setSheet(null)} onOpen={onOpen} />
+
+ if (!rows.length) {
+ return (
+ <>
+ {t('challenges.title')}
+
+
+
+
+
+ {t('challenges.emptyTitle')}
+ {t('challenges.emptyText')}
+
+
+
+
+
+
+ {sheetEl}
+ >
+ )
+ }
+
+ return (
+ <>
+ setSheet({ kind: 'list' })}>{t('challenges.manage')}}>{t('challenges.title')}
+
+ {partyRow && (
+
+
+
+
+
+
+ {t('challenges.celebrate')}
+ {t('challenges.celebrateText', { name: challengeTitle(partyRow.c) })}
+
+
+
+ )}
+
+
+ {shown.map(({ c, p }) => (
+ setSheet({ kind: 'detail', id: c.id })} />
+ ))}
+
+ {rows.length > HOME_MAX && (
+
+ )}
+ {sheetEl}
+ >
+ )
+}
+
+const rank = (s: string) => (s === 'active' ? 0 : s === 'upcoming' ? 1 : 2)
diff --git a/src/components/challenges/ChallengesSheet.tsx b/src/components/challenges/ChallengesSheet.tsx
new file mode 100644
index 0000000..14f90b9
--- /dev/null
+++ b/src/components/challenges/ChallengesSheet.tsx
@@ -0,0 +1,420 @@
+import { Archive, ArchiveRestore, ArrowLeft, Info, Minus, Pencil, Plus, RotateCcw, Trash2, Trophy, X } from 'lucide-react'
+import { useMemo, useState, type ReactNode } from 'react'
+import { fmtNumber, t } from '../../i18n'
+import {
+ challengeTitle,
+ computeProgress,
+ formatDay,
+ fromTemplate,
+ MAX_CHALLENGES,
+ mediaLabel,
+ NAME_MAX,
+ newChallengeId,
+ periodBounds,
+ periodLabel,
+ quantity,
+ renewed,
+ TARGET_MAX,
+ TEMPLATES,
+ type ChallengeProgress,
+} from '../../lib/challenges'
+import { MEDIA_TYPES } from '../../lib/constants'
+import { useEscape } from '../../lib/escape'
+import { useScrollLock } from '../../lib/scrollLock'
+import { cx, todayISO } from '../../lib/utils'
+import { useMedia } from '../../store'
+import type { Challenge, MediaItem } from '../../types'
+import ConfirmDialog from '../ConfirmDialog'
+import Poster from '../Poster'
+import { ChallengeSummary, daysText, paceText, ProgressRing } from './ChallengeBits'
+
+export type ChallengesView = { kind: 'list' } | { kind: 'new' } | { kind: 'edit'; id: string } | { kind: 'detail'; id: string }
+
+interface Props {
+ initial?: ChallengesView
+ onClose: () => void
+ onOpen: (item: MediaItem) => void
+}
+
+/** Gestion des défis : liste, création / modification, détail (titres comptés). */
+export default function ChallengesSheet({ initial = { kind: 'list' }, onClose, onOpen }: Props) {
+ const { items, settings, updateSettings } = useMedia()
+ const challenges = useMemo(() => settings.challenges ?? [], [settings.challenges])
+ const [stack, setStack] = useState([initial])
+ const view = stack[stack.length - 1]
+ const push = (v: ChallengesView) => setStack((s) => [...s, v])
+ const back = () => (stack.length > 1 ? setStack((s) => s.slice(0, -1)) : onClose())
+ const replace = (v: ChallengesView) => setStack((s) => [...s.slice(0, -1), v])
+
+ useScrollLock()
+ useEscape(back)
+
+ const save = (list: Challenge[]) => updateSettings({ challenges: list.slice(0, MAX_CHALLENGES) })
+ const upsert = (c: Challenge) => save(challenges.some((x) => x.id === c.id) ? challenges.map((x) => (x.id === c.id ? c : x)) : [...challenges, c])
+ const full = challenges.length >= MAX_CHALLENGES
+
+ const current = view.kind === 'edit' || view.kind === 'detail' ? challenges.find((c) => c.id === view.id) : undefined
+
+ let title: string
+ let body: ReactNode
+ if (view.kind === 'new' || (view.kind === 'edit' && current)) {
+ title = view.kind === 'new' ? t('challenges.new') : t('challenges.edit')
+ body = (
+ {
+ upsert(c)
+ if (view.kind === 'new') replace({ kind: 'detail', id: c.id })
+ else back()
+ }}
+ />
+ )
+ } else if (view.kind === 'detail' && current) {
+ title = t('challenges.title')
+ body = (
+ push({ kind: 'edit', id: current.id })}
+ onArchive={() => upsert({ ...current, archived: current.archived ? undefined : true })}
+ onRenew={
+ full
+ ? undefined
+ : () => {
+ const next = renewed(current)
+ save([...challenges.map((x) => (x.id === current.id ? { ...x, archived: true } : x)), next])
+ replace({ kind: 'detail', id: next.id })
+ }
+ }
+ onDelete={() => {
+ save(challenges.filter((x) => x.id !== current.id))
+ back()
+ }}
+ />
+ )
+ } else {
+ title = t('challenges.title')
+ body = (
+ push({ kind: 'new' })}
+ onPick={(id) => push({ kind: 'detail', id })}
+ onTemplate={(c) => {
+ upsert(c)
+ push({ kind: 'detail', id: c.id })
+ }}
+ />
+ )
+ }
+
+ return (
+
+
+
+
+
{title}
+
+
+
+
+
+ )
+}
+
+// ─── Liste ───
+
+/** Avec un nom perso, on rappelle ce qui est compté. */
+function mediaLabelIfNamed(c: Challenge) {
+ return c.name ? challengeTitle({ ...c, name: undefined }) : null
+}
+
+function ChallengeList({ challenges, items, full, onNew, onPick, onTemplate }: { challenges: Challenge[]; items: MediaItem[]; full: boolean; onNew: () => void; onPick: (id: string) => void; onTemplate: (c: Challenge) => void }) {
+ const rows = useMemo(() => challenges.map((c) => ({ c, p: computeProgress(c, items) })), [challenges, items])
+ const today = todayISO()
+ const active = rows.filter((r) => !r.c.archived && r.c.end >= today)
+ const finished = rows.filter((r) => !r.c.archived && r.c.end < today)
+ const archived = rows.filter((r) => r.c.archived)
+ // Modèles pas encore utilisés sur la période en cours
+ const templates = TEMPLATES.map((tpl) => fromTemplate(tpl)).filter(
+ (tpl) => !challenges.some((c) => !c.archived && c.target === tpl.target && c.media === tpl.media && c.unit === tpl.unit && c.start === tpl.start && c.end === tpl.end),
+ )
+
+ const section = (label: string, list: typeof rows) =>
+ list.length > 0 && (
+
+ {label}
+
+ {list.map(({ c, p }) => (
+ onPick(c.id)} />
+ ))}
+
+
+ )
+
+ return (
+ <>
+
+ {full && {t('challenges.limit', { n: MAX_CHALLENGES })}
}
+
+ {!full && templates.length > 0 && (
+
+ {t('challenges.templates')}
+
+ {templates.map((tpl) => (
+
+ ))}
+
+
+ )}
+
+ {section(t('challenges.active'), active)}
+ {section(t('challenges.finished'), finished)}
+ {section(t('challenges.archived'), archived)}
+ >
+ )
+}
+
+// ─── Détail ───
+
+function ChallengeDetail({ c, items, onOpen, onEdit, onArchive, onRenew, onDelete }: { c: Challenge; items: MediaItem[]; onOpen: (item: MediaItem) => void; onEdit: () => void; onArchive: () => void; onRenew?: () => void; onDelete: () => void }) {
+ const p = useMemo(() => computeProgress(c, items), [c, items])
+ const [confirm, setConfirm] = useState(false)
+ const days = daysText(p)
+ const ended = c.end < todayISO()
+ return (
+ <>
+
+
+
+ {fmtNumber(p.count)}
+ / {fmtNumber(c.target)}
+
+
+
{challengeTitle(c)}
+
{[mediaLabelIfNamed(c), periodLabel(c)].filter(Boolean).join(' · ')}
+ {p.done ? (
+
+ {paceText(c, p)}
+
+ ) : (
+
{[paceText(c, p), days].filter(Boolean).join(' · ')}
+ )}
+
+
+
+
+
+ {ended && onRenew && (
+
+ )}
+
+
+
+
+ {t('challenges.counted')} · {fmtNumber(p.entries.length)}
+
+ {p.entries.length === 0 ? (
+ {t('challenges.countedEmpty')}
+ ) : (
+
+ {p.entries.map((e) => (
+ -
+
+
+ ))}
+
+ )}
+ {p.estimated && (
+
+ {t('challenges.estimated')}
+
+ )}
+
+ setConfirm(false)}
+ onConfirm={() => {
+ setConfirm(false)
+ onDelete()
+ }}
+ />
+ >
+ )
+}
+
+// ─── Formulaire ───
+
+const UNITS: Challenge['unit'][] = ['titles', 'episodes']
+const PERIODS: Challenge['period'][] = ['week', 'month', 'year', 'custom']
+
+function ChallengeForm({ initial, items, onSave }: { initial?: Challenge; items: MediaItem[]; onSave: (c: Challenge) => void }) {
+ const [draft, setDraft] = useState(() => initial ?? { id: newChallengeId(), target: 12, media: 'film', unit: 'titles', period: 'year', ...periodBounds('year') })
+ const [targetText, setTargetText] = useState(String(draft.target))
+ const set = (patch: Partial) => setDraft((d) => ({ ...d, ...patch }))
+
+ const setTarget = (n: number) => {
+ const v = Math.min(TARGET_MAX, Math.max(1, Math.round(n) || 1))
+ set({ target: v })
+ setTargetText(String(v))
+ }
+ const setPeriod = (period: Challenge['period']) => {
+ if (period === draft.period) return
+ if (period === 'custom') set({ period })
+ else set({ period, ...periodBounds(period) })
+ }
+ const setMedia = (media: Challenge['media']) => set(media === 'film' ? { media, unit: 'titles' } : { media })
+
+ const valid = draft.target >= 1 && !!draft.start && !!draft.end && draft.end >= draft.start
+ const preview = useMemo(() => (valid ? computeProgress(draft, items) : null), [draft, items, valid])
+
+ return (
+
+ )
+}
diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts
index f043a88..734f8a4 100644
--- a/src/i18n/locales/ar.ts
+++ b/src/i18n/locales/ar.ts
@@ -1035,6 +1035,121 @@ const dict: Translations = {
'sync.pending_two': "تعديلان في الانتظار",
'sync.pending_few': "{count} تعديلات في الانتظار",
'sync.pending_many': "{count} تعديلًا في الانتظار",
+
+ // — Défis —
+ 'challenges.title': "التحديات",
+ 'challenges.manage': "إدارة",
+ 'challenges.emptyTitle': "حدّد لنفسك هدفًا",
+ 'challenges.emptyText': "52 فيلمًا هذا العام، أنمي كل أسبوع… يُحسب التقدّم تلقائيًا.",
+ 'challenges.create': "إنشاء تحدٍّ",
+ 'challenges.new': "تحدٍّ جديد",
+ 'challenges.edit': "تعديل التحدي",
+ 'challenges.templates': "أفكار للتحديات",
+ 'challenges.target': "الهدف",
+ 'challenges.media': "النوع",
+ 'challenges.unit': "احتساب",
+ 'challenges.unit.titles': "العناوين المكتملة",
+ 'challenges.unit.episodes': "الحلقات المُشاهدة",
+ 'challenges.period': "الفترة",
+ 'challenges.period.week': "هذا الأسبوع",
+ 'challenges.period.month': "هذا الشهر",
+ 'challenges.period.year': "هذا العام",
+ 'challenges.period.custom': "تواريخ مخصّصة",
+ 'challenges.from': "من",
+ 'challenges.to': "إلى",
+ 'challenges.name': "الاسم (اختياري)",
+ 'challenges.preview': "بالفعل {what} في هذه الفترة",
+ 'challenges.ahead': "متقدّم بـ {what}",
+ 'challenges.behind': "متأخر بـ {what}",
+ 'challenges.onPace': "ضمن الإيقاع",
+ 'challenges.lastDay': "اليوم الأخير",
+ 'challenges.doneOn': "تحقّق في {date}",
+ 'challenges.done': "تحقّق",
+ 'challenges.missed': "لم يتحقّق",
+ 'challenges.weekOf': "أسبوع {date}",
+ 'challenges.progress': "{count} من {target}",
+ 'challenges.active': "جارية",
+ 'challenges.finished': "منتهية",
+ 'challenges.archived': "مؤرشفة",
+ 'challenges.archive': "أرشفة",
+ 'challenges.unarchive': "إلغاء الأرشفة",
+ 'challenges.renew': "البدء من جديد",
+ 'challenges.deleteTitle': "حذف هذا التحدي؟",
+ 'challenges.deleteText': "لن تتغيّر مكتبتك.",
+ 'challenges.counted': "المحتسَب في هذا التحدي",
+ 'challenges.countedEmpty': "لا شيء بعد في هذه الفترة.",
+ 'challenges.rewatch': "إعادة مشاهدة",
+ 'challenges.estimated': "بعض الحلقات بلا تاريخ دقيق: تُوزَّع بين بداية المشاهدة ونهايتها (تقدير).",
+ 'challenges.celebrate': "تحقّق التحدي!",
+ 'challenges.celebrateText': "{name} — أحسنت!",
+ 'challenges.limit': "{n} تحديًا كحدّ أقصى: أرشِف واحدًا أو احذفه.",
+ 'challenges.back': "رجوع",
+ 'challenges.qty.title_zero': "لا عناوين",
+ 'challenges.qty.title_one': "عنوان واحد",
+ 'challenges.qty.title_two': "عنوانان",
+ 'challenges.qty.title_few': "{count} عناوين",
+ 'challenges.qty.title_many': "{count} عنوانًا",
+ 'challenges.qty.title_other': "{count} عنوان",
+ 'challenges.qty.film_zero': "لا أفلام",
+ 'challenges.qty.film_one': "فيلم واحد",
+ 'challenges.qty.film_two': "فيلمان",
+ 'challenges.qty.film_few': "{count} أفلام",
+ 'challenges.qty.film_many': "{count} فيلمًا",
+ 'challenges.qty.film_other': "{count} فيلم",
+ 'challenges.qty.serie_zero': "لا مسلسلات",
+ 'challenges.qty.serie_one': "مسلسل واحد",
+ 'challenges.qty.serie_two': "مسلسلان",
+ 'challenges.qty.serie_few': "{count} مسلسلات",
+ 'challenges.qty.serie_many': "{count} مسلسلًا",
+ 'challenges.qty.serie_other': "{count} مسلسل",
+ 'challenges.qty.anime_zero': "لا أنمي",
+ 'challenges.qty.anime_one': "أنمي واحد",
+ 'challenges.qty.anime_two': "أنمي اثنان",
+ 'challenges.qty.anime_few': "{count} أنمي",
+ 'challenges.qty.anime_many': "{count} أنمي",
+ 'challenges.qty.anime_other': "{count} أنمي",
+ 'challenges.qty.kdrama_zero': "لا دراما كورية",
+ 'challenges.qty.kdrama_one': "دراما كورية واحدة",
+ 'challenges.qty.kdrama_two': "دراماتان كوريتان",
+ 'challenges.qty.kdrama_few': "{count} دراما كورية",
+ 'challenges.qty.kdrama_many': "{count} دراما كورية",
+ 'challenges.qty.kdrama_other': "{count} دراما كورية",
+ 'challenges.qty.cdrama_zero': "لا دراما صينية",
+ 'challenges.qty.cdrama_one': "دراما صينية واحدة",
+ 'challenges.qty.cdrama_two': "دراماتان صينيتان",
+ 'challenges.qty.cdrama_few': "{count} دراما صينية",
+ 'challenges.qty.cdrama_many': "{count} دراما صينية",
+ 'challenges.qty.cdrama_other': "{count} دراما صينية",
+ 'challenges.qty.autre_zero': "لا عناوين أخرى",
+ 'challenges.qty.autre_one': "عنوان آخر واحد",
+ 'challenges.qty.autre_two': "عنوانان آخران",
+ 'challenges.qty.autre_few': "{count} عناوين أخرى",
+ 'challenges.qty.autre_many': "{count} عنوانًا آخر",
+ 'challenges.qty.autre_other': "{count} عنوان آخر",
+ 'challenges.qty.episode_zero': "لا حلقات",
+ 'challenges.qty.episode_one': "حلقة واحدة",
+ 'challenges.qty.episode_two': "حلقتان",
+ 'challenges.qty.episode_few': "{count} حلقات",
+ 'challenges.qty.episode_many': "{count} حلقة",
+ 'challenges.qty.episode_other': "{count} حلقة",
+ 'challenges.daysLeft_zero': "لم يتبقَّ أي يوم",
+ 'challenges.daysLeft_one': "يتبقّى يوم واحد",
+ 'challenges.daysLeft_two': "يتبقّى يومان",
+ 'challenges.daysLeft_few': "يتبقّى {count} أيام",
+ 'challenges.daysLeft_many': "يتبقّى {count} يومًا",
+ 'challenges.daysLeft_other': "يتبقّى {count} يوم",
+ 'challenges.startsIn_zero': "يبدأ اليوم",
+ 'challenges.startsIn_one': "يبدأ بعد يوم واحد",
+ 'challenges.startsIn_two': "يبدأ بعد يومين",
+ 'challenges.startsIn_few': "يبدأ بعد {count} أيام",
+ 'challenges.startsIn_many': "يبدأ بعد {count} يومًا",
+ 'challenges.startsIn_other': "يبدأ بعد {count} يوم",
+ 'challenges.more_zero': "+ {count}",
+ 'challenges.more_one': "+ تحدٍّ آخر",
+ 'challenges.more_two': "+ تحدّيان آخران",
+ 'challenges.more_few': "+ {count} تحديات أخرى",
+ 'challenges.more_many': "+ {count} تحديًا آخر",
+ 'challenges.more_other': "+ {count} تحدٍّ آخر",
}
export default dict
diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts
index 27a5e64..8bbe1eb 100644
--- a/src/i18n/locales/de.ts
+++ b/src/i18n/locales/de.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} Änderung ausstehend",
'sync.pending_other': "{count} Änderungen ausstehend",
'sync.now': "Jetzt synchronisieren",
+
+ // — Défis —
+ 'challenges.title': "Challenges",
+ 'challenges.manage': "Verwalten",
+ 'challenges.emptyTitle': "Setz dir ein Ziel",
+ 'challenges.emptyText': "52 Filme dieses Jahr, ein Anime pro Woche… Der Fortschritt wird automatisch berechnet.",
+ 'challenges.create': "Challenge erstellen",
+ 'challenges.new': "Neue Challenge",
+ 'challenges.edit': "Challenge bearbeiten",
+ 'challenges.templates': "Ideen für Challenges",
+ 'challenges.target': "Ziel",
+ 'challenges.media': "Typ",
+ 'challenges.unit': "Zählen",
+ 'challenges.unit.titles': "Beendete Titel",
+ 'challenges.unit.episodes': "Gesehene Folgen",
+ 'challenges.period': "Zeitraum",
+ 'challenges.period.week': "Diese Woche",
+ 'challenges.period.month': "Diesen Monat",
+ 'challenges.period.year': "Dieses Jahr",
+ 'challenges.period.custom': "Eigene Daten",
+ 'challenges.from': "Von",
+ 'challenges.to': "Bis",
+ 'challenges.name': "Name (optional)",
+ 'challenges.preview': "Schon {what} in diesem Zeitraum",
+ 'challenges.ahead': "{what} Vorsprung",
+ 'challenges.behind': "{what} Rückstand",
+ 'challenges.onPace': "Im Plan",
+ 'challenges.lastDay': "Letzter Tag",
+ 'challenges.doneOn': "Geschafft am {date}",
+ 'challenges.done': "Geschafft",
+ 'challenges.missed': "Nicht erreicht",
+ 'challenges.weekOf': "Woche vom {date}",
+ 'challenges.progress': "{count} von {target}",
+ 'challenges.active': "Laufend",
+ 'challenges.finished': "Beendet",
+ 'challenges.archived': "Archiviert",
+ 'challenges.archive': "Archivieren",
+ 'challenges.unarchive': "Wiederherstellen",
+ 'challenges.renew': "Neu starten",
+ 'challenges.deleteTitle': "Diese Challenge löschen?",
+ 'challenges.deleteText': "Deine Bibliothek bleibt unverändert.",
+ 'challenges.counted': "In dieser Challenge gezählt",
+ 'challenges.countedEmpty': "Noch nichts in diesem Zeitraum.",
+ 'challenges.rewatch': "Erneut gesehen",
+ 'challenges.estimated': "Manche Folgen haben kein genaues Datum: Sie werden zwischen Beginn und Ende des Schauens verteilt (Schätzung).",
+ 'challenges.celebrate': "Challenge geschafft!",
+ 'challenges.celebrateText': "{name} — super!",
+ 'challenges.limit': "Maximal {n} Challenges: archiviere oder lösche eine.",
+ 'challenges.back': "Zurück",
+ 'challenges.qty.title_one': "{count} Titel",
+ 'challenges.qty.title_other': "{count} Titel",
+ 'challenges.qty.film_one': "{count} Film",
+ 'challenges.qty.film_other': "{count} Filme",
+ 'challenges.qty.serie_one': "{count} Serie",
+ 'challenges.qty.serie_other': "{count} Serien",
+ 'challenges.qty.anime_one': "{count} Anime",
+ 'challenges.qty.anime_other': "{count} Animes",
+ 'challenges.qty.kdrama_one': "{count} K-Drama",
+ 'challenges.qty.kdrama_other': "{count} K-Dramas",
+ 'challenges.qty.cdrama_one': "{count} C-Drama",
+ 'challenges.qty.cdrama_other': "{count} C-Dramas",
+ 'challenges.qty.autre_one': "{count} anderer Titel",
+ 'challenges.qty.autre_other': "{count} andere Titel",
+ 'challenges.qty.episode_one': "{count} Folge",
+ 'challenges.qty.episode_other': "{count} Folgen",
+ 'challenges.daysLeft_one': "Noch {count} Tag",
+ 'challenges.daysLeft_other': "Noch {count} Tage",
+ 'challenges.startsIn_one': "Beginnt in {count} Tag",
+ 'challenges.startsIn_other': "Beginnt in {count} Tagen",
+ 'challenges.more_one': "+ {count} weitere Challenge",
+ 'challenges.more_other': "+ {count} weitere Challenges",
}
export default dict
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts
index 485d651..d57391d 100644
--- a/src/i18n/locales/en.ts
+++ b/src/i18n/locales/en.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} change waiting",
'sync.pending_other': "{count} changes waiting",
'sync.now': "Sync now",
+
+ // — Défis —
+ 'challenges.title': "Challenges",
+ 'challenges.manage': "Manage",
+ 'challenges.emptyTitle': "Set yourself a goal",
+ 'challenges.emptyText': "52 films this year, an anime a week… Progress is tracked automatically.",
+ 'challenges.create': "Create a challenge",
+ 'challenges.new': "New challenge",
+ 'challenges.edit': "Edit challenge",
+ 'challenges.templates': "Challenge ideas",
+ 'challenges.target': "Goal",
+ 'challenges.media': "Type",
+ 'challenges.unit': "Count",
+ 'challenges.unit.titles': "Finished titles",
+ 'challenges.unit.episodes': "Episodes watched",
+ 'challenges.period': "Period",
+ 'challenges.period.week': "This week",
+ 'challenges.period.month': "This month",
+ 'challenges.period.year': "This year",
+ 'challenges.period.custom': "Custom dates",
+ 'challenges.from': "From",
+ 'challenges.to': "To",
+ 'challenges.name': "Name (optional)",
+ 'challenges.preview': "Already {what} in this period",
+ 'challenges.ahead': "{what} ahead",
+ 'challenges.behind': "{what} behind",
+ 'challenges.onPace': "On pace",
+ 'challenges.lastDay': "Last day",
+ 'challenges.doneOn': "Completed on {date}",
+ 'challenges.done': "Completed",
+ 'challenges.missed': "Not reached",
+ 'challenges.weekOf': "Week of {date}",
+ 'challenges.progress': "{count} of {target}",
+ 'challenges.active': "In progress",
+ 'challenges.finished': "Finished",
+ 'challenges.archived': "Archived",
+ 'challenges.archive': "Archive",
+ 'challenges.unarchive': "Unarchive",
+ 'challenges.renew': "Start again",
+ 'challenges.deleteTitle': "Delete this challenge?",
+ 'challenges.deleteText': "Your library stays unchanged.",
+ 'challenges.counted': "Counted in this challenge",
+ 'challenges.countedEmpty': "Nothing yet in this period.",
+ 'challenges.rewatch': "Rewatch",
+ 'challenges.estimated': "Some episodes have no exact date: they are spread between the start and end of watching (estimate).",
+ 'challenges.celebrate': "Challenge completed!",
+ 'challenges.celebrateText': "{name} — well done!",
+ 'challenges.limit': "Up to {n} challenges: archive or delete one.",
+ 'challenges.back': "Back",
+ 'challenges.qty.title_one': "{count} title",
+ 'challenges.qty.title_other': "{count} titles",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} films",
+ 'challenges.qty.serie_one': "{count} series",
+ 'challenges.qty.serie_other': "{count} series",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-dramas",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-dramas",
+ 'challenges.qty.autre_one': "{count} other title",
+ 'challenges.qty.autre_other': "{count} other titles",
+ 'challenges.qty.episode_one': "{count} episode",
+ 'challenges.qty.episode_other': "{count} episodes",
+ 'challenges.daysLeft_one': "{count} day left",
+ 'challenges.daysLeft_other': "{count} days left",
+ 'challenges.startsIn_one': "Starts in {count} day",
+ 'challenges.startsIn_other': "Starts in {count} days",
+ 'challenges.more_one': "+ {count} more challenge",
+ 'challenges.more_other': "+ {count} more challenges",
}
export default dict
diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts
index 7cf4d14..03ac3d3 100644
--- a/src/i18n/locales/es.ts
+++ b/src/i18n/locales/es.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} cambio pendiente",
'sync.pending_other': "{count} cambios pendientes",
'sync.now': "Sincronizar",
+
+ // — Défis —
+ 'challenges.title': "Retos",
+ 'challenges.manage': "Gestionar",
+ 'challenges.emptyTitle': "Fíjate un objetivo",
+ 'challenges.emptyText': "52 películas este año, un anime por semana… El progreso se calcula solo.",
+ 'challenges.create': "Crear un reto",
+ 'challenges.new': "Nuevo reto",
+ 'challenges.edit': "Editar reto",
+ 'challenges.templates': "Ideas de retos",
+ 'challenges.target': "Objetivo",
+ 'challenges.media': "Tipo",
+ 'challenges.unit': "Contar",
+ 'challenges.unit.titles': "Títulos terminados",
+ 'challenges.unit.episodes': "Episodios vistos",
+ 'challenges.period': "Periodo",
+ 'challenges.period.week': "Esta semana",
+ 'challenges.period.month': "Este mes",
+ 'challenges.period.year': "Este año",
+ 'challenges.period.custom': "Fechas libres",
+ 'challenges.from': "Del",
+ 'challenges.to': "Al",
+ 'challenges.name': "Nombre (opcional)",
+ 'challenges.preview': "Ya {what} en este periodo",
+ 'challenges.ahead': "{what} de ventaja",
+ 'challenges.behind': "{what} de retraso",
+ 'challenges.onPace': "Al ritmo",
+ 'challenges.lastDay': "Último día",
+ 'challenges.doneOn': "Logrado el {date}",
+ 'challenges.done': "Logrado",
+ 'challenges.missed': "No alcanzado",
+ 'challenges.weekOf': "Semana del {date}",
+ 'challenges.progress': "{count} de {target}",
+ 'challenges.active': "En curso",
+ 'challenges.finished': "Terminados",
+ 'challenges.archived': "Archivados",
+ 'challenges.archive': "Archivar",
+ 'challenges.unarchive': "Desarchivar",
+ 'challenges.renew': "Volver a empezar",
+ 'challenges.deleteTitle': "¿Eliminar este reto?",
+ 'challenges.deleteText': "Tu biblioteca no cambia.",
+ 'challenges.counted': "Contados en este reto",
+ 'challenges.countedEmpty': "Nada por ahora en este periodo.",
+ 'challenges.rewatch': "Revisto",
+ 'challenges.estimated': "Algunos episodios no tienen fecha exacta: se reparten entre el inicio y el final del visionado (estimación).",
+ 'challenges.celebrate': "¡Reto logrado!",
+ 'challenges.celebrateText': "{name} — ¡bravo!",
+ 'challenges.limit': "Máximo {n} retos: archiva o elimina uno.",
+ 'challenges.back': "Volver",
+ 'challenges.qty.title_one': "{count} título",
+ 'challenges.qty.title_other': "{count} títulos",
+ 'challenges.qty.film_one': "{count} película",
+ 'challenges.qty.film_other': "{count} películas",
+ 'challenges.qty.serie_one': "{count} serie",
+ 'challenges.qty.serie_other': "{count} series",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} animes",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-dramas",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-dramas",
+ 'challenges.qty.autre_one': "{count} otro título",
+ 'challenges.qty.autre_other': "{count} otros títulos",
+ 'challenges.qty.episode_one': "{count} episodio",
+ 'challenges.qty.episode_other': "{count} episodios",
+ 'challenges.daysLeft_one': "Queda {count} día",
+ 'challenges.daysLeft_other': "Quedan {count} días",
+ 'challenges.startsIn_one': "Empieza en {count} día",
+ 'challenges.startsIn_other': "Empieza en {count} días",
+ 'challenges.more_one': "+ {count} reto más",
+ 'challenges.more_other': "+ {count} retos más",
}
export default dict
diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts
index 1898226..36e0de9 100644
--- a/src/i18n/locales/fr.ts
+++ b/src/i18n/locales/fr.ts
@@ -899,6 +899,77 @@ const dict = {
'sync.pending_one': "{count} modification en attente",
'sync.pending_other': "{count} modifications en attente",
'sync.now': "Synchroniser",
+
+ // — Défis —
+ 'challenges.title': "Défis",
+ 'challenges.manage': "Gérer",
+ 'challenges.emptyTitle': "Fixez-vous un objectif",
+ 'challenges.emptyText': "52 films cette année, un anime par semaine… La progression se calcule toute seule.",
+ 'challenges.create': "Créer un défi",
+ 'challenges.new': "Nouveau défi",
+ 'challenges.edit': "Modifier le défi",
+ 'challenges.templates': "Idées de défis",
+ 'challenges.target': "Objectif",
+ 'challenges.media': "Type",
+ 'challenges.unit': "Compter",
+ 'challenges.unit.titles': "Titres terminés",
+ 'challenges.unit.episodes': "Épisodes vus",
+ 'challenges.period': "Période",
+ 'challenges.period.week': "Cette semaine",
+ 'challenges.period.month': "Ce mois-ci",
+ 'challenges.period.year': "Cette année",
+ 'challenges.period.custom': "Dates libres",
+ 'challenges.from': "Du",
+ 'challenges.to': "Au",
+ 'challenges.name': "Nom (facultatif)",
+ 'challenges.preview': "Déjà {what} sur cette période",
+ 'challenges.ahead': "{what} d’avance",
+ 'challenges.behind': "{what} de retard",
+ 'challenges.onPace': "Dans le rythme",
+ 'challenges.lastDay': "Dernier jour",
+ 'challenges.doneOn': "Réussi le {date}",
+ 'challenges.done': "Réussi",
+ 'challenges.missed': "Non atteint",
+ 'challenges.weekOf': "Semaine du {date}",
+ 'challenges.progress': "{count} sur {target}",
+ 'challenges.active': "En cours",
+ 'challenges.finished': "Terminés",
+ 'challenges.archived': "Archivés",
+ 'challenges.archive': "Archiver",
+ 'challenges.unarchive': "Désarchiver",
+ 'challenges.renew': "Recommencer",
+ 'challenges.deleteTitle': "Supprimer ce défi ?",
+ 'challenges.deleteText': "Votre bibliothèque ne change pas.",
+ 'challenges.counted': "Comptés dans ce défi",
+ 'challenges.countedEmpty': "Rien pour l’instant sur cette période.",
+ 'challenges.rewatch': "Revu",
+ 'challenges.estimated': "Certains épisodes n’ont pas de date précise : ils sont répartis entre le début et la fin du visionnage (estimation).",
+ 'challenges.celebrate': "Défi réussi !",
+ 'challenges.celebrateText': "{name} — bravo !",
+ 'challenges.limit': "Maximum {n} défis : archivez ou supprimez-en un.",
+ 'challenges.back': "Retour",
+ 'challenges.qty.title_one': "{count} titre",
+ 'challenges.qty.title_other': "{count} titres",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} films",
+ 'challenges.qty.serie_one': "{count} série",
+ 'challenges.qty.serie_other': "{count} séries",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} animes",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-dramas",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-dramas",
+ 'challenges.qty.autre_one': "{count} autre titre",
+ 'challenges.qty.autre_other': "{count} autres titres",
+ 'challenges.qty.episode_one': "{count} épisode",
+ 'challenges.qty.episode_other': "{count} épisodes",
+ 'challenges.daysLeft_one': "Encore {count} jour",
+ 'challenges.daysLeft_other': "Encore {count} jours",
+ 'challenges.startsIn_one': "Commence dans {count} jour",
+ 'challenges.startsIn_other': "Commence dans {count} jours",
+ 'challenges.more_one': "+ {count} autre défi",
+ 'challenges.more_other': "+ {count} autres défis",
}
export default dict
diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts
index db825eb..a41536d 100644
--- a/src/i18n/locales/hi.ts
+++ b/src/i18n/locales/hi.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} बदलाव बाकी",
'sync.pending_other': "{count} बदलाव बाकी",
'sync.now': "अभी सिंक करें",
+
+ // — Défis —
+ 'challenges.title': "चुनौतियाँ",
+ 'challenges.manage': "प्रबंधित करें",
+ 'challenges.emptyTitle': "अपने लिए एक लक्ष्य तय करें",
+ 'challenges.emptyText': "इस साल 52 फ़िल्में, हर हफ़्ते एक एनीमे… प्रगति अपने आप गिनी जाती है।",
+ 'challenges.create': "चुनौती बनाएँ",
+ 'challenges.new': "नई चुनौती",
+ 'challenges.edit': "चुनौती बदलें",
+ 'challenges.templates': "चुनौतियों के सुझाव",
+ 'challenges.target': "लक्ष्य",
+ 'challenges.media': "प्रकार",
+ 'challenges.unit': "गिनें",
+ 'challenges.unit.titles': "पूरे किए गए शीर्षक",
+ 'challenges.unit.episodes': "देखे गए एपिसोड",
+ 'challenges.period': "अवधि",
+ 'challenges.period.week': "इस हफ़्ते",
+ 'challenges.period.month': "इस महीने",
+ 'challenges.period.year': "इस साल",
+ 'challenges.period.custom': "अपनी तारीख़ें",
+ 'challenges.from': "से",
+ 'challenges.to': "तक",
+ 'challenges.name': "नाम (वैकल्पिक)",
+ 'challenges.preview': "इस अवधि में पहले ही {what}",
+ 'challenges.ahead': "{what} आगे",
+ 'challenges.behind': "{what} पीछे",
+ 'challenges.onPace': "रफ़्तार पर",
+ 'challenges.lastDay': "आख़िरी दिन",
+ 'challenges.doneOn': "{date} को पूरा हुआ",
+ 'challenges.done': "पूरा हुआ",
+ 'challenges.missed': "पूरा नहीं हुआ",
+ 'challenges.weekOf': "{date} वाला हफ़्ता",
+ 'challenges.progress': "{target} में से {count}",
+ 'challenges.active': "जारी",
+ 'challenges.finished': "समाप्त",
+ 'challenges.archived': "संग्रहित",
+ 'challenges.archive': "संग्रहित करें",
+ 'challenges.unarchive': "संग्रह से हटाएँ",
+ 'challenges.renew': "फिर से शुरू करें",
+ 'challenges.deleteTitle': "यह चुनौती हटाएँ?",
+ 'challenges.deleteText': "आपकी लाइब्रेरी नहीं बदलेगी।",
+ 'challenges.counted': "इस चुनौती में गिने गए",
+ 'challenges.countedEmpty': "इस अवधि में अभी कुछ नहीं।",
+ 'challenges.rewatch': "दोबारा देखा",
+ 'challenges.estimated': "कुछ एपिसोड की सटीक तारीख़ नहीं है: उन्हें देखने की शुरुआत और अंत के बीच बाँटा गया है (अनुमान)।",
+ 'challenges.celebrate': "चुनौती पूरी!",
+ 'challenges.celebrateText': "{name} — शाबाश!",
+ 'challenges.limit': "अधिकतम {n} चुनौतियाँ: किसी एक को संग्रहित करें या हटाएँ।",
+ 'challenges.back': "वापस",
+ 'challenges.qty.title_one': "{count} शीर्षक",
+ 'challenges.qty.title_other': "{count} शीर्षक",
+ 'challenges.qty.film_one': "{count} फ़िल्म",
+ 'challenges.qty.film_other': "{count} फ़िल्में",
+ 'challenges.qty.serie_one': "{count} सीरीज़",
+ 'challenges.qty.serie_other': "{count} सीरीज़",
+ 'challenges.qty.anime_one': "{count} एनीमे",
+ 'challenges.qty.anime_other': "{count} एनीमे",
+ 'challenges.qty.kdrama_one': "{count} के-ड्रामा",
+ 'challenges.qty.kdrama_other': "{count} के-ड्रामा",
+ 'challenges.qty.cdrama_one': "{count} सी-ड्रामा",
+ 'challenges.qty.cdrama_other': "{count} सी-ड्रामा",
+ 'challenges.qty.autre_one': "{count} अन्य शीर्षक",
+ 'challenges.qty.autre_other': "{count} अन्य शीर्षक",
+ 'challenges.qty.episode_one': "{count} एपिसोड",
+ 'challenges.qty.episode_other': "{count} एपिसोड",
+ 'challenges.daysLeft_one': "{count} दिन बाक़ी",
+ 'challenges.daysLeft_other': "{count} दिन बाक़ी",
+ 'challenges.startsIn_one': "{count} दिन में शुरू",
+ 'challenges.startsIn_other': "{count} दिन में शुरू",
+ 'challenges.more_one': "+ {count} और चुनौती",
+ 'challenges.more_other': "+ {count} और चुनौतियाँ",
}
export default dict
diff --git a/src/i18n/locales/id.ts b/src/i18n/locales/id.ts
index 5da9809..b645a0d 100644
--- a/src/i18n/locales/id.ts
+++ b/src/i18n/locales/id.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} perubahan menunggu",
'sync.pending_other': "{count} perubahan menunggu",
'sync.now': "Sinkronkan",
+
+ // — Défis —
+ 'challenges.title': "Tantangan",
+ 'challenges.manage': "Kelola",
+ 'challenges.emptyTitle': "Tetapkan target",
+ 'challenges.emptyText': "52 film tahun ini, satu anime per minggu… Progres dihitung otomatis.",
+ 'challenges.create': "Buat tantangan",
+ 'challenges.new': "Tantangan baru",
+ 'challenges.edit': "Edit tantangan",
+ 'challenges.templates': "Ide tantangan",
+ 'challenges.target': "Target",
+ 'challenges.media': "Jenis",
+ 'challenges.unit': "Hitung",
+ 'challenges.unit.titles': "Judul selesai",
+ 'challenges.unit.episodes': "Episode ditonton",
+ 'challenges.period': "Periode",
+ 'challenges.period.week': "Minggu ini",
+ 'challenges.period.month': "Bulan ini",
+ 'challenges.period.year': "Tahun ini",
+ 'challenges.period.custom': "Tanggal bebas",
+ 'challenges.from': "Dari",
+ 'challenges.to': "Sampai",
+ 'challenges.name': "Nama (opsional)",
+ 'challenges.preview': "Sudah {what} di periode ini",
+ 'challenges.ahead': "Unggul {what}",
+ 'challenges.behind': "Tertinggal {what}",
+ 'challenges.onPace': "Sesuai ritme",
+ 'challenges.lastDay': "Hari terakhir",
+ 'challenges.doneOn': "Selesai pada {date}",
+ 'challenges.done': "Berhasil",
+ 'challenges.missed': "Tidak tercapai",
+ 'challenges.weekOf': "Minggu {date}",
+ 'challenges.progress': "{count} dari {target}",
+ 'challenges.active': "Berjalan",
+ 'challenges.finished': "Selesai",
+ 'challenges.archived': "Diarsipkan",
+ 'challenges.archive': "Arsipkan",
+ 'challenges.unarchive': "Batalkan arsip",
+ 'challenges.renew': "Mulai lagi",
+ 'challenges.deleteTitle': "Hapus tantangan ini?",
+ 'challenges.deleteText': "Pustakamu tidak berubah.",
+ 'challenges.counted': "Dihitung dalam tantangan ini",
+ 'challenges.countedEmpty': "Belum ada di periode ini.",
+ 'challenges.rewatch': "Ditonton ulang",
+ 'challenges.estimated': "Beberapa episode tidak punya tanggal pasti: dibagi rata antara awal dan akhir menonton (perkiraan).",
+ 'challenges.celebrate': "Tantangan berhasil!",
+ 'challenges.celebrateText': "{name} — hebat!",
+ 'challenges.limit': "Maksimal {n} tantangan: arsipkan atau hapus salah satunya.",
+ 'challenges.back': "Kembali",
+ 'challenges.qty.title_one': "{count} judul",
+ 'challenges.qty.title_other': "{count} judul",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} film",
+ 'challenges.qty.serie_one': "{count} serial",
+ 'challenges.qty.serie_other': "{count} serial",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-drama",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-drama",
+ 'challenges.qty.autre_one': "{count} judul lain",
+ 'challenges.qty.autre_other': "{count} judul lain",
+ 'challenges.qty.episode_one': "{count} episode",
+ 'challenges.qty.episode_other': "{count} episode",
+ 'challenges.daysLeft_one': "{count} hari lagi",
+ 'challenges.daysLeft_other': "{count} hari lagi",
+ 'challenges.startsIn_one': "Mulai dalam {count} hari",
+ 'challenges.startsIn_other': "Mulai dalam {count} hari",
+ 'challenges.more_one': "+ {count} tantangan lain",
+ 'challenges.more_other': "+ {count} tantangan lain",
}
export default dict
diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts
index df1ce6b..9428f3f 100644
--- a/src/i18n/locales/it.ts
+++ b/src/i18n/locales/it.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} modifica in attesa",
'sync.pending_other': "{count} modifiche in attesa",
'sync.now': "Sincronizza",
+
+ // — Défis —
+ 'challenges.title': "Sfide",
+ 'challenges.manage': "Gestisci",
+ 'challenges.emptyTitle': "Datti un obiettivo",
+ 'challenges.emptyText': "52 film quest’anno, un anime a settimana… I progressi si calcolano da soli.",
+ 'challenges.create': "Crea una sfida",
+ 'challenges.new': "Nuova sfida",
+ 'challenges.edit': "Modifica sfida",
+ 'challenges.templates': "Idee di sfide",
+ 'challenges.target': "Obiettivo",
+ 'challenges.media': "Tipo",
+ 'challenges.unit': "Conta",
+ 'challenges.unit.titles': "Titoli finiti",
+ 'challenges.unit.episodes': "Episodi visti",
+ 'challenges.period': "Periodo",
+ 'challenges.period.week': "Questa settimana",
+ 'challenges.period.month': "Questo mese",
+ 'challenges.period.year': "Quest’anno",
+ 'challenges.period.custom': "Date libere",
+ 'challenges.from': "Dal",
+ 'challenges.to': "Al",
+ 'challenges.name': "Nome (facoltativo)",
+ 'challenges.preview': "Già {what} in questo periodo",
+ 'challenges.ahead': "{what} di vantaggio",
+ 'challenges.behind': "{what} di ritardo",
+ 'challenges.onPace': "In linea",
+ 'challenges.lastDay': "Ultimo giorno",
+ 'challenges.doneOn': "Completata il {date}",
+ 'challenges.done': "Completata",
+ 'challenges.missed': "Non raggiunta",
+ 'challenges.weekOf': "Settimana del {date}",
+ 'challenges.progress': "{count} su {target}",
+ 'challenges.active': "In corso",
+ 'challenges.finished': "Concluse",
+ 'challenges.archived': "Archiviate",
+ 'challenges.archive': "Archivia",
+ 'challenges.unarchive': "Ripristina",
+ 'challenges.renew': "Ricomincia",
+ 'challenges.deleteTitle': "Eliminare questa sfida?",
+ 'challenges.deleteText': "La tua libreria non cambia.",
+ 'challenges.counted': "Contati in questa sfida",
+ 'challenges.countedEmpty': "Ancora niente in questo periodo.",
+ 'challenges.rewatch': "Rivisto",
+ 'challenges.estimated': "Alcuni episodi non hanno una data precisa: sono distribuiti tra l’inizio e la fine della visione (stima).",
+ 'challenges.celebrate': "Sfida completata!",
+ 'challenges.celebrateText': "{name} — bravo!",
+ 'challenges.limit': "Massimo {n} sfide: archiviane o eliminane una.",
+ 'challenges.back': "Indietro",
+ 'challenges.qty.title_one': "{count} titolo",
+ 'challenges.qty.title_other': "{count} titoli",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} film",
+ 'challenges.qty.serie_one': "{count} serie",
+ 'challenges.qty.serie_other': "{count} serie",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-drama",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-drama",
+ 'challenges.qty.autre_one': "{count} altro titolo",
+ 'challenges.qty.autre_other': "{count} altri titoli",
+ 'challenges.qty.episode_one': "{count} episodio",
+ 'challenges.qty.episode_other': "{count} episodi",
+ 'challenges.daysLeft_one': "Ancora {count} giorno",
+ 'challenges.daysLeft_other': "Ancora {count} giorni",
+ 'challenges.startsIn_one': "Inizia tra {count} giorno",
+ 'challenges.startsIn_other': "Inizia tra {count} giorni",
+ 'challenges.more_one': "+ {count} altra sfida",
+ 'challenges.more_other': "+ {count} altre sfide",
}
export default dict
diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts
index 67b6839..2951213 100644
--- a/src/i18n/locales/ja.ts
+++ b/src/i18n/locales/ja.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} 件の変更が保留中",
'sync.pending_other': "{count} 件の変更が保留中",
'sync.now': "今すぐ同期",
+
+ // — Défis —
+ 'challenges.title': "チャレンジ",
+ 'challenges.manage': "管理",
+ 'challenges.emptyTitle': "目標を決めよう",
+ 'challenges.emptyText': "今年は映画52本、毎週アニメ1本… 進み具合は自動で計算されます。",
+ 'challenges.create': "チャレンジを作成",
+ 'challenges.new': "新しいチャレンジ",
+ 'challenges.edit': "チャレンジを編集",
+ 'challenges.templates': "チャレンジのアイデア",
+ 'challenges.target': "目標",
+ 'challenges.media': "種類",
+ 'challenges.unit': "数えるもの",
+ 'challenges.unit.titles': "見終えた作品",
+ 'challenges.unit.episodes': "見たエピソード",
+ 'challenges.period': "期間",
+ 'challenges.period.week': "今週",
+ 'challenges.period.month': "今月",
+ 'challenges.period.year': "今年",
+ 'challenges.period.custom': "期間を指定",
+ 'challenges.from': "開始",
+ 'challenges.to': "終了",
+ 'challenges.name': "名前(任意)",
+ 'challenges.preview': "この期間ですでに{what}",
+ 'challenges.ahead': "{what}先行",
+ 'challenges.behind': "{what}遅れ",
+ 'challenges.onPace': "ペース通り",
+ 'challenges.lastDay': "最終日",
+ 'challenges.doneOn': "{date}に達成",
+ 'challenges.done': "達成",
+ 'challenges.missed': "未達成",
+ 'challenges.weekOf': "{date}の週",
+ 'challenges.progress': "{target}中{count}",
+ 'challenges.active': "進行中",
+ 'challenges.finished': "終了",
+ 'challenges.archived': "アーカイブ",
+ 'challenges.archive': "アーカイブ",
+ 'challenges.unarchive': "アーカイブ解除",
+ 'challenges.renew': "もう一度",
+ 'challenges.deleteTitle': "このチャレンジを削除しますか?",
+ 'challenges.deleteText': "ライブラリは変わりません。",
+ 'challenges.counted': "このチャレンジに含まれる作品",
+ 'challenges.countedEmpty': "この期間にはまだありません。",
+ 'challenges.rewatch': "再視聴",
+ 'challenges.estimated': "一部のエピソードは正確な日付がないため、視聴の開始から終了までに均等に割り当てています(推定)。",
+ 'challenges.celebrate': "チャレンジ達成!",
+ 'challenges.celebrateText': "{name} — おめでとう!",
+ 'challenges.limit': "チャレンジは最大{n}件です。アーカイブするか削除してください。",
+ 'challenges.back': "戻る",
+ 'challenges.qty.title_one': "{count}作品",
+ 'challenges.qty.title_other': "{count}作品",
+ 'challenges.qty.film_one': "映画{count}本",
+ 'challenges.qty.film_other': "映画{count}本",
+ 'challenges.qty.serie_one': "ドラマ{count}本",
+ 'challenges.qty.serie_other': "ドラマ{count}本",
+ 'challenges.qty.anime_one': "アニメ{count}本",
+ 'challenges.qty.anime_other': "アニメ{count}本",
+ 'challenges.qty.kdrama_one': "韓国ドラマ{count}本",
+ 'challenges.qty.kdrama_other': "韓国ドラマ{count}本",
+ 'challenges.qty.cdrama_one': "中国ドラマ{count}本",
+ 'challenges.qty.cdrama_other': "中国ドラマ{count}本",
+ 'challenges.qty.autre_one': "その他{count}作品",
+ 'challenges.qty.autre_other': "その他{count}作品",
+ 'challenges.qty.episode_one': "{count}話",
+ 'challenges.qty.episode_other': "{count}話",
+ 'challenges.daysLeft_one': "残り{count}日",
+ 'challenges.daysLeft_other': "残り{count}日",
+ 'challenges.startsIn_one': "{count}日後に開始",
+ 'challenges.startsIn_other': "{count}日後に開始",
+ 'challenges.more_one': "ほか{count}件のチャレンジ",
+ 'challenges.more_other': "ほか{count}件のチャレンジ",
}
export default dict
diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts
index 54d2f0b..3d8effd 100644
--- a/src/i18n/locales/ko.ts
+++ b/src/i18n/locales/ko.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "변경 {count}개 대기 중",
'sync.pending_other': "변경 {count}개 대기 중",
'sync.now': "지금 동기화",
+
+ // — Défis —
+ 'challenges.title': "챌린지",
+ 'challenges.manage': "관리",
+ 'challenges.emptyTitle': "목표를 세워 보세요",
+ 'challenges.emptyText': "올해 영화 52편, 매주 애니 1편… 진행 상황은 자동으로 계산돼요.",
+ 'challenges.create': "챌린지 만들기",
+ 'challenges.new': "새 챌린지",
+ 'challenges.edit': "챌린지 수정",
+ 'challenges.templates': "챌린지 아이디어",
+ 'challenges.target': "목표",
+ 'challenges.media': "유형",
+ 'challenges.unit': "집계 기준",
+ 'challenges.unit.titles': "완료한 작품",
+ 'challenges.unit.episodes': "본 에피소드",
+ 'challenges.period': "기간",
+ 'challenges.period.week': "이번 주",
+ 'challenges.period.month': "이번 달",
+ 'challenges.period.year': "올해",
+ 'challenges.period.custom': "직접 지정",
+ 'challenges.from': "시작",
+ 'challenges.to': "종료",
+ 'challenges.name': "이름 (선택)",
+ 'challenges.preview': "이 기간에 벌써 {what}",
+ 'challenges.ahead': "{what} 앞서는 중",
+ 'challenges.behind': "{what} 뒤처지는 중",
+ 'challenges.onPace': "페이스 유지 중",
+ 'challenges.lastDay': "마지막 날",
+ 'challenges.doneOn': "{date} 달성",
+ 'challenges.done': "달성",
+ 'challenges.missed': "미달성",
+ 'challenges.weekOf': "{date} 주",
+ 'challenges.progress': "{target} 중 {count}",
+ 'challenges.active': "진행 중",
+ 'challenges.finished': "종료됨",
+ 'challenges.archived': "보관됨",
+ 'challenges.archive': "보관",
+ 'challenges.unarchive': "보관 해제",
+ 'challenges.renew': "다시 시작",
+ 'challenges.deleteTitle': "이 챌린지를 삭제할까요?",
+ 'challenges.deleteText': "라이브러리는 바뀌지 않아요.",
+ 'challenges.counted': "이 챌린지에 포함된 작품",
+ 'challenges.countedEmpty': "이 기간에는 아직 없어요.",
+ 'challenges.rewatch': "재시청",
+ 'challenges.estimated': "일부 에피소드는 정확한 날짜가 없어 시청 시작일과 종료일 사이에 고르게 나눴어요(추정).",
+ 'challenges.celebrate': "챌린지 달성!",
+ 'challenges.celebrateText': "{name} — 멋져요!",
+ 'challenges.limit': "챌린지는 최대 {n}개예요. 하나를 보관하거나 삭제하세요.",
+ 'challenges.back': "뒤로",
+ 'challenges.qty.title_one': "작품 {count}편",
+ 'challenges.qty.title_other': "작품 {count}편",
+ 'challenges.qty.film_one': "영화 {count}편",
+ 'challenges.qty.film_other': "영화 {count}편",
+ 'challenges.qty.serie_one': "시리즈 {count}편",
+ 'challenges.qty.serie_other': "시리즈 {count}편",
+ 'challenges.qty.anime_one': "애니 {count}편",
+ 'challenges.qty.anime_other': "애니 {count}편",
+ 'challenges.qty.kdrama_one': "K-드라마 {count}편",
+ 'challenges.qty.kdrama_other': "K-드라마 {count}편",
+ 'challenges.qty.cdrama_one': "C-드라마 {count}편",
+ 'challenges.qty.cdrama_other': "C-드라마 {count}편",
+ 'challenges.qty.autre_one': "기타 {count}편",
+ 'challenges.qty.autre_other': "기타 {count}편",
+ 'challenges.qty.episode_one': "{count}화",
+ 'challenges.qty.episode_other': "{count}화",
+ 'challenges.daysLeft_one': "{count}일 남음",
+ 'challenges.daysLeft_other': "{count}일 남음",
+ 'challenges.startsIn_one': "{count}일 후 시작",
+ 'challenges.startsIn_other': "{count}일 후 시작",
+ 'challenges.more_one': "+ 챌린지 {count}개 더",
+ 'challenges.more_other': "+ 챌린지 {count}개 더",
}
export default dict
diff --git a/src/i18n/locales/nl.ts b/src/i18n/locales/nl.ts
index dd2e4f3..0c13df9 100644
--- a/src/i18n/locales/nl.ts
+++ b/src/i18n/locales/nl.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} wijziging in wachtrij",
'sync.pending_other': "{count} wijzigingen in wachtrij",
'sync.now': "Nu synchroniseren",
+
+ // — Défis —
+ 'challenges.title': "Uitdagingen",
+ 'challenges.manage': "Beheren",
+ 'challenges.emptyTitle': "Stel jezelf een doel",
+ 'challenges.emptyText': "52 films dit jaar, een anime per week… De voortgang wordt automatisch berekend.",
+ 'challenges.create': "Uitdaging maken",
+ 'challenges.new': "Nieuwe uitdaging",
+ 'challenges.edit': "Uitdaging bewerken",
+ 'challenges.templates': "Ideeën voor uitdagingen",
+ 'challenges.target': "Doel",
+ 'challenges.media': "Type",
+ 'challenges.unit': "Tellen",
+ 'challenges.unit.titles': "Afgeronde titels",
+ 'challenges.unit.episodes': "Bekeken afleveringen",
+ 'challenges.period': "Periode",
+ 'challenges.period.week': "Deze week",
+ 'challenges.period.month': "Deze maand",
+ 'challenges.period.year': "Dit jaar",
+ 'challenges.period.custom': "Eigen data",
+ 'challenges.from': "Van",
+ 'challenges.to': "Tot",
+ 'challenges.name': "Naam (optioneel)",
+ 'challenges.preview': "Al {what} in deze periode",
+ 'challenges.ahead': "{what} voor",
+ 'challenges.behind': "{what} achter",
+ 'challenges.onPace': "Op schema",
+ 'challenges.lastDay': "Laatste dag",
+ 'challenges.doneOn': "Gehaald op {date}",
+ 'challenges.done': "Gehaald",
+ 'challenges.missed': "Niet gehaald",
+ 'challenges.weekOf': "Week van {date}",
+ 'challenges.progress': "{count} van {target}",
+ 'challenges.active': "Bezig",
+ 'challenges.finished': "Afgelopen",
+ 'challenges.archived': "Gearchiveerd",
+ 'challenges.archive': "Archiveren",
+ 'challenges.unarchive': "Terugzetten",
+ 'challenges.renew': "Opnieuw beginnen",
+ 'challenges.deleteTitle': "Deze uitdaging verwijderen?",
+ 'challenges.deleteText': "Je bibliotheek blijft ongewijzigd.",
+ 'challenges.counted': "Geteld in deze uitdaging",
+ 'challenges.countedEmpty': "Nog niets in deze periode.",
+ 'challenges.rewatch': "Herbekeken",
+ 'challenges.estimated': "Sommige afleveringen hebben geen exacte datum: ze worden verdeeld tussen begin en einde van het kijken (schatting).",
+ 'challenges.celebrate': "Uitdaging gehaald!",
+ 'challenges.celebrateText': "{name} — goed gedaan!",
+ 'challenges.limit': "Maximaal {n} uitdagingen: archiveer of verwijder er een.",
+ 'challenges.back': "Terug",
+ 'challenges.qty.title_one': "{count} titel",
+ 'challenges.qty.title_other': "{count} titels",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} films",
+ 'challenges.qty.serie_one': "{count} serie",
+ 'challenges.qty.serie_other': "{count} series",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-drama’s",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-drama’s",
+ 'challenges.qty.autre_one': "{count} andere titel",
+ 'challenges.qty.autre_other': "{count} andere titels",
+ 'challenges.qty.episode_one': "{count} aflevering",
+ 'challenges.qty.episode_other': "{count} afleveringen",
+ 'challenges.daysLeft_one': "Nog {count} dag",
+ 'challenges.daysLeft_other': "Nog {count} dagen",
+ 'challenges.startsIn_one': "Begint over {count} dag",
+ 'challenges.startsIn_other': "Begint over {count} dagen",
+ 'challenges.more_one': "+ {count} andere uitdaging",
+ 'challenges.more_other': "+ {count} andere uitdagingen",
}
export default dict
diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts
index 8427a4b..310de56 100644
--- a/src/i18n/locales/pl.ts
+++ b/src/i18n/locales/pl.ts
@@ -989,6 +989,99 @@ const dict: Translations = {
'sync.now': "Synchronizuj",
'sync.pending_few': "{count} zmiany oczekują",
'sync.pending_many': "{count} zmian oczekuje",
+
+ // — Défis —
+ 'challenges.title': "Wyzwania",
+ 'challenges.manage': "Zarządzaj",
+ 'challenges.emptyTitle': "Wyznacz sobie cel",
+ 'challenges.emptyText': "52 filmy w tym roku, jedno anime tygodniowo… Postęp liczy się sam.",
+ 'challenges.create': "Utwórz wyzwanie",
+ 'challenges.new': "Nowe wyzwanie",
+ 'challenges.edit': "Edytuj wyzwanie",
+ 'challenges.templates': "Pomysły na wyzwania",
+ 'challenges.target': "Cel",
+ 'challenges.media': "Typ",
+ 'challenges.unit': "Licz",
+ 'challenges.unit.titles': "Ukończone tytuły",
+ 'challenges.unit.episodes': "Obejrzane odcinki",
+ 'challenges.period': "Okres",
+ 'challenges.period.week': "Ten tydzień",
+ 'challenges.period.month': "Ten miesiąc",
+ 'challenges.period.year': "Ten rok",
+ 'challenges.period.custom': "Własne daty",
+ 'challenges.from': "Od",
+ 'challenges.to': "Do",
+ 'challenges.name': "Nazwa (opcjonalnie)",
+ 'challenges.preview': "Już {what} w tym okresie",
+ 'challenges.ahead': "{what} przed planem",
+ 'challenges.behind': "{what} za planem",
+ 'challenges.onPace': "Zgodnie z planem",
+ 'challenges.lastDay': "Ostatni dzień",
+ 'challenges.doneOn': "Ukończone {date}",
+ 'challenges.done': "Ukończone",
+ 'challenges.missed': "Nieosiągnięte",
+ 'challenges.weekOf': "Tydzień od {date}",
+ 'challenges.progress': "{count} z {target}",
+ 'challenges.active': "W toku",
+ 'challenges.finished': "Zakończone",
+ 'challenges.archived': "Zarchiwizowane",
+ 'challenges.archive': "Archiwizuj",
+ 'challenges.unarchive': "Przywróć",
+ 'challenges.renew': "Zacznij od nowa",
+ 'challenges.deleteTitle': "Usunąć to wyzwanie?",
+ 'challenges.deleteText': "Twoja biblioteka się nie zmieni.",
+ 'challenges.counted': "Policzone w tym wyzwaniu",
+ 'challenges.countedEmpty': "Na razie nic w tym okresie.",
+ 'challenges.rewatch': "Ponownie",
+ 'challenges.estimated': "Niektóre odcinki nie mają dokładnej daty: są rozłożone między początkiem a końcem oglądania (szacunek).",
+ 'challenges.celebrate': "Wyzwanie ukończone!",
+ 'challenges.celebrateText': "{name} — brawo!",
+ 'challenges.limit': "Maksymalnie {n} wyzwań: zarchiwizuj lub usuń jedno.",
+ 'challenges.back': "Wstecz",
+ 'challenges.qty.title_one': "{count} tytuł",
+ 'challenges.qty.title_few': "{count} tytuły",
+ 'challenges.qty.title_many': "{count} tytułów",
+ 'challenges.qty.title_other': "{count} tytułu",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_few': "{count} filmy",
+ 'challenges.qty.film_many': "{count} filmów",
+ 'challenges.qty.film_other': "{count} filmu",
+ 'challenges.qty.serie_one': "{count} serial",
+ 'challenges.qty.serie_few': "{count} seriale",
+ 'challenges.qty.serie_many': "{count} seriali",
+ 'challenges.qty.serie_other': "{count} serialu",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_few': "{count} anime",
+ 'challenges.qty.anime_many': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_few': "{count} K-dramy",
+ 'challenges.qty.kdrama_many': "{count} K-dram",
+ 'challenges.qty.kdrama_other': "{count} K-dramy",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_few': "{count} C-dramy",
+ 'challenges.qty.cdrama_many': "{count} C-dram",
+ 'challenges.qty.cdrama_other': "{count} C-dramy",
+ 'challenges.qty.autre_one': "{count} inny tytuł",
+ 'challenges.qty.autre_few': "{count} inne tytuły",
+ 'challenges.qty.autre_many': "{count} innych tytułów",
+ 'challenges.qty.autre_other': "{count} innego tytułu",
+ 'challenges.qty.episode_one': "{count} odcinek",
+ 'challenges.qty.episode_few': "{count} odcinki",
+ 'challenges.qty.episode_many': "{count} odcinków",
+ 'challenges.qty.episode_other': "{count} odcinka",
+ 'challenges.daysLeft_one': "Został {count} dzień",
+ 'challenges.daysLeft_few': "Zostały {count} dni",
+ 'challenges.daysLeft_many': "Zostało {count} dni",
+ 'challenges.daysLeft_other': "Zostało {count} dnia",
+ 'challenges.startsIn_one': "Zaczyna się za {count} dzień",
+ 'challenges.startsIn_few': "Zaczyna się za {count} dni",
+ 'challenges.startsIn_many': "Zaczyna się za {count} dni",
+ 'challenges.startsIn_other': "Zaczyna się za {count} dnia",
+ 'challenges.more_one': "+ {count} inne wyzwanie",
+ 'challenges.more_few': "+ {count} inne wyzwania",
+ 'challenges.more_many': "+ {count} innych wyzwań",
+ 'challenges.more_other': "+ {count} innego wyzwania",
}
export default dict
diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts
index dee6d12..097448d 100644
--- a/src/i18n/locales/pt.ts
+++ b/src/i18n/locales/pt.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} alteração pendente",
'sync.pending_other': "{count} alterações pendentes",
'sync.now': "Sincronizar",
+
+ // — Défis —
+ 'challenges.title': "Desafios",
+ 'challenges.manage': "Gerenciar",
+ 'challenges.emptyTitle': "Defina uma meta",
+ 'challenges.emptyText': "52 filmes este ano, um anime por semana… O progresso é calculado sozinho.",
+ 'challenges.create': "Criar um desafio",
+ 'challenges.new': "Novo desafio",
+ 'challenges.edit': "Editar desafio",
+ 'challenges.templates': "Ideias de desafios",
+ 'challenges.target': "Meta",
+ 'challenges.media': "Tipo",
+ 'challenges.unit': "Contar",
+ 'challenges.unit.titles': "Títulos concluídos",
+ 'challenges.unit.episodes': "Episódios vistos",
+ 'challenges.period': "Período",
+ 'challenges.period.week': "Esta semana",
+ 'challenges.period.month': "Este mês",
+ 'challenges.period.year': "Este ano",
+ 'challenges.period.custom': "Datas livres",
+ 'challenges.from': "De",
+ 'challenges.to': "Até",
+ 'challenges.name': "Nome (opcional)",
+ 'challenges.preview': "Já {what} neste período",
+ 'challenges.ahead': "{what} de vantagem",
+ 'challenges.behind': "{what} de atraso",
+ 'challenges.onPace': "No ritmo",
+ 'challenges.lastDay': "Último dia",
+ 'challenges.doneOn': "Concluído em {date}",
+ 'challenges.done': "Concluído",
+ 'challenges.missed': "Não atingido",
+ 'challenges.weekOf': "Semana de {date}",
+ 'challenges.progress': "{count} de {target}",
+ 'challenges.active': "Em andamento",
+ 'challenges.finished': "Encerrados",
+ 'challenges.archived': "Arquivados",
+ 'challenges.archive': "Arquivar",
+ 'challenges.unarchive': "Desarquivar",
+ 'challenges.renew': "Recomeçar",
+ 'challenges.deleteTitle': "Excluir este desafio?",
+ 'challenges.deleteText': "Sua biblioteca não muda.",
+ 'challenges.counted': "Contados neste desafio",
+ 'challenges.countedEmpty': "Nada ainda neste período.",
+ 'challenges.rewatch': "Revisto",
+ 'challenges.estimated': "Alguns episódios não têm data exata: eles são distribuídos entre o início e o fim da exibição (estimativa).",
+ 'challenges.celebrate': "Desafio concluído!",
+ 'challenges.celebrateText': "{name} — parabéns!",
+ 'challenges.limit': "No máximo {n} desafios: arquive ou exclua um.",
+ 'challenges.back': "Voltar",
+ 'challenges.qty.title_one': "{count} título",
+ 'challenges.qty.title_other': "{count} títulos",
+ 'challenges.qty.film_one': "{count} filme",
+ 'challenges.qty.film_other': "{count} filmes",
+ 'challenges.qty.serie_one': "{count} série",
+ 'challenges.qty.serie_other': "{count} séries",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} animes",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-dramas",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-dramas",
+ 'challenges.qty.autre_one': "{count} outro título",
+ 'challenges.qty.autre_other': "{count} outros títulos",
+ 'challenges.qty.episode_one': "{count} episódio",
+ 'challenges.qty.episode_other': "{count} episódios",
+ 'challenges.daysLeft_one': "Falta {count} dia",
+ 'challenges.daysLeft_other': "Faltam {count} dias",
+ 'challenges.startsIn_one': "Começa em {count} dia",
+ 'challenges.startsIn_other': "Começa em {count} dias",
+ 'challenges.more_one': "+ {count} outro desafio",
+ 'challenges.more_other': "+ {count} outros desafios",
}
export default dict
diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts
index c95076d..c109e4a 100644
--- a/src/i18n/locales/ru.ts
+++ b/src/i18n/locales/ru.ts
@@ -989,6 +989,99 @@ const dict: Translations = {
'sync.now': "Синхронизировать",
'sync.pending_few': "{count} изменения ожидают",
'sync.pending_many': "{count} изменений ожидают",
+
+ // — Défis —
+ 'challenges.title': "Челленджи",
+ 'challenges.manage': "Управлять",
+ 'challenges.emptyTitle': "Поставьте себе цель",
+ 'challenges.emptyText': "52 фильма за год, аниме в неделю… Прогресс считается сам.",
+ 'challenges.create': "Создать челлендж",
+ 'challenges.new': "Новый челлендж",
+ 'challenges.edit': "Изменить челлендж",
+ 'challenges.templates': "Идеи челленджей",
+ 'challenges.target': "Цель",
+ 'challenges.media': "Тип",
+ 'challenges.unit': "Считать",
+ 'challenges.unit.titles': "Завершённые тайтлы",
+ 'challenges.unit.episodes': "Просмотренные серии",
+ 'challenges.period': "Период",
+ 'challenges.period.week': "Эта неделя",
+ 'challenges.period.month': "Этот месяц",
+ 'challenges.period.year': "Этот год",
+ 'challenges.period.custom': "Свои даты",
+ 'challenges.from': "С",
+ 'challenges.to': "По",
+ 'challenges.name': "Название (необязательно)",
+ 'challenges.preview': "Уже {what} за этот период",
+ 'challenges.ahead': "Опережение: {what}",
+ 'challenges.behind': "Отставание: {what}",
+ 'challenges.onPace': "В графике",
+ 'challenges.lastDay': "Последний день",
+ 'challenges.doneOn': "Выполнен {date}",
+ 'challenges.done': "Выполнен",
+ 'challenges.missed': "Не достигнут",
+ 'challenges.weekOf': "Неделя с {date}",
+ 'challenges.progress': "{count} из {target}",
+ 'challenges.active': "Активные",
+ 'challenges.finished': "Завершённые",
+ 'challenges.archived': "В архиве",
+ 'challenges.archive': "В архив",
+ 'challenges.unarchive': "Из архива",
+ 'challenges.renew': "Начать заново",
+ 'challenges.deleteTitle': "Удалить этот челлендж?",
+ 'challenges.deleteText': "Ваша библиотека не изменится.",
+ 'challenges.counted': "Учтено в челлендже",
+ 'challenges.countedEmpty': "Пока ничего за этот период.",
+ 'challenges.rewatch': "Пересмотр",
+ 'challenges.estimated': "У некоторых серий нет точной даты: они распределены между началом и концом просмотра (оценка).",
+ 'challenges.celebrate': "Челлендж выполнен!",
+ 'challenges.celebrateText': "{name} — браво!",
+ 'challenges.limit': "Не больше {n} челленджей: архивируйте или удалите один.",
+ 'challenges.back': "Назад",
+ 'challenges.qty.title_one': "{count} тайтл",
+ 'challenges.qty.title_few': "{count} тайтла",
+ 'challenges.qty.title_many': "{count} тайтлов",
+ 'challenges.qty.title_other': "{count} тайтла",
+ 'challenges.qty.film_one': "{count} фильм",
+ 'challenges.qty.film_few': "{count} фильма",
+ 'challenges.qty.film_many': "{count} фильмов",
+ 'challenges.qty.film_other': "{count} фильма",
+ 'challenges.qty.serie_one': "{count} сериал",
+ 'challenges.qty.serie_few': "{count} сериала",
+ 'challenges.qty.serie_many': "{count} сериалов",
+ 'challenges.qty.serie_other': "{count} сериала",
+ 'challenges.qty.anime_one': "{count} аниме",
+ 'challenges.qty.anime_few': "{count} аниме",
+ 'challenges.qty.anime_many': "{count} аниме",
+ 'challenges.qty.anime_other': "{count} аниме",
+ 'challenges.qty.kdrama_one': "{count} дорама",
+ 'challenges.qty.kdrama_few': "{count} дорамы",
+ 'challenges.qty.kdrama_many': "{count} дорам",
+ 'challenges.qty.kdrama_other': "{count} дорамы",
+ 'challenges.qty.cdrama_one': "{count} китайская дорама",
+ 'challenges.qty.cdrama_few': "{count} китайские дорамы",
+ 'challenges.qty.cdrama_many': "{count} китайских дорам",
+ 'challenges.qty.cdrama_other': "{count} китайской дорамы",
+ 'challenges.qty.autre_one': "{count} другой тайтл",
+ 'challenges.qty.autre_few': "{count} других тайтла",
+ 'challenges.qty.autre_many': "{count} других тайтлов",
+ 'challenges.qty.autre_other': "{count} другого тайтла",
+ 'challenges.qty.episode_one': "{count} серия",
+ 'challenges.qty.episode_few': "{count} серии",
+ 'challenges.qty.episode_many': "{count} серий",
+ 'challenges.qty.episode_other': "{count} серии",
+ 'challenges.daysLeft_one': "Остался {count} день",
+ 'challenges.daysLeft_few': "Осталось {count} дня",
+ 'challenges.daysLeft_many': "Осталось {count} дней",
+ 'challenges.daysLeft_other': "Осталось {count} дня",
+ 'challenges.startsIn_one': "Начнётся через {count} день",
+ 'challenges.startsIn_few': "Начнётся через {count} дня",
+ 'challenges.startsIn_many': "Начнётся через {count} дней",
+ 'challenges.startsIn_other': "Начнётся через {count} дня",
+ 'challenges.more_one': "+ ещё {count} челлендж",
+ 'challenges.more_few': "+ ещё {count} челленджа",
+ 'challenges.more_many': "+ ещё {count} челленджей",
+ 'challenges.more_other': "+ ещё {count} челленджа",
}
export default dict
diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts
index 4551741..3a1caa5 100644
--- a/src/i18n/locales/th.ts
+++ b/src/i18n/locales/th.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "รอซิงค์ {count} รายการ",
'sync.pending_other': "รอซิงค์ {count} รายการ",
'sync.now': "ซิงค์ตอนนี้",
+
+ // — Défis —
+ 'challenges.title': "ชาเลนจ์",
+ 'challenges.manage': "จัดการ",
+ 'challenges.emptyTitle': "ตั้งเป้าหมายให้ตัวเอง",
+ 'challenges.emptyText': "ปีนี้ 52 เรื่อง อนิเมะสัปดาห์ละเรื่อง… ความคืบหน้าคำนวณให้อัตโนมัติ",
+ 'challenges.create': "สร้างชาเลนจ์",
+ 'challenges.new': "ชาเลนจ์ใหม่",
+ 'challenges.edit': "แก้ไขชาเลนจ์",
+ 'challenges.templates': "ไอเดียชาเลนจ์",
+ 'challenges.target': "เป้าหมาย",
+ 'challenges.media': "ประเภท",
+ 'challenges.unit': "นับ",
+ 'challenges.unit.titles': "เรื่องที่ดูจบ",
+ 'challenges.unit.episodes': "ตอนที่ดูแล้ว",
+ 'challenges.period': "ช่วงเวลา",
+ 'challenges.period.week': "สัปดาห์นี้",
+ 'challenges.period.month': "เดือนนี้",
+ 'challenges.period.year': "ปีนี้",
+ 'challenges.period.custom': "กำหนดวันเอง",
+ 'challenges.from': "จาก",
+ 'challenges.to': "ถึง",
+ 'challenges.name': "ชื่อ (ไม่บังคับ)",
+ 'challenges.preview': "ช่วงนี้ได้แล้ว {what}",
+ 'challenges.ahead': "นำหน้า {what}",
+ 'challenges.behind': "ตามหลัง {what}",
+ 'challenges.onPace': "ตามจังหวะ",
+ 'challenges.lastDay': "วันสุดท้าย",
+ 'challenges.doneOn': "สำเร็จเมื่อ {date}",
+ 'challenges.done': "สำเร็จ",
+ 'challenges.missed': "ไม่สำเร็จ",
+ 'challenges.weekOf': "สัปดาห์ของ {date}",
+ 'challenges.progress': "{count} จาก {target}",
+ 'challenges.active': "กำลังทำ",
+ 'challenges.finished': "จบแล้ว",
+ 'challenges.archived': "เก็บถาวร",
+ 'challenges.archive': "เก็บถาวร",
+ 'challenges.unarchive': "เลิกเก็บถาวร",
+ 'challenges.renew': "เริ่มใหม่",
+ 'challenges.deleteTitle': "ลบชาเลนจ์นี้?",
+ 'challenges.deleteText': "คลังของคุณจะไม่เปลี่ยนแปลง",
+ 'challenges.counted': "นับในชาเลนจ์นี้",
+ 'challenges.countedEmpty': "ยังไม่มีในช่วงนี้",
+ 'challenges.rewatch': "ดูซ้ำ",
+ 'challenges.estimated': "บางตอนไม่มีวันที่แน่นอน: จะกระจายระหว่างวันเริ่มและวันจบการดู (ประมาณการ)",
+ 'challenges.celebrate': "ชาเลนจ์สำเร็จ!",
+ 'challenges.celebrateText': "{name} — เยี่ยมมาก!",
+ 'challenges.limit': "สูงสุด {n} ชาเลนจ์: เก็บถาวรหรือลบสักอัน",
+ 'challenges.back': "กลับ",
+ 'challenges.qty.title_one': "{count} เรื่อง",
+ 'challenges.qty.title_other': "{count} เรื่อง",
+ 'challenges.qty.film_one': "ภาพยนตร์ {count} เรื่อง",
+ 'challenges.qty.film_other': "ภาพยนตร์ {count} เรื่อง",
+ 'challenges.qty.serie_one': "ซีรีส์ {count} เรื่อง",
+ 'challenges.qty.serie_other': "ซีรีส์ {count} เรื่อง",
+ 'challenges.qty.anime_one': "อนิเมะ {count} เรื่อง",
+ 'challenges.qty.anime_other': "อนิเมะ {count} เรื่อง",
+ 'challenges.qty.kdrama_one': "ซีรีส์เกาหลี {count} เรื่อง",
+ 'challenges.qty.kdrama_other': "ซีรีส์เกาหลี {count} เรื่อง",
+ 'challenges.qty.cdrama_one': "ซีรีส์จีน {count} เรื่อง",
+ 'challenges.qty.cdrama_other': "ซีรีส์จีน {count} เรื่อง",
+ 'challenges.qty.autre_one': "เรื่องอื่น {count} เรื่อง",
+ 'challenges.qty.autre_other': "เรื่องอื่น {count} เรื่อง",
+ 'challenges.qty.episode_one': "{count} ตอน",
+ 'challenges.qty.episode_other': "{count} ตอน",
+ 'challenges.daysLeft_one': "เหลืออีก {count} วัน",
+ 'challenges.daysLeft_other': "เหลืออีก {count} วัน",
+ 'challenges.startsIn_one': "เริ่มในอีก {count} วัน",
+ 'challenges.startsIn_other': "เริ่มในอีก {count} วัน",
+ 'challenges.more_one': "+ อีก {count} ชาเลนจ์",
+ 'challenges.more_other': "+ อีก {count} ชาเลนจ์",
}
export default dict
diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts
index ea49087..fa0909e 100644
--- a/src/i18n/locales/tr.ts
+++ b/src/i18n/locales/tr.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} değişiklik bekliyor",
'sync.pending_other': "{count} değişiklik bekliyor",
'sync.now': "Şimdi eşitle",
+
+ // — Défis —
+ 'challenges.title': "Hedefler",
+ 'challenges.manage': "Yönet",
+ 'challenges.emptyTitle': "Kendine bir hedef koy",
+ 'challenges.emptyText': "Bu yıl 52 film, haftada bir anime… İlerleme kendiliğinden hesaplanır.",
+ 'challenges.create': "Hedef oluştur",
+ 'challenges.new': "Yeni hedef",
+ 'challenges.edit': "Hedefi düzenle",
+ 'challenges.templates': "Hedef fikirleri",
+ 'challenges.target': "Hedef",
+ 'challenges.media': "Tür",
+ 'challenges.unit': "Sayılacak",
+ 'challenges.unit.titles': "Bitirilen yapımlar",
+ 'challenges.unit.episodes': "İzlenen bölümler",
+ 'challenges.period': "Dönem",
+ 'challenges.period.week': "Bu hafta",
+ 'challenges.period.month': "Bu ay",
+ 'challenges.period.year': "Bu yıl",
+ 'challenges.period.custom': "Özel tarihler",
+ 'challenges.from': "Başlangıç",
+ 'challenges.to': "Bitiş",
+ 'challenges.name': "Ad (isteğe bağlı)",
+ 'challenges.preview': "Bu dönemde şimdiden {what}",
+ 'challenges.ahead': "{what} önde",
+ 'challenges.behind': "{what} geride",
+ 'challenges.onPace': "Tempoda",
+ 'challenges.lastDay': "Son gün",
+ 'challenges.doneOn': "{date} tarihinde tamamlandı",
+ 'challenges.done': "Tamamlandı",
+ 'challenges.missed': "Ulaşılamadı",
+ 'challenges.weekOf': "{date} haftası",
+ 'challenges.progress': "{count} / {target}",
+ 'challenges.active': "Devam eden",
+ 'challenges.finished': "Biten",
+ 'challenges.archived': "Arşiv",
+ 'challenges.archive': "Arşivle",
+ 'challenges.unarchive': "Arşivden çıkar",
+ 'challenges.renew': "Yeniden başla",
+ 'challenges.deleteTitle': "Bu hedef silinsin mi?",
+ 'challenges.deleteText': "Kütüphanen değişmez.",
+ 'challenges.counted': "Bu hedefte sayılanlar",
+ 'challenges.countedEmpty': "Bu dönemde henüz bir şey yok.",
+ 'challenges.rewatch': "Tekrar",
+ 'challenges.estimated': "Bazı bölümlerin kesin tarihi yok: izlemenin başı ile sonu arasına dağıtılır (tahmin).",
+ 'challenges.celebrate': "Hedef tamamlandı!",
+ 'challenges.celebrateText': "{name} — tebrikler!",
+ 'challenges.limit': "En fazla {n} hedef: birini arşivle veya sil.",
+ 'challenges.back': "Geri",
+ 'challenges.qty.title_one': "{count} yapım",
+ 'challenges.qty.title_other': "{count} yapım",
+ 'challenges.qty.film_one': "{count} film",
+ 'challenges.qty.film_other': "{count} film",
+ 'challenges.qty.serie_one': "{count} dizi",
+ 'challenges.qty.serie_other': "{count} dizi",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} K-drama",
+ 'challenges.qty.kdrama_other': "{count} K-drama",
+ 'challenges.qty.cdrama_one': "{count} C-drama",
+ 'challenges.qty.cdrama_other': "{count} C-drama",
+ 'challenges.qty.autre_one': "{count} diğer yapım",
+ 'challenges.qty.autre_other': "{count} diğer yapım",
+ 'challenges.qty.episode_one': "{count} bölüm",
+ 'challenges.qty.episode_other': "{count} bölüm",
+ 'challenges.daysLeft_one': "{count} gün kaldı",
+ 'challenges.daysLeft_other': "{count} gün kaldı",
+ 'challenges.startsIn_one': "{count} gün sonra başlıyor",
+ 'challenges.startsIn_other': "{count} gün sonra başlıyor",
+ 'challenges.more_one': "+ {count} hedef daha",
+ 'challenges.more_other': "+ {count} hedef daha",
}
export default dict
diff --git a/src/i18n/locales/vi.ts b/src/i18n/locales/vi.ts
index 632c8a9..0f82f21 100644
--- a/src/i18n/locales/vi.ts
+++ b/src/i18n/locales/vi.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} thay đổi đang chờ",
'sync.pending_other': "{count} thay đổi đang chờ",
'sync.now': "Đồng bộ ngay",
+
+ // — Défis —
+ 'challenges.title': "Thử thách",
+ 'challenges.manage': "Quản lý",
+ 'challenges.emptyTitle': "Đặt cho mình một mục tiêu",
+ 'challenges.emptyText': "52 phim năm nay, mỗi tuần một anime… Tiến độ được tính tự động.",
+ 'challenges.create': "Tạo thử thách",
+ 'challenges.new': "Thử thách mới",
+ 'challenges.edit': "Sửa thử thách",
+ 'challenges.templates': "Gợi ý thử thách",
+ 'challenges.target': "Mục tiêu",
+ 'challenges.media': "Loại",
+ 'challenges.unit': "Đếm",
+ 'challenges.unit.titles': "Phim đã xem xong",
+ 'challenges.unit.episodes': "Tập đã xem",
+ 'challenges.period': "Khoảng thời gian",
+ 'challenges.period.week': "Tuần này",
+ 'challenges.period.month': "Tháng này",
+ 'challenges.period.year': "Năm nay",
+ 'challenges.period.custom': "Ngày tùy chọn",
+ 'challenges.from': "Từ",
+ 'challenges.to': "Đến",
+ 'challenges.name': "Tên (không bắt buộc)",
+ 'challenges.preview': "Đã {what} trong khoảng này",
+ 'challenges.ahead': "Vượt {what}",
+ 'challenges.behind': "Chậm {what}",
+ 'challenges.onPace': "Đúng nhịp",
+ 'challenges.lastDay': "Ngày cuối",
+ 'challenges.doneOn': "Hoàn thành ngày {date}",
+ 'challenges.done': "Hoàn thành",
+ 'challenges.missed': "Chưa đạt",
+ 'challenges.weekOf': "Tuần từ {date}",
+ 'challenges.progress': "{count} / {target}",
+ 'challenges.active': "Đang diễn ra",
+ 'challenges.finished': "Đã kết thúc",
+ 'challenges.archived': "Đã lưu trữ",
+ 'challenges.archive': "Lưu trữ",
+ 'challenges.unarchive': "Bỏ lưu trữ",
+ 'challenges.renew': "Bắt đầu lại",
+ 'challenges.deleteTitle': "Xóa thử thách này?",
+ 'challenges.deleteText': "Thư viện của bạn không thay đổi.",
+ 'challenges.counted': "Được tính trong thử thách",
+ 'challenges.countedEmpty': "Chưa có gì trong khoảng này.",
+ 'challenges.rewatch': "Xem lại",
+ 'challenges.estimated': "Một số tập không có ngày chính xác: được chia đều từ lúc bắt đầu đến lúc xem xong (ước tính).",
+ 'challenges.celebrate': "Hoàn thành thử thách!",
+ 'challenges.celebrateText': "{name} — tuyệt vời!",
+ 'challenges.limit': "Tối đa {n} thử thách: hãy lưu trữ hoặc xóa bớt một cái.",
+ 'challenges.back': "Quay lại",
+ 'challenges.qty.title_one': "{count} tựa phim",
+ 'challenges.qty.title_other': "{count} tựa phim",
+ 'challenges.qty.film_one': "{count} phim lẻ",
+ 'challenges.qty.film_other': "{count} phim lẻ",
+ 'challenges.qty.serie_one': "{count} phim bộ",
+ 'challenges.qty.serie_other': "{count} phim bộ",
+ 'challenges.qty.anime_one': "{count} anime",
+ 'challenges.qty.anime_other': "{count} anime",
+ 'challenges.qty.kdrama_one': "{count} phim Hàn",
+ 'challenges.qty.kdrama_other': "{count} phim Hàn",
+ 'challenges.qty.cdrama_one': "{count} phim Trung",
+ 'challenges.qty.cdrama_other': "{count} phim Trung",
+ 'challenges.qty.autre_one': "{count} tựa khác",
+ 'challenges.qty.autre_other': "{count} tựa khác",
+ 'challenges.qty.episode_one': "{count} tập",
+ 'challenges.qty.episode_other': "{count} tập",
+ 'challenges.daysLeft_one': "Còn {count} ngày",
+ 'challenges.daysLeft_other': "Còn {count} ngày",
+ 'challenges.startsIn_one': "Bắt đầu sau {count} ngày",
+ 'challenges.startsIn_other': "Bắt đầu sau {count} ngày",
+ 'challenges.more_one': "+ {count} thử thách khác",
+ 'challenges.more_other': "+ {count} thử thách khác",
}
export default dict
diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts
index ad9a6c6..0798281 100644
--- a/src/i18n/locales/zh.ts
+++ b/src/i18n/locales/zh.ts
@@ -897,6 +897,77 @@ const dict: Translations = {
'sync.pending_one': "{count} 项更改待上传",
'sync.pending_other': "{count} 项更改待上传",
'sync.now': "立即同步",
+
+ // — Défis —
+ 'challenges.title': "挑战",
+ 'challenges.manage': "管理",
+ 'challenges.emptyTitle': "给自己定个目标",
+ 'challenges.emptyText': "今年看 52 部电影,每周一部动画…… 进度自动计算。",
+ 'challenges.create': "创建挑战",
+ 'challenges.new': "新挑战",
+ 'challenges.edit': "编辑挑战",
+ 'challenges.templates': "挑战灵感",
+ 'challenges.target': "目标",
+ 'challenges.media': "类型",
+ 'challenges.unit': "计数方式",
+ 'challenges.unit.titles': "看完的作品",
+ 'challenges.unit.episodes': "看过的集数",
+ 'challenges.period': "时间段",
+ 'challenges.period.week': "本周",
+ 'challenges.period.month': "本月",
+ 'challenges.period.year': "今年",
+ 'challenges.period.custom': "自定义日期",
+ 'challenges.from': "从",
+ 'challenges.to': "到",
+ 'challenges.name': "名称(可选)",
+ 'challenges.preview': "本期已有 {what}",
+ 'challenges.ahead': "领先 {what}",
+ 'challenges.behind': "落后 {what}",
+ 'challenges.onPace': "进度正常",
+ 'challenges.lastDay': "最后一天",
+ 'challenges.doneOn': "于 {date} 完成",
+ 'challenges.done': "已完成",
+ 'challenges.missed': "未达成",
+ 'challenges.weekOf': "{date} 那一周",
+ 'challenges.progress': "{count} / {target}",
+ 'challenges.active': "进行中",
+ 'challenges.finished': "已结束",
+ 'challenges.archived': "已归档",
+ 'challenges.archive': "归档",
+ 'challenges.unarchive': "取消归档",
+ 'challenges.renew': "重新开始",
+ 'challenges.deleteTitle': "删除这个挑战?",
+ 'challenges.deleteText': "你的片库不会改变。",
+ 'challenges.counted': "计入本挑战",
+ 'challenges.countedEmpty': "本期暂时还没有。",
+ 'challenges.rewatch': "重看",
+ 'challenges.estimated': "部分集数没有确切日期:按观看开始到结束平均分配(估算)。",
+ 'challenges.celebrate': "挑战完成!",
+ 'challenges.celebrateText': "{name} — 太棒了!",
+ 'challenges.limit': "最多 {n} 个挑战:请归档或删除一个。",
+ 'challenges.back': "返回",
+ 'challenges.qty.title_one': "{count} 部作品",
+ 'challenges.qty.title_other': "{count} 部作品",
+ 'challenges.qty.film_one': "{count} 部电影",
+ 'challenges.qty.film_other': "{count} 部电影",
+ 'challenges.qty.serie_one': "{count} 部剧集",
+ 'challenges.qty.serie_other': "{count} 部剧集",
+ 'challenges.qty.anime_one': "{count} 部动画",
+ 'challenges.qty.anime_other': "{count} 部动画",
+ 'challenges.qty.kdrama_one': "{count} 部韩剧",
+ 'challenges.qty.kdrama_other': "{count} 部韩剧",
+ 'challenges.qty.cdrama_one': "{count} 部国剧",
+ 'challenges.qty.cdrama_other': "{count} 部国剧",
+ 'challenges.qty.autre_one': "{count} 部其他作品",
+ 'challenges.qty.autre_other': "{count} 部其他作品",
+ 'challenges.qty.episode_one': "{count} 集",
+ 'challenges.qty.episode_other': "{count} 集",
+ 'challenges.daysLeft_one': "还剩 {count} 天",
+ 'challenges.daysLeft_other': "还剩 {count} 天",
+ 'challenges.startsIn_one': "{count} 天后开始",
+ 'challenges.startsIn_other': "{count} 天后开始",
+ 'challenges.more_one': "+ 另外 {count} 个挑战",
+ 'challenges.more_other': "+ 另外 {count} 个挑战",
}
export default dict
diff --git a/src/index.css b/src/index.css
index 31671c3..6dcf30a 100644
--- a/src/index.css
+++ b/src/index.css
@@ -300,3 +300,41 @@
}
}
+
+/* — Défis — célébration sobre : le trophée apparaît, un halo s'élargit une fois puis s'efface */
+@keyframes challenge-pop {
+ 0% {
+ transform: scale(0.6);
+ opacity: 0;
+ }
+ 60% {
+ transform: scale(1.08);
+ opacity: 1;
+ }
+ 100% {
+ transform: scale(1);
+ }
+}
+@keyframes challenge-halo {
+ from {
+ transform: scale(1);
+ opacity: 0.8;
+ }
+ to {
+ transform: scale(1.8);
+ opacity: 0;
+ }
+}
+.challenge-pop {
+ animation: challenge-pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
+}
+.challenge-halo {
+ opacity: 0;
+ animation: challenge-halo 1.1s ease-out 0.35s 2;
+}
+@media (prefers-reduced-motion: reduce) {
+ .challenge-pop,
+ .challenge-halo {
+ animation: none;
+ }
+}
diff --git a/src/lib/backup.ts b/src/lib/backup.ts
index a98f477..7d6d2c4 100644
--- a/src/lib/backup.ts
+++ b/src/lib/backup.ts
@@ -19,6 +19,7 @@ import {
safeStringList,
} from './security'
import { todayISO, uid } from './utils'
+import { normalizeChallenges, normalizeEpisodeLog } from './challenges'
const TYPES = new Set(MEDIA_TYPES.map((t) => t.value))
const STATUS_SET = new Set(STATUSES.map((s) => s.value))
@@ -113,6 +114,7 @@ export function normalizeItem(raw: unknown): MediaItem | null {
listIds: listIds.length ? listIds : undefined,
countries: safeCountries(r.countries),
rewatchDates: safeDates(r.rewatchDates),
+ episodeLog: normalizeEpisodeLog(r.episodeLog),
publicRating: (() => {
const n = num(r.publicRating, 0, 10)
return n ? Math.round(n * 10) / 10 : undefined
@@ -135,6 +137,8 @@ export function normalizeSettings(raw: unknown): Partial | undefined {
for (const k of ['episodes', 'follows', 'accepted', 'reactions'] as const) if (typeof raw.notifPrefs[k] === 'boolean') np[k] = raw.notifPrefs[k] as boolean
out.notifPrefs = np
}
+ const challenges = normalizeChallenges(raw.challenges)
+ if (challenges) out.challenges = challenges
return out
}
diff --git a/src/lib/challenges.ts b/src/lib/challenges.ts
new file mode 100644
index 0000000..dbbd6e4
--- /dev/null
+++ b/src/lib/challenges.ts
@@ -0,0 +1,356 @@
+import { locale, t } from '../i18n'
+import type { Challenge, MediaItem, MediaType, Settings } from '../types'
+import { MEDIA_TYPES, TYPE_BY_VALUE } from './constants'
+import { cleanText, isPlainObject, isSafeId, safeDay } from './security'
+import { localDay } from './utils'
+
+/**
+ * Défis de visionnage.
+ *
+ * Progression calculée à partir de la bibliothèque :
+ * - « titres terminés » : fiches « Terminé » dont la date de fin tombe dans la période, plus chaque revisionnage daté ;
+ * - « épisodes vus » : journal des épisodes cochés jour par jour (`episodeLog`, rempli depuis l'arrivée des défis).
+ * Les épisodes vus avant (ou saisis sans journal) n'ont pas de date : on les répartit uniformément entre la date
+ * de début et la date de fin de la fiche (ou, sans date de fin, jusqu'au premier jour journalisé / la dernière
+ * modification). Sans aucune date, ils ne sont pas comptés. Le résultat est alors marqué « estimation ».
+ */
+
+export const MAX_CHALLENGES = 15
+export const NAME_MAX = 40
+export const TARGET_MAX = 10000
+
+type Media = Challenge['media']
+const MEDIA_SET = new Set(['all', ...MEDIA_TYPES.map((m) => m.value)])
+
+// ─── Dates (jours entiers, sans fuseau) ───
+
+const DAY = 86400000
+const toNum = (d: string) => {
+ const [y, m, day] = d.split('-').map(Number)
+ return Math.round(Date.UTC(y, m - 1, day) / DAY)
+}
+const fromNum = (n: number) => new Date(n * DAY).toISOString().slice(0, 10)
+const asDate = (d: string) => {
+ const [y, m, day] = d.split('-').map(Number)
+ return new Date(y, m - 1, day)
+}
+
+/** Bornes de la période en cours (semaine du lundi au dimanche). */
+export function periodBounds(period: Exclude, today = localDay()): { start: string; end: string } {
+ const [y, m] = today.split('-').map(Number)
+ if (period === 'year') return { start: `${y}-01-01`, end: `${y}-12-31` }
+ if (period === 'month') {
+ const last = new Date(Date.UTC(y, m, 0)).getUTCDate()
+ const mm = String(m).padStart(2, '0')
+ return { start: `${y}-${mm}-01`, end: `${y}-${mm}-${last}` }
+ }
+ const n = toNum(today)
+ const weekday = (new Date(n * DAY).getUTCDay() + 6) % 7 // lundi = 0
+ return { start: fromNum(n - weekday), end: fromNum(n - weekday + 6) }
+}
+
+// ─── Validation (réglages synchronisés, import) ───
+
+export function normalizeChallenges(v: unknown): Challenge[] | undefined {
+ if (!Array.isArray(v)) return undefined
+ const out: Challenge[] = []
+ for (const r of v.slice(0, MAX_CHALLENGES * 2)) {
+ if (out.length >= MAX_CHALLENGES) break
+ if (!isPlainObject(r) || !isSafeId(r.id) || out.some((c) => c.id === r.id)) continue
+ const target = typeof r.target === 'number' && Number.isFinite(r.target) ? Math.round(r.target) : NaN
+ const start = safeDay(r.start)
+ const end = safeDay(r.end)
+ if (!(target >= 1 && target <= TARGET_MAX) || !start || !end || end < start) continue
+ if (!MEDIA_SET.has(r.media as string)) continue
+ const unit = r.unit === 'episodes' ? 'episodes' : r.unit === 'titles' ? 'titles' : null
+ const period = r.period === 'week' || r.period === 'month' || r.period === 'year' || r.period === 'custom' ? r.period : null
+ if (!unit || !period) continue
+ const c: Challenge = { id: r.id, target, media: r.media as Media, unit, period, start, end }
+ const name = cleanText(r.name, NAME_MAX)
+ if (name) c.name = name
+ if (r.archived === true) c.archived = true
+ out.push(c)
+ }
+ return out
+}
+
+/** Import en mode « fusion » : on ajoute les défis inconnus sans écraser ceux de l'appareil. */
+export function mergeImportedSettings(incoming: Partial, current: Settings): Partial {
+ if (!incoming.challenges) return incoming
+ const mine = current.challenges ?? []
+ const ids = new Set(mine.map((c) => c.id))
+ return { ...incoming, challenges: [...mine, ...incoming.challenges.filter((c) => !ids.has(c.id))].slice(0, MAX_CHALLENGES) }
+}
+
+export const newChallengeId = () => Math.random().toString(36).slice(2, 12).padEnd(10, '0')
+
+// ─── Journal des épisodes ───
+
+const LOG_MAX_DAYS = 400
+
+/** Nouveau journal après un changement du nombre d'épisodes vus (aujourd'hui). */
+export function logEpisodes(log: Record | undefined, delta: number, day = localDay()): Record | undefined {
+ if (!delta) return log
+ const next = { ...(log ?? {}) }
+ const value = Math.max(0, (next[day] ?? 0) + delta)
+ if (value) next[day] = Math.min(value, 100000)
+ else delete next[day]
+ const days = Object.keys(next).sort()
+ for (const d of days.slice(0, Math.max(0, days.length - LOG_MAX_DAYS))) delete next[d]
+ return Object.keys(next).length ? next : undefined
+}
+
+export function normalizeEpisodeLog(v: unknown): Record | undefined {
+ if (!isPlainObject(v)) return undefined
+ const entries = Object.entries(v)
+ .slice(0, LOG_MAX_DAYS * 2)
+ .filter(([d, n]) => safeDay(d) && typeof n === 'number' && Number.isFinite(n) && n >= 1)
+ .map(([d, n]) => [d, Math.min(100000, Math.round(n as number))] as const)
+ .sort((a, b) => a[0].localeCompare(b[0]))
+ .slice(-LOG_MAX_DAYS)
+ return entries.length ? Object.fromEntries(entries) : undefined
+}
+
+// ─── Progression ───
+
+export interface CountedEntry {
+ item: MediaItem
+ /** Date (titres) ou dernier jour compté (épisodes) */
+ date: string
+ /** Nombre compté pour cette fiche (1 par titre, n épisodes) */
+ amount: number
+ rewatch?: boolean
+ /** Une partie est estimée (épisodes sans date) */
+ estimated?: boolean
+}
+
+export interface ChallengeProgress {
+ count: number
+ entries: CountedEntry[]
+ estimated: boolean
+ done: boolean
+ /** Jour où l'objectif a été atteint */
+ doneAt?: string
+ state: 'upcoming' | 'active' | 'done' | 'missed'
+ /** Écart avec le rythme régulier (positif : en avance) */
+ pace: number
+ daysLeft: number
+ /** Jours avant le début (défi à venir) */
+ startsIn: number
+ /** Part de la période écoulée (0 → 1) */
+ elapsed: number
+}
+
+const matches = (item: MediaItem, media: Media) => media === 'all' || item.type === media
+
+/** Nombre compté par jour (pour la date de réussite et le rythme). */
+function dailyCounts(c: Pick, items: MediaItem[]) {
+ const s = toNum(c.start)
+ const e = toNum(c.end)
+ const perDay = new Map()
+ const add = (day: number, n: number) => perDay.set(day, (perDay.get(day) ?? 0) + n)
+ const entries: CountedEntry[] = []
+ let estimated = false
+
+ for (const item of items) {
+ if (!matches(item, c.media)) continue
+ if (c.unit === 'titles') {
+ if (item.status === 'termine' && item.endDate && item.endDate >= c.start && item.endDate <= c.end) {
+ entries.push({ item, date: item.endDate, amount: 1 })
+ add(toNum(item.endDate), 1)
+ }
+ for (const d of item.rewatchDates ?? []) {
+ if (d >= c.start && d <= c.end) {
+ entries.push({ item, date: d, amount: 1, rewatch: true })
+ add(toNum(d), 1)
+ }
+ }
+ continue
+ }
+
+ // Épisodes (les films n'en ont pas)
+ if (!TYPE_BY_VALUE[item.type].episodic || item.episodesWatched <= 0) continue
+ let amount = 0
+ let last = ''
+ let partEstimated = false
+ const log = item.episodeLog ?? {}
+ const logDays = Object.keys(log).sort()
+ let logged = 0
+ for (const d of logDays) {
+ logged += log[d]
+ if (d >= c.start && d <= c.end) {
+ amount += log[d]
+ add(toNum(d), log[d])
+ if (d > last) last = d
+ }
+ }
+ const unlogged = Math.max(0, item.episodesWatched - logged)
+ const from = item.startDate ?? item.endDate
+ if (unlogged > 0 && from) {
+ let to = item.endDate ?? (logDays[0] ? fromNum(toNum(logDays[0]) - 1) : item.updatedAt.slice(0, 10))
+ if (!safeDay(to) || to < from) to = from
+ const a = toNum(from)
+ const b = toNum(to)
+ const lo = Math.max(a, s)
+ const hi = Math.min(b, e)
+ if (hi >= lo) {
+ const rate = unlogged / (b - a + 1)
+ for (let d = lo; d <= hi; d++) add(d, rate)
+ amount += rate * (hi - lo + 1)
+ partEstimated = true
+ const lastEst = fromNum(hi)
+ if (lastEst > last) last = lastEst
+ }
+ }
+ if (amount > 0.05) {
+ if (partEstimated) estimated = true
+ entries.push({ item, date: last, amount: partEstimated ? Math.max(1, Math.round(amount)) : amount, estimated: partEstimated })
+ }
+ }
+ return { perDay, entries, estimated }
+}
+
+export function computeProgress(c: Challenge, items: MediaItem[], today = localDay()): ChallengeProgress {
+ const { perDay, entries, estimated } = dailyCounts(c, items)
+ const s = toNum(c.start)
+ const e = toNum(c.end)
+ const now = toNum(today)
+
+ // Cumul jour par jour : date de réussite
+ let total = 0
+ let doneAt: string | undefined
+ const days = [...perDay.keys()].sort((a, b) => a - b)
+ for (const d of days) {
+ total += perDay.get(d)!
+ if (!doneAt && total + 1e-6 >= c.target) doneAt = fromNum(d)
+ }
+ const count = Math.round(total)
+ const done = count >= c.target
+ if (!done) doneAt = undefined
+ else if (!doneAt) doneAt = fromNum(Math.min(now, e))
+
+ const length = e - s + 1
+ const elapsedDays = Math.min(length, Math.max(0, now - s + 1))
+ const elapsed = elapsedDays / length
+ const pace = count - c.target * elapsed
+ const state: ChallengeProgress['state'] = done ? 'done' : now < s ? 'upcoming' : now > e ? 'missed' : 'active'
+
+ entries.sort((a, b) => b.date.localeCompare(a.date) || a.item.title.localeCompare(b.item.title, locale()))
+ return { count, entries, estimated, done, doneAt, state, pace, daysLeft: Math.max(0, e - now), startsIn: Math.max(0, s - now), elapsed }
+}
+
+// ─── Textes ───
+
+/** « 52 films », « 1 épisode », « 3 animes »… */
+export function quantity(count: number, media: Media, unit: Challenge['unit']): string {
+ if (unit === 'episodes') return t('challenges.qty.episode', { count })
+ switch (media) {
+ case 'film':
+ return t('challenges.qty.film', { count })
+ case 'serie':
+ return t('challenges.qty.serie', { count })
+ case 'anime':
+ return t('challenges.qty.anime', { count })
+ case 'kdrama':
+ return t('challenges.qty.kdrama', { count })
+ case 'cdrama':
+ return t('challenges.qty.cdrama', { count })
+ case 'autre':
+ return t('challenges.qty.autre', { count })
+ default:
+ return t('challenges.qty.title', { count })
+ }
+}
+
+export function mediaLabel(media: Media): string {
+ return media === 'all' ? t('common.all') : TYPE_BY_VALUE[media as MediaType].label
+}
+
+const fmtYear = (d: string) => new Intl.NumberFormat(locale(), { useGrouping: false }).format(Number(d.slice(0, 4)))
+const capitalize = (s: string) => s.charAt(0).toLocaleUpperCase(locale()) + s.slice(1)
+
+export function periodLabel(c: Pick): string {
+ const loc = locale()
+ try {
+ if (c.period === 'year' && c.start.endsWith('-01-01') && c.end === `${c.start.slice(0, 4)}-12-31`) return fmtYear(c.start)
+ if (c.period === 'month') return capitalize(new Intl.DateTimeFormat(loc, { month: 'long', year: 'numeric', calendar: 'gregory' }).format(asDate(c.start)))
+ if (c.period === 'week') return t('challenges.weekOf', { date: new Intl.DateTimeFormat(loc, { day: 'numeric', month: 'short', calendar: 'gregory' }).format(asDate(c.start)) })
+ const sameYear = c.start.slice(0, 4) === c.end.slice(0, 4)
+ const f = new Intl.DateTimeFormat(loc, { day: 'numeric', month: 'short', year: 'numeric', calendar: 'gregory' })
+ const fs = sameYear ? new Intl.DateTimeFormat(loc, { day: 'numeric', month: 'short', calendar: 'gregory' }) : f
+ return `${fs.format(asDate(c.start))} – ${f.format(asDate(c.end))}`
+ } catch {
+ return `${c.start} – ${c.end}`
+ }
+}
+
+/** Titre affiché : nom choisi, sinon « 52 films · 2026 ». */
+export function challengeTitle(c: Challenge): string {
+ if (c.name) return c.name
+ const parts = [quantity(c.target, c.media, c.unit)]
+ if (c.unit === 'episodes' && c.media !== 'all') parts.push(TYPE_BY_VALUE[c.media as MediaType].label)
+ return parts.join(' · ')
+}
+
+export function formatDay(d: string): string {
+ try {
+ return new Intl.DateTimeFormat(locale(), { day: 'numeric', month: 'long', year: 'numeric', calendar: 'gregory' }).format(asDate(d))
+ } catch {
+ return d
+ }
+}
+
+/** Modèles prêts à l'emploi */
+export interface ChallengeTemplate {
+ target: number
+ media: Media
+ unit: Challenge['unit']
+ period: Exclude
+}
+
+export const TEMPLATES: ChallengeTemplate[] = [
+ { target: 52, media: 'film', unit: 'titles', period: 'year' },
+ { target: 4, media: 'anime', unit: 'titles', period: 'month' },
+ { target: 20, media: 'all', unit: 'episodes', period: 'week' },
+ { target: 10, media: 'kdrama', unit: 'titles', period: 'year' },
+ { target: 100, media: 'all', unit: 'titles', period: 'year' },
+ { target: 5, media: 'film', unit: 'titles', period: 'month' },
+ { target: 12, media: 'serie', unit: 'titles', period: 'year' },
+ { target: 6, media: 'cdrama', unit: 'titles', period: 'year' },
+]
+
+export function fromTemplate(tpl: ChallengeTemplate, today = localDay()): Challenge {
+ return { id: newChallengeId(), target: tpl.target, media: tpl.media, unit: tpl.unit, period: tpl.period, ...periodBounds(tpl.period, today) }
+}
+
+/** Même défi sur la période en cours (« Recommencer »). */
+export function renewed(c: Challenge, today = localDay()): Challenge {
+ const bounds = c.period === 'custom' ? (() => {
+ const len = toNum(c.end) - toNum(c.start)
+ return { start: today, end: fromNum(toNum(today) + len) }
+ })() : periodBounds(c.period, today)
+ return { ...c, id: newChallengeId(), archived: undefined, ...bounds }
+}
+
+// ─── Célébration (une fois par défi et par appareil) ───
+
+const CELEBRATED_KEY = 'azuucine:challenges-celebrated'
+
+export function celebrated(): Set {
+ try {
+ const raw = JSON.parse(localStorage.getItem(CELEBRATED_KEY) ?? '[]')
+ return new Set(Array.isArray(raw) ? raw.filter((x): x is string => typeof x === 'string').slice(-200) : [])
+ } catch {
+ return new Set()
+ }
+}
+
+export function markCelebrated(id: string) {
+ try {
+ const set = celebrated()
+ set.add(id)
+ localStorage.setItem(CELEBRATED_KEY, JSON.stringify([...set].slice(-200)))
+ } catch {
+ /* ignore */
+ }
+}
diff --git a/src/lib/cloud/sync.ts b/src/lib/cloud/sync.ts
index 48262b4..9840f5e 100644
--- a/src/lib/cloud/sync.ts
+++ b/src/lib/cloud/sync.ts
@@ -15,7 +15,7 @@ import { cloudFetch } from './api'
* En cas de conflit, la modification la plus récente gagne (vérifié aussi par la base).
*/
-export type SyncedSettings = Pick
+export type SyncedSettings = Pick
export interface SyncHooks {
getLists: () => CustomList[]
diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx
index 016342d..85e9d95 100644
--- a/src/pages/HomePage.tsx
+++ b/src/pages/HomePage.tsx
@@ -7,6 +7,7 @@ import Avatar from '../components/social/Avatar'
import FriendsFeed from '../components/social/FriendsFeed'
import Poster from '../components/Poster'
import TopFive from '../components/TopFive'
+import ChallengesCard from '../components/challenges/ChallengesCard'
import Recommendations from '../components/Recommendations'
import HomeHero, { ContinueCard } from '../components/HomeHero'
import type { Tab } from '../components/BottomNav'
@@ -241,6 +242,8 @@ export default function HomePage({ onOpen, onAdd, onNavigate, onRoulette, onCale
>
)}
+
+
{toWatch.length > 0 && (
<>
{t('status.a_voir')}
diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx
index d8ab5cf..1051f08 100644
--- a/src/pages/SettingsPage.tsx
+++ b/src/pages/SettingsPage.tsx
@@ -17,6 +17,7 @@ import { cx } from '../lib/utils'
import { useEscape } from '../lib/escape'
import { useBackToClose } from '../lib/backNav'
import { useMedia } from '../store'
+import { mergeImportedSettings } from '../lib/challenges'
type Message = { kind: 'ok' | 'error'; text: string }
@@ -124,7 +125,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
if (!pending) return
setConfirm(null)
await importItems(pending.items, mode)
- if (pending.settings) updateSettings(pending.settings)
+ if (pending.settings) updateSettings(mode === 'merge' ? mergeImportedSettings(pending.settings, settings) : pending.settings)
if (pending.lists) mergeLists(pending.lists, mode)
setMessage({
kind: 'ok',
diff --git a/src/store.tsx b/src/store.tsx
index 23edc9d..e34bb67 100644
--- a/src/store.tsx
+++ b/src/store.tsx
@@ -16,6 +16,7 @@ import { episodesPatch } from './lib/progress'
import { uid } from './lib/utils'
import { episodeCap } from './lib/franchise'
import { airedCount } from './lib/airing'
+import { logEpisodes } from './lib/challenges'
// Clés propres à l'espace actif (compte connecté, ou appareil sans compte)
const settingsKey = () => scopedKey('settings')
@@ -169,8 +170,8 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
getLists: () => listsRef.current,
applyLists: (next) => setLists(() => next, true),
getSettings: () => {
- const { ratingScale, topCategories, accentColor, themeMode, notifPrefs } = settingsRef.current
- return { ratingScale, topCategories, accentColor, themeMode, notifPrefs }
+ const { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges } = settingsRef.current
+ return { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges }
},
applySettings: (patch) => updateSettingsRef.current(patch, true),
itemsChanged: () => void reloadItems(),
@@ -211,7 +212,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
}, [settings.themeMode])
const updateSettings = useCallback((patch: Partial, silent = false) => {
- if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'notifPrefs' in patch)) syncRef.current.markSettings()
+ if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'notifPrefs' in patch || 'challenges' in patch)) syncRef.current.markSettings()
setSettings((prev) => {
const next = { ...prev, ...patch }
try {
@@ -248,7 +249,11 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
async (id: string, patch: Partial) => {
const current = itemsRef.current.find((i) => i.id === id)
if (!current) return
- await save({ ...current, ...patch, updatedAt: new Date().toISOString() })
+ const next = { ...current, ...patch, updatedAt: new Date().toISOString() }
+ // Défis : on retient le jour où des épisodes sont cochés (ou décochés)
+ const delta = (patch.episodesWatched ?? current.episodesWatched) - current.episodesWatched
+ if (delta) next.episodeLog = logEpisodes(current.episodeLog, delta)
+ await save(next)
},
[save],
)
diff --git a/src/types.ts b/src/types.ts
index ad7da63..53d24b2 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -55,6 +55,8 @@ export interface MediaItem {
rewatchDates?: string[]
/** Note moyenne du public sur 10 (TMDB ou AniList). */
publicRating?: number
+ /** Épisodes cochés par jour (AAAA-MM-JJ → nombre), pour les défis. Privé (retiré des profils publics). */
+ episodeLog?: Record
createdAt: string // ISO
updatedAt: string // ISO
@@ -88,6 +90,24 @@ export interface Settings {
themeMode: ThemeMode
/** Notifications reçues (true par défaut si absent). Nécessite un compte. */
notifPrefs?: NotifPrefs
+ /** Défis de visionnage (synchronisés avec les réglages, privés). */
+ challenges?: Challenge[]
+}
+
+/** Défi : « voir N films en 2026 », « 20 épisodes cette semaine »… */
+export interface Challenge {
+ id: string
+ /** Objectif (quantité) */
+ target: number
+ media: MediaType | 'all'
+ /** Titres terminés ou épisodes vus */
+ unit: 'titles' | 'episodes'
+ period: 'week' | 'month' | 'year' | 'custom'
+ /** Bornes incluses, AAAA-MM-JJ */
+ start: string
+ end: string
+ name?: string
+ archived?: boolean
}
/** Types de notifications que l'on choisit de recevoir (true par défaut). */
diff --git a/supabase/migrations/20261009140000_challenges.sql b/supabase/migrations/20261009140000_challenges.sql
new file mode 100644
index 0000000..57d74eb
--- /dev/null
+++ b/supabase/migrations/20261009140000_challenges.sql
@@ -0,0 +1,39 @@
+-- Défis de visionnage (idempotent)
+--
+-- 1) Les défis vivent dans les réglages synchronisés (public.settings.data → "challenges", 15 max).
+-- La limite de 4 000 octets du JSON des réglages devient 16 000 octets.
+-- 2) Les fiches gagnent un journal privé des épisodes cochés par jour ("episodeLog") :
+-- il est retiré des fiches montrées aux autres (profil public, fil d'amis), comme les listes perso.
+
+-- ─── 1. Taille des réglages ───
+do $$
+declare
+ c record;
+begin
+ for c in
+ select con.conname
+ from pg_constraint con
+ where con.conrelid = 'public.settings'::regclass
+ and con.contype = 'c'
+ and pg_get_constraintdef(con.oid) ilike '%octet_length%'
+ loop
+ execute format('alter table public.settings drop constraint %I', c.conname);
+ end loop;
+end;
+$$;
+
+alter table public.settings
+ add constraint settings_data_check
+ check (jsonb_typeof(data) = 'object' and octet_length(data::text) <= 16000);
+
+-- ─── 2. Fiche publique : sans le journal des épisodes ───
+create or replace function public.public_item(d jsonb)
+returns jsonb
+language sql
+immutable
+set search_path = ''
+as $$
+ select case when length(coalesce(x->>'poster', '')) > 150000 then x - 'poster' else x end
+ -- Les avis sont publics (comme sur Letterboxd) ; les listes perso et le journal des épisodes restent privés
+ from (select d - 'listIds' - 'notesPublic' - 'episodeLog' as x) s
+$$;