diff --git a/src/components/challenges/ChallengeBits.tsx b/src/components/challenges/ChallengeBits.tsx new file mode 100644 index 0000000..cc0c92e --- /dev/null +++ b/src/components/challenges/ChallengeBits.tsx @@ -0,0 +1,109 @@ +import { Check } from 'lucide-react' +import { useEffect, useState, type ReactNode } from 'react' +import { fmtNumber, t } from '../../i18n' +import { formatDay, mediaLabel, periodLabel, quantity, type ChallengeProgress } from '../../lib/challenges' +import { cx } from '../../lib/utils' +import type { Challenge } from '../../types' + +/** Anneau de progression (piste discrète, arc à la couleur d'accent). */ +export function ProgressRing({ value, size = 56, stroke = 5, done, children, animate = true, label }: { label?: string; value: number; size?: number; stroke?: number; done?: boolean; children?: ReactNode; animate?: boolean }) { + const r = (size - stroke) / 2 + const c = 2 * Math.PI * r + const target = Math.max(0, Math.min(1, value)) + // L'arc se remplit à l'apparition (sauf mouvement réduit, géré par le CSS de transition) + const [shown, setShown] = useState(animate ? 0 : target) + useEffect(() => { + const id = requestAnimationFrame(() => setShown(target)) + return () => cancelAnimationFrame(id) + }, [target]) + return ( + + + + {done ? ( + + + + ) : ( + children + )} + + + ) +} + +export const percent = (p: ChallengeProgress, c: Challenge) => Math.min(100, Math.floor((p.count / c.target) * 100)) + +/** « 3 films d'avance », « Réussi le 4 octobre »… */ +export function paceText(c: Challenge, p: ChallengeProgress): string { + if (p.state === 'done') return p.doneAt ? t('challenges.doneOn', { date: formatDay(p.doneAt) }) : t('challenges.done') + if (p.state === 'missed') return t('challenges.missed') + if (p.state === 'upcoming') return t('challenges.startsIn', { count: p.startsIn }) + if (p.pace >= 1) return t('challenges.ahead', { what: quantity(Math.floor(p.pace), c.media, c.unit) }) + if (p.pace <= -1) return t('challenges.behind', { what: quantity(Math.floor(-p.pace), c.media, c.unit) }) + return t('challenges.onPace') +} + +export function daysText(p: ChallengeProgress): string | null { + if (p.state !== 'active') return null + return p.daysLeft === 0 ? t('challenges.lastDay') : t('challenges.daysLeft', { count: p.daysLeft }) +} + +/** « 12 / 52 films » */ +export function CountLine({ c, p, className }: { c: Challenge; p: ChallengeProgress; className?: string }) { + return ( + + {fmtNumber(p.count)} + / + {quantity(c.target, c.media, c.unit)} + + ) +} + +/** Ligne de défi (accueil et liste) : anneau, progression, période, rythme. */ +export function ChallengeSummary({ c, p, onClick, ring = 56 }: { c: Challenge; p: ChallengeProgress; onClick: () => void; ring?: number }) { + const days = daysText(p) + return ( + + ) +} diff --git a/src/components/challenges/ChallengesCard.tsx b/src/components/challenges/ChallengesCard.tsx new file mode 100644 index 0000000..faa6545 --- /dev/null +++ b/src/components/challenges/ChallengesCard.tsx @@ -0,0 +1,105 @@ +import { Target, Trophy, X } from 'lucide-react' +import { useEffect, useMemo, useState } from 'react' +import { t } from '../../i18n' +import { celebrated, challengeTitle, computeProgress, markCelebrated } from '../../lib/challenges' +import { todayISO } from '../../lib/utils' +import { useMedia } from '../../store' +import type { MediaItem } from '../../types' +import { LinkArrow, SectionTitle } from '../ui' +import { ChallengeSummary } from './ChallengeBits' +import ChallengesSheet, { type ChallengesView } from './ChallengesSheet' + +const HOME_MAX = 3 + +/** Carte « Défis » de l'accueil : défis en cours, rythme, petite célébration à la réussite. */ +export default function ChallengesCard({ onOpen }: { onOpen: (item: MediaItem) => void }) { + const { items, settings } = useMedia() + const [sheet, setSheet] = useState(null) + const today = todayISO() + + const rows = useMemo( + () => + (settings.challenges ?? []) + .filter((c) => !c.archived && c.end >= today) + .map((c) => ({ c, p: computeProgress(c, items, today) })) + // En cours d'abord (fin la plus proche), puis à venir, puis réussis + .sort((a, b) => rank(a.p.state) - rank(b.p.state) || a.c.end.localeCompare(b.c.end)), + [settings.challenges, items, today], + ) + + // Célébration : une fois par défi réussi (et par appareil) + const [party, setParty] = useState([]) + useEffect(() => { + const seen = celebrated() + const fresh = rows.filter((r) => r.p.done && !seen.has(r.c.id)).map((r) => r.c.id) + if (!fresh.length) return + fresh.forEach(markCelebrated) + setParty((prev) => [...new Set([...prev, ...fresh])]) + }, [rows]) + const partyRow = rows.find((r) => party.includes(r.c.id)) + + const shown = rows.slice(0, HOME_MAX) + const sheetEl = sheet && 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}

+ +
+
+
+
{body}
+
+
+ ) +} + +// ─── 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 ( +
{ + e.preventDefault() + if (!valid) return + const name = draft.name?.trim().slice(0, NAME_MAX) + onSave({ ...draft, name: name || undefined }) + }} + className="space-y-6" + > +
+ {t('challenges.target')} +
+ + { + setTargetText(e.target.value) + const n = Number(e.target.value) + if (Number.isFinite(n) && n >= 1) set({ target: Math.min(TARGET_MAX, Math.round(n)) }) + }} + onBlur={() => setTarget(Number(targetText))} + className="field w-24 text-center text-lg font-semibold tabular-nums" + aria-label={t('challenges.target')} + /> + +
+
+ +
+ {t('challenges.media')} +
+ {(['all', ...MEDIA_TYPES.map((m) => m.value)] as Challenge['media'][]).map((m) => ( + + ))} +
+
+ +
+ {t('challenges.unit')} +
+ {UNITS.map((u) => ( + + ))} +
+
+ +
+ {t('challenges.period')} +
+ {PERIODS.map((p) => ( + + ))} +
+ {draft.period === 'custom' ? ( +
+ + +
+ ) : ( +

{periodLabel(draft)}

+ )} +
+ + + + {preview && ( +
+ +

{t('challenges.preview', { what: quantity(preview.count, draft.media, draft.unit) })}

+
+ )} + + +
+ ) +} diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 337113f..69a5109 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -1173,6 +1173,121 @@ const dict: Translations = { 'import.err.read': "الملف غير معروف لهذا المصدر.", 'import.err.empty': "لم يُعثر على أي عنوان في هذا الملف.", 'import.err.user': "مستخدم AniList غير موجود، أو القائمة خاصة.", + + // — 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 9b5aecf..eb6569b 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Datei für diese Quelle nicht erkannt.", 'import.err.empty': "Keine Titel in dieser Datei gefunden.", 'import.err.user': "AniList-Nutzer nicht gefunden oder Liste privat.", + + // — 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 66dd0a7..dbe6e55 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "File not recognised for this source.", 'import.err.empty': "No titles found in this file.", 'import.err.user': "AniList user not found, or the list is private.", + + // — 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 86e21a5..040c40c 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Archivo no reconocido para esta fuente.", 'import.err.empty': "No se encontró ningún título en este archivo.", 'import.err.user': "Usuario de AniList no encontrado, o lista privada.", + + // — 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 1b4c11a..0fe58fc 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -1004,6 +1004,77 @@ const dict = { 'import.err.read': "Fichier non reconnu pour cette source.", 'import.err.empty': "Aucun titre trouvé dans ce fichier.", 'import.err.user': "Membre AniList introuvable, ou liste privée.", + + // — 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 57ac4fb..0ee1809 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "इस स्रोत के लिए फ़ाइल पहचानी नहीं गई।", 'import.err.empty': "इस फ़ाइल में कोई टाइटल नहीं मिला।", 'import.err.user': "AniList यूज़र नहीं मिला, या सूची निजी है।", + + // — 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 0d9baa4..5c347f5 100644 --- a/src/i18n/locales/id.ts +++ b/src/i18n/locales/id.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "File tidak dikenali untuk sumber ini.", 'import.err.empty': "Tidak ada judul di file ini.", 'import.err.user': "Pengguna AniList tidak ditemukan, atau daftarnya privat.", + + // — 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 bb677f8..b27422f 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "File non riconosciuto per questa fonte.", 'import.err.empty': "Nessun titolo trovato in questo file.", 'import.err.user': "Utente AniList non trovato, o lista privata.", + + // — 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 ac0c232..5f898f4 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "このソースのファイルではありません。", 'import.err.empty': "このファイルに作品が見つかりません。", 'import.err.user': "AniList ユーザーが見つからないか、リストが非公開です。", + + // — 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 8284de4..42c444d 100644 --- a/src/i18n/locales/ko.ts +++ b/src/i18n/locales/ko.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "이 소스의 파일이 아니에요.", 'import.err.empty': "이 파일에서 작품을 찾지 못했어요.", 'import.err.user': "AniList 사용자를 찾을 수 없거나 목록이 비공개예요.", + + // — 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 09caec1..b966af8 100644 --- a/src/i18n/locales/nl.ts +++ b/src/i18n/locales/nl.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Bestand niet herkend voor deze bron.", 'import.err.empty': "Geen titels gevonden in dit bestand.", 'import.err.user': "AniList-gebruiker niet gevonden, of lijst privé.", + + // — 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 eacf7c2..aee0fe4 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -1116,6 +1116,99 @@ const dict: Translations = { 'import.err.read': "Plik nierozpoznany dla tego źródła.", 'import.err.empty': "W tym pliku nie znaleziono żadnych tytułów.", 'import.err.user': "Nie znaleziono użytkownika AniList lub lista jest prywatna.", + + // — 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 360f5a5..974058c 100644 --- a/src/i18n/locales/pt.ts +++ b/src/i18n/locales/pt.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Arquivo não reconhecido para esta fonte.", 'import.err.empty': "Nenhum título encontrado neste arquivo.", 'import.err.user': "Usuário do AniList não encontrado, ou lista privada.", + + // — 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 16b8965..5641dd9 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -1116,6 +1116,99 @@ const dict: Translations = { 'import.err.read': "Файл не подходит для этого источника.", 'import.err.empty': "В этом файле не найдено тайтлов.", 'import.err.user': "Пользователь AniList не найден или список закрыт.", + + // — 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 33c1470..5b61721 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "ไม่รู้จักไฟล์สำหรับแหล่งนี้", 'import.err.empty': "ไม่พบรายการในไฟล์นี้", 'import.err.user': "ไม่พบผู้ใช้ AniList หรือรายการเป็นส่วนตัว", + + // — 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 054c895..d6e0d87 100644 --- a/src/i18n/locales/tr.ts +++ b/src/i18n/locales/tr.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Dosya bu kaynak için tanınmadı.", 'import.err.empty': "Bu dosyada başlık bulunamadı.", 'import.err.user': "AniList kullanıcısı bulunamadı ya da liste gizli.", + + // — 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 9298752..3950cdf 100644 --- a/src/i18n/locales/vi.ts +++ b/src/i18n/locales/vi.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "Tệp không phù hợp với nguồn này.", 'import.err.empty': "Không tìm thấy tựa nào trong tệp này.", 'import.err.user': "Không tìm thấy người dùng AniList, hoặc danh sách ở chế độ riêng tư.", + + // — 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 72f5f49..6acfe60 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -1002,6 +1002,77 @@ const dict: Translations = { 'import.err.read': "该文件不属于此来源。", 'import.err.empty': "此文件中没有找到作品。", 'import.err.user': "找不到该 AniList 用户,或列表未公开。", + + // — 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 fad9d29..6e2816f 100644 --- a/src/lib/backup.ts +++ b/src/lib/backup.ts @@ -19,6 +19,7 @@ import { safeStringList, } from './security' import { normalizeText, 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)) @@ -130,6 +131,7 @@ export function normalizeItem(raw: unknown): MediaItem | null { tags, 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 @@ -152,6 +154,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 12c1097..ddad8de 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -18,6 +18,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 } @@ -125,7 +126,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 e25683e..57b1ef7 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') @@ -179,8 +180,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(), @@ -221,7 +222,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 { @@ -258,7 +259,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 acbbd63..1ddc79a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -57,6 +57,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 @@ -90,6 +92,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..95ec840 --- /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' - 'tags' - 'episodeLog' as x) s +$$;