Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95bf8f67f2 | ||
|
|
aae386de01 | ||
|
|
449d22666b | ||
|
|
6c18cfe71e | ||
|
|
586c1ec00a | ||
|
|
0adcafecf0 | ||
|
|
6f7064f53f | ||
|
|
53d984af8a | ||
|
|
308c0f2327 | ||
|
|
21e4354742 | ||
|
|
945ee32200 | ||
|
|
0dab749134 | ||
|
|
94c27739b2 | ||
|
|
3c0ffe40c6 | ||
|
|
c246b16e7e |
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# Sauvegarde automatique de la base Supabase : chaque nuit, pg_dump -> chiffrement -> VPS, avec rotation
|
||||
# (7 quotidiennes, 4 hebdomadaires, 6 mensuelles). Voir deploy/BACKUP.md.
|
||||
# Secrets à créer dans Gitea (Dépôt -> Paramètres -> Actions -> Secrets) — JAMAIS dans le dépôt :
|
||||
# SUPABASE_DB_URL chaîne « Session pooler » (IPv4) de Supabase, avec le mot de passe de la base
|
||||
# BACKUP_PASSPHRASE phrase de chiffrement (16 caractères min.), conservée aussi hors du VPS
|
||||
# Variable optionnelle : BACKUP_DIR (défaut /srv/backups/azuucine)
|
||||
name: backup
|
||||
on:
|
||||
schedule:
|
||||
- cron: '17 2 * * *' # tous les jours à 02:17 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
backup:
|
||||
runs-on: azuucine
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Récupérer le script
|
||||
# Le jeton n'est visible que de cette étape
|
||||
env:
|
||||
GIT_TOKEN: ${{ github.token }}
|
||||
REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
|
||||
run: |
|
||||
rm -rf src
|
||||
AUTH=$(printf 'x-access-token:%s' "$GIT_TOKEN" | base64 -w0)
|
||||
git -c http.extraheader="AUTHORIZATION: basic $AUTH" clone --depth 1 --branch main "$REPO_URL" src
|
||||
- name: Sauvegarder (dump, contrôle, chiffrement, rotation)
|
||||
env:
|
||||
SUPABASE_DB_URL: ${{ secrets.SUPABASE_DB_URL }}
|
||||
BACKUP_PASSPHRASE: ${{ secrets.BACKUP_PASSPHRASE }}
|
||||
BACKUP_DIR: ${{ vars.BACKUP_DIR }}
|
||||
run: bash src/deploy/backup.sh
|
||||
@@ -57,9 +57,10 @@ npm run build # build de prod
|
||||
- Garder les fichiers idempotents côté SQL.
|
||||
- RTL géré (arabe) : préférer les classes logiques (`ps-`/`pe-`, `ms-`/`me-`, `start-`/`end-`, `border-e`).
|
||||
|
||||
## État / en attente (au 8 oct. 2026)
|
||||
- **À appliquer dans Supabase SQL Editor** : `supabase/migrations/20261007120000_social_notifications.sql`
|
||||
(avis par titre, réactions emoji, notifications : abonnements / demandes acceptées / réactions reçues /
|
||||
**nouveaux épisodes** des séries suivies, + préférences `notifPrefs` dans les réglages). Testé localement, jamais encore exécuté sur le projet réel.
|
||||
- Ensuite : `git push` pour déployer le client.
|
||||
- Recommandé dans le tableau de bord Supabase : activer **Leaked Password Protection** (Authentication → Passwords).
|
||||
## État / en attente (au 9 oct. 2026)
|
||||
- Appliqués en ligne : tout jusqu'à `20261008150000`, + `20261009110000_private_tags` et `20261009140000_challenges`.
|
||||
- **À coller dans SQL Editor** : `supabase/A_COLLER_2026-10-09.sql` (commentaires/spoilers, listes partagées, web push, modération, bugs/erreurs). Idempotent.
|
||||
- Edge functions déployées : `tmdb` v4 (watch/providers, /find), `send-push` v1.
|
||||
- Push : générer les clés (`node scripts/gen-vapid.mjs`), 4 secrets Edge Functions + `azuu_push_secret` dans Vault → voir `supabase/PUSH_SETUP.md`.
|
||||
- Sauvegardes : secrets Gitea `SUPABASE_DB_URL` + `BACKUP_PASSPHRASE`, préparation du VPS → voir `deploy/BACKUP.md`.
|
||||
- Recommandé : activer **Leaked Password Protection** (Authentication → Passwords) ; supprimer `_tmp_ping2` / `_tmp_sd2`.
|
||||
@@ -0,0 +1,114 @@
|
||||
# Sauvegardes automatiques de la base (Supabase → VPS)
|
||||
|
||||
Chaque nuit à 02:17 UTC, le workflow `.gitea/workflows/backup.yml` lance `deploy/backup.sh` sur le
|
||||
runner `azuucine` (le VPS) :
|
||||
|
||||
1. `pg_dump` de toute la base (format custom compressé : tables, données, fonctions, policies RLS,
|
||||
comptes `auth.users`), via la connexion **Session pooler IPv4** de Supabase ;
|
||||
2. **contrôles** : taille minimale, dump lisible par `pg_restore`, présence des tables `items`,
|
||||
`profiles`, `follows`, `settings` et `auth.users` — sinon le job **échoue** (croix rouge dans Gitea) ;
|
||||
3. **chiffrement** gpg symétrique AES-256 avec `BACKUP_PASSPHRASE`, puis vérification que le fichier
|
||||
se déchiffre bien ;
|
||||
4. rangement dans `/srv/backups/azuucine/` (dossier en `700`) et **rotation** :
|
||||
7 quotidiennes, 4 hebdomadaires, 6 mensuelles (liens physiques : une même sauvegarde n'occupe
|
||||
la place qu'une fois).
|
||||
|
||||
Les secrets ne sont jamais dans le dépôt ni affichés dans les logs ; le mot de passe de la base passe
|
||||
par `PGPASSWORD` (pas sur la ligne de commande).
|
||||
|
||||
Pour restaurer : **`deploy/restore.md`**.
|
||||
|
||||
## Mise en place (une seule fois)
|
||||
|
||||
### 1. Chaîne de connexion Supabase
|
||||
|
||||
Supabase → projet `qfgnxonqwldcfdjqhhjz` → **Connect** → **Session pooler** (IPv4, port 5432) :
|
||||
|
||||
```
|
||||
postgresql://postgres.qfgnxonqwldcfdjqhhjz:[YOUR-PASSWORD]@aws-0-<région>.pooler.supabase.com:5432/postgres
|
||||
```
|
||||
|
||||
Remplacer `[YOUR-PASSWORD]` par le mot de passe de la base (Project Settings → Database → Reset
|
||||
database password si tu ne l'as plus ; **les caractères spéciaux doivent être encodés en %XX**,
|
||||
ex. `@` → `%40`, ou choisir un mot de passe sans caractères spéciaux, long).
|
||||
|
||||
> Pourquoi le *Session pooler* : la connexion directe `db.<ref>.supabase.co` est en IPv6 seulement ;
|
||||
> le pooler « session » est IPv4 et accepte `pg_dump` (le pooler « transaction », port 6543, non).
|
||||
|
||||
### 2. Phrase de chiffrement
|
||||
|
||||
Générer une phrase longue et la ranger **dans ton gestionnaire de mots de passe** (si le VPS meurt,
|
||||
c'est la seule façon de relire les sauvegardes copiées ailleurs) :
|
||||
|
||||
```bash
|
||||
openssl rand -base64 32
|
||||
```
|
||||
|
||||
### 3. Secrets Gitea
|
||||
|
||||
Dépôt `romain/azuucine` → **Paramètres → Actions → Secrets** :
|
||||
|
||||
| Nom | Valeur |
|
||||
| --- | --- |
|
||||
| `SUPABASE_DB_URL` | la chaîne de l'étape 1 |
|
||||
| `BACKUP_PASSPHRASE` | la phrase de l'étape 2 |
|
||||
|
||||
Optionnel, **Variables** : `BACKUP_DIR` (défaut `/srv/backups/azuucine`).
|
||||
|
||||
### 4. Préparer le VPS (en root, une fois)
|
||||
|
||||
Le runner tourne avec l'utilisateur `deploy` (sans sudo). Il lui faut un client Postgres **de la même
|
||||
version majeure que Supabase ou plus récent** (Supabase → Project Settings → Infrastructure ; 15 ou 17),
|
||||
`gpg`, et le dossier des sauvegardes :
|
||||
|
||||
```bash
|
||||
# Client Postgres officiel (dépôt PGDG), ex. version 17
|
||||
apt-get install -y gnupg postgresql-common
|
||||
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
|
||||
apt-get install -y postgresql-client-17
|
||||
|
||||
# Dossier dédié, hors de /srv/azuucine (qui est monté dans le conteneur web)
|
||||
install -d -m 700 -o deploy -g deploy /srv/backups/azuucine
|
||||
```
|
||||
|
||||
Alternative sans installer le client : si l'utilisateur `deploy` peut lancer Docker, le script utilise
|
||||
automatiquement l'image `postgres:17-alpine` quand le `pg_dump` local manque ou est trop ancien.
|
||||
|
||||
### 5. Premier lancement
|
||||
|
||||
Gitea → **Actions → backup → Run workflow**. Le log doit finir par :
|
||||
|
||||
```
|
||||
sauvegarde OK : azuucine-AAAAMMJJ-HHMMSS.dump.gpg (… octets chiffrés, … tables de données)
|
||||
daily : 1
|
||||
weekly : 1
|
||||
monthly : 1
|
||||
```
|
||||
|
||||
Puis **tester une restauration** dans une base jetable (`deploy/restore.md`, cas a). Une sauvegarde
|
||||
jamais testée n'est pas une sauvegarde.
|
||||
|
||||
## Surveillance
|
||||
|
||||
- Un échec rend le job rouge dans Gitea : active les **notifications par e-mail des Actions** dans
|
||||
ton profil Gitea (Paramètres → Notifications) pour être prévenu.
|
||||
- `/srv/backups/azuucine/.last-success` contient la date de la dernière sauvegarde réussie.
|
||||
- Le job ne touche pas aux sauvegardes existantes s'il échoue.
|
||||
|
||||
## Recommandé : une copie hors du VPS
|
||||
|
||||
Les sauvegardes sur le VPS protègent contre une erreur côté Supabase (fausse manip, projet supprimé),
|
||||
pas contre la perte du VPS. Les fichiers étant chiffrés, on peut les copier n'importe où sans risque,
|
||||
par exemple chaque semaine depuis un autre ordinateur :
|
||||
|
||||
```bash
|
||||
rsync -a deploy@<vps>:/srv/backups/azuucine/weekly/ ~/Sauvegardes/azuucine/
|
||||
```
|
||||
|
||||
## Lancer une sauvegarde à la main (sur le VPS)
|
||||
|
||||
```bash
|
||||
export SUPABASE_DB_URL='postgresql://…' # ou lu depuis un fichier en 600
|
||||
read -rs BACKUP_PASSPHRASE && export BACKUP_PASSPHRASE
|
||||
bash deploy/backup.sh
|
||||
```
|
||||
Executable
+129
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sauvegarde chiffrée de la base Supabase d'AzuuCine, avec rotation.
|
||||
# Lancé chaque nuit par .gitea/workflows/backup.yml (runner "azuucine", sur le VPS).
|
||||
#
|
||||
# Variables (secrets Gitea, JAMAIS dans le dépôt) :
|
||||
# SUPABASE_DB_URL postgresql://postgres.<ref>:<mot de passe>@aws-0-<région>.pooler.supabase.com:5432/postgres
|
||||
# (Supabase -> Connect -> « Session pooler », IPv4)
|
||||
# BACKUP_PASSPHRASE phrase de chiffrement (gpg symétrique AES-256) — à garder AUSSI hors du VPS
|
||||
# Optionnelles :
|
||||
# BACKUP_DIR dossier des sauvegardes (défaut : /srv/backups/azuucine)
|
||||
# PG_IMAGE image Docker du client Postgres si pg_dump local trop ancien (défaut : postgres:17-alpine)
|
||||
# KEEP_DAILY / KEEP_WEEKLY / KEEP_MONTHLY (défaut : 7 / 4 / 6)
|
||||
# MIN_DUMP_BYTES taille minimale d'un dump valide (défaut : 20000)
|
||||
#
|
||||
# Restauration : voir deploy/restore.md. Procédure complète : deploy/BACKUP.md.
|
||||
set -Eeuo pipefail
|
||||
umask 077
|
||||
|
||||
fail() { echo "ÉCHEC SAUVEGARDE : $*" >&2; exit 1; }
|
||||
trap 'fail "erreur inattendue (ligne $LINENO)"' ERR
|
||||
|
||||
: "${SUPABASE_DB_URL:?SUPABASE_DB_URL manquante (secret Gitea)}"
|
||||
: "${BACKUP_PASSPHRASE:?BACKUP_PASSPHRASE manquante (secret Gitea)}"
|
||||
[ "${#BACKUP_PASSPHRASE}" -ge 16 ] || fail "BACKUP_PASSPHRASE trop courte (16 caractères minimum)"
|
||||
BACKUP_DIR=${BACKUP_DIR:-/srv/backups/azuucine}
|
||||
PG_IMAGE=${PG_IMAGE:-postgres:17-alpine}
|
||||
KEEP_DAILY=${KEEP_DAILY:-7}
|
||||
KEEP_WEEKLY=${KEEP_WEEKLY:-4}
|
||||
KEEP_MONTHLY=${KEEP_MONTHLY:-6}
|
||||
MIN_DUMP_BYTES=${MIN_DUMP_BYTES:-20000}
|
||||
command -v gpg >/dev/null || fail "gpg absent (apt install gnupg)"
|
||||
|
||||
# ── Connexion : le mot de passe passe par PGPASSWORD, jamais sur la ligne de commande (visible dans ps) ──
|
||||
re='^(postgres(ql)?://)([^:/@]+):([^@]*)@(.+)$'
|
||||
[[ "$SUPABASE_DB_URL" =~ $re ]] || fail "SUPABASE_DB_URL mal formée (attendu postgresql://user:motdepasse@hôte:port/base)"
|
||||
DB_URL="${BASH_REMATCH[1]}${BASH_REMATCH[3]}@${BASH_REMATCH[5]}"
|
||||
pw=${BASH_REMATCH[4]}
|
||||
PGPASSWORD=$(printf '%b' "${pw//%/\\x}") # décodage des %XX éventuels
|
||||
export PGPASSWORD
|
||||
export PGSSLMODE=${PGSSLMODE:-require}
|
||||
export PGCONNECT_TIMEOUT=20
|
||||
unset pw
|
||||
|
||||
mkdir -p "$BACKUP_DIR"/{daily,weekly,monthly}
|
||||
chmod 700 "$BACKUP_DIR" "$BACKUP_DIR"/{daily,weekly,monthly}
|
||||
WORK=$(mktemp -d "$BACKUP_DIR/.work.XXXXXX")
|
||||
cleanup() { rm -rf "$WORK"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
# ── Client Postgres : pg_dump local s'il est assez récent (>= version du serveur), sinon Docker ──
|
||||
pg() { # pg <commande> <args…> — exécute un outil client Postgres
|
||||
if [ "${USE_DOCKER:-0}" = 1 ]; then
|
||||
docker run --rm -i --network host --user "$(id -u):$(id -g)" \
|
||||
-e PGPASSWORD -e PGSSLMODE -e PGCONNECT_TIMEOUT -v "$WORK:$WORK" -w "$WORK" "$PG_IMAGE" "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
server_major() { pg psql -X -At -d "$DB_URL" -c 'show server_version_num' | cut -c1-2; }
|
||||
|
||||
USE_DOCKER=0
|
||||
if command -v pg_dump >/dev/null && command -v psql >/dev/null; then
|
||||
local_major=$(pg_dump --version | grep -oE '[0-9]+' | head -1)
|
||||
srv=$(server_major) || fail "connexion à la base impossible (URL, mot de passe, réseau IPv4 ?)"
|
||||
if [ "$local_major" -lt "$srv" ]; then
|
||||
command -v docker >/dev/null || fail "pg_dump $local_major < serveur $srv et Docker absent : installe postgresql-client-$srv"
|
||||
USE_DOCKER=1
|
||||
fi
|
||||
else
|
||||
command -v docker >/dev/null || fail "ni pg_dump ni Docker : installe postgresql-client (même version que Supabase) ou Docker"
|
||||
USE_DOCKER=1
|
||||
srv=$(server_major) || fail "connexion à la base impossible (URL, mot de passe, réseau IPv4 ?)"
|
||||
fi
|
||||
echo "serveur Postgres $srv · client $([ "$USE_DOCKER" = 1 ] && echo "Docker $PG_IMAGE" || echo "local $local_major")"
|
||||
|
||||
# ── Dump (format « custom » : compressé, restauration sélective possible avec pg_restore) ──
|
||||
STAMP=$(date -u +%Y%m%d-%H%M%S)
|
||||
DUMP="$WORK/azuucine-$STAMP.dump"
|
||||
pg pg_dump -d "$DB_URL" --format=custom --compress=9 --no-owner --no-privileges \
|
||||
--exclude-table-data='auth.audit_log_entries' --file "$DUMP" \
|
||||
|| fail "pg_dump a échoué"
|
||||
|
||||
# ── Contrôles : le dump doit exister, avoir une taille plausible et contenir les tables de l'app ──
|
||||
[ -s "$DUMP" ] || fail "dump vide"
|
||||
size=$(stat -c %s "$DUMP")
|
||||
[ "$size" -ge "$MIN_DUMP_BYTES" ] || fail "dump trop petit ($size octets < $MIN_DUMP_BYTES) : base vide ou dump incomplet ?"
|
||||
pg pg_restore --list "$DUMP" > "$WORK/toc.txt" || fail "dump illisible par pg_restore"
|
||||
for tbl in items profiles follows settings; do
|
||||
grep -qE "TABLE DATA public $tbl " "$WORK/toc.txt" || fail "table public.$tbl absente du dump"
|
||||
done
|
||||
grep -qE "TABLE DATA auth users " "$WORK/toc.txt" || fail "table auth.users absente du dump"
|
||||
entries=$(grep -c 'TABLE DATA' "$WORK/toc.txt")
|
||||
|
||||
# ── Chiffrement (gpg symétrique AES-256 ; la phrase passe par un descripteur, pas par la ligne de commande) ──
|
||||
ENC="$DUMP.gpg"
|
||||
gpg --batch --yes --quiet --pinentry-mode loopback --passphrase-fd 3 \
|
||||
--symmetric --cipher-algo AES256 --s2k-digest-algo SHA512 --s2k-count 65011712 --compress-algo none \
|
||||
--output "$ENC" "$DUMP" 3<<<"$BACKUP_PASSPHRASE" || fail "chiffrement impossible"
|
||||
# Vérification : le fichier chiffré se déchiffre et redonne exactement le dump
|
||||
gpg --batch --quiet --pinentry-mode loopback --passphrase-fd 3 --decrypt "$ENC" 3<<<"$BACKUP_PASSPHRASE" \
|
||||
| cmp -s - "$DUMP" || fail "vérification du déchiffrement échouée"
|
||||
sha256sum "$ENC" | sed "s# .*/# #" > "$ENC.sha256"
|
||||
rm -f "$DUMP"
|
||||
|
||||
# ── Rangement + rotation (7 quotidiennes, 4 hebdomadaires, 6 mensuelles ; liens physiques = pas de doublon disque) ──
|
||||
name=$(basename "$ENC")
|
||||
mv "$ENC" "$ENC.sha256" "$BACKUP_DIR/daily/"
|
||||
newest() { { ls -1 "$1"/*.gpg 2>/dev/null || true; } | sort | tail -1; }
|
||||
age_days() { echo $(( ( $(date -u +%s) - $(stat -c %Y "$1") ) / 86400 )); }
|
||||
w=$(newest "$BACKUP_DIR/weekly")
|
||||
if [ -z "$w" ] || [ "$(age_days "$w")" -ge 7 ]; then
|
||||
ln -f "$BACKUP_DIR/daily/$name" "$BACKUP_DIR/weekly/$name"
|
||||
ln -f "$BACKUP_DIR/daily/$name.sha256" "$BACKUP_DIR/weekly/$name.sha256"
|
||||
fi
|
||||
m=$(newest "$BACKUP_DIR/monthly")
|
||||
if [ -z "$m" ] || [ "$(basename "$m" | cut -c10-15)" != "$(date -u +%Y%m)" ]; then
|
||||
ln -f "$BACKUP_DIR/daily/$name" "$BACKUP_DIR/monthly/$name"
|
||||
ln -f "$BACKUP_DIR/daily/$name.sha256" "$BACKUP_DIR/monthly/$name.sha256"
|
||||
fi
|
||||
prune() { # prune <dossier> <nombre à garder>
|
||||
{ ls -1 "$1"/*.gpg 2>/dev/null || true; } | sort -r | tail -n +$(( $2 + 1 )) | while read -r f; do rm -f "$f" "$f.sha256"; done
|
||||
}
|
||||
prune "$BACKUP_DIR/daily" "$KEEP_DAILY"
|
||||
prune "$BACKUP_DIR/weekly" "$KEEP_WEEKLY"
|
||||
prune "$BACKUP_DIR/monthly" "$KEEP_MONTHLY"
|
||||
|
||||
date -u +%FT%TZ > "$BACKUP_DIR/.last-success"
|
||||
echo "sauvegarde OK : $name ($(stat -c %s "$BACKUP_DIR/daily/$name") octets chiffrés, $entries tables de données)"
|
||||
for d in daily weekly monthly; do echo " $d : $({ ls -1 "$BACKUP_DIR/$d"/*.gpg 2>/dev/null || true; } | wc -l)"; done
|
||||
@@ -10,6 +10,9 @@ server {
|
||||
root /srv/azuucine/current/dist;
|
||||
index index.html;
|
||||
|
||||
# Adresse inconnue : vraie réponse 404 avec une page dédiée
|
||||
error_page 404 /404.html;
|
||||
|
||||
# nginx ne connaît pas .webmanifest : sans cette ligne, le manifest du PWA est servi en octet-stream
|
||||
include /etc/nginx/mime.types;
|
||||
types { application/manifest+json webmanifest; }
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
# Restaurer une sauvegarde de la base AzuuCine
|
||||
|
||||
Les sauvegardes sont produites chaque nuit par `deploy/backup.sh` (workflow `.gitea/workflows/backup.yml`)
|
||||
dans `/srv/backups/azuucine/{daily,weekly,monthly}/` sur le VPS :
|
||||
|
||||
```
|
||||
azuucine-AAAAMMJJ-HHMMSS.dump.gpg dump pg_dump (format custom, compressé) chiffré AES-256 (gpg symétrique)
|
||||
azuucine-AAAAMMJJ-HHMMSS.dump.gpg.sha256 empreinte du fichier chiffré
|
||||
```
|
||||
|
||||
Il faut la **phrase de chiffrement** (`BACKUP_PASSPHRASE`, gardée dans ton gestionnaire de mots de passe) :
|
||||
sans elle, la sauvegarde est illisible — c'est voulu.
|
||||
|
||||
> ⚠️ Toujours **tester d'abord sur un projet Supabase de test** (ou une base Postgres locale), jamais
|
||||
> directement sur la production. Une restauration remplace des données : fais d'abord une sauvegarde
|
||||
> de l'état actuel (`bash deploy/backup.sh` à la main, voir BACKUP.md).
|
||||
|
||||
## 1. Récupérer et déchiffrer
|
||||
|
||||
```bash
|
||||
cd /srv/backups/azuucine/daily # ou weekly / monthly
|
||||
ls -1 # choisir le fichier
|
||||
F=azuucine-20261009-021703.dump.gpg
|
||||
sha256sum -c "$F.sha256" # doit afficher : OK
|
||||
|
||||
# Déchiffrer (la phrase est demandée ; rien n'est écrit dans l'historique du shell)
|
||||
umask 077
|
||||
gpg --decrypt --output /tmp/azuucine.dump "$F"
|
||||
|
||||
# Contenu du dump (liste des tables, fonctions, policies…)
|
||||
pg_restore --list /tmp/azuucine.dump | less
|
||||
```
|
||||
|
||||
Le client Postgres doit être **de la même version majeure que Supabase, ou plus récent**
|
||||
(`pg_restore --version`). Sinon, via Docker :
|
||||
`docker run --rm -it --network host -v /tmp:/tmp postgres:17-alpine pg_restore --list /tmp/azuucine.dump`
|
||||
|
||||
## 2. Cas courants
|
||||
|
||||
La connexion se fait avec la chaîne **Session pooler** (Supabase → Connect), mot de passe dans `PGPASSWORD` :
|
||||
|
||||
```bash
|
||||
export PGPASSWORD='…' # mot de passe de la base (pas dans l'URL)
|
||||
export PGSSLMODE=require
|
||||
DB='postgresql://postgres.<ref>@aws-0-<région>.pooler.supabase.com:5432/postgres'
|
||||
```
|
||||
|
||||
### a) Récupérer les données d'un seul compte ou d'une seule table (le plus fréquent)
|
||||
|
||||
Restaurer le dump dans une **base locale** jetable, puis copier ce qu'il faut :
|
||||
|
||||
```bash
|
||||
createdb azuu_restore
|
||||
pg_restore --no-owner --no-privileges -d azuu_restore --schema=public /tmp/azuucine.dump
|
||||
psql -d azuu_restore -c "select id, data->>'title' from public.items where user_id = '<uuid>'"
|
||||
```
|
||||
|
||||
(Les erreurs « role … does not exist » / « schema auth does not exist » sur une base locale sont normales :
|
||||
les tables `public` gardent leurs données.) Puis réinjecter les lignes voulues dans Supabase avec
|
||||
`\copy … to/from` ou un `insert … on conflict do update` ciblé.
|
||||
|
||||
### b) Restaurer tout le schéma `public` (après une fausse manip)
|
||||
|
||||
```bash
|
||||
# 1. sauvegarde de l'état actuel
|
||||
bash deploy/backup.sh
|
||||
# 2. restauration des tables de l'app (les comptes auth.users existent toujours)
|
||||
pg_restore --no-owner --no-privileges --clean --if-exists --schema=public -d "$DB" /tmp/azuucine.dump
|
||||
```
|
||||
|
||||
`--clean` supprime puis recrée les objets du schéma `public` (tables, fonctions, policies RLS).
|
||||
Relancer ensuite les migrations récentes si le dump est antérieur à l'une d'elles
|
||||
(`supabase/migrations/*.sql`, toutes idempotentes) dans **SQL Editor → Run**.
|
||||
|
||||
### c) Projet Supabase perdu (reconstruction complète dans un nouveau projet)
|
||||
|
||||
1. Créer un nouveau projet Supabase (même région), noter sa chaîne Session pooler.
|
||||
2. Restaurer d'abord les comptes, puis l'app :
|
||||
```bash
|
||||
pg_restore --no-owner --no-privileges --data-only --schema=auth --table=users --table=identities -d "$DB" /tmp/azuucine.dump
|
||||
pg_restore --no-owner --no-privileges --schema=public -d "$DB" /tmp/azuucine.dump
|
||||
pg_restore --no-owner --no-privileges --data-only --schema=storage --table=objects -d "$DB" /tmp/azuucine.dump
|
||||
```
|
||||
(Les fichiers du bucket `profile-media` ne sont **pas** dans le dump : seules leurs références le sont.
|
||||
Les photos de profil devront être re-téléversées, ou copiées depuis l'ancien projet s'il est accessible.)
|
||||
3. Rejouer les réglages hors base : bucket `profile-media` (public), edge functions `tmdb` et
|
||||
`delete-account` + leurs secrets (clé TMDB), fournisseurs d'auth (Google), URL du site.
|
||||
4. Mettre à jour `VITE_SUPABASE_URL` / `VITE_SUPABASE_ANON_KEY` dans Gitea et redéployer.
|
||||
5. Remettre Romain admin : `insert into public.admins (user_id) values ('<uuid>') on conflict do nothing;`
|
||||
|
||||
## 3. Nettoyer
|
||||
|
||||
```bash
|
||||
shred -u /tmp/azuucine.dump 2>/dev/null || rm -f /tmp/azuucine.dump
|
||||
dropdb azuu_restore 2>/dev/null || true
|
||||
unset PGPASSWORD
|
||||
```
|
||||
@@ -0,0 +1,33 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>AzuuCine — Page introuvable</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
<link rel="icon" href="/icons/favicon.svg" type="image/svg+xml" />
|
||||
<style>
|
||||
:root { color-scheme: dark; }
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; min-height: 100dvh; display: grid; place-items: center; background: #0a0a0a; color: #e8e8e8; font: 16px/1.6 Inter, system-ui, -apple-system, sans-serif; text-align: center; }
|
||||
main { padding: 48px 20px; max-width: 520px; }
|
||||
.code { font-size: clamp(6rem, 28vw, 11rem); font-weight: 800; letter-spacing: -.06em; line-height: 1; margin: 0; color: #2a2a2a; }
|
||||
.code span { color: #e5383b; }
|
||||
h1 { font-size: 1.5rem; margin: 20px 0 8px; }
|
||||
p { color: #a3a3a3; margin: 0 0 28px; }
|
||||
a.btn { display: inline-block; background: #e5383b; color: #fff; text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 999px; }
|
||||
a.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
|
||||
.en { margin-top: 36px; font-size: .85rem; color: #8a8a8a; }
|
||||
.en a { color: #e5383b; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<p class="code" aria-hidden="true">4<span>0</span>4</p>
|
||||
<h1>Cette scène a été coupée au montage</h1>
|
||||
<p>La page que tu cherches n'existe pas ou a été déplacée.</p>
|
||||
<a class="btn" href="/">Retour à AzuuCine</a>
|
||||
<p class="en">Page not found — <a href="/">back to AzuuCine</a></p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
+2
-1
@@ -57,6 +57,7 @@
|
||||
<ul>
|
||||
<li><strong>TMDB</strong> — <em>This product uses the TMDB API but is not endorsed or certified by TMDB.</em> Les informations et images des films et séries proviennent de <a href="https://www.themoviedb.org">The Movie Database (TMDB)</a>.</li>
|
||||
<li><strong>AniList</strong> — les informations et images des animes proviennent de <a href="https://anilist.co">AniList</a>.</li>
|
||||
<li><strong>JustWatch</strong> — les offres de streaming (« Où regarder ») proviennent de <a href="https://www.justwatch.com">JustWatch</a>, via TMDB.</li>
|
||||
<li><strong>Police Inter</strong> — Rasmus Andersson, licence SIL Open Font License 1.1.</li>
|
||||
<li><strong>Icônes Lucide</strong> — licence ISC.</li>
|
||||
<li><strong>Logiciels libres</strong> — React (MIT), Vite (MIT), Tailwind CSS (MIT), Workbox (MIT).</li>
|
||||
@@ -69,7 +70,7 @@
|
||||
<hr />
|
||||
|
||||
<h1 style="font-size:1.4rem">Legal notice & terms (English summary)</h1>
|
||||
<p>AzuuCine is published by Romain Dacet, a private individual, on a personal, non-commercial basis (contact: <a href="https://rdacet.fr">rdacet.fr</a>). The site is hosted by OVH SAS (2 rue Kellermann, 59100 Roubaix, France); accounts and data are hosted by Supabase Inc. in the European Union (Ireland). The service is free, with no ads and no purchases. You must be at least 15 years old to sign up (or have a parent's consent). You own what you write; illegal, hateful, harassing or sexual content, impersonation and spam are forbidden and may be removed, and the account suspended. Title data comes from TMDB and AniList and is provided as is. This product uses the TMDB API but is not endorsed or certified by TMDB. French law applies.</p>
|
||||
<p>AzuuCine is published by Romain Dacet, a private individual, on a personal, non-commercial basis (contact: <a href="https://rdacet.fr">rdacet.fr</a>). The site is hosted by OVH SAS (2 rue Kellermann, 59100 Roubaix, France); accounts and data are hosted by Supabase Inc. in the European Union (Ireland). The service is free, with no ads and no purchases. You must be at least 15 years old to sign up (or have a parent's consent). You own what you write; illegal, hateful, harassing or sexual content, impersonation and spam are forbidden and may be removed, and the account suspended. Title data comes from TMDB and AniList (streaming availability: JustWatch) and is provided as is. This product uses the TMDB API but is not endorsed or certified by TMDB. French law applies.</p>
|
||||
|
||||
<p class="muted"><a href="/">← Retour à AzuuCine</a></p>
|
||||
</main>
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
<ul>
|
||||
<li><strong>Supabase Inc.</strong> (base de données, authentification, stockage des photos) — sous-traitant, données hébergées dans l'<strong>Union européenne (Irlande)</strong>.</li>
|
||||
<li><strong>OVH SAS</strong> (Roubaix, France) — héberge les fichiers du site. Ce serveur ne reçoit aucune de tes données de compte ; comme tout serveur web, il voit ton adresse IP le temps de te servir les pages.</li>
|
||||
<li><strong>TMDB et AniList</strong> — fournissent les fiches et les images des œuvres. Tes recherches leur sont transmises (pour TMDB via notre serveur, sans ton identité — ou directement si tu as renseigné ta propre clé TMDB dans les réglages), et ton navigateur télécharge les affiches directement chez eux, ce qui leur révèle ton adresse IP, comme n'importe quel site qui affiche leurs images. Aucune donnée de compte ne leur est envoyée.</li>
|
||||
<li><strong>TMDB et AniList</strong> — fournissent les fiches et les images des œuvres. Tes recherches leur sont transmises (pour TMDB via notre serveur, sans ton identité — ou directement si tu as renseigné ta propre clé TMDB dans les réglages), et ton navigateur télécharge les affiches directement chez eux, ce qui leur révèle ton adresse IP, comme n'importe quel site qui affiche leurs images. Aucune donnée de compte ne leur est envoyée. Les plateformes affichées dans « Où regarder » viennent de JustWatch (via TMDB) ; le pays choisi reste sur ton appareil, et un lien vers une plateforme n'est ouvert que si tu cliques dessus.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Sur ton appareil</h2>
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* AzuuCine — notifications push (chargé dans le service worker généré par Workbox via importScripts).
|
||||
* Affiche la notification reçue, et au clic ouvre (ou ramène au premier plan) l'app sur le bon écran. */
|
||||
/* eslint-env serviceworker */
|
||||
|
||||
// Écrans que le serveur peut demander d'ouvrir (tout le reste ouvre l'accueil)
|
||||
var OPEN_RE = /^(notifications|item:[A-Za-z0-9_-]{1,64}|u:[a-z0-9_]{3,20})$/
|
||||
|
||||
function clip(v, max) {
|
||||
if (typeof v !== 'string') return ''
|
||||
v = v.replace(/[\u0000-\u001f\u007f]/g, ' ').trim()
|
||||
return v.length > max ? v.slice(0, max - 1) + '…' : v
|
||||
}
|
||||
|
||||
/** Adresse à ouvrir : uniquement « /?open=<écran> » sur ce site. */
|
||||
function safeUrl(raw) {
|
||||
try {
|
||||
var u = new URL(typeof raw === 'string' ? raw : '/', self.location.origin)
|
||||
var open = u.searchParams.get('open') || ''
|
||||
if (u.origin === self.location.origin && u.pathname === '/' && OPEN_RE.test(open)) return '/?open=' + encodeURIComponent(open)
|
||||
} catch (e) {
|
||||
/* adresse invalide */
|
||||
}
|
||||
return '/'
|
||||
}
|
||||
|
||||
self.addEventListener('push', function (event) {
|
||||
var data = {}
|
||||
try {
|
||||
data = event.data ? event.data.json() : {}
|
||||
} catch (e) {
|
||||
data = {}
|
||||
}
|
||||
var title = clip(data.title, 120) || 'AzuuCine'
|
||||
var options = {
|
||||
body: clip(data.body, 300),
|
||||
tag: clip(data.tag, 64) || undefined,
|
||||
icon: '/icons/icon-192.png',
|
||||
data: { url: safeUrl(data.url) },
|
||||
}
|
||||
event.waitUntil(
|
||||
Promise.all([
|
||||
self.registration.showNotification(title, options),
|
||||
// App ouverte : on lui signale qu'il y a du nouveau (compteur de la cloche)
|
||||
self.clients.matchAll({ type: 'window', includeUncontrolled: true }).then(function (list) {
|
||||
list.forEach(function (c) {
|
||||
c.postMessage({ type: 'azuu:push' })
|
||||
})
|
||||
}),
|
||||
]),
|
||||
)
|
||||
})
|
||||
|
||||
self.addEventListener('notificationclick', function (event) {
|
||||
event.notification.close()
|
||||
var url = safeUrl(event.notification.data && event.notification.data.url)
|
||||
var open = new URL(url, self.location.origin).searchParams.get('open') || ''
|
||||
event.waitUntil(
|
||||
self.clients.matchAll({ type: 'window', includeUncontrolled: true }).then(function (list) {
|
||||
// Une fenêtre de l'app est déjà ouverte : on la ramène et on lui dit quoi afficher
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var c = list[i]
|
||||
var cu = new URL(c.url)
|
||||
// (les pages légales, /privacy et /legal, ne sont pas l'app)
|
||||
if (cu.origin === self.location.origin && cu.pathname === '/' && 'focus' in c) {
|
||||
c.postMessage({ type: 'azuu:open', open: open })
|
||||
return c.focus()
|
||||
}
|
||||
}
|
||||
return self.clients.openWindow ? self.clients.openWindow(url) : undefined
|
||||
}),
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env node
|
||||
// Génère une paire de clés VAPID (P-256) pour les notifications push, et un secret de webhook.
|
||||
// À lancer UNE fois sur ton PC : node scripts/gen-vapid.mjs
|
||||
// Les valeurs affichées vont dans les secrets Supabase (jamais dans le dépôt, jamais dans .env / VITE_).
|
||||
// Ne pas exécuter en CI. Voir supabase/PUSH_SETUP.md.
|
||||
import { webcrypto as crypto } from 'node:crypto'
|
||||
|
||||
const b64url = (buf) => Buffer.from(buf).toString('base64url')
|
||||
|
||||
const pair = await crypto.subtle.generateKey({ name: 'ECDSA', namedCurve: 'P-256' }, true, ['sign', 'verify'])
|
||||
const publicKey = b64url(await crypto.subtle.exportKey('raw', pair.publicKey))
|
||||
const { d: privateKey } = await crypto.subtle.exportKey('jwk', pair.privateKey)
|
||||
const webhookSecret = b64url(crypto.getRandomValues(new Uint8Array(32)))
|
||||
|
||||
console.log(`# Clés VAPID et secret du webhook — à garder secrètes (sauf VAPID_PUBLIC_KEY)
|
||||
# 1) Secrets des fonctions Supabase (Dashboard → Edge Functions → Secrets, ou en ligne de commande) :
|
||||
supabase secrets set VAPID_PUBLIC_KEY=${publicKey}
|
||||
supabase secrets set VAPID_PRIVATE_KEY=${privateKey}
|
||||
supabase secrets set VAPID_SUBJECT=mailto:ton-adresse@example.com
|
||||
supabase secrets set PUSH_WEBHOOK_SECRET=${webhookSecret}
|
||||
|
||||
# 2) Le même PUSH_WEBHOOK_SECRET dans Supabase Vault (SQL Editor) :
|
||||
select vault.create_secret('${webhookSecret}', 'azuu_push_secret');
|
||||
`)
|
||||
+18
-5
@@ -1,4 +1,5 @@
|
||||
import { SocialProvider } from './components/social/SocialProvider'
|
||||
import { ToastProvider } from './components/Toast'
|
||||
import { useEffect, useState } from 'react'
|
||||
import BottomNav, { type Tab } from './components/BottomNav'
|
||||
import SideNav from './components/SideNav'
|
||||
@@ -12,18 +13,25 @@ import CatalogPage from './pages/CatalogPage'
|
||||
import StatsPage from './pages/StatsPage'
|
||||
import SettingsPage from './pages/SettingsPage'
|
||||
import AdminPage from './pages/AdminPage'
|
||||
import NotFoundPage from './pages/NotFoundPage'
|
||||
import PushBridge from './components/PushBridge'
|
||||
import SyncIndicator from './components/SyncIndicator'
|
||||
import { useMedia } from './store'
|
||||
import type { SearchResult } from './lib/catalogApi'
|
||||
import type { MediaItem } from './types'
|
||||
|
||||
const TABS: Tab[] = ['home', 'catalog', 'stats', 'settings']
|
||||
// L'administration a sa propre route (#/admin), hors de la navigation principale
|
||||
type Route = Tab | 'admin'
|
||||
type Route = Tab | 'admin' | 'notfound'
|
||||
|
||||
function routeFromHash(): Route {
|
||||
const h = window.location.hash.replace('#/', '')
|
||||
const hash = window.location.hash
|
||||
// Pas de route (ou retour de connexion « #access_token=… ») : accueil
|
||||
if (!hash.startsWith('#/')) return 'home'
|
||||
const h = hash.slice(2)
|
||||
if (h === '' || h.startsWith('u/')) return 'home'
|
||||
if (h === 'admin') return 'admin'
|
||||
return (TABS as string[]).includes(h) ? (h as Tab) : 'home'
|
||||
return (TABS as string[]).includes(h) ? (h as Tab) : 'notfound'
|
||||
}
|
||||
|
||||
/** Fiche ouverte : un titre de ma bibliothèque, ou un résultat de recherche pas encore ajouté. */
|
||||
@@ -49,7 +57,7 @@ export default function App() {
|
||||
window.scrollTo({ top: 0 })
|
||||
}
|
||||
// Dans la barre de navigation, l'administration reste rattachée à « Réglages »
|
||||
const navTab: Tab = route === 'admin' ? 'settings' : route
|
||||
const navTab: Tab = route === 'admin' ? 'settings' : route === 'notfound' ? 'home' : route
|
||||
|
||||
const openItem = (item: MediaItem) => setOpened({ item })
|
||||
const openNew = () => setAdding(true)
|
||||
@@ -62,7 +70,8 @@ export default function App() {
|
||||
}
|
||||
|
||||
return (
|
||||
<SocialProvider onOpenOwnItem={openItem}>
|
||||
<ToastProvider>
|
||||
<SocialProvider onOpenOwnItem={openItem} onOpenSeed={(seed) => setOpened({ seed })}>
|
||||
<SideNav current={navTab} onChange={go} onAdd={openNew} />
|
||||
<div className="mx-auto min-h-dvh max-w-2xl lg:max-w-none lg:ps-60">
|
||||
<main className="safe-top px-4 pb-32 lg:px-10 lg:pb-10 2xl:px-14">
|
||||
@@ -72,9 +81,12 @@ export default function App() {
|
||||
{route === 'stats' && <StatsPage />}
|
||||
{route === 'settings' && <SettingsPage onOpenAdmin={() => go('admin')} />}
|
||||
{route === 'admin' && <AdminPage onBack={() => go('settings')} />}
|
||||
{route === 'notfound' && <NotFoundPage onHome={() => go('home')} />}
|
||||
</main>
|
||||
|
||||
<BottomNav current={navTab} onChange={go} onAdd={openNew} />
|
||||
<SyncIndicator />
|
||||
<PushBridge />
|
||||
|
||||
{roulette && <Roulette onClose={() => setRoulette(false)} onOpen={openItem} />}
|
||||
{calendar && <CalendarView onClose={() => setCalendar(false)} onOpen={openItem} />}
|
||||
@@ -110,5 +122,6 @@ export default function App() {
|
||||
)}
|
||||
</div>
|
||||
</SocialProvider>
|
||||
</ToastProvider>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Component, type ErrorInfo, type ReactNode } from 'react'
|
||||
import { t } from '../i18n'
|
||||
import { reportError } from '../lib/errorReporter'
|
||||
|
||||
/**
|
||||
* Filet de sécurité global : si l'affichage plante, on montre un écran propre
|
||||
* (« Oups… ») au lieu d'une page blanche, et l'erreur est remontée (sans donnée perso).
|
||||
*/
|
||||
export default class ErrorBoundary extends Component<{ children: ReactNode }, { failed: boolean }> {
|
||||
state = { failed: false }
|
||||
|
||||
static getDerivedStateFromError() {
|
||||
return { failed: true }
|
||||
}
|
||||
|
||||
componentDidCatch(error: unknown, info: ErrorInfo) {
|
||||
reportError(error, 'render', info.componentStack ?? '')
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.state.failed) return this.props.children
|
||||
return <CrashScreen onRetry={() => this.setState({ failed: false })} />
|
||||
}
|
||||
}
|
||||
|
||||
function CrashScreen({ onRetry }: { onRetry: () => void }) {
|
||||
return (
|
||||
<main role="alert" className="flex min-h-dvh flex-col items-center justify-center bg-bg px-6 text-center text-ink">
|
||||
<p className="text-5xl font-bold text-accent" aria-hidden>
|
||||
:(
|
||||
</p>
|
||||
<h1 className="mt-6 text-2xl font-bold">{t('crash.title')}</h1>
|
||||
<p className="mt-2 max-w-sm text-sm leading-relaxed text-ink-2">{t('crash.text')}</p>
|
||||
<div className="mt-8 flex flex-wrap justify-center gap-2">
|
||||
<button type="button" onClick={() => location.reload()} className="btn btn-primary">
|
||||
{t('crash.reload')}
|
||||
</button>
|
||||
<button type="button" onClick={onRetry} className="btn btn-ghost">
|
||||
{t('crash.retry')}
|
||||
</button>
|
||||
</div>
|
||||
<p className="mt-8 max-w-xs text-xs text-ink-3">{t('crash.privacy')}</p>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
import { ArrowLeft, Check, ChevronDown, FileUp, Loader2, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useRef, useState, type DragEvent } from 'react'
|
||||
import { t, type TKey } from '../i18n'
|
||||
import { useBackToClose } from '../lib/backNav'
|
||||
import { useEscape } from '../lib/escape'
|
||||
import { ImportFileError, readImportFile, type TextFile } from '../lib/import/files'
|
||||
import { buildImportPlan, countByKind, type ImportPlan } from '../lib/import/merge'
|
||||
import { CancelledError, fetchAniListUser, isAniListUserName, resolveEntries, type CancelToken, type Match, type Progress } from '../lib/import/resolve'
|
||||
import { letterboxdRole, parseLetterboxd, parseMal, parseTvTime, type ImportEntry, type ImportSource } from '../lib/import/sources'
|
||||
import { useScrollLock } from '../lib/scrollLock'
|
||||
import { LIMITS } from '../lib/security'
|
||||
import { cx } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
|
||||
/**
|
||||
* Assistant « Importer depuis une autre app » : Letterboxd, TV Time, MyAnimeList, AniList.
|
||||
* Source → fichier (ou nom d'utilisateur) → recherche des fiches → aperçu → fusion → résumé.
|
||||
* Tout se passe sur l'appareil ; la synchro existante enverra ensuite les fiches au compte.
|
||||
*/
|
||||
|
||||
type Step = 'source' | 'input' | 'working' | 'preview' | 'done'
|
||||
|
||||
const SOURCES: { id: ImportSource; name: string; mark: string; accept?: string; multiple?: boolean }[] = [
|
||||
{ id: 'letterboxd', name: 'Letterboxd', mark: 'Lb', accept: '.zip,.csv,application/zip,text/csv', multiple: true },
|
||||
{ id: 'tvtime', name: 'TV Time', mark: 'TV', accept: '.zip,.csv,application/zip,text/csv', multiple: true },
|
||||
{ id: 'mal', name: 'MyAnimeList', mark: 'MAL', accept: '.xml,.gz,application/xml,text/xml,application/gzip' },
|
||||
{ id: 'anilist', name: 'AniList', mark: 'AL' },
|
||||
]
|
||||
|
||||
const NEEDS_TMDB: ImportSource[] = ['letterboxd', 'tvtime']
|
||||
|
||||
/** Message lisible pour une erreur de lecture / de réseau. */
|
||||
function errorText(e: unknown): string {
|
||||
if (e instanceof ImportFileError) {
|
||||
const k = `import.err.${e.message}` as TKey
|
||||
return ['tooBig', 'badZip', 'encrypted', 'unsupported'].includes(e.message) ? t(k) : t('import.err.read')
|
||||
}
|
||||
const msg = (e as Error)?.message
|
||||
if (msg === 'anilist-user') return t('import.err.user')
|
||||
if (msg === 'rate') return t('err.anilistRate')
|
||||
if (!navigator.onLine) return t('search.offline')
|
||||
return msg || t('import.err.read')
|
||||
}
|
||||
|
||||
async function readEntries(source: ImportSource, files: File[]): Promise<ImportEntry[]> {
|
||||
const texts: TextFile[] = []
|
||||
for (const f of files.slice(0, 40)) {
|
||||
const keep = source === 'letterboxd' ? (p: string) => !!letterboxdRole(p) : source === 'mal' ? (p: string) => /\.xml$/.test(p) : (p: string) => /\.csv$/.test(p)
|
||||
texts.push(...(await readImportFile(f, keep, LIMITS.importFileBytes)))
|
||||
}
|
||||
if (source === 'letterboxd') return parseLetterboxd(texts)
|
||||
if (source === 'tvtime') return parseTvTime(texts)
|
||||
const xml = texts.find((x) => x.text.includes('<myanimelist') || x.text.includes('<anime>'))
|
||||
if (!xml) throw new ImportFileError('read')
|
||||
return parseMal(xml.text)
|
||||
}
|
||||
|
||||
export default function ImportWizard({ onClose }: { onClose: () => void }) {
|
||||
const { items, settings, importItems } = useMedia()
|
||||
const [step, setStep] = useState<Step>('source')
|
||||
const [source, setSource] = useState<ImportSource>()
|
||||
const [userName, setUserName] = useState('')
|
||||
const [error, setError] = useState<string>()
|
||||
const [phase, setPhase] = useState<'reading' | 'resolving' | 'saving'>('reading')
|
||||
const [progress, setProgress] = useState<Progress>({ done: 0, total: 0 })
|
||||
const [entries, setEntries] = useState<ImportEntry[]>([])
|
||||
const [matches, setMatches] = useState<Map<string, Match>>(new Map())
|
||||
const [includeUnmatched, setIncludeUnmatched] = useState(false)
|
||||
const [showMissing, setShowMissing] = useState(false)
|
||||
const [result, setResult] = useState<{ added: number; updated: number; unchanged: number; notFound: number }>()
|
||||
const [dragging, setDragging] = useState(false)
|
||||
const [now, setNow] = useState(Date.now())
|
||||
const token = useRef<CancelToken>({ cancelled: false })
|
||||
const fileRef = useRef<HTMLInputElement>(null)
|
||||
|
||||
const close = () => {
|
||||
token.current.cancelled = true
|
||||
onClose()
|
||||
}
|
||||
useScrollLock()
|
||||
useEscape(close)
|
||||
useBackToClose(close)
|
||||
// Fermeture de l'assistant : la recherche en cours s'arrête
|
||||
useEffect(() => () => void (token.current.cancelled = true), [])
|
||||
|
||||
// Compte à rebours pendant une pause imposée par la limite de débit
|
||||
useEffect(() => {
|
||||
if (!progress.waitUntil) return
|
||||
const id = setInterval(() => setNow(Date.now()), 500)
|
||||
return () => clearInterval(id)
|
||||
}, [progress.waitUntil])
|
||||
|
||||
const info = SOURCES.find((s) => s.id === source)
|
||||
const hasTmdb = !!settings.tmdbKey?.trim()
|
||||
|
||||
const plan: ImportPlan | undefined = useMemo(
|
||||
() => (step === 'preview' ? buildImportPlan(entries, matches, items, { includeUnmatched }) : undefined),
|
||||
[step, entries, matches, items, includeUnmatched],
|
||||
)
|
||||
|
||||
const run = async (load: () => Promise<ImportEntry[]>) => {
|
||||
const tk = { cancelled: false }
|
||||
token.current = tk
|
||||
setError(undefined)
|
||||
setStep('working')
|
||||
setPhase('reading')
|
||||
setProgress({ done: 0, total: 0 })
|
||||
try {
|
||||
const list = await load()
|
||||
if (tk.cancelled) return
|
||||
if (!list.length) throw new Error(t('import.err.empty'))
|
||||
setEntries(list)
|
||||
setPhase('resolving')
|
||||
const found = await resolveEntries(list, { tmdbKey: settings.tmdbKey, token: tk, onProgress: (p) => !tk.cancelled && setProgress(p) })
|
||||
if (tk.cancelled) return
|
||||
setMatches(found)
|
||||
setShowMissing(false)
|
||||
setIncludeUnmatched(false)
|
||||
setStep('preview')
|
||||
} catch (e) {
|
||||
if (e instanceof CancelledError || tk.cancelled) return
|
||||
setError(errorText(e))
|
||||
setStep('input')
|
||||
}
|
||||
}
|
||||
|
||||
const onFiles = (list: FileList | null | undefined) => {
|
||||
const files = Array.from(list ?? [])
|
||||
if (fileRef.current) fileRef.current.value = ''
|
||||
if (!files.length || !source || source === 'anilist') return
|
||||
void run(() => readEntries(source, files))
|
||||
}
|
||||
|
||||
const onAniList = () => {
|
||||
const name = userName.trim()
|
||||
if (!isAniListUserName(name)) return setError(t('import.err.user'))
|
||||
void run(async () => (await fetchAniListUser(name)).entries)
|
||||
}
|
||||
|
||||
const cancelWork = () => {
|
||||
token.current.cancelled = true
|
||||
setStep('input')
|
||||
}
|
||||
|
||||
const confirm = async () => {
|
||||
if (!plan) return
|
||||
setStep('working')
|
||||
setPhase('saving')
|
||||
try {
|
||||
await importItems([...plan.added, ...plan.updated], 'merge')
|
||||
setResult({ added: plan.added.length, updated: plan.updated.length, unchanged: plan.unchanged, notFound: includeUnmatched ? 0 : plan.notFound.length })
|
||||
setStep('done')
|
||||
} catch (e) {
|
||||
setError(errorText(e))
|
||||
setStep('preview')
|
||||
}
|
||||
}
|
||||
|
||||
const onDrop = (e: DragEvent) => {
|
||||
e.preventDefault()
|
||||
setDragging(false)
|
||||
onFiles(e.dataTransfer?.files)
|
||||
}
|
||||
|
||||
const back = () => {
|
||||
setError(undefined)
|
||||
setStep(step === 'preview' ? 'input' : 'source')
|
||||
}
|
||||
|
||||
const pct = progress.total ? Math.round((progress.done / progress.total) * 100) : 0
|
||||
const wait = progress.waitUntil ? Math.max(0, Math.ceil((progress.waitUntil - now) / 1000)) : 0
|
||||
const kinds = plan ? countByKind(plan.added) : undefined
|
||||
|
||||
return (
|
||||
<div className="sheet sheet-in z-[60]" role="dialog" aria-modal="true" aria-label={t('import.title')}>
|
||||
<header className="safe-top border-b border-line">
|
||||
<div className="mx-auto flex max-w-2xl items-center gap-2 px-3 py-2.5 lg:max-w-none lg:px-10">
|
||||
{step === 'input' || step === 'preview' ? (
|
||||
<button onClick={back} className="grid size-10 shrink-0 place-items-center rounded-full text-ink-2 rtl:-scale-x-100" aria-label={t('import.back')}>
|
||||
<ArrowLeft size={21} />
|
||||
</button>
|
||||
) : (
|
||||
<span className="size-10 shrink-0" />
|
||||
)}
|
||||
<h2 className="min-w-0 flex-1 truncate text-center text-base font-semibold">{info && step !== 'source' ? info.name : t('import.title')}</h2>
|
||||
<button onClick={close} className="grid size-10 shrink-0 place-items-center rounded-full text-ink-2" aria-label={t('common.close')}>
|
||||
<X size={22} />
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div className="sheet-scroll">
|
||||
<div className="mx-auto max-w-2xl px-4 pb-[calc(10rem+env(safe-area-inset-bottom))] pt-5 lg:px-10">
|
||||
{step === 'source' && (
|
||||
<>
|
||||
<p className="text-sm text-ink-2">{t('import.chooseSource')}</p>
|
||||
<div className="mt-4 grid gap-2.5 sm:grid-cols-2">
|
||||
{SOURCES.map((s) => (
|
||||
<button
|
||||
key={s.id}
|
||||
onClick={() => {
|
||||
setSource(s.id)
|
||||
setError(undefined)
|
||||
setStep('input')
|
||||
}}
|
||||
className="card flex items-center gap-3.5 p-4 text-start transition-colors active:bg-surface-2"
|
||||
>
|
||||
<span className="grid size-12 shrink-0 place-items-center rounded-xl border border-line-strong bg-surface-2 text-sm font-bold tracking-tight text-ink">{s.mark}</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-semibold">{s.name}</span>
|
||||
<span className="mt-0.5 block text-xs text-ink-3">{t(`import.src.${s.id}` as TKey)}</span>
|
||||
</span>
|
||||
<span className="text-ink-3 rtl:-scale-x-100">→</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<p className="mt-5 text-xs leading-relaxed text-ink-3">{t('import.mergeHint')}</p>
|
||||
</>
|
||||
)}
|
||||
|
||||
{step === 'input' && info && (
|
||||
<>
|
||||
<span className="eyebrow">{t('import.how')}</span>
|
||||
<ol className="mt-3 space-y-3">
|
||||
{t(`import.steps.${info.id}` as TKey)
|
||||
.split('\n')
|
||||
.map((line, i) => (
|
||||
<li key={i} className="flex gap-3 text-sm leading-relaxed text-ink-2">
|
||||
<span className="grid size-6 shrink-0 place-items-center rounded-full bg-surface-2 text-xs font-bold text-ink">{i + 1}</span>
|
||||
<span>{line}</span>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
{NEEDS_TMDB.includes(info.id) && !hasTmdb && (
|
||||
<p className="mt-5 rounded-2xl border border-dashed border-line-strong p-3.5 text-xs leading-relaxed text-ink-2">{t('import.noTmdb')}</p>
|
||||
)}
|
||||
|
||||
{info.id === 'anilist' ? (
|
||||
<form
|
||||
className="mt-6 flex gap-2"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault()
|
||||
onAniList()
|
||||
}}
|
||||
>
|
||||
<input
|
||||
className="field flex-1"
|
||||
value={userName}
|
||||
onChange={(e) => setUserName(e.target.value.slice(0, 20))}
|
||||
placeholder={t('import.userName')}
|
||||
aria-label={t('import.userName')}
|
||||
autoCapitalize="off"
|
||||
autoComplete="off"
|
||||
spellCheck={false}
|
||||
enterKeyHint="go"
|
||||
/>
|
||||
<button type="submit" className="btn btn-primary px-5" disabled={!userName.trim()}>
|
||||
{t('import.continue')}
|
||||
</button>
|
||||
</form>
|
||||
) : (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => fileRef.current?.click()}
|
||||
onDragOver={(e) => {
|
||||
e.preventDefault()
|
||||
setDragging(true)
|
||||
}}
|
||||
onDragLeave={() => setDragging(false)}
|
||||
onDrop={onDrop}
|
||||
className={cx(
|
||||
'mt-6 flex w-full flex-col items-center gap-2 rounded-2xl border-2 border-dashed px-4 py-9 text-center transition-colors',
|
||||
dragging ? 'border-accent bg-surface-2' : 'border-line-strong active:bg-surface-2',
|
||||
)}
|
||||
>
|
||||
<FileUp size={28} className="text-accent" />
|
||||
<span className="font-semibold">{t('import.drop')}</span>
|
||||
<span className="text-xs text-ink-3">{info.accept?.split(',').filter((x) => x.startsWith('.')).join(' · ')}</span>
|
||||
</button>
|
||||
<input ref={fileRef} type="file" accept={info.accept} multiple={info.multiple} hidden onChange={(e) => onFiles(e.target.files)} />
|
||||
</>
|
||||
)}
|
||||
<p className="mt-3 text-xs text-ink-3">{t('import.privacy')}</p>
|
||||
{error && (
|
||||
<p role="alert" className="mt-4 rounded-2xl border border-accent p-3.5 text-sm text-ink">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{step === 'working' && (
|
||||
<div className="flex flex-col items-center pt-10 text-center" aria-live="polite">
|
||||
<Loader2 size={30} className="animate-spin text-accent" />
|
||||
<p className="mt-4 font-semibold">{phase === 'reading' ? t('import.reading') : phase === 'saving' ? t('import.importing') : t('import.resolving')}</p>
|
||||
{phase === 'resolving' && progress.total > 0 && (
|
||||
<>
|
||||
<div className="mt-5 h-2 w-full max-w-sm overflow-hidden rounded-full bg-surface-2" role="progressbar" aria-valuemin={0} aria-valuemax={100} aria-valuenow={pct}>
|
||||
<div className="h-full rounded-full bg-accent-fill transition-[width] duration-300" style={{ width: `${pct}%` }} />
|
||||
</div>
|
||||
<p className="mt-2 text-xs tabular-nums text-ink-3">{t('import.progress', { done: progress.done, total: progress.total })}</p>
|
||||
{wait > 0 && <p className="mt-3 max-w-sm text-xs text-ink-2">{t('import.rateWait', { s: wait })}</p>}
|
||||
</>
|
||||
)}
|
||||
{phase !== 'saving' && (
|
||||
<button onClick={cancelWork} className="btn btn-ghost mt-8 px-6">
|
||||
{t('import.cancel')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{step === 'preview' && plan && kinds && (
|
||||
<>
|
||||
<p className="text-sm text-ink-2">{t('import.found', { n: entries.length })}</p>
|
||||
<div className="mt-4 grid grid-cols-3 gap-2">
|
||||
{(
|
||||
[
|
||||
[kinds.films, t('typePlural.film')],
|
||||
[kinds.series, t('typePlural.serie')],
|
||||
[kinds.anime, t('typePlural.anime')],
|
||||
] as const
|
||||
).map(([n, label]) => (
|
||||
<div key={label} className="card p-3.5">
|
||||
<span className="block text-2xl font-bold tabular-nums">{n}</span>
|
||||
<span className="text-xs text-ink-3">{label}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="card mt-3 divide-y divide-line">
|
||||
<Line label={t('import.new')} value={plan.added.length} strong />
|
||||
<Line label={t('import.toUpdate')} value={plan.updated.length} />
|
||||
<Line label={t('import.already')} value={plan.unchanged} />
|
||||
<Line label={t('import.notFound')} value={plan.notFound.length} accent={plan.notFound.length > 0} />
|
||||
</div>
|
||||
|
||||
{plan.notFound.length > 0 && (
|
||||
<div className="mt-3">
|
||||
<button onClick={() => setShowMissing((v) => !v)} className="flex items-center gap-1.5 text-sm font-medium text-ink-2" aria-expanded={showMissing}>
|
||||
<ChevronDown size={16} className={cx('transition-transform', showMissing && 'rotate-180')} />
|
||||
{showMissing ? t('import.hideNotFound') : t('import.showNotFound')}
|
||||
</button>
|
||||
{showMissing && (
|
||||
<ul className="mt-2 max-h-72 divide-y divide-line overflow-y-auto rounded-2xl border border-line px-3.5 text-sm">
|
||||
{plan.notFound.slice(0, 500).map((e) => (
|
||||
<li key={e.key} className="flex justify-between gap-3 py-2">
|
||||
<span className="min-w-0 truncate">{e.title}</span>
|
||||
{e.year && <span className="shrink-0 text-ink-3">{e.year}</span>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={includeUnmatched}
|
||||
onClick={() => setIncludeUnmatched((v) => !v)}
|
||||
className="mt-3 flex w-full items-center gap-3 rounded-2xl border border-line px-4 py-3 text-start"
|
||||
>
|
||||
<span className="flex-1 text-sm">{t('import.includeUnmatched')}</span>
|
||||
<span className={cx('relative h-6 w-11 shrink-0 rounded-full transition-colors', includeUnmatched ? 'bg-accent-fill' : 'border border-line-strong bg-surface-2')}>
|
||||
<span className={cx('absolute top-0.5 size-5 rounded-full transition-all', includeUnmatched ? 'start-[22px] bg-on-accent' : 'start-0.5 bg-ink')} />
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p className="mt-4 text-xs leading-relaxed text-ink-3">{t('import.mergeHint')}</p>
|
||||
{error && <p className="mt-3 text-sm text-accent">{error}</p>}
|
||||
{plan.added.length + plan.updated.length > 0 ? (
|
||||
<button onClick={() => void confirm()} className="btn btn-primary mt-5 w-full">
|
||||
<Check size={18} /> {t('import.confirm', { n: plan.added.length + plan.updated.length })}
|
||||
</button>
|
||||
) : (
|
||||
<p className="mt-5 rounded-2xl border border-line p-4 text-center text-sm text-ink-2">{t('import.nothing')}</p>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{step === 'done' && result && (
|
||||
<div className="pt-6">
|
||||
<div className="flex flex-col items-center text-center">
|
||||
<span className="grid size-14 place-items-center rounded-full bg-accent-fill text-on-accent">
|
||||
<Check size={28} strokeWidth={2.5} />
|
||||
</span>
|
||||
<h3 className="mt-4 text-lg font-semibold">{t('import.done')}</h3>
|
||||
</div>
|
||||
<div className="card mt-6 divide-y divide-line">
|
||||
<Line label={t('import.doneAdded')} value={result.added} strong />
|
||||
<Line label={t('import.toUpdate')} value={result.updated} />
|
||||
<Line label={t('import.already')} value={result.unchanged} />
|
||||
{result.notFound > 0 && <Line label={t('import.notFound')} value={result.notFound} />}
|
||||
</div>
|
||||
<button onClick={close} className="btn btn-primary mt-6 w-full">
|
||||
{t('import.close')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function Line({ label, value, strong, accent }: { label: string; value: number; strong?: boolean; accent?: boolean }) {
|
||||
return (
|
||||
<div className="flex items-center justify-between px-4 py-3 text-sm">
|
||||
<span className={strong ? 'font-medium' : 'text-ink-2'}>{label}</span>
|
||||
<span className={cx('tabular-nums', strong && 'font-semibold', accent && 'text-accent')}>{value}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import ConfirmDialog from './ConfirmDialog'
|
||||
import { MediaCard } from './MediaCard'
|
||||
import Poster from './Poster'
|
||||
import { EmptyState } from './ui'
|
||||
import { useLibraryActions } from './library/useLibraryActions'
|
||||
import { SharedListsSection } from './social/SharedLists'
|
||||
|
||||
/** Mosaïque 2×2 des premières affiches d'une liste. */
|
||||
function Mosaic({ items }: { items: MediaItem[] }) {
|
||||
@@ -60,6 +62,7 @@ export function NewListForm({ onCreated, autoFocus }: { onCreated?: (list: Custo
|
||||
|
||||
function ListDetail({ list, onBack, onOpen }: { list: CustomList; onBack: () => void; onOpen: (item: MediaItem) => void }) {
|
||||
const { items, renameList, deleteList, toggleInList } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const [renaming, setRenaming] = useState(false)
|
||||
const [name, setName] = useState(list.name)
|
||||
const [adding, setAdding] = useState(false)
|
||||
@@ -130,7 +133,7 @@ function ListDetail({ list, onBack, onOpen }: { list: CustomList; onBack: () =>
|
||||
const inList = item.listIds?.includes(list.id)
|
||||
return (
|
||||
<li key={item.id}>
|
||||
<button onClick={() => toggleInList(item.id, list.id)} className="flex w-full items-center gap-3 py-2.5 text-start">
|
||||
<button onClick={() => (inList ? void actions.removeFromList([item.id], list.id) : void toggleInList(item.id, list.id))} className="flex w-full items-center gap-3 py-2.5 text-start">
|
||||
<div className="w-9 shrink-0">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
</div>
|
||||
@@ -228,6 +231,9 @@ export default function ListsView({ onOpen }: { onOpen: (item: MediaItem) => voi
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Listes partagées avec d'autres membres (compte requis ; masqué sinon) */}
|
||||
<SharedListsSection />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { keepPushFresh } from '../lib/push'
|
||||
import { useMedia } from '../store'
|
||||
import { useSocial } from './social/SocialProvider'
|
||||
|
||||
/** Écrans qu'une notification push peut ouvrir (« /?open=… », voir public/push-sw.js). */
|
||||
const OPEN_RE = /^(notifications|item:[A-Za-z0-9_-]{1,64}|u:[a-z0-9_]{3,20})$/
|
||||
|
||||
/** Lit (et retire de l'adresse) l'écran demandé par une notification au lancement de l'app. */
|
||||
function takeOpenParam(): string | null {
|
||||
try {
|
||||
const params = new URLSearchParams(location.search)
|
||||
const open = params.get('open')
|
||||
if (open === null) return null
|
||||
params.delete('open')
|
||||
const q = params.toString()
|
||||
history.replaceState(history.state, '', `${location.pathname}${q ? `?${q}` : ''}${location.hash}`)
|
||||
return OPEN_RE.test(open) ? open : null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lien entre les notifications push et l'app : ouvre le bon écran au clic sur une notification
|
||||
* (app lancée, ou déjà ouverte : message du service worker), met à jour la cloche quand
|
||||
* une notification arrive, et garde l'abonnement de l'appareil à jour côté serveur.
|
||||
*/
|
||||
export default function PushBridge() {
|
||||
const { account, items, loading } = useMedia()
|
||||
const social = useSocial()
|
||||
const [target, setTarget] = useState<string | null>(takeOpenParam)
|
||||
const socialRef = useRef(social)
|
||||
socialRef.current = social
|
||||
|
||||
// Messages du service worker
|
||||
useEffect(() => {
|
||||
if (!('serviceWorker' in navigator)) return
|
||||
const onMessage = (e: MessageEvent) => {
|
||||
const data = e.data as { type?: unknown; open?: unknown } | null
|
||||
if (!data || typeof data !== 'object') return
|
||||
if (data.type === 'azuu:open' && typeof data.open === 'string' && OPEN_RE.test(data.open)) setTarget(data.open)
|
||||
else if (data.type === 'azuu:push') void socialRef.current.refresh()
|
||||
}
|
||||
navigator.serviceWorker.addEventListener('message', onMessage)
|
||||
return () => navigator.serviceWorker.removeEventListener('message', onMessage)
|
||||
}, [])
|
||||
|
||||
// Ouvre l'écran demandé une fois le compte et la bibliothèque chargés
|
||||
useEffect(() => {
|
||||
if (!target) return
|
||||
if (!account) {
|
||||
// Pas (ou plus) connecté : rien à ouvrir
|
||||
if (!loading) setTarget(null)
|
||||
return
|
||||
}
|
||||
if (!social.enabled || loading) return
|
||||
setTarget(null)
|
||||
if (target === 'notifications') social.openNotifications()
|
||||
else if (target.startsWith('u:')) social.openProfile(target.slice(2))
|
||||
else {
|
||||
const item = items.find((i) => i.id === target.slice(5))
|
||||
if (item) social.openItem(item)
|
||||
else social.openNotifications()
|
||||
}
|
||||
}, [target, account, social, loading, items])
|
||||
|
||||
// Abonnement push renouvelé par le navigateur, langue changée… : on le signale au serveur
|
||||
const accountOn = !!account
|
||||
useEffect(() => {
|
||||
if (accountOn) void keepPushFresh()
|
||||
}, [accountOn])
|
||||
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import { BellRing, Loader2 } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../i18n'
|
||||
import { enablePush, disablePush, getPushState, PushError, type PushState } from '../lib/push'
|
||||
import { cx } from '../lib/utils'
|
||||
|
||||
/** Réglages → Notifications : « Notifications sur cet appareil » (Web Push, même app fermée). */
|
||||
export default function PushToggle() {
|
||||
const [state, setState] = useState<PushState | null>(null)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
void getPushState().then((s) => alive && setState(s))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [])
|
||||
|
||||
if (state === null) return null
|
||||
const on = state === 'on'
|
||||
const available = state === 'on' || state === 'off'
|
||||
|
||||
const toggle = async () => {
|
||||
if (busy || !available) return
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
try {
|
||||
if (on) {
|
||||
await disablePush()
|
||||
setState('off')
|
||||
} else {
|
||||
// La permission n'est demandée qu'ici, au clic
|
||||
setState(await enablePush())
|
||||
}
|
||||
} catch (e) {
|
||||
const code = e instanceof PushError ? e.code : 'failed'
|
||||
if (code === 'denied') setState('denied')
|
||||
else setError(code === 'not-ready' ? t('push.notReady') : t('push.error'))
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const hint =
|
||||
state === 'needs-install'
|
||||
? t('push.iosInstall')
|
||||
: state === 'unsupported'
|
||||
? t('push.unsupported')
|
||||
: state === 'denied'
|
||||
? t('push.denied')
|
||||
: t('push.deviceHint')
|
||||
|
||||
return (
|
||||
<div className="card mb-3 overflow-hidden">
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={on}
|
||||
aria-disabled={!available || busy}
|
||||
onClick={() => void toggle()}
|
||||
className={cx('flex w-full items-center gap-3.5 px-4 py-3.5 text-start', !available && 'cursor-default')}
|
||||
>
|
||||
<span className={cx('grid size-10 shrink-0 place-items-center rounded-full bg-surface-2', on ? 'text-accent' : 'text-ink-2')}>
|
||||
{busy ? <Loader2 size={18} className="animate-spin" /> : <BellRing size={18} />}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block text-sm font-medium">{t('push.device')}</span>
|
||||
<span className={cx('mt-0.5 block text-xs', state === 'denied' ? 'text-accent' : 'text-ink-3')}>{hint}</span>
|
||||
</span>
|
||||
{available && (
|
||||
<span className={cx('relative h-6 w-11 shrink-0 rounded-full transition-colors', on ? 'bg-accent-fill' : 'border border-line-strong bg-surface-2')}>
|
||||
<span className={cx('absolute top-0.5 size-5 rounded-full bg-ink transition-all', on ? 'start-[22px] bg-on-accent' : 'start-0.5')} />
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
{error && (
|
||||
<p role="alert" className="border-t border-line px-4 py-2.5 text-xs text-accent">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
import { Check, CloudOff, RefreshCw, X } from 'lucide-react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { t } from '../i18n'
|
||||
import { cx } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
|
||||
function useOnline(): boolean {
|
||||
const [online, setOnline] = useState(() => navigator.onLine)
|
||||
useEffect(() => {
|
||||
const up = () => setOnline(true)
|
||||
const down = () => setOnline(false)
|
||||
window.addEventListener('online', up)
|
||||
window.addEventListener('offline', down)
|
||||
return () => {
|
||||
window.removeEventListener('online', up)
|
||||
window.removeEventListener('offline', down)
|
||||
}
|
||||
}, [])
|
||||
return online
|
||||
}
|
||||
|
||||
type Kind = 'offline' | 'offline-local' | 'pending' | 'synced'
|
||||
|
||||
/**
|
||||
* Petite pastille discrète : hors-ligne, ou modifications pas encore envoyées au compte.
|
||||
* Mobile : juste au-dessus de la barre de navigation ; ordinateur : en bas de la barre latérale.
|
||||
* Elle disparaît une fois tout synchronisé (après un bref « Synchronisé »).
|
||||
* L'état vient du moteur de synchro (useMedia().account.sync) : rien n'est recalculé ici.
|
||||
*/
|
||||
export default function SyncIndicator() {
|
||||
const { account } = useMedia()
|
||||
const online = useOnline()
|
||||
const pending = account?.sync.pending ?? 0
|
||||
const syncing = account?.sync.state === 'syncing'
|
||||
const failed = account?.sync.state === 'error'
|
||||
|
||||
// Une modification part normalement en 1-2 s : on ne signale l'attente que si elle dure
|
||||
const [slow, setSlow] = useState(false)
|
||||
useEffect(() => {
|
||||
if (pending === 0) {
|
||||
setSlow(false)
|
||||
return
|
||||
}
|
||||
const timer = setTimeout(() => setSlow(true), failed ? 0 : 4000)
|
||||
return () => clearTimeout(timer)
|
||||
}, [pending > 0, failed])
|
||||
|
||||
// Sans compte, l'app marche hors-ligne : message rassurant, que l'on peut masquer
|
||||
const [dismissed, setDismissed] = useState(false)
|
||||
useEffect(() => {
|
||||
if (online) setDismissed(false)
|
||||
}, [online])
|
||||
|
||||
const base: Kind | null = !online
|
||||
? account
|
||||
? 'offline'
|
||||
: dismissed
|
||||
? null
|
||||
: 'offline-local'
|
||||
: account && pending > 0 && slow
|
||||
? 'pending'
|
||||
: null
|
||||
|
||||
// Bref « Synchronisé » quand la pastille d'attente disparaît
|
||||
const [flash, setFlash] = useState(false)
|
||||
const shown = useRef<Kind | null>(null)
|
||||
useEffect(() => {
|
||||
const was = shown.current
|
||||
shown.current = base
|
||||
if (base) {
|
||||
setFlash(false)
|
||||
return
|
||||
}
|
||||
if (account && was === 'pending' && pending === 0 && online) setFlash(true)
|
||||
}, [base, account, pending, online])
|
||||
useEffect(() => {
|
||||
if (!flash) return
|
||||
const timer = setTimeout(() => setFlash(false), 2200)
|
||||
return () => clearTimeout(timer)
|
||||
}, [flash])
|
||||
const kind: Kind | null = base ?? (flash ? 'synced' : null)
|
||||
if (!kind) return null
|
||||
|
||||
const text =
|
||||
kind === 'offline'
|
||||
? pending > 0
|
||||
? `${t('sync.offline')} · ${t('sync.pending', { count: pending })}`
|
||||
: t('netPill.offlineSync')
|
||||
: kind === 'offline-local'
|
||||
? t('netPill.offlineLocal')
|
||||
: kind === 'pending'
|
||||
? syncing
|
||||
? `${t('sync.syncing')} · ${t('sync.pending', { count: pending })}`
|
||||
: t('sync.pending', { count: pending })
|
||||
: t('netPill.synced')
|
||||
|
||||
const icon =
|
||||
kind === 'synced' ? (
|
||||
<Check size={14} className="shrink-0 text-accent" />
|
||||
) : kind === 'pending' ? (
|
||||
<RefreshCw size={14} className={cx('shrink-0', syncing && 'animate-spin', failed && 'text-accent')} />
|
||||
) : (
|
||||
<CloudOff size={14} className="shrink-0" />
|
||||
)
|
||||
|
||||
const pill = 'pointer-events-auto inline-flex max-w-full items-center gap-2 rounded-full border border-line bg-surface px-3.5 py-1.5 text-xs font-medium text-ink-2 shadow-lg lg:w-full lg:rounded-xl lg:px-3 lg:py-2 lg:text-start'
|
||||
|
||||
return (
|
||||
<div
|
||||
className="pointer-events-none fixed inset-x-0 bottom-[calc(4.75rem+env(safe-area-inset-bottom))] z-20 flex justify-center px-4 lg:inset-x-auto lg:start-0 lg:bottom-5 lg:z-[31] lg:w-60 lg:justify-start"
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
data-testid="sync-indicator"
|
||||
data-kind={kind}
|
||||
>
|
||||
{kind === 'pending' ? (
|
||||
// Envoi en attente : un appui relance la synchro
|
||||
<button type="button" onClick={() => void account?.syncNow().catch(() => {})} className={pill} title={t('sync.now')}>
|
||||
{icon}
|
||||
<span className="truncate lg:overflow-visible lg:whitespace-normal">{text}</span>
|
||||
</button>
|
||||
) : kind === 'offline-local' ? (
|
||||
<span className={pill}>
|
||||
{icon}
|
||||
<span className="truncate lg:overflow-visible lg:whitespace-normal">{text}</span>
|
||||
<button type="button" onClick={() => setDismissed(true)} aria-label={t('netPill.hide')} className="-me-1 ms-0.5 grid size-5 shrink-0 place-items-center rounded-full text-ink-3 hover:text-ink">
|
||||
<X size={12} />
|
||||
</button>
|
||||
</span>
|
||||
) : (
|
||||
<span className={pill}>
|
||||
{icon}
|
||||
<span className="truncate lg:overflow-visible lg:whitespace-normal">{text}</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -12,10 +12,12 @@ interface Props {
|
||||
display?: (value: string) => string
|
||||
/** Valeur enregistrée à partir du texte saisi (ex. nom de référence d'un genre) */
|
||||
normalize?: (input: string) => string
|
||||
/** Propose aussi les suggestions avant de taper (ex. tags perso déjà utilisés) */
|
||||
showAll?: boolean
|
||||
}
|
||||
|
||||
/** Saisie de tags libres ; des suggestions apparaissent quand on commence à taper. */
|
||||
export default function TagInput({ value, onChange, suggestions, placeholder, display = (v) => v, normalize = (v) => v }: Props) {
|
||||
export default function TagInput({ value, onChange, suggestions, placeholder, display = (v) => v, normalize = (v) => v, showAll = false }: Props) {
|
||||
const [text, setText] = useState('')
|
||||
|
||||
const add = (raw: string) => {
|
||||
@@ -30,9 +32,9 @@ export default function TagInput({ value, onChange, suggestions, placeholder, di
|
||||
const q = normalizeText(text)
|
||||
const taken = new Set(value.map((v) => normalizeText(display(v))))
|
||||
// Suggestions seulement pendant la saisie (pas de rangée de genres affichée en permanence)
|
||||
if (!q) return []
|
||||
if (!q && !showAll) return []
|
||||
return suggestions.filter((s) => !taken.has(normalizeText(s)) && normalizeText(s).includes(q)).slice(0, 12)
|
||||
}, [text, value, suggestions])
|
||||
}, [text, value, suggestions, showAll])
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
import { t } from '../i18n'
|
||||
import { Undo2, X } from 'lucide-react'
|
||||
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
||||
|
||||
/**
|
||||
* Petits messages en bas de l'écran (« Supprimé · Annuler »), au-dessus de la barre de navigation.
|
||||
* Un seul à la fois : un nouveau message remplace le précédent (dont l'annulation n'est plus proposée).
|
||||
*/
|
||||
export interface ToastOptions {
|
||||
/** Bouton « Annuler » : remet les choses comme avant. */
|
||||
undo?: () => void | Promise<void>
|
||||
/** Durée d'affichage en ms (6 s avec « Annuler », 3 s sinon). */
|
||||
duration?: number
|
||||
}
|
||||
|
||||
interface ToastApi {
|
||||
show: (message: string, opts?: ToastOptions) => void
|
||||
dismiss: () => void
|
||||
}
|
||||
|
||||
interface ToastState extends ToastOptions {
|
||||
id: number
|
||||
message: string
|
||||
}
|
||||
|
||||
const ToastContext = createContext<ToastApi | null>(null)
|
||||
|
||||
export function ToastProvider({ children }: { children: ReactNode }) {
|
||||
const [toast, setToast] = useState<ToastState | null>(null)
|
||||
const seq = useRef(0)
|
||||
|
||||
const dismiss = useCallback(() => setToast(null), [])
|
||||
const show = useCallback((message: string, opts: ToastOptions = {}) => {
|
||||
seq.current += 1
|
||||
setToast({ id: seq.current, message, ...opts })
|
||||
}, [])
|
||||
|
||||
const api = useMemo(() => ({ show, dismiss }), [show, dismiss])
|
||||
|
||||
return (
|
||||
<ToastContext.Provider value={api}>
|
||||
{children}
|
||||
<ToastViewport toast={toast} onDismiss={dismiss} onShow={show} />
|
||||
</ToastContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
/** Accès aux messages. Hors du fournisseur (tests, aperçu), les appels ne font rien. */
|
||||
export function useToast(): ToastApi {
|
||||
return useContext(ToastContext) ?? NOOP
|
||||
}
|
||||
const NOOP: ToastApi = { show: () => {}, dismiss: () => {} }
|
||||
|
||||
function ToastViewport({ toast, onDismiss, onShow }: { toast: ToastState | null; onDismiss: () => void; onShow: ToastApi['show'] }) {
|
||||
const [paused, setPaused] = useState(false)
|
||||
const [undoing, setUndoing] = useState(false)
|
||||
const remaining = useRef(0)
|
||||
const startedAt = useRef(0)
|
||||
|
||||
// Nouveau message : compte à rebours complet
|
||||
useEffect(() => {
|
||||
if (!toast) return
|
||||
remaining.current = toast.duration ?? (toast.undo ? 6000 : 3000)
|
||||
setUndoing(false)
|
||||
}, [toast])
|
||||
|
||||
// Le compte à rebours s'arrête tant que le doigt / la souris / le clavier est sur le message
|
||||
useEffect(() => {
|
||||
if (!toast || paused) return
|
||||
startedAt.current = Date.now()
|
||||
const id = setTimeout(onDismiss, remaining.current)
|
||||
return () => {
|
||||
clearTimeout(id)
|
||||
remaining.current = Math.max(1500, remaining.current - (Date.now() - startedAt.current))
|
||||
}
|
||||
}, [toast, paused, onDismiss])
|
||||
|
||||
const undo = async () => {
|
||||
if (!toast?.undo || undoing) return
|
||||
setUndoing(true)
|
||||
try {
|
||||
await toast.undo()
|
||||
onShow(t('toast.undone'))
|
||||
} catch {
|
||||
onShow(t('toast.undoFailed'))
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
className="pointer-events-none fixed inset-x-0 bottom-[calc(5.25rem+env(safe-area-inset-bottom))] z-[80] flex justify-center px-4 lg:bottom-6 lg:ps-64"
|
||||
>
|
||||
{toast && (
|
||||
<div
|
||||
key={toast.id}
|
||||
className="sheet-in pointer-events-auto flex w-full max-w-md items-center gap-3 rounded-2xl bg-ink py-2.5 ps-4 pe-2 text-bg shadow-lg"
|
||||
onPointerEnter={() => setPaused(true)}
|
||||
onPointerLeave={() => setPaused(false)}
|
||||
onFocus={() => setPaused(true)}
|
||||
onBlur={() => setPaused(false)}
|
||||
>
|
||||
<p className="min-w-0 flex-1 text-sm font-medium leading-snug">{toast.message}</p>
|
||||
{toast.undo && (
|
||||
<button
|
||||
onClick={() => void undo()}
|
||||
disabled={undoing}
|
||||
className="inline-flex shrink-0 items-center gap-1.5 rounded-full border border-bg/30 px-3 py-1.5 text-sm font-semibold transition active:scale-95 disabled:opacity-50"
|
||||
>
|
||||
<Undo2 size={15} /> {t('toast.undo')}
|
||||
</button>
|
||||
)}
|
||||
<button onClick={onDismiss} className="grid size-8 shrink-0 place-items-center rounded-full opacity-70" aria-label={t('common.close')}>
|
||||
<X size={16} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -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 (
|
||||
<span className="relative inline-grid shrink-0 place-items-center" style={{ width: size, height: size }} role={label ? 'img' : undefined} aria-label={label}>
|
||||
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} className="-rotate-90" aria-hidden="true">
|
||||
<circle cx={size / 2} cy={size / 2} r={r} fill="none" stroke="currentColor" strokeWidth={stroke} className="text-line" />
|
||||
<circle
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
r={r}
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={stroke}
|
||||
strokeLinecap="round"
|
||||
strokeDasharray={c}
|
||||
strokeDashoffset={c * (1 - shown)}
|
||||
className="text-accent transition-[stroke-dashoffset] duration-700 ease-out motion-reduce:transition-none"
|
||||
/>
|
||||
</svg>
|
||||
<span className="absolute inset-0 grid place-items-center">
|
||||
{done ? (
|
||||
<span className="grid size-[60%] place-items-center rounded-full bg-accent-fill text-on-accent">
|
||||
<Check size={Math.round(size * 0.3)} strokeWidth={3} />
|
||||
</span>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
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 (
|
||||
<span className={cx('tabular-nums', className)}>
|
||||
<span className="font-semibold text-ink">{fmtNumber(p.count)}</span>
|
||||
<span className="text-ink-3"> / </span>
|
||||
{quantity(c.target, c.media, c.unit)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
/** 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 (
|
||||
<button onClick={onClick} className="flex w-full items-center gap-4 p-4 text-start transition-colors active:bg-surface-2">
|
||||
<ProgressRing value={p.count / c.target} done={p.done} size={ring} label={t('challenges.progress', { count: p.count, target: c.target })}>
|
||||
<span className="text-xs font-semibold tabular-nums text-ink-2">{fmtNumber(percent(p, c) / 100, { style: 'percent' })}</span>
|
||||
</ProgressRing>
|
||||
<span className="min-w-0 flex-1">
|
||||
{c.name ? (
|
||||
<>
|
||||
<span className="block truncate font-semibold">{c.name}</span>
|
||||
<span className="mt-0.5 block truncate text-sm text-ink-2">
|
||||
<CountLine c={c} p={p} /> <span className="text-ink-3">· {periodLabel(c)}</span>
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span className="block truncate">
|
||||
<CountLine c={c} p={p} className="text-[15px] text-ink-2" />
|
||||
{c.unit === 'episodes' && c.media !== 'all' && <span className="text-sm text-ink-3"> · {mediaLabel(c.media)}</span>}
|
||||
</span>
|
||||
<span className="mt-0.5 block truncate text-sm text-ink-3">{periodLabel(c)}</span>
|
||||
</>
|
||||
)}
|
||||
<span className="mt-1 block truncate text-xs">
|
||||
<span className={cx(p.state === 'done' ? 'font-semibold text-accent' : p.state === 'active' && p.pace >= 1 ? 'font-medium text-ink' : 'text-ink-2')}>{paceText(c, p)}</span>
|
||||
{days && <span className="text-ink-3"> · {days}</span>}
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
@@ -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<ChallengesView | null>(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<string[]>([])
|
||||
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 && <ChallengesSheet initial={sheet} onClose={() => setSheet(null)} onOpen={onOpen} />
|
||||
|
||||
if (!rows.length) {
|
||||
return (
|
||||
<>
|
||||
<SectionTitle>{t('challenges.title')}</SectionTitle>
|
||||
<div className="card flex items-center gap-4 p-4">
|
||||
<span className="grid size-12 shrink-0 place-items-center rounded-full border border-line-strong text-accent">
|
||||
<Target size={22} />
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-semibold">{t('challenges.emptyTitle')}</span>
|
||||
<span className="mt-0.5 block text-xs text-ink-3">{t('challenges.emptyText')}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2 flex gap-2">
|
||||
<button onClick={() => setSheet({ kind: 'list' })} className="btn btn-ghost flex-1 px-3 py-2 text-sm">
|
||||
{t('challenges.templates')}
|
||||
</button>
|
||||
<button onClick={() => setSheet({ kind: 'new' })} className="btn btn-primary flex-1 px-3 py-2 text-sm">
|
||||
{t('challenges.create')}
|
||||
</button>
|
||||
</div>
|
||||
{sheetEl}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<SectionTitle action={<LinkArrow onClick={() => setSheet({ kind: 'list' })}>{t('challenges.manage')}</LinkArrow>}>{t('challenges.title')}</SectionTitle>
|
||||
|
||||
{partyRow && (
|
||||
<div className="card mb-3 flex items-center gap-3 border-accent p-3.5" role="status">
|
||||
<span className="challenge-pop relative grid size-11 shrink-0 place-items-center rounded-full bg-accent-fill text-on-accent">
|
||||
<Trophy size={20} />
|
||||
<span className="challenge-halo absolute inset-0 rounded-full border-2 border-accent" aria-hidden="true" />
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-semibold">{t('challenges.celebrate')}</span>
|
||||
<span className="block truncate text-xs text-ink-2">{t('challenges.celebrateText', { name: challengeTitle(partyRow.c) })}</span>
|
||||
</span>
|
||||
<button onClick={() => setParty((p) => p.filter((id) => id !== partyRow.c.id))} className="grid size-9 shrink-0 place-items-center rounded-full text-ink-3" aria-label={t('common.close')}>
|
||||
<X size={18} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="card divide-y divide-line overflow-hidden">
|
||||
{shown.map(({ c, p }) => (
|
||||
<ChallengeSummary key={c.id} c={c} p={p} onClick={() => setSheet({ kind: 'detail', id: c.id })} />
|
||||
))}
|
||||
</div>
|
||||
{rows.length > HOME_MAX && (
|
||||
<button onClick={() => setSheet({ kind: 'list' })} className="mt-2 w-full py-1.5 text-center text-xs text-ink-3">
|
||||
{t('challenges.more', { count: rows.length - HOME_MAX })}
|
||||
</button>
|
||||
)}
|
||||
{sheetEl}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const rank = (s: string) => (s === 'active' ? 0 : s === 'upcoming' ? 1 : 2)
|
||||
@@ -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<ChallengesView[]>([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 = (
|
||||
<ChallengeForm
|
||||
key={view.kind === 'edit' ? view.id : 'new'}
|
||||
initial={view.kind === 'edit' ? current : undefined}
|
||||
items={items}
|
||||
onSave={(c) => {
|
||||
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 = (
|
||||
<ChallengeDetail
|
||||
c={current}
|
||||
items={items}
|
||||
onOpen={onOpen}
|
||||
onEdit={() => 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 = (
|
||||
<ChallengeList
|
||||
challenges={challenges}
|
||||
items={items}
|
||||
full={full}
|
||||
onNew={() => push({ kind: 'new' })}
|
||||
onPick={(id) => push({ kind: 'detail', id })}
|
||||
onTemplate={(c) => {
|
||||
upsert(c)
|
||||
push({ kind: 'detail', id: c.id })
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="sheet-in fixed inset-0 z-50 flex flex-col bg-bg" role="dialog" aria-modal="true" aria-label={title}>
|
||||
<header className="safe-top border-b border-line">
|
||||
<div className="mx-auto flex max-w-2xl items-center gap-2 px-3 py-2.5">
|
||||
<button onClick={back} className="grid size-10 place-items-center rounded-full text-ink-2" aria-label={stack.length > 1 ? t('challenges.back') : t('common.close')}>
|
||||
{stack.length > 1 ? <ArrowLeft size={22} className="rtl:rotate-180" /> : <X size={22} />}
|
||||
</button>
|
||||
<h2 className="min-w-0 flex-1 truncate text-center text-base font-semibold">{title}</h2>
|
||||
<span className="size-10" />
|
||||
</div>
|
||||
</header>
|
||||
<div key={stack.length + view.kind} className="flex-1 overflow-y-auto overscroll-contain">
|
||||
<div className="mx-auto max-w-2xl px-4 py-5 pb-[calc(10rem+env(safe-area-inset-bottom))]">{body}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// ─── 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 && (
|
||||
<section className="mt-7">
|
||||
<h3 className="eyebrow mb-2">{label}</h3>
|
||||
<div className="card divide-y divide-line overflow-hidden">
|
||||
{list.map(({ c, p }) => (
|
||||
<ChallengeSummary key={c.id} c={c} p={p} ring={52} onClick={() => onPick(c.id)} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<button onClick={onNew} disabled={full} className="btn btn-primary w-full">
|
||||
<Plus size={18} /> {t('challenges.new')}
|
||||
</button>
|
||||
{full && <p className="mt-2 text-center text-xs text-ink-3">{t('challenges.limit', { n: MAX_CHALLENGES })}</p>}
|
||||
|
||||
{!full && templates.length > 0 && (
|
||||
<section className="mt-6">
|
||||
<h3 className="eyebrow mb-2">{t('challenges.templates')}</h3>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{templates.map((tpl) => (
|
||||
<button key={`${tpl.target}-${tpl.media}-${tpl.unit}-${tpl.period}`} onClick={() => onTemplate({ ...tpl, id: newChallengeId() })} className="chip">
|
||||
<Plus size={14} className="text-accent" />
|
||||
{challengeTitle(tpl)} · {periodLabel(tpl)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
{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 (
|
||||
<>
|
||||
<div className="flex flex-col items-center text-center">
|
||||
<ProgressRing value={p.count / c.target} size={132} stroke={9}>
|
||||
<span className="flex flex-col items-center leading-none">
|
||||
<span className="text-3xl font-black tabular-nums">{fmtNumber(p.count)}</span>
|
||||
<span className="mt-1 text-xs text-ink-3 tabular-nums">/ {fmtNumber(c.target)}</span>
|
||||
</span>
|
||||
</ProgressRing>
|
||||
<h3 className="mt-4 text-xl font-semibold">{challengeTitle(c)}</h3>
|
||||
<p className="mt-1 text-sm text-ink-3">{[mediaLabelIfNamed(c), periodLabel(c)].filter(Boolean).join(' · ')}</p>
|
||||
{p.done ? (
|
||||
<span className="mt-3 inline-flex items-center gap-1.5 rounded-full bg-accent-fill px-3 py-1 text-sm font-semibold text-on-accent">
|
||||
<Trophy size={15} /> {paceText(c, p)}
|
||||
</span>
|
||||
) : (
|
||||
<p className="mt-3 text-sm text-ink-2">{[paceText(c, p), days].filter(Boolean).join(' · ')}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-6 grid grid-cols-2 gap-2">
|
||||
<button onClick={onEdit} className="btn btn-ghost px-3 text-sm">
|
||||
<Pencil size={16} /> {t('common.edit')}
|
||||
</button>
|
||||
<button onClick={onArchive} className="btn btn-ghost px-3 text-sm">
|
||||
{c.archived ? <ArchiveRestore size={16} /> : <Archive size={16} />} {c.archived ? t('challenges.unarchive') : t('challenges.archive')}
|
||||
</button>
|
||||
{ended && onRenew && (
|
||||
<button onClick={onRenew} className="btn btn-ghost px-3 text-sm">
|
||||
<RotateCcw size={16} /> {t('challenges.renew')}
|
||||
</button>
|
||||
)}
|
||||
<button onClick={() => setConfirm(true)} className={cx('btn px-3 text-sm text-ink-2', !(ended && onRenew) && 'col-span-2')}>
|
||||
<Trash2 size={16} /> {t('common.delete')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3 className="eyebrow mt-8 mb-2">
|
||||
{t('challenges.counted')} · {fmtNumber(p.entries.length)}
|
||||
</h3>
|
||||
{p.entries.length === 0 ? (
|
||||
<p className="card p-4 text-sm text-ink-3">{t('challenges.countedEmpty')}</p>
|
||||
) : (
|
||||
<ul className="card divide-y divide-line overflow-hidden">
|
||||
{p.entries.map((e) => (
|
||||
<li key={`${e.item.id}-${e.date}-${e.rewatch ? 'r' : ''}`}>
|
||||
<button onClick={() => onOpen(e.item)} className="flex w-full items-center gap-3 p-2.5 text-start transition-colors active:bg-surface-2">
|
||||
<span className="w-10 shrink-0">
|
||||
<Poster src={e.item.poster} title={e.item.title} />
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate text-sm font-semibold">{e.item.title}</span>
|
||||
<span className="block truncate text-xs text-ink-3">
|
||||
{[mediaLabel(e.item.type), formatDay(e.date)].join(' · ')}
|
||||
</span>
|
||||
</span>
|
||||
{e.rewatch && <span className="shrink-0 rounded-full border border-line-strong px-2 py-0.5 text-[10px] font-semibold uppercase text-ink-2">{t('challenges.rewatch')}</span>}
|
||||
{c.unit === 'episodes' && (
|
||||
<span className="shrink-0 text-xs tabular-nums text-ink-2">
|
||||
{e.estimated ? '≈ ' : ''}
|
||||
{quantity(Math.round(e.amount), 'all', 'episodes')}
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{p.estimated && (
|
||||
<p className="mt-3 flex gap-2 text-xs leading-relaxed text-ink-3">
|
||||
<Info size={14} className="mt-0.5 shrink-0" /> {t('challenges.estimated')}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<ConfirmDialog
|
||||
open={confirm}
|
||||
title={t('challenges.deleteTitle')}
|
||||
message={t('challenges.deleteText')}
|
||||
confirmLabel={t('common.delete')}
|
||||
onCancel={() => 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<Challenge>(() => initial ?? { id: newChallengeId(), target: 12, media: 'film', unit: 'titles', period: 'year', ...periodBounds('year') })
|
||||
const [targetText, setTargetText] = useState(String(draft.target))
|
||||
const set = (patch: Partial<Challenge>) => 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 (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault()
|
||||
if (!valid) return
|
||||
const name = draft.name?.trim().slice(0, NAME_MAX)
|
||||
onSave({ ...draft, name: name || undefined })
|
||||
}}
|
||||
className="space-y-6"
|
||||
>
|
||||
<div>
|
||||
<span className="label">{t('challenges.target')}</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<button type="button" onClick={() => setTarget(draft.target - 1)} className="grid size-11 shrink-0 place-items-center rounded-full border border-line text-ink-2 active:bg-surface-2" aria-label="−1">
|
||||
<Minus size={18} />
|
||||
</button>
|
||||
<input
|
||||
type="number"
|
||||
inputMode="numeric"
|
||||
min={1}
|
||||
max={TARGET_MAX}
|
||||
value={targetText}
|
||||
onChange={(e) => {
|
||||
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')}
|
||||
/>
|
||||
<button type="button" onClick={() => setTarget(draft.target + 1)} className="grid size-11 shrink-0 place-items-center rounded-full border border-line text-ink-2 active:bg-surface-2" aria-label="+1">
|
||||
<Plus size={18} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span className="label">{t('challenges.media')}</span>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{(['all', ...MEDIA_TYPES.map((m) => m.value)] as Challenge['media'][]).map((m) => (
|
||||
<button type="button" key={m} onClick={() => setMedia(m)} className={cx('chip', draft.media === m && 'chip-on')} aria-pressed={draft.media === m}>
|
||||
{mediaLabel(m)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span className="label">{t('challenges.unit')}</span>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{UNITS.map((u) => (
|
||||
<button
|
||||
type="button"
|
||||
key={u}
|
||||
disabled={u === 'episodes' && draft.media === 'film'}
|
||||
onClick={() => set({ unit: u })}
|
||||
className={cx('chip disabled:opacity-40', draft.unit === u && 'chip-on')}
|
||||
aria-pressed={draft.unit === u}
|
||||
>
|
||||
{t(u === 'titles' ? 'challenges.unit.titles' : 'challenges.unit.episodes')}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span className="label">{t('challenges.period')}</span>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{PERIODS.map((p) => (
|
||||
<button type="button" key={p} onClick={() => setPeriod(p)} className={cx('chip', draft.period === p && 'chip-on')} aria-pressed={draft.period === p}>
|
||||
{t(`challenges.period.${p}`)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{draft.period === 'custom' ? (
|
||||
<div className="mt-3 grid grid-cols-2 gap-2">
|
||||
<label>
|
||||
<span className="label">{t('challenges.from')}</span>
|
||||
<input type="date" value={draft.start} max={draft.end || undefined} onChange={(e) => set({ start: e.target.value })} className="field" />
|
||||
</label>
|
||||
<label>
|
||||
<span className="label">{t('challenges.to')}</span>
|
||||
<input type="date" value={draft.end} min={draft.start || undefined} onChange={(e) => set({ end: e.target.value })} className="field" />
|
||||
</label>
|
||||
</div>
|
||||
) : (
|
||||
<p className="mt-2 text-xs text-ink-3">{periodLabel(draft)}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<label className="block">
|
||||
<span className="label">{t('challenges.name')}</span>
|
||||
<input type="text" value={draft.name ?? ''} maxLength={NAME_MAX} onChange={(e) => set({ name: e.target.value })} placeholder={challengeTitle({ ...draft, name: undefined })} className="field" />
|
||||
</label>
|
||||
|
||||
{preview && (
|
||||
<div className="card flex items-center gap-3 p-3.5">
|
||||
<ProgressRing value={preview.count / draft.target} done={preview.done} size={44} stroke={4} animate={false} />
|
||||
<p className="text-sm text-ink-2">{t('challenges.preview', { what: quantity(preview.count, draft.media, draft.unit) })}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button type="submit" disabled={!valid} className="btn btn-primary w-full">
|
||||
{initial ? t('common.save') : t('challenges.create')}
|
||||
</button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import { t } from '../../i18n'
|
||||
import { Check } from 'lucide-react'
|
||||
import { useRef, type ReactNode } from 'react'
|
||||
import { cx } from '../../lib/utils'
|
||||
|
||||
interface Props {
|
||||
title: string
|
||||
selecting: boolean
|
||||
selected: boolean
|
||||
onToggle: () => void
|
||||
/** Appui long (téléphone) ou case à cocher (ordinateur) : entre en mode sélection avec ce titre. */
|
||||
onStartSelect: () => void
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
const LONG_PRESS_MS = 450
|
||||
|
||||
/**
|
||||
* Enveloppe d'une carte du catalogue pour la sélection multiple :
|
||||
* - téléphone : appui long sur la carte ;
|
||||
* - ordinateur : case à cocher au survol ;
|
||||
* - en mode sélection, toucher la carte la coche / décoche (au lieu d'ouvrir la fiche).
|
||||
*/
|
||||
export default function SelectableCard({ title, selecting, selected, onToggle, onStartSelect, children }: Props) {
|
||||
const timer = useRef<ReturnType<typeof setTimeout>>(undefined)
|
||||
const origin = useRef<{ x: number; y: number }>(undefined)
|
||||
const fired = useRef(false)
|
||||
|
||||
const cancel = () => {
|
||||
clearTimeout(timer.current)
|
||||
timer.current = undefined
|
||||
origin.current = undefined
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="group relative select-none [-webkit-touch-callout:none]"
|
||||
onPointerDown={(e) => {
|
||||
fired.current = false
|
||||
if (selecting || e.pointerType === 'mouse') return
|
||||
origin.current = { x: e.clientX, y: e.clientY }
|
||||
timer.current = setTimeout(() => {
|
||||
fired.current = true
|
||||
timer.current = undefined
|
||||
navigator.vibrate?.(12)
|
||||
onStartSelect()
|
||||
}, LONG_PRESS_MS)
|
||||
}}
|
||||
onPointerMove={(e) => {
|
||||
// Le doigt glisse (défilement) : ce n'est pas un appui long
|
||||
if (origin.current && Math.hypot(e.clientX - origin.current.x, e.clientY - origin.current.y) > 10) cancel()
|
||||
}}
|
||||
onPointerUp={cancel}
|
||||
onPointerCancel={cancel}
|
||||
onPointerLeave={cancel}
|
||||
onContextMenu={(e) => {
|
||||
// Pas de menu « Enregistrer l'image » pendant l'appui long
|
||||
if (fired.current || timer.current) e.preventDefault()
|
||||
}}
|
||||
onClickCapture={(e) => {
|
||||
// Le « clic » qui suit un appui long ne doit pas ouvrir la fiche
|
||||
if (fired.current) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
fired.current = false
|
||||
}
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
{selecting ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onToggle}
|
||||
aria-pressed={selected}
|
||||
aria-label={t('select.toggle', { title })}
|
||||
className={cx('absolute -inset-1 z-10 rounded-2xl transition-colors', selected ? 'bg-accent-fill/15 ring-2 ring-accent' : 'active:bg-ink/5')}
|
||||
>
|
||||
<span
|
||||
className={cx(
|
||||
'absolute end-3 top-3 grid size-7 place-items-center rounded-full border-2 transition-colors',
|
||||
selected ? 'border-accent-fill bg-accent-fill text-on-accent' : 'border-ink/70 bg-bg/70 text-transparent',
|
||||
)}
|
||||
>
|
||||
<Check size={15} strokeWidth={3} />
|
||||
</span>
|
||||
</button>
|
||||
) : (
|
||||
// Ordinateur : case à cocher au survol (ou au clavier) pour commencer une sélection
|
||||
<button
|
||||
type="button"
|
||||
onClick={onStartSelect}
|
||||
aria-label={t('select.toggle', { title })}
|
||||
className="absolute end-2 top-2 z-10 hidden size-7 place-items-center rounded-full border-2 border-ink/70 bg-bg/85 text-transparent opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100 pointer-fine:grid"
|
||||
>
|
||||
<Check size={15} strokeWidth={3} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
import { t } from '../../i18n'
|
||||
import { CircleDot, ListPlus, Minus, Plus, Tag, Trash2, X } from 'lucide-react'
|
||||
import { useMemo, useState, type ReactNode } from 'react'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
import { allTags, cleanTag, hasTag } from '../../lib/bulk'
|
||||
import { STATUSES } from '../../lib/constants'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
import { cx, normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem, WatchStatus } from '../../types'
|
||||
import { StatusDot } from '../Badges'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import { NewListForm } from '../ListsView'
|
||||
import { useLibraryActions } from './useLibraryActions'
|
||||
|
||||
type Panel = null | 'status' | 'list' | 'tag' | 'delete'
|
||||
|
||||
interface Props {
|
||||
/** Fiches sélectionnées */
|
||||
selected: MediaItem[]
|
||||
/** Action terminée : on quitte le mode sélection */
|
||||
onDone: () => void
|
||||
}
|
||||
|
||||
/** Barre d'actions groupées (en bas, à la place de la barre de navigation). */
|
||||
export default function SelectionBar({ selected, onDone }: Props) {
|
||||
const actions = useLibraryActions()
|
||||
const [panel, setPanel] = useState<Panel>(null)
|
||||
const ids = selected.map((i) => i.id)
|
||||
const none = selected.length === 0
|
||||
|
||||
const run = async (fn: () => Promise<void>) => {
|
||||
setPanel(null)
|
||||
await fn()
|
||||
onDone()
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="safe-bottom fixed inset-x-0 bottom-0 z-40 border-t border-line bg-bg/95 backdrop-blur-md lg:start-60 lg:bottom-6 lg:mx-auto lg:max-w-xl lg:rounded-2xl lg:border lg:pb-0">
|
||||
<div className="mx-auto grid max-w-2xl grid-cols-4 px-2" role="toolbar" aria-label={t('select.actions')}>
|
||||
<BarButton icon={<CircleDot size={21} />} label={t('select.status')} onClick={() => setPanel('status')} disabled={none} />
|
||||
<BarButton icon={<ListPlus size={21} />} label={t('select.list')} onClick={() => setPanel('list')} disabled={none} />
|
||||
<BarButton icon={<Tag size={21} />} label={t('select.tag')} onClick={() => setPanel('tag')} disabled={none} />
|
||||
<BarButton icon={<Trash2 size={21} />} label={t('common.delete')} onClick={() => setPanel('delete')} disabled={none} danger />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{panel === 'status' && (
|
||||
<PickerSheet title={t('select.statusTitle', { count: selected.length })} onClose={() => setPanel(null)}>
|
||||
{STATUSES.map((s) => {
|
||||
const already = selected.every((i) => i.status === s.value)
|
||||
return (
|
||||
<button
|
||||
key={s.value}
|
||||
onClick={() => void run(() => actions.setStatus(ids, s.value as WatchStatus))}
|
||||
disabled={already}
|
||||
className="flex w-full items-center gap-3 rounded-xl px-3 py-3.5 text-start text-[15px] text-ink active:bg-surface-2 disabled:opacity-40"
|
||||
>
|
||||
<StatusDot status={s.value} className="size-2.5" />
|
||||
{s.label}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</PickerSheet>
|
||||
)}
|
||||
|
||||
{panel === 'list' && <ListPicker selected={selected} onClose={() => setPanel(null)} run={run} />}
|
||||
{panel === 'tag' && <TagPicker selected={selected} onClose={() => setPanel(null)} run={run} />}
|
||||
|
||||
<ConfirmDialog
|
||||
open={panel === 'delete'}
|
||||
title={t('confirm.title')}
|
||||
message={t('select.deleteConfirm', { count: selected.length })}
|
||||
confirmLabel={t('common.delete')}
|
||||
onConfirm={() => void run(() => actions.deleteItems(ids))}
|
||||
onCancel={() => setPanel(null)}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function BarButton({ icon, label, onClick, disabled, danger }: { icon: ReactNode; label: string; onClick: () => void; disabled?: boolean; danger?: boolean }) {
|
||||
return (
|
||||
<button
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
className={cx('flex flex-col items-center gap-1 pb-2 pt-2.5 text-[11px] font-medium transition-colors disabled:opacity-35', danger ? 'text-accent' : 'text-ink')}
|
||||
>
|
||||
{icon}
|
||||
{label}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
/** Petite feuille en bas de l'écran ; Échap ou le geste retour la ferment sans quitter la sélection. */
|
||||
function PickerSheet({ title, onClose, children }: { title: string; onClose: () => void; children: ReactNode }) {
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
return (
|
||||
<div className="fixed inset-0 z-[60] flex items-end justify-center bg-black/70 sm:items-center" onClick={onClose}>
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={title}
|
||||
className="sheet-in safe-bottom max-h-[85dvh] w-full max-w-md overflow-y-auto overscroll-contain rounded-t-3xl border border-line-strong bg-surface p-3 sm:rounded-3xl"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="mb-1 flex items-center justify-between gap-2 ps-3">
|
||||
<h2 className="text-base font-semibold">{title}</h2>
|
||||
<button onClick={onClose} className="grid size-10 place-items-center rounded-full text-ink-3" aria-label={t('common.close')}>
|
||||
<X size={20} />
|
||||
</button>
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
type Run = (fn: () => Promise<void>) => Promise<void>
|
||||
|
||||
function ListPicker({ selected, onClose, run }: { selected: MediaItem[]; onClose: () => void; run: Run }) {
|
||||
const { lists } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const ids = selected.map((i) => i.id)
|
||||
return (
|
||||
<PickerSheet title={t('select.listTitle', { count: selected.length })} onClose={onClose}>
|
||||
{lists.length === 0 && <p className="px-3 pb-3 text-sm text-ink-3">{t('select.noLists')}</p>}
|
||||
<ul className="divide-y divide-line">
|
||||
{lists.map((l) => {
|
||||
const inside = selected.filter((i) => i.listIds?.includes(l.id)).length
|
||||
return (
|
||||
<li key={l.id} className="flex items-center gap-2 px-3 py-2.5">
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="truncate text-[15px]">{l.name}</p>
|
||||
<p className="text-xs text-ink-3">{t('select.inList', { n: inside, total: selected.length })}</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => void run(() => actions.removeFromList(ids, l.id))}
|
||||
disabled={inside === 0}
|
||||
className="grid size-9 place-items-center rounded-full border border-line text-ink-2 disabled:opacity-30"
|
||||
aria-label={t('select.removeFrom', { list: l.name })}
|
||||
>
|
||||
<Minus size={16} />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => void run(() => actions.addToList(ids, l.id))}
|
||||
disabled={inside === selected.length}
|
||||
className="grid size-9 place-items-center rounded-full bg-accent-fill text-on-accent disabled:opacity-30"
|
||||
aria-label={t('select.addTo', { list: l.name })}
|
||||
>
|
||||
<Plus size={16} />
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
<div className="mt-2 px-1 pb-1">
|
||||
<NewListForm onCreated={(l) => void run(() => actions.addToList(ids, l.id, l.name))} />
|
||||
</div>
|
||||
</PickerSheet>
|
||||
)
|
||||
}
|
||||
|
||||
function TagPicker({ selected, onClose, run }: { selected: MediaItem[]; onClose: () => void; run: Run }) {
|
||||
const { items } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const ids = selected.map((i) => i.id)
|
||||
const existing = useMemo(() => allTags(items), [items])
|
||||
// Tags déjà portés par au moins une fiche sélectionnée (pour les retirer)
|
||||
const present = useMemo(() => allTags(selected), [selected])
|
||||
const [text, setText] = useState('')
|
||||
const q = normalizeText(text)
|
||||
const suggestions = existing.filter((tag) => !selected.every((i) => hasTag(i, tag)) && (!q || normalizeText(tag).includes(q))).slice(0, 16)
|
||||
const add = (raw: string) => {
|
||||
const tag = cleanTag(raw, existing)
|
||||
if (tag) void run(() => actions.addTag(ids, tag))
|
||||
}
|
||||
|
||||
return (
|
||||
<PickerSheet title={t('select.tagTitle', { count: selected.length })} onClose={onClose}>
|
||||
<form
|
||||
className="flex gap-2 px-1"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault()
|
||||
add(text)
|
||||
}}
|
||||
>
|
||||
<input className="field" value={text} onChange={(e) => setText(e.target.value)} placeholder={t('tags.placeholder')} maxLength={40} autoFocus enterKeyHint="done" aria-label={t('tags.label')} />
|
||||
<button disabled={!cleanTag(text)} className="btn btn-light shrink-0 px-4 text-sm">
|
||||
{t('common.add')}
|
||||
</button>
|
||||
</form>
|
||||
{suggestions.length > 0 && (
|
||||
<div className="mt-3 flex flex-wrap gap-1.5 px-1">
|
||||
{suggestions.map((tag) => (
|
||||
<button key={tag} onClick={() => add(tag)} className="chip py-1! text-xs">
|
||||
+ {tag}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{present.length > 0 && (
|
||||
<div className="mt-5 border-t border-line px-1 pt-3">
|
||||
<span className="label">{t('select.removeTag')}</span>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{present.map((tag) => (
|
||||
<button key={tag} onClick={() => void run(() => actions.removeTag(ids, tag))} className="chip py-1! text-xs" aria-label={t('common.removeX', { name: tag })}>
|
||||
#{tag} <X size={13} />
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="mt-4 px-1 pb-1 text-xs text-ink-3">{t('tags.private')}</p>
|
||||
</PickerSheet>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import { t } from '../../i18n'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import { STATUS_BY_VALUE } from '../../lib/constants'
|
||||
import { hasTag, statusPatch } from '../../lib/bulk'
|
||||
import { LIMITS } from '../../lib/security'
|
||||
import { normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem, WatchStatus } from '../../types'
|
||||
import { useToast } from '../Toast'
|
||||
|
||||
/**
|
||||
* Actions sur la bibliothèque qui proposent « Annuler » (suppression, statut, listes, tags).
|
||||
* L'annulation remet les fiches exactement comme avant (voir `restore` dans le store).
|
||||
*/
|
||||
export function useLibraryActions() {
|
||||
const { items, lists, updateMany, removeMany, restore } = useMedia()
|
||||
const toast = useToast()
|
||||
|
||||
const pick = useCallback((ids: Iterable<string>) => {
|
||||
const wanted = new Set(ids)
|
||||
return items.filter((i) => wanted.has(i.id))
|
||||
}, [items])
|
||||
|
||||
const undoable = useCallback(
|
||||
(message: string, snapshots: MediaItem[]) => toast.show(message, { undo: () => restore(snapshots) }),
|
||||
[toast, restore],
|
||||
)
|
||||
|
||||
const listName = useCallback((id: string) => lists.find((l) => l.id === id)?.name ?? '', [lists])
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
/** Supprime des fiches (avec « Annuler »). */
|
||||
async deleteItems(ids: Iterable<string>) {
|
||||
const snapshots = pick(ids)
|
||||
if (!snapshots.length) return
|
||||
await removeMany(snapshots.map((i) => i.id))
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.deleted', { title: snapshots[0].title }) : t('toast.deletedMany', { count: snapshots.length }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
/** Change le statut (dates et épisodes suivent, comme sur la fiche). */
|
||||
async setStatus(ids: Iterable<string>, status: WatchStatus) {
|
||||
const snapshots = pick(ids).filter((i) => i.status !== status)
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: statusPatch(i, status) })))
|
||||
const label = STATUS_BY_VALUE[status].label
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.status', { title: snapshots[0].title, status: label }) : t('toast.statusMany', { count: snapshots.length, status: label }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
async addToList(ids: Iterable<string>, listId: string, name?: string) {
|
||||
const snapshots = pick(ids).filter((i) => !i.listIds?.includes(listId))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { listIds: [...(i.listIds ?? []), listId] } })))
|
||||
undoable(t('toast.addedToList', { count: snapshots.length, list: name ?? listName(listId) }), snapshots)
|
||||
},
|
||||
|
||||
async removeFromList(ids: Iterable<string>, listId: string) {
|
||||
const snapshots = pick(ids).filter((i) => i.listIds?.includes(listId))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { listIds: i.listIds!.filter((x) => x !== listId) } })))
|
||||
undoable(
|
||||
snapshots.length === 1 ? t('toast.removedFromList', { title: snapshots[0].title, list: listName(listId) }) : t('toast.removedFromListMany', { count: snapshots.length, list: listName(listId) }),
|
||||
snapshots,
|
||||
)
|
||||
},
|
||||
|
||||
async addTag(ids: Iterable<string>, tag: string) {
|
||||
const snapshots = pick(ids).filter((i) => !hasTag(i, tag) && (i.tags?.length ?? 0) < LIMITS.tags)
|
||||
if (!snapshots.length || !tag) return
|
||||
await updateMany(snapshots.map((i) => ({ id: i.id, patch: { tags: [...(i.tags ?? []), tag] } })))
|
||||
undoable(t('toast.tagged', { count: snapshots.length, tag }), snapshots)
|
||||
},
|
||||
|
||||
async removeTag(ids: Iterable<string>, tag: string) {
|
||||
const key = normalizeText(tag)
|
||||
const snapshots = pick(ids).filter((i) => hasTag(i, tag))
|
||||
if (!snapshots.length) return
|
||||
await updateMany(
|
||||
snapshots.map((i) => {
|
||||
const tags = i.tags!.filter((x) => normalizeText(x) !== key)
|
||||
return { id: i.id, patch: { tags: tags.length ? tags : undefined } }
|
||||
}),
|
||||
)
|
||||
undoable(t('toast.untagged', { count: snapshots.length, tag }), snapshots)
|
||||
},
|
||||
|
||||
/** « Annuler » pour un changement fait ailleurs (fiche) : remet ces copies. */
|
||||
offerUndo: undoable,
|
||||
}),
|
||||
[pick, removeMany, updateMany, undoable, listName],
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
import { Bug, Check, ExternalLink, Loader2 } from 'lucide-react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import { t, type TKey } from '../../i18n'
|
||||
import { techInfo } from '../../lib/appInfo'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
import { BUG_DESCRIPTION_MAX, BUG_DESCRIPTION_MIN, submitBugReport } from '../../lib/cloud/moderation'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
import { useScrollLock } from '../../lib/scrollLock'
|
||||
import { useMedia } from '../../store'
|
||||
|
||||
/** Contact de l'éditeur (sans compte, le formulaire n'est pas disponible). */
|
||||
export const SUPPORT_URL = 'https://rdacet.fr'
|
||||
|
||||
const INFO_LABEL: Record<string, TKey> = {
|
||||
version: 'bug.info.version',
|
||||
browser: 'bug.info.browser',
|
||||
os: 'bug.info.os',
|
||||
lang: 'bug.info.lang',
|
||||
theme: 'bug.info.theme',
|
||||
screen: 'bug.info.screen',
|
||||
viewport: 'bug.info.viewport',
|
||||
route: 'bug.info.route',
|
||||
standalone: 'bug.info.standalone',
|
||||
online: 'bug.info.online',
|
||||
}
|
||||
|
||||
/** Ligne « Signaler un bug » de la section « À propos » des réglages. */
|
||||
export function BugReportRow() {
|
||||
const { account } = useMedia()
|
||||
const [open, setOpen] = useState(false)
|
||||
if (!account) {
|
||||
return (
|
||||
<a href={SUPPORT_URL} target="_blank" rel="noopener" className="flex items-center gap-3.5 px-4 py-4 transition-colors active:bg-surface-2">
|
||||
<Bug size={19} className="text-ink-2" />
|
||||
<span className="flex-1">
|
||||
<span className="block font-medium">{t('bug.title')}</span>
|
||||
<span className="mt-0.5 block text-xs text-ink-3">{t('bug.hintLocal')}</span>
|
||||
</span>
|
||||
<ExternalLink size={16} className="text-ink-3" />
|
||||
</a>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<button type="button" onClick={() => setOpen(true)} className="flex w-full items-center gap-3.5 px-4 py-4 text-start transition-colors active:bg-surface-2">
|
||||
<Bug size={19} className="text-ink-2" />
|
||||
<span className="flex-1">
|
||||
<span className="block font-medium">{t('bug.title')}</span>
|
||||
<span className="mt-0.5 block text-xs text-ink-3">{t('bug.hint')}</span>
|
||||
</span>
|
||||
<span className="text-ink-3">→</span>
|
||||
</button>
|
||||
{open && createPortal(<BugReportDialog onClose={() => setOpen(false)} />, document.body)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
/** Formulaire « Signaler un bug » : description + infos techniques (montrées avant l'envoi, rien de personnel). */
|
||||
export default function BugReportDialog({ onClose }: { onClose: () => void }) {
|
||||
const { settings } = useMedia()
|
||||
const info = useMemo(() => techInfo(settings.themeMode), [settings.themeMode])
|
||||
const [text, setText] = useState('')
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [error, setError] = useState<string>()
|
||||
const [done, setDone] = useState(false)
|
||||
useScrollLock()
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
|
||||
const tooShort = text.trim().length < BUG_DESCRIPTION_MIN
|
||||
|
||||
const submit = async () => {
|
||||
if (tooShort || busy) return
|
||||
setBusy(true)
|
||||
setError(undefined)
|
||||
try {
|
||||
await submitBugReport(text, info)
|
||||
setDone(true)
|
||||
} catch (e) {
|
||||
setError((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-[80] flex touch-none items-end justify-center overscroll-none bg-black/70 sm:items-center sm:p-4" onClick={onClose}>
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="bug-title"
|
||||
className="sheet-in safe-bottom max-h-[92dvh] w-full max-w-lg touch-pan-y overflow-y-auto overscroll-contain rounded-t-3xl border border-line-strong bg-surface p-5 sm:rounded-3xl"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{done ? (
|
||||
<div className="flex flex-col items-center py-4 text-center">
|
||||
<span className="grid size-12 place-items-center rounded-full border border-line-strong text-accent">
|
||||
<Check size={22} />
|
||||
</span>
|
||||
<h2 id="bug-title" className="mt-4 text-lg font-semibold">
|
||||
{t('bug.thanks')}
|
||||
</h2>
|
||||
<p className="mt-2 text-sm leading-relaxed text-ink-2">{t('bug.thanksText')}</p>
|
||||
<button type="button" onClick={onClose} className="btn btn-ghost mt-6 w-full" autoFocus>
|
||||
{t('common.close')}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<h2 id="bug-title" className="flex items-center gap-2 text-lg font-semibold">
|
||||
<Bug size={18} className="text-accent" />
|
||||
{t('bug.title')}
|
||||
</h2>
|
||||
<p className="mt-1.5 text-sm text-ink-3">{t('bug.intro')}</p>
|
||||
|
||||
<label className="mt-4 block">
|
||||
<span className="label">{t('bug.description')}</span>
|
||||
<textarea
|
||||
className="field min-h-32 resize-y text-sm"
|
||||
maxLength={BUG_DESCRIPTION_MAX}
|
||||
value={text}
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
placeholder={t('bug.placeholder')}
|
||||
autoFocus
|
||||
/>
|
||||
<span className="mt-1 block text-end text-[11px] tabular-nums text-ink-3">
|
||||
{text.length}/{BUG_DESCRIPTION_MAX}
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<details className="mt-2 rounded-xl border border-line px-3.5 py-2.5 text-sm" open>
|
||||
<summary className="cursor-pointer font-medium text-ink-2">{t('bug.techTitle')}</summary>
|
||||
<dl className="mt-2 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-xs">
|
||||
{Object.entries(info).map(([k, v]) => (
|
||||
<div key={k} className="contents">
|
||||
<dt className="text-ink-3">{INFO_LABEL[k] ? t(INFO_LABEL[k]) : k}</dt>
|
||||
<dd className="min-w-0 break-words text-ink-2" dir="ltr">
|
||||
{v}
|
||||
</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
<p className="mt-2 text-[11px] leading-relaxed text-ink-3">{t('bug.techPrivacy')}</p>
|
||||
</details>
|
||||
|
||||
{error && (
|
||||
<p role="alert" className="mt-3 rounded-xl border border-accent px-3 py-2 text-sm text-ink">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-4 grid grid-cols-2 gap-2">
|
||||
<button type="button" onClick={onClose} className="btn btn-ghost">
|
||||
{t('common.cancel')}
|
||||
</button>
|
||||
<button type="button" onClick={submit} disabled={tooShort || busy} className="btn btn-primary">
|
||||
{busy && <Loader2 size={16} className="animate-spin" />}
|
||||
{t('bug.send')}
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
import { Flag, MoreHorizontal } from 'lucide-react'
|
||||
import { useState, type ReactNode } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import { t } from '../../i18n'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
import type { ReportTarget } from '../../lib/cloud/moderation'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
import { cx } from '../../lib/utils'
|
||||
import ReportDialog from './ReportDialog'
|
||||
|
||||
export interface MenuAction {
|
||||
icon: ReactNode
|
||||
label: string
|
||||
onClick: () => void
|
||||
danger?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Bouton « ⋯ » réutilisable : ouvre un petit menu avec « Signaler » (+ actions en plus,
|
||||
* ex. « Bloquer »), puis la fenêtre de signalement. Cible générique : avis, profil, commentaire, liste.
|
||||
*/
|
||||
export default function ReportButton({
|
||||
target,
|
||||
actions = [],
|
||||
className,
|
||||
size = 18,
|
||||
label,
|
||||
}: {
|
||||
target: ReportTarget
|
||||
actions?: MenuAction[]
|
||||
className?: string
|
||||
size?: number
|
||||
/** Nom accessible du bouton (par défaut « Plus d'options ») */
|
||||
label?: string
|
||||
}) {
|
||||
const [menu, setMenu] = useState(false)
|
||||
const [report, setReport] = useState(false)
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
setMenu(true)
|
||||
}}
|
||||
aria-label={label ?? t('report.more')}
|
||||
aria-haspopup="menu"
|
||||
className={cx('grid size-9 shrink-0 place-items-center rounded-full text-ink-3 transition-colors hover:text-ink active:bg-surface-2', className)}
|
||||
>
|
||||
<MoreHorizontal size={size} />
|
||||
</button>
|
||||
{/* Portail : un parent animé (transform) piégerait sinon les fenêtres « fixed » dans sa boîte */}
|
||||
{menu &&
|
||||
createPortal(
|
||||
<ActionMenu onClose={() => setMenu(false)}>
|
||||
{actions.map((a) => (
|
||||
<MenuItem
|
||||
key={a.label}
|
||||
icon={a.icon}
|
||||
danger={a.danger}
|
||||
onClick={() => {
|
||||
setMenu(false)
|
||||
a.onClick()
|
||||
}}
|
||||
>
|
||||
{a.label}
|
||||
</MenuItem>
|
||||
))}
|
||||
<MenuItem
|
||||
icon={<Flag size={18} />}
|
||||
danger
|
||||
onClick={() => {
|
||||
setMenu(false)
|
||||
setReport(true)
|
||||
}}
|
||||
>
|
||||
{t('report.action')}
|
||||
</MenuItem>
|
||||
</ActionMenu>,
|
||||
document.body,
|
||||
)}
|
||||
{report && createPortal(<ReportDialog target={target} onClose={() => setReport(false)} />, document.body)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
/** Menu en bas d'écran (comme le « ⋯ » de la fiche) : Échap / geste retour le ferment, sans fermer l'écran derrière. */
|
||||
function ActionMenu({ onClose, children }: { onClose: () => void; children: ReactNode }) {
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
return (
|
||||
<div className="fixed inset-0 z-[80] flex items-end justify-center bg-black/70 sm:items-center" onClick={onClose}>
|
||||
<div role="menu" className="sheet-in safe-bottom w-full max-w-md rounded-t-3xl border border-line-strong bg-surface p-3 sm:rounded-3xl" onClick={(e) => e.stopPropagation()}>
|
||||
{children}
|
||||
<button type="button" onClick={onClose} className="mt-1 w-full rounded-xl px-3 py-3 text-center text-sm text-ink-3 active:bg-surface-2">
|
||||
{t('common.cancel')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function MenuItem({ icon, children, onClick, danger }: { icon: ReactNode; children: ReactNode; onClick: () => void; danger?: boolean }) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
role="menuitem"
|
||||
onClick={onClick}
|
||||
className={cx('flex w-full items-center gap-3 rounded-xl px-3 py-3.5 text-start text-[15px] active:bg-surface-2', danger ? 'text-accent' : 'text-ink')}
|
||||
>
|
||||
{icon}
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
import { Check, Flag, Loader2 } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { t, type TKey } from '../../i18n'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
import { REPORT_DETAILS_MAX, REPORT_REASONS, reportContent, type ReportReason, type ReportTarget } from '../../lib/cloud/moderation'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
import { useScrollLock } from '../../lib/scrollLock'
|
||||
import { cx } from '../../lib/utils'
|
||||
|
||||
const REASON_LABEL: Record<ReportReason, TKey> = {
|
||||
spoiler: 'report.reason.spoiler',
|
||||
harassment: 'report.reason.harassment',
|
||||
hate: 'report.reason.hate',
|
||||
sexual: 'report.reason.sexual',
|
||||
spam: 'report.reason.spam',
|
||||
impersonation: 'report.reason.impersonation',
|
||||
other: 'report.reason.other',
|
||||
}
|
||||
export const reasonLabel = (r: ReportReason) => t(REASON_LABEL[r])
|
||||
|
||||
const TITLE: Record<ReportTarget['type'], TKey> = {
|
||||
review: 'report.titleReview',
|
||||
profile: 'report.titleProfile',
|
||||
comment: 'report.titleComment',
|
||||
list: 'report.titleList',
|
||||
}
|
||||
|
||||
/**
|
||||
* Fenêtre « Signaler » générique (avis, profil, commentaire, liste partagée) :
|
||||
* motif + précision facultative (500 caractères), envoyée à l'équipe de modération.
|
||||
*/
|
||||
export default function ReportDialog({ target, onClose }: { target: ReportTarget; onClose: () => void }) {
|
||||
const [reason, setReason] = useState<ReportReason>()
|
||||
const [details, setDetails] = useState('')
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [error, setError] = useState<string>()
|
||||
const [done, setDone] = useState<'sent' | 'duplicate'>()
|
||||
useScrollLock()
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
|
||||
const submit = async () => {
|
||||
if (!reason || busy) return
|
||||
setBusy(true)
|
||||
setError(undefined)
|
||||
try {
|
||||
const r = await reportContent(target, reason, details)
|
||||
setDone(r.duplicate ? 'duplicate' : 'sent')
|
||||
} catch (e) {
|
||||
setError((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-[80] flex touch-none items-end justify-center overscroll-none bg-black/70 sm:items-center sm:p-4" onClick={onClose}>
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="report-title"
|
||||
className="sheet-in safe-bottom max-h-[90dvh] w-full max-w-md touch-pan-y overflow-y-auto overscroll-contain rounded-t-3xl border border-line-strong bg-surface p-5 sm:rounded-3xl"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{done ? (
|
||||
<div className="flex flex-col items-center py-4 text-center">
|
||||
<span className="grid size-12 place-items-center rounded-full border border-line-strong text-accent">
|
||||
<Check size={22} />
|
||||
</span>
|
||||
<h2 id="report-title" className="mt-4 text-lg font-semibold">
|
||||
{done === 'sent' ? t('report.thanks') : t('report.already')}
|
||||
</h2>
|
||||
<p className="mt-2 text-sm leading-relaxed text-ink-2">{t('report.thanksText')}</p>
|
||||
<button type="button" onClick={onClose} className="btn btn-ghost mt-6 w-full" autoFocus>
|
||||
{t('common.close')}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<h2 id="report-title" className="flex items-center gap-2 text-lg font-semibold">
|
||||
<Flag size={18} className="text-accent" />
|
||||
{t(TITLE[target.type])}
|
||||
</h2>
|
||||
<p className="mt-1.5 text-sm text-ink-3">{t('report.intro')}</p>
|
||||
|
||||
<fieldset className="mt-4">
|
||||
<legend className="label">{t('report.reason')}</legend>
|
||||
<div className="space-y-1.5">
|
||||
{REPORT_REASONS.map((r) => (
|
||||
<label
|
||||
key={r}
|
||||
className={cx(
|
||||
'flex cursor-pointer items-center gap-3 rounded-xl border px-3.5 py-2.5 text-sm transition-colors',
|
||||
reason === r ? 'border-accent text-ink' : 'border-line text-ink-2',
|
||||
)}
|
||||
>
|
||||
<input type="radio" name="report-reason" value={r} checked={reason === r} onChange={() => setReason(r)} className="accent-accent-fill" />
|
||||
{reasonLabel(r)}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<label className="mt-4 block">
|
||||
<span className="label">{t('report.details')}</span>
|
||||
<textarea
|
||||
className="field min-h-24 resize-y text-sm"
|
||||
maxLength={REPORT_DETAILS_MAX}
|
||||
value={details}
|
||||
onChange={(e) => setDetails(e.target.value)}
|
||||
placeholder={t('report.detailsPlaceholder')}
|
||||
/>
|
||||
<span className="mt-1 block text-end text-[11px] tabular-nums text-ink-3">
|
||||
{details.length}/{REPORT_DETAILS_MAX}
|
||||
</span>
|
||||
</label>
|
||||
|
||||
{error && (
|
||||
<p role="alert" className="mt-2 rounded-xl border border-accent px-3 py-2 text-sm text-ink">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-4 grid grid-cols-2 gap-2">
|
||||
<button type="button" onClick={onClose} className="btn btn-ghost">
|
||||
{t('common.cancel')}
|
||||
</button>
|
||||
<button type="button" onClick={submit} disabled={!reason || busy} className="btn btn-primary">
|
||||
{busy && <Loader2 size={16} className="animate-spin" />}
|
||||
{t('report.send')}
|
||||
</button>
|
||||
</div>
|
||||
<p className="mt-3 text-[11px] leading-relaxed text-ink-3">{t('report.privacy')}</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { adminAlerts, type AdminAlerts } from '../../lib/cloud/adminModeration'
|
||||
|
||||
/** Compteurs « à traiter » de l'administration (signalements ouverts, nouveaux bugs, nouvelles erreurs). */
|
||||
export function useAdminAlerts(enabled: boolean, refreshKey: unknown = 0): AdminAlerts | null {
|
||||
const [alerts, setAlerts] = useState<AdminAlerts | null>(null)
|
||||
useEffect(() => {
|
||||
if (!enabled) return setAlerts(null)
|
||||
let alive = true
|
||||
adminAlerts()
|
||||
.then((a) => alive && setAlerts(a))
|
||||
.catch(() => alive && setAlerts(null))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [enabled, refreshKey])
|
||||
return alerts
|
||||
}
|
||||
|
||||
/** Résumé court pour la ligne « Administration » des réglages (undefined s'il n'y a rien à traiter). */
|
||||
export function alertsSummary(a: AdminAlerts | null): string | undefined {
|
||||
if (!a) return undefined
|
||||
const parts = [
|
||||
a.reports ? t('adminMod.alertReports', { count: a.reports }) : '',
|
||||
a.bugs ? t('adminMod.alertBugs', { count: a.bugs }) : '',
|
||||
a.errors ? t('adminMod.alertErrors', { count: a.errors }) : '',
|
||||
].filter(Boolean)
|
||||
return parts.length ? parts.join(' · ') : undefined
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { t } from '../../i18n'
|
||||
import { useMedia } from '../../store'
|
||||
import ReviewComments from './ReviewComments'
|
||||
import ReviewText from './ReviewText'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
/** Commentaires sous un de mes avis, en plein écran (ouvert depuis une notification). */
|
||||
export default function CommentsSheet({ authorId, itemId, title, onClose }: { authorId: string; itemId: string; title: string; onClose: () => void }) {
|
||||
const { items } = useMedia()
|
||||
// Mon avis tel qu'il est sur cet appareil (les commentaires viennent du serveur)
|
||||
const mine = items.find((i) => i.id === itemId)
|
||||
return (
|
||||
<Sheet title={title || t('comments.title')} label={t('comments.title')} onClose={onClose} elevated>
|
||||
<div className="px-4 pt-4">
|
||||
{mine?.notes && (
|
||||
<article className="card mb-4 p-3.5">
|
||||
<p className="eyebrow">{t('form.review')}</p>
|
||||
<ReviewText text={mine.notes} spoiler={mine.notesSpoiler} revealed clamp />
|
||||
</article>
|
||||
)}
|
||||
<p className="eyebrow mb-1">{t('comments.title')}</p>
|
||||
<ReviewComments authorId={authorId} itemId={itemId} defaultOpen />
|
||||
</div>
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
@@ -11,8 +11,11 @@ import { useMedia } from '../../store'
|
||||
import type { MediaInput, MediaItem } from '../../types'
|
||||
import { StatusPill, TypeBadge } from '../Badges'
|
||||
import Poster from '../Poster'
|
||||
import ReportButton from '../moderation/ReportButton'
|
||||
import Avatar from './Avatar'
|
||||
import Reactions from './Reactions'
|
||||
import ReviewComments from './ReviewComments'
|
||||
import ReviewText from './ReviewText'
|
||||
import { useEscape } from '../../lib/escape'
|
||||
|
||||
export interface PeekOwner {
|
||||
@@ -120,16 +123,19 @@ export default function ItemPeek({ item, owner, onClose }: { item: MediaItem; ow
|
||||
{formatRating(item.rating, settings.ratingScale)}
|
||||
</span>
|
||||
)}
|
||||
{canReact && review && <ReportButton target={{ type: 'review', id: review.item_id, userId: review.user_id }} className="-me-1.5 size-8" size={16} />}
|
||||
</div>
|
||||
<div className="mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-ink-3">
|
||||
<StatusPill status={item.status} />
|
||||
{item.endDate && item.status === 'termine' && <span>{formatDate(item.endDate)}</span>}
|
||||
{item.favorite && <span className="text-accent">♥ {t('form.favorite')}</span>}
|
||||
</div>
|
||||
{item.notes && <p className="mt-3 whitespace-pre-line text-sm leading-relaxed text-ink-2">{item.notes}</p>}
|
||||
{item.notes && <ReviewText text={item.notes} spoiler={item.notesSpoiler} className="mt-3" />}
|
||||
{canReact && review && (
|
||||
<div className="mt-3 border-t border-line pt-3">
|
||||
<Reactions authorId={review.user_id} itemId={review.item_id} reactions={review.reactions} mine={review.mine} />
|
||||
<ReviewComments authorId={review.user_id} itemId={review.item_id} count={review.comments} hidden={review.comments === null}>
|
||||
<Reactions authorId={review.user_id} itemId={review.item_id} reactions={review.reactions} mine={review.mine} />
|
||||
</ReviewComments>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Loader2, Tv } from 'lucide-react'
|
||||
import { Check, Loader2, MessageCircle, Tv, Users } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { listNotifications, markNotificationsRead, type AppNotification, type NotificationKind } from '../../lib/cloud/notifications'
|
||||
import { cx, formatDate } from '../../lib/utils'
|
||||
import { EmptyState } from '../ui'
|
||||
import Avatar from './Avatar'
|
||||
import { respondToInvite } from '../../lib/cloud/sharedLists'
|
||||
import { useSocial } from './SocialProvider'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
const PAGE = 30
|
||||
@@ -18,10 +20,24 @@ const VERB: Record<NotificationKind, () => string> = {
|
||||
reaction: () => t('notif.reaction'),
|
||||
new_episode: () => '',
|
||||
new_season: () => '',
|
||||
review_comment: () => t('notif.review_comment'),
|
||||
shared_list_invite: () => t('notif.shared_list_invite'),
|
||||
}
|
||||
|
||||
/** Liste des notifications (abonnements, réactions, nouveaux épisodes). Marque comme lues à l'ouverture. */
|
||||
export default function Notifications({ onClose, onOpenProfile, onOpenItem }: { onClose: () => void; onOpenProfile: (username: string) => void; onOpenItem: (itemId: string) => void }) {
|
||||
export default function Notifications({
|
||||
onClose,
|
||||
onOpenProfile,
|
||||
onOpenItem,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
onClose: () => void
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenItem: (itemId: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const [items, setItems] = useState<AppNotification[] | undefined>(undefined)
|
||||
const [done, setDone] = useState(false)
|
||||
const [loadingMore, setLoadingMore] = useState(false)
|
||||
@@ -74,7 +90,7 @@ export default function Notifications({ onClose, onOpenProfile, onOpenItem }: {
|
||||
) : (
|
||||
<ul>
|
||||
{items.map((n) => (
|
||||
<Row key={n.id} n={n} onOpenProfile={onOpenProfile} onOpenItem={onOpenItem} />
|
||||
<Row key={n.id} n={n} onOpenProfile={onOpenProfile} onOpenItem={onOpenItem} onOpenComments={onOpenComments} onOpenSharedList={onOpenSharedList} />
|
||||
))}
|
||||
{!done && (
|
||||
<li className="p-4">
|
||||
@@ -89,7 +105,19 @@ export default function Notifications({ onClose, onOpenProfile, onOpenItem }: {
|
||||
)
|
||||
}
|
||||
|
||||
function Row({ n, onOpenProfile, onOpenItem }: { n: AppNotification; onOpenProfile: (username: string) => void; onOpenItem: (itemId: string) => void }) {
|
||||
function Row({
|
||||
n,
|
||||
onOpenProfile,
|
||||
onOpenItem,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
n: AppNotification
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenItem: (itemId: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const unread = n.read_at === null
|
||||
const isEpisode = EPISODE_KINDS.includes(n.kind)
|
||||
const base = cx('flex items-center gap-3 border-b border-line px-4 py-3 text-start', unread && 'bg-surface-2')
|
||||
@@ -123,6 +151,11 @@ function Row({ n, onOpenProfile, onOpenItem }: { n: AppNotification; onOpenProfi
|
||||
)
|
||||
}
|
||||
|
||||
// ── Commentaire sur mon avis / invitation à une liste partagée ──
|
||||
if (n.kind === 'review_comment' || n.kind === 'shared_list_invite') {
|
||||
return <SocialRow n={n} base={base} unread={unread} onOpenProfile={onOpenProfile} onOpenComments={onOpenComments} onOpenSharedList={onOpenSharedList} />
|
||||
}
|
||||
|
||||
// ── Abonnements / réactions ──
|
||||
const actor = n.actor
|
||||
const actorName = actor?.display_name ?? t('notif.someone')
|
||||
@@ -158,3 +191,99 @@ function Row({ n, onOpenProfile, onOpenItem }: { n: AppNotification; onOpenProfi
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
function SocialRow({
|
||||
n,
|
||||
base,
|
||||
unread,
|
||||
onOpenProfile,
|
||||
onOpenComments,
|
||||
onOpenSharedList,
|
||||
}: {
|
||||
n: AppNotification
|
||||
base: string
|
||||
unread: boolean
|
||||
onOpenProfile: (username: string) => void
|
||||
onOpenComments?: (itemId: string, title: string) => void
|
||||
onOpenSharedList?: (listId: string) => void
|
||||
}) {
|
||||
const social = useSocial()
|
||||
const [status, setStatus] = useState(n.invite_status)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const actor = n.actor
|
||||
const actorName = actor?.display_name ?? t('notif.someone')
|
||||
const isInvite = n.kind === 'shared_list_invite'
|
||||
|
||||
const respond = async (accept: boolean) => {
|
||||
if (!n.item_id) return
|
||||
setBusy(true)
|
||||
try {
|
||||
await respondToInvite(n.item_id, accept)
|
||||
setStatus(accept ? 'accepted' : null)
|
||||
social.bumpShared()
|
||||
if (accept) onOpenSharedList?.(n.item_id)
|
||||
} catch {
|
||||
/* invitation expirée ou réseau : rien ne change */
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
// Où mène un tap sur la ligne
|
||||
const open =
|
||||
!isInvite && n.item_id && onOpenComments
|
||||
? () => onOpenComments(n.item_id!, n.title ?? '')
|
||||
: isInvite && status === 'accepted' && n.item_id && onOpenSharedList
|
||||
? () => onOpenSharedList(n.item_id!)
|
||||
: null
|
||||
|
||||
const text = (
|
||||
<span className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{actorName}</b> {VERB[n.kind]()}
|
||||
{isInvite ? (
|
||||
n.title ? (
|
||||
<>
|
||||
{' '}
|
||||
<b className="text-ink">{n.title}</b>
|
||||
</>
|
||||
) : (
|
||||
` (${t('shared.expired')})`
|
||||
)
|
||||
) : n.title ? (
|
||||
` ${t('notif.on', { title: n.title })}`
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
|
||||
return (
|
||||
<li>
|
||||
<div className={cx(base, 'flex-wrap')}>
|
||||
{unread && <span className="size-2 shrink-0 rounded-full bg-accent-fill" aria-hidden="true" />}
|
||||
<button type="button" onClick={() => actor && onOpenProfile(actor.username)} className="shrink-0" aria-label={actorName} disabled={!actor}>
|
||||
<Avatar url={actor?.avatar_url ?? undefined} name={actorName} size={38} />
|
||||
</button>
|
||||
{open ? (
|
||||
<button type="button" onClick={open} className="flex min-w-0 flex-1 items-center gap-2 text-start">
|
||||
{isInvite ? <Users size={14} className="shrink-0 text-accent" aria-hidden="true" /> : <MessageCircle size={14} className="shrink-0 text-accent" aria-hidden="true" />}
|
||||
{text}
|
||||
</button>
|
||||
) : (
|
||||
text
|
||||
)}
|
||||
<span className="shrink-0 text-xs text-ink-3">{formatDate(n.created_at)}</span>
|
||||
{isInvite && status === 'pending' && n.title && (
|
||||
<div className="flex w-full justify-end gap-2 ps-[3.25rem]">
|
||||
<button type="button" onClick={() => void respond(false)} disabled={busy} className="btn btn-ghost px-3.5 py-1.5 text-sm">
|
||||
{t('shared.decline')}
|
||||
</button>
|
||||
<button type="button" onClick={() => void respond(true)} disabled={busy} className="btn btn-primary px-3.5 py-1.5 text-sm">
|
||||
{busy ? <Loader2 size={14} className="animate-spin" /> : <Check size={14} />} {t('shared.accept')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Check, Loader2, Lock, Share2, Star, UserPlus } from 'lucide-react'
|
||||
import { Ban, Check, Loader2, Lock, Share2, Star, UserCheck, UserPlus } from 'lucide-react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { fmtNumber, t } from '../../i18n'
|
||||
import { follow, getProfile, getProfileItems, profileLink, unfollow, type Profile } from '../../lib/cloud/social'
|
||||
@@ -7,6 +7,8 @@ import { cx, formatRating } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem, WatchStatus } from '../../types'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import ReportButton from '../moderation/ReportButton'
|
||||
import { blockUser, unblockUser, useBlocked } from '../../lib/cloud/moderation'
|
||||
import Poster from '../Poster'
|
||||
import { EmptyState, SectionTitle } from '../ui'
|
||||
import Avatar from './Avatar'
|
||||
@@ -58,6 +60,9 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [confirmUnfollow, setConfirmUnfollow] = useState(false)
|
||||
const [toast, setToast] = useState<string>()
|
||||
const [confirmBlock, setConfirmBlock] = useState(false)
|
||||
const { isBlocked } = useBlocked(!!profile && !profile.isMe)
|
||||
const blocked = !!profile && !profile.isMe && isBlocked(profile.id)
|
||||
|
||||
const load = useCallback(async () => {
|
||||
setError(undefined)
|
||||
@@ -132,6 +137,36 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
}
|
||||
}
|
||||
|
||||
// Bloquer : il ne peut plus me suivre ni réagir à mes avis ; ses avis me sont masqués
|
||||
const doBlock = async () => {
|
||||
if (!profile) return
|
||||
setConfirmBlock(false)
|
||||
setBusy(true)
|
||||
try {
|
||||
await blockUser({ id: profile.id, username: profile.username, displayName: profile.displayName, avatarUrl: profile.avatarUrl })
|
||||
await load()
|
||||
void social.refresh()
|
||||
setToast(t('block.done', { name: profile.displayName }))
|
||||
} catch (e) {
|
||||
setToast((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const doUnblock = async () => {
|
||||
if (!profile) return
|
||||
setBusy(true)
|
||||
try {
|
||||
await unblockUser(profile.id)
|
||||
setToast(t('block.undone', { name: profile.displayName }))
|
||||
} catch (e) {
|
||||
setToast((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const topByCategory = useMemo(() => {
|
||||
const out: { label: string; items: MediaItem[] }[] = []
|
||||
// Mon profil : mes réglages locaux font foi tout de suite (même avant la synchro)
|
||||
@@ -179,26 +214,43 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
{t('social.editProfile')}
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
onClick={toggleFollow}
|
||||
disabled={busy}
|
||||
className={cx('btn mb-1 px-4 py-2 text-sm', profile.relation === 'none' ? 'btn-primary' : 'btn-ghost')}
|
||||
>
|
||||
{busy ? (
|
||||
<Loader2 size={15} className="animate-spin" />
|
||||
) : profile.relation === 'accepted' ? (
|
||||
<Check size={15} />
|
||||
) : profile.relation === 'none' ? (
|
||||
<UserPlus size={15} />
|
||||
) : null}
|
||||
{profile.relation === 'accepted'
|
||||
? t('social.following')
|
||||
: profile.relation === 'pending'
|
||||
? t('social.requested')
|
||||
: profile.followsMe
|
||||
? t('social.followBack')
|
||||
: t('social.follow')}
|
||||
</button>
|
||||
<div className="mb-1 flex items-center gap-1">
|
||||
{blocked ? (
|
||||
<button onClick={doUnblock} disabled={busy} className="btn btn-ghost px-4 py-2 text-sm">
|
||||
{busy ? <Loader2 size={15} className="animate-spin" /> : <UserCheck size={15} />}
|
||||
{t('block.unblock')}
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
onClick={toggleFollow}
|
||||
disabled={busy}
|
||||
className={cx('btn px-4 py-2 text-sm', profile.relation === 'none' ? 'btn-primary' : 'btn-ghost')}
|
||||
>
|
||||
{busy ? (
|
||||
<Loader2 size={15} className="animate-spin" />
|
||||
) : profile.relation === 'accepted' ? (
|
||||
<Check size={15} />
|
||||
) : profile.relation === 'none' ? (
|
||||
<UserPlus size={15} />
|
||||
) : null}
|
||||
{profile.relation === 'accepted'
|
||||
? t('social.following')
|
||||
: profile.relation === 'pending'
|
||||
? t('social.requested')
|
||||
: profile.followsMe
|
||||
? t('social.followBack')
|
||||
: t('social.follow')}
|
||||
</button>
|
||||
)}
|
||||
<ReportButton
|
||||
target={{ type: 'profile', id: profile.id, userId: profile.id }}
|
||||
actions={[
|
||||
blocked
|
||||
? { icon: <UserCheck size={18} />, label: t('block.unblock'), onClick: () => void doUnblock() }
|
||||
: { icon: <Ban size={18} />, label: t('block.block'), onClick: () => setConfirmBlock(true) },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -213,6 +265,12 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
)}
|
||||
</p>
|
||||
{profile.bio && <p className="mt-3 whitespace-pre-line text-sm leading-relaxed text-ink-2 lg:max-w-3xl lg:text-base">{profile.bio}</p>}
|
||||
{blocked && (
|
||||
<p className="mt-4 flex items-start gap-2.5 rounded-2xl border border-line px-4 py-3 text-sm text-ink-2 lg:max-w-2xl">
|
||||
<Ban size={16} className="mt-0.5 shrink-0 text-accent" />
|
||||
{t('block.notice')}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-5 flex divide-x divide-line rounded-2xl border border-line py-3 lg:max-w-2xl">
|
||||
<Stat value={profile.visible ? (profile.stats?.finished ?? 0) : undefined} label={t('social.seen')} />
|
||||
@@ -262,6 +320,14 @@ export default function ProfileView({ username, onClose }: { username: string; o
|
||||
{toast}
|
||||
</p>
|
||||
)}
|
||||
<ConfirmDialog
|
||||
open={confirmBlock}
|
||||
title={t('block.confirmTitle', { name: profile?.displayName ?? '' })}
|
||||
message={t('block.confirmText')}
|
||||
confirmLabel={t('block.block')}
|
||||
onConfirm={doBlock}
|
||||
onCancel={() => setConfirmBlock(false)}
|
||||
/>
|
||||
<ConfirmDialog
|
||||
open={confirmUnfollow}
|
||||
title={profile?.relation === 'pending' ? t('social.cancelRequestTitle') : t('social.unfollowTitle', { name: profile?.displayName ?? '' })}
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
import { Loader2, MessageCircle, Send, Trash2 } from 'lucide-react'
|
||||
import { useEffect, useRef, useState, type ReactNode } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { useBlocked } from '../../lib/cloud/moderation'
|
||||
import ReportButton from '../moderation/ReportButton'
|
||||
import { addReviewComment, COMMENT_MAX, CommentsUnavailable, deleteReviewComment, getReviewComments, type ReviewComment } from '../../lib/cloud/comments'
|
||||
import { timeAgo } from '../../lib/timeAgo'
|
||||
import { cx } from '../../lib/utils'
|
||||
import Avatar from './Avatar'
|
||||
import { useSocial } from './SocialProvider'
|
||||
|
||||
/**
|
||||
* Bouton « commentaires » (avec leur nombre) placé à côté des réactions, et fil de commentaires
|
||||
* qui s'ouvre sous l'avis. `children` = les autres actions de la ligne (réactions).
|
||||
*/
|
||||
export default function ReviewComments({
|
||||
authorId,
|
||||
itemId,
|
||||
count: initialCount,
|
||||
defaultOpen,
|
||||
hidden,
|
||||
children,
|
||||
}: {
|
||||
authorId: string
|
||||
itemId: string
|
||||
/** Nombre connu (sinon chargé à l'ouverture) */
|
||||
count?: number | null
|
||||
defaultOpen?: boolean
|
||||
/** Serveur sans les commentaires (migration pas encore appliquée) : seules les autres actions s'affichent */
|
||||
hidden?: boolean
|
||||
children?: ReactNode
|
||||
}) {
|
||||
const social = useSocial()
|
||||
const { isBlocked } = useBlocked(social.enabled)
|
||||
const [open, setOpen] = useState(!!defaultOpen)
|
||||
const [count, setCount] = useState(initialCount ?? undefined)
|
||||
const [comments, setComments] = useState<ReviewComment[]>()
|
||||
const [unavailable, setUnavailable] = useState(false)
|
||||
const [loadError, setLoadError] = useState(false)
|
||||
|
||||
// Fil chargé à l'ouverture (ou tout de suite si on ne connaît pas encore le nombre)
|
||||
const shouldLoad = !hidden && (open || initialCount === undefined)
|
||||
useEffect(() => {
|
||||
if (!shouldLoad || comments || unavailable) return
|
||||
let alive = true
|
||||
getReviewComments(authorId, itemId)
|
||||
.then((th) => {
|
||||
if (!alive) return
|
||||
setComments(th.comments)
|
||||
setCount(th.comments.length)
|
||||
})
|
||||
.catch((e) => {
|
||||
if (!alive) return
|
||||
if (e instanceof CommentsUnavailable) setUnavailable(true)
|
||||
else setLoadError(true)
|
||||
})
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [shouldLoad, comments, unavailable, authorId, itemId])
|
||||
|
||||
if (!social.enabled || hidden) return <>{children}</>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{children}
|
||||
{!unavailable && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
aria-expanded={open}
|
||||
aria-label={t('comments.toggle', { count: count ?? 0 })}
|
||||
className={cx(
|
||||
'inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-sm transition-colors active:scale-95',
|
||||
open ? 'border-ink/60 text-ink' : 'border-line text-ink-2',
|
||||
)}
|
||||
>
|
||||
<MessageCircle size={15} aria-hidden="true" />
|
||||
{(count ?? 0) > 0 && <span className="text-xs font-medium">{count}</span>}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{open && !unavailable && (
|
||||
<Thread
|
||||
comments={comments?.filter((c) => !isBlocked(c.user.id))}
|
||||
error={loadError}
|
||||
onOpenProfile={social.openProfile}
|
||||
onAdd={async (body) => {
|
||||
const c = await addReviewComment(authorId, itemId, body)
|
||||
setComments((prev) => [...(prev ?? []), c])
|
||||
setCount((n) => (n ?? 0) + 1)
|
||||
}}
|
||||
onDelete={async (id) => {
|
||||
await deleteReviewComment(id)
|
||||
setComments((prev) => prev?.filter((c) => c.id !== id))
|
||||
setCount((n) => Math.max(0, (n ?? 1) - 1))
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function Thread({
|
||||
comments,
|
||||
error,
|
||||
onOpenProfile,
|
||||
onAdd,
|
||||
onDelete,
|
||||
}: {
|
||||
comments?: ReviewComment[]
|
||||
error: boolean
|
||||
onOpenProfile: (username: string) => void
|
||||
onAdd: (body: string) => Promise<void>
|
||||
onDelete: (id: number) => Promise<void>
|
||||
}) {
|
||||
const [text, setText] = useState('')
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [err, setErr] = useState<string>()
|
||||
const [confirmId, setConfirmId] = useState<number>()
|
||||
const [deleting, setDeleting] = useState<number>()
|
||||
const area = useRef<HTMLTextAreaElement>(null)
|
||||
|
||||
const submit = async () => {
|
||||
const body = text.trim()
|
||||
if (!body || busy) return
|
||||
setBusy(true)
|
||||
setErr(undefined)
|
||||
try {
|
||||
await onAdd(body)
|
||||
setText('')
|
||||
if (area.current) area.current.style.height = ''
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
|
||||
const remove = async (id: number) => {
|
||||
setDeleting(id)
|
||||
try {
|
||||
await onDelete(id)
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setDeleting(undefined)
|
||||
setConfirmId(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-3 border-t border-line pt-3">
|
||||
{comments === undefined ? (
|
||||
error ? (
|
||||
<p className="text-xs text-ink-3">{t('comments.loadError')}</p>
|
||||
) : (
|
||||
<p className="flex items-center gap-2 text-xs text-ink-3">
|
||||
<Loader2 size={13} className="animate-spin" /> {t('social.loading')}
|
||||
</p>
|
||||
)
|
||||
) : comments.length === 0 ? (
|
||||
<p className="text-xs text-ink-3">{t('comments.none')}</p>
|
||||
) : (
|
||||
<ul className="space-y-3">
|
||||
{comments.map((c) => (
|
||||
<li key={c.id} className="flex gap-2.5">
|
||||
<button type="button" onClick={() => onOpenProfile(c.user.username)} className="shrink-0" aria-label={c.user.displayName}>
|
||||
<Avatar url={c.user.avatarUrl} name={c.user.displayName} size={28} />
|
||||
</button>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<button type="button" onClick={() => onOpenProfile(c.user.username)} className="min-w-0 truncate text-start text-[13px] font-semibold text-ink">
|
||||
{c.user.displayName}
|
||||
</button>
|
||||
<span className="shrink-0 text-[11px] text-ink-3">{timeAgo(c.createdAt)}</span>
|
||||
{c.canDelete && confirmId !== c.id && (
|
||||
<button type="button" onClick={() => setConfirmId(c.id)} className="ms-auto grid size-7 shrink-0 place-items-center rounded-full text-ink-3" aria-label={t('comments.delete')}>
|
||||
<Trash2 size={14} />
|
||||
</button>
|
||||
)}
|
||||
{!c.mine && <ReportButton target={{ type: 'comment', id: String(c.id), userId: c.user.id }} className={cx('size-7', !(c.canDelete && confirmId !== c.id) && 'ms-auto')} size={14} />}
|
||||
</div>
|
||||
<p className="whitespace-pre-line break-words text-sm leading-relaxed text-ink-2">{c.body}</p>
|
||||
{confirmId === c.id && (
|
||||
<div className="mt-1.5 flex items-center gap-2 text-xs">
|
||||
<span className="text-ink-3">{t('comments.deleteConfirm')}</span>
|
||||
<button type="button" onClick={() => void remove(c.id)} disabled={deleting === c.id} className="rounded-full bg-accent-fill px-2.5 py-1 font-semibold text-on-accent disabled:opacity-60">
|
||||
{deleting === c.id ? <Loader2 size={12} className="animate-spin" /> : t('common.delete')}
|
||||
</button>
|
||||
<button type="button" onClick={() => setConfirmId(undefined)} className="rounded-full border border-line px-2.5 py-1 text-ink-2">
|
||||
{t('common.cancel')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
<form
|
||||
className="mt-3 flex items-end gap-2"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault()
|
||||
void submit()
|
||||
}}
|
||||
>
|
||||
<label className="min-w-0 flex-1">
|
||||
<span className="sr-only">{t('comments.placeholder')}</span>
|
||||
<textarea
|
||||
ref={area}
|
||||
rows={1}
|
||||
value={text}
|
||||
maxLength={COMMENT_MAX}
|
||||
onChange={(e) => {
|
||||
setText(e.target.value)
|
||||
// Le champ grandit avec le texte (jusqu'à ~6 lignes)
|
||||
e.target.style.height = 'auto'
|
||||
e.target.style.height = `${Math.min(e.target.scrollHeight, 160)}px`
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
|
||||
e.preventDefault()
|
||||
void submit()
|
||||
}
|
||||
}}
|
||||
placeholder={t('comments.placeholder')}
|
||||
className="field block resize-none py-2 text-sm leading-snug"
|
||||
/>
|
||||
</label>
|
||||
<button type="submit" disabled={busy || !text.trim()} className="btn btn-primary size-10 shrink-0 p-0" aria-label={t('comments.send')}>
|
||||
{busy ? <Loader2 size={16} className="animate-spin" /> : <Send size={16} className="rtl:-scale-x-100" />}
|
||||
</button>
|
||||
</form>
|
||||
{text.length > COMMENT_MAX - 100 && (
|
||||
<p className={cx('mt-1 text-end text-[11px]', text.length >= COMMENT_MAX ? 'text-accent' : 'text-ink-3')}>
|
||||
{text.length}/{COMMENT_MAX}
|
||||
</p>
|
||||
)}
|
||||
{err && (
|
||||
<p role="alert" className="mt-1.5 text-xs text-accent">
|
||||
{err}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import { EyeOff } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { cx } from '../../lib/utils'
|
||||
|
||||
/**
|
||||
* Texte d'un avis. Avec spoilers : le texte n'est PAS dans la page tant qu'on n'a pas tapé
|
||||
* « Afficher le spoiler » (pas seulement flouté : rien à lire pour un lecteur d'écran ni à copier).
|
||||
*/
|
||||
export default function ReviewText({
|
||||
text,
|
||||
spoiler,
|
||||
className,
|
||||
clamp,
|
||||
revealed,
|
||||
}: {
|
||||
text: string
|
||||
spoiler?: boolean
|
||||
className?: string
|
||||
clamp?: boolean
|
||||
/** Déjà dévoilé (mon propre avis) : seul le badge « Spoiler » reste */
|
||||
revealed?: boolean
|
||||
}) {
|
||||
const [shown, setShown] = useState(!spoiler || !!revealed)
|
||||
|
||||
if (!shown) {
|
||||
return (
|
||||
<div className={cx('relative mt-2 overflow-hidden rounded-xl border border-line bg-surface-2 px-3.5 py-3', className)}>
|
||||
{/* Fausses lignes floutées : purement décoratives */}
|
||||
<div aria-hidden="true" className="space-y-2 blur-[3px]">
|
||||
<span className="block h-2.5 w-11/12 rounded-full bg-ink-3/40" />
|
||||
<span className="block h-2.5 w-4/5 rounded-full bg-ink-3/40" />
|
||||
<span className="block h-2.5 w-3/5 rounded-full bg-ink-3/40" />
|
||||
</div>
|
||||
<div className="absolute inset-0 flex flex-wrap items-center justify-center gap-x-3 gap-y-1.5 px-3">
|
||||
<span className="flex items-center gap-1.5 text-xs font-semibold text-ink-2">
|
||||
<EyeOff size={14} className="text-accent" aria-hidden="true" /> {t('spoiler.warning')}
|
||||
</span>
|
||||
<button type="button" onClick={() => setShown(true)} className="rounded-full border border-line-strong bg-surface px-3 py-1 text-xs font-semibold text-ink active:scale-95">
|
||||
{t('spoiler.show')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={cx('mt-2', className)}>
|
||||
{spoiler && (
|
||||
<span className="mb-1.5 inline-flex items-center gap-1 rounded-full border border-accent/50 px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide text-accent">
|
||||
<EyeOff size={11} aria-hidden="true" /> {t('spoiler.badge')}
|
||||
</span>
|
||||
)}
|
||||
<p className={cx('whitespace-pre-line break-words text-sm leading-relaxed text-ink-2', clamp && 'line-clamp-6')}>{text}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import { Check, Loader2, Users } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { getTmdbPosterUrl } from '../../lib/catalogApi'
|
||||
import { addSharedListItem, getSharedLists, removeSharedListItem, snapshotOf, type SharedListCard } from '../../lib/cloud/sharedLists'
|
||||
import { cx } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import type { MediaItem } from '../../types'
|
||||
import { useSocial } from './SocialProvider'
|
||||
|
||||
/**
|
||||
* « Ajouter à une liste » côté listes partagées, dans la fiche d'un titre.
|
||||
* N'apparaît que si j'ai au moins une liste partagée (et si le serveur les gère déjà).
|
||||
*/
|
||||
export default function SharedListPicker({ snapshot, posterFallback }: { snapshot: Pick<MediaItem, 'externalId' | 'title' | 'type' | 'year' | 'poster'>; posterFallback?: string }) {
|
||||
const social = useSocial()
|
||||
const { settings } = useMedia()
|
||||
const [lists, setLists] = useState<SharedListCard[]>()
|
||||
const [busy, setBusy] = useState<string>()
|
||||
const [err, setErr] = useState<string>()
|
||||
const externalId = snapshot.externalId
|
||||
|
||||
useEffect(() => {
|
||||
if (!social.enabled || !externalId) return
|
||||
let alive = true
|
||||
getSharedLists(externalId)
|
||||
.then((d) => alive && setLists(d.lists))
|
||||
.catch(() => alive && setLists([]))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [social.enabled, externalId, social.sharedTick])
|
||||
|
||||
if (!social.enabled || !lists?.length) return null
|
||||
|
||||
const toggle = async (l: SharedListCard) => {
|
||||
const snap = snapshotOf(snapshot, posterFallback)
|
||||
if (!snap) return
|
||||
setBusy(l.id)
|
||||
setErr(undefined)
|
||||
try {
|
||||
if (l.has) await removeSharedListItem(l.id, snap.externalId)
|
||||
else {
|
||||
// L'affiche gardée hors-ligne (copie locale) ne se partage pas : on reprend l'adresse TMDB
|
||||
if (!snap.poster && snap.externalId.startsWith('tmdb:') && settings.tmdbKey && navigator.onLine) {
|
||||
snap.poster = await getTmdbPosterUrl(snap.externalId, settings.tmdbKey).catch(() => undefined)
|
||||
}
|
||||
await addSharedListItem(l.id, snap)
|
||||
}
|
||||
setLists((prev) => prev?.map((x) => (x.id === l.id ? { ...x, has: !l.has, count: x.count + (l.has ? -1 : 1) } : x)))
|
||||
social.bumpShared()
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setBusy(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="mx-4 mt-8 border-t border-line pt-5" aria-labelledby="shared-picker-title">
|
||||
<h3 id="shared-picker-title" className="eyebrow mb-3 flex items-center gap-1.5 text-ink-2">
|
||||
<Users size={13} aria-hidden="true" /> {t('shared.addTo')}
|
||||
</h3>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{lists.map((l) => (
|
||||
<button key={l.id} onClick={() => void toggle(l)} disabled={busy === l.id} aria-pressed={l.has} className={cx('chip', l.has && 'chip-on')}>
|
||||
{busy === l.id ? <Loader2 size={14} className="animate-spin" /> : l.has ? <Check size={14} /> : <Users size={14} />}
|
||||
{l.name}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{err && (
|
||||
<p role="alert" className="mt-2 text-xs text-accent">
|
||||
{err}
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,616 @@
|
||||
import { Check, Loader2, LogOut, Pencil, Plus, Search, Trash2, UserPlus, Users, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { locale, t } from '../../i18n'
|
||||
import {
|
||||
addSharedListItem,
|
||||
createSharedList,
|
||||
deleteSharedList,
|
||||
getSharedList,
|
||||
getSharedLists,
|
||||
inviteCandidates,
|
||||
inviteToSharedList,
|
||||
leaveSharedList,
|
||||
removeSharedListItem,
|
||||
removeSharedListMember,
|
||||
renameSharedList,
|
||||
respondToInvite,
|
||||
SHARED_LIST_NAME_MAX,
|
||||
SharedListsUnavailable,
|
||||
snapshotOf,
|
||||
type SharedList,
|
||||
type SharedListCard,
|
||||
type SharedListInvite,
|
||||
type SharedListItem,
|
||||
} from '../../lib/cloud/sharedLists'
|
||||
import type { ProfileCard } from '../../lib/cloud/social'
|
||||
import { TYPE_BY_VALUE } from '../../lib/constants'
|
||||
import { cx, normalizeText } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import { TypeBadge } from '../Badges'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import Poster from '../Poster'
|
||||
import { EmptyState } from '../ui'
|
||||
import ReportButton from '../moderation/ReportButton'
|
||||
import Avatar from './Avatar'
|
||||
import PersonRow from './PersonRow'
|
||||
import Sheet from './Sheet'
|
||||
import { useSocial } from './SocialProvider'
|
||||
|
||||
/** Mosaïque 2×2 des dernières affiches d'une liste partagée. */
|
||||
function PosterMosaic({ posters }: { posters: string[] }) {
|
||||
return (
|
||||
<div className="relative grid grid-cols-2 gap-0.5 overflow-hidden rounded-xl border border-line bg-surface-2">
|
||||
{[0, 1, 2, 3].map((i) =>
|
||||
posters[i] ? (
|
||||
<img key={i} src={posters[i]} alt="" loading="lazy" className="aspect-[2/3] w-full object-cover" />
|
||||
) : (
|
||||
<div key={i} className="aspect-[2/3] w-full bg-surface-2" />
|
||||
),
|
||||
)}
|
||||
<span className="absolute bottom-1.5 end-1.5 grid size-7 place-items-center rounded-full bg-bg/85 text-ink" aria-hidden="true">
|
||||
<Users size={14} />
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Champ « nom de liste » + bouton (création, renommage). */
|
||||
function NameForm({ initial = '', submitLabel, onSubmit, onCancel, autoFocus }: { initial?: string; submitLabel: string; onSubmit: (name: string) => Promise<void>; onCancel?: () => void; autoFocus?: boolean }) {
|
||||
const [name, setName] = useState(initial)
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [err, setErr] = useState<string>()
|
||||
const submit = async () => {
|
||||
if (!name.trim() || busy) return
|
||||
setBusy(true)
|
||||
setErr(undefined)
|
||||
try {
|
||||
await onSubmit(name.trim())
|
||||
setName('')
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<div className="flex gap-2">
|
||||
<input
|
||||
className="field"
|
||||
value={name}
|
||||
maxLength={SHARED_LIST_NAME_MAX}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault()
|
||||
void submit()
|
||||
}
|
||||
if (e.key === 'Escape' && onCancel) {
|
||||
e.stopPropagation()
|
||||
onCancel()
|
||||
}
|
||||
}}
|
||||
placeholder={t('shared.namePh')}
|
||||
autoFocus={autoFocus}
|
||||
enterKeyHint="done"
|
||||
aria-label={t('shared.namePh')}
|
||||
/>
|
||||
<button type="button" onClick={() => void submit()} disabled={!name.trim() || busy} className="btn btn-light shrink-0 px-4 text-sm">
|
||||
{busy ? <Loader2 size={15} className="animate-spin" /> : submitLabel}
|
||||
</button>
|
||||
</div>
|
||||
{err && (
|
||||
<p role="alert" className="mt-1.5 text-xs text-accent">
|
||||
{err}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// ════════════════════════ Section « Listes partagées » (onglet Listes) ════════════════════════
|
||||
|
||||
export function SharedListsSection() {
|
||||
const social = useSocial()
|
||||
const [data, setData] = useState<{ lists: SharedListCard[]; invites: SharedListInvite[] }>()
|
||||
const [unavailable, setUnavailable] = useState(false)
|
||||
const [creating, setCreating] = useState(false)
|
||||
const [busyInvite, setBusyInvite] = useState<string>()
|
||||
|
||||
useEffect(() => {
|
||||
if (!social.enabled) return
|
||||
let alive = true
|
||||
getSharedLists()
|
||||
.then((d) => alive && setData(d))
|
||||
.catch((e) => {
|
||||
if (!alive) return
|
||||
if (e instanceof SharedListsUnavailable) setUnavailable(true)
|
||||
else setData((prev) => prev ?? { lists: [], invites: [] })
|
||||
})
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [social.enabled, social.sharedTick])
|
||||
|
||||
// Sans compte, ou serveur pas encore à jour : la section n'existe pas
|
||||
if (!social.enabled || unavailable) return null
|
||||
|
||||
const respond = async (inv: SharedListInvite, accept: boolean) => {
|
||||
setBusyInvite(inv.id)
|
||||
try {
|
||||
await respondToInvite(inv.id, accept)
|
||||
social.bumpShared()
|
||||
if (accept) social.openSharedList(inv.id)
|
||||
} catch {
|
||||
/* l'invitation reste affichée */
|
||||
} finally {
|
||||
setBusyInvite(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="mt-10 border-t border-line pt-6" aria-labelledby="shared-lists-title">
|
||||
<div className="mb-1 flex items-center justify-between gap-3">
|
||||
<h2 id="shared-lists-title" className="flex items-center gap-2 text-lg">
|
||||
<Users size={18} className="text-accent" aria-hidden="true" /> {t('shared.title')}
|
||||
</h2>
|
||||
</div>
|
||||
<p className="mb-4 text-sm text-ink-3">{t('shared.hint')}</p>
|
||||
|
||||
{creating ? (
|
||||
<div className="mb-5">
|
||||
<NameForm
|
||||
autoFocus
|
||||
submitLabel={t('lists.create')}
|
||||
onCancel={() => setCreating(false)}
|
||||
onSubmit={async (name) => {
|
||||
const id = await createSharedList(name)
|
||||
setCreating(false)
|
||||
social.bumpShared()
|
||||
social.openSharedList(id)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<button onClick={() => setCreating(true)} className="chip mb-5">
|
||||
<Plus size={14} /> {t('shared.new')}
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Invitations reçues */}
|
||||
{data && data.invites.length > 0 && (
|
||||
<ul className="mb-6 space-y-2">
|
||||
{data.invites.map((inv) => (
|
||||
<li key={inv.id} className="card p-3.5 sm:flex sm:items-center sm:gap-3">
|
||||
<div className="flex min-w-0 flex-1 items-center gap-3">
|
||||
<Avatar url={inv.owner?.avatarUrl} name={inv.owner?.displayName ?? '?'} size={36} />
|
||||
<p className="min-w-0 flex-1 text-sm leading-snug text-ink-2">
|
||||
<b className="text-ink">{inv.owner?.displayName ?? t('notif.someone')}</b> {t('shared.invitesYou')} <b className="text-ink">{inv.name}</b>
|
||||
</p>
|
||||
</div>
|
||||
<div className="mt-3 flex shrink-0 justify-end gap-2 sm:mt-0">
|
||||
<button onClick={() => void respond(inv, false)} disabled={busyInvite === inv.id} className="btn btn-ghost px-3.5 py-1.5 text-sm">
|
||||
{t('shared.decline')}
|
||||
</button>
|
||||
<button onClick={() => void respond(inv, true)} disabled={busyInvite === inv.id} className="btn btn-primary px-3.5 py-1.5 text-sm">
|
||||
{busyInvite === inv.id ? <Loader2 size={14} className="animate-spin" /> : <Check size={14} />} {t('shared.accept')}
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
{data === undefined ? (
|
||||
<p className="flex items-center gap-2 text-sm text-ink-3">
|
||||
<Loader2 size={14} className="animate-spin" /> {t('social.loading')}
|
||||
</p>
|
||||
) : data.lists.length === 0 ? (
|
||||
<p className="rounded-2xl border border-dashed border-line-strong p-4 text-sm text-ink-3">{t('shared.none')}</p>
|
||||
) : (
|
||||
<div className="grid grid-cols-2 gap-x-3.5 gap-y-6 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8">
|
||||
{data.lists.map((l) => (
|
||||
<button key={l.id} onClick={() => social.openSharedList(l.id)} className="text-start">
|
||||
<PosterMosaic posters={l.posters} />
|
||||
<p className="mt-2 truncate text-sm font-semibold">{l.name}</p>
|
||||
<p className="truncate text-xs text-ink-3">
|
||||
{t('account.nTitles', { count: l.count })} · {t('shared.nMembers', { count: l.members })}
|
||||
</p>
|
||||
{!l.isOwner && l.owner && <p className="truncate text-[11px] text-ink-3">{t('shared.by', { name: l.owner.displayName })}</p>}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
// ════════════════════════ Une liste partagée (plein écran) ════════════════════════
|
||||
|
||||
export function SharedListSheet({ id, onClose }: { id: string; onClose: () => void }) {
|
||||
const social = useSocial()
|
||||
const [list, setList] = useState<SharedList | null>()
|
||||
const [error, setError] = useState<string>()
|
||||
const [renaming, setRenaming] = useState(false)
|
||||
const [editing, setEditing] = useState(false)
|
||||
const [confirm, setConfirm] = useState<'delete' | 'leave' | null>(null)
|
||||
const [busyKey, setBusyKey] = useState<string>()
|
||||
const [reload, setReload] = useState(0)
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
getSharedList(id)
|
||||
.then((l) => alive && setList(l))
|
||||
.catch((e) => alive && (setError((e as Error).message), setList(null)))
|
||||
return () => {
|
||||
alive = false
|
||||
}
|
||||
}, [id, reload, social.sharedTick])
|
||||
|
||||
const refresh = () => setReload((n) => n + 1)
|
||||
|
||||
const act = async (key: string, fn: () => Promise<unknown>) => {
|
||||
setBusyKey(key)
|
||||
setError(undefined)
|
||||
try {
|
||||
await fn()
|
||||
refresh()
|
||||
social.bumpShared()
|
||||
} catch (e) {
|
||||
setError((e as Error).message)
|
||||
} finally {
|
||||
setBusyKey(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
const accepted = list?.members.filter((m) => m.status === 'accepted') ?? []
|
||||
const ownerId = list?.members.find((m) => m.isOwner)?.id
|
||||
const pending = list?.members.filter((m) => m.status === 'pending') ?? []
|
||||
|
||||
return (
|
||||
<Sheet title={list?.name ?? t('shared.title')} label={list?.name ?? t('shared.title')} onClose={onClose} wide>
|
||||
{list === undefined ? (
|
||||
<p className="flex items-center justify-center py-16 text-ink-3">
|
||||
<Loader2 size={20} className="animate-spin" />
|
||||
</p>
|
||||
) : list === null ? (
|
||||
<div className="px-4">
|
||||
<EmptyState title={t('shared.notFound')} text={error} />
|
||||
</div>
|
||||
) : (
|
||||
<div className="px-4 pt-5 lg:px-8">
|
||||
{/* Nom + compteurs */}
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
{renaming ? (
|
||||
<div className="flex-1">
|
||||
<NameForm
|
||||
autoFocus
|
||||
initial={list.name}
|
||||
submitLabel="OK"
|
||||
onCancel={() => setRenaming(false)}
|
||||
onSubmit={async (name) => {
|
||||
await renameSharedList(list.id, name)
|
||||
setRenaming(false)
|
||||
refresh()
|
||||
social.bumpShared()
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="min-w-0">
|
||||
<p className="eyebrow flex items-center gap-1.5">
|
||||
<Users size={12} aria-hidden="true" /> {t('shared.badge')}
|
||||
</p>
|
||||
<h2 className="mt-1 text-2xl leading-tight">{list.name}</h2>
|
||||
<p className="mt-1 text-sm text-ink-3">
|
||||
{t('account.nTitles', { count: list.items.length })} · {t('shared.nMembers', { count: accepted.length })}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
{!list.isOwner && ownerId && <ReportButton target={{ type: 'list', id: list.id, userId: ownerId }} className="size-10" />}
|
||||
{list.isOwner && !renaming && (
|
||||
<button onClick={() => setRenaming(true)} className="grid size-10 shrink-0 place-items-center rounded-full border border-line text-ink-2" aria-label={t('lists.rename')}>
|
||||
<Pencil size={16} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Membres */}
|
||||
<section className="mt-5" aria-label={t('shared.members')}>
|
||||
<div className="mb-2 flex items-center justify-between">
|
||||
<span className="eyebrow">{t('shared.members')}</span>
|
||||
{list.isOwner && (
|
||||
<button onClick={() => social.openInvite(list.id, list.name)} className="chip py-1 text-xs">
|
||||
<UserPlus size={13} /> {t('shared.invite')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<ul className="no-scrollbar -mx-4 flex gap-4 overflow-x-auto px-4 pb-1 lg:mx-0 lg:flex-wrap lg:px-0">
|
||||
{[...accepted, ...pending].map((m) => (
|
||||
<li key={m.id} className="relative w-16 shrink-0 text-center">
|
||||
<button onClick={() => social.openProfile(m.username)} className="block w-full" aria-label={m.displayName}>
|
||||
<Avatar url={m.avatarUrl} name={m.displayName} size={52} className={cx('mx-auto', m.status === 'pending' && 'opacity-50')} />
|
||||
<span className="mt-1.5 block truncate text-[11px] font-medium text-ink-2">{m.displayName}</span>
|
||||
<span className="block truncate text-[10px] text-ink-3">{m.isOwner ? t('shared.owner') : m.status === 'pending' ? t('shared.pending') : ' '}</span>
|
||||
</button>
|
||||
{list.isOwner && !m.isOwner && (
|
||||
<button
|
||||
onClick={() => void act(`m:${m.id}`, () => removeSharedListMember(list.id, m.id))}
|
||||
disabled={busyKey === `m:${m.id}`}
|
||||
className="absolute -top-1 end-0 grid size-6 place-items-center rounded-full border border-line-strong bg-surface text-ink-2"
|
||||
aria-label={t('shared.removeMember', { name: m.displayName })}
|
||||
>
|
||||
{busyKey === `m:${m.id}` ? <Loader2 size={11} className="animate-spin" /> : <X size={12} />}
|
||||
</button>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{error && (
|
||||
<p role="alert" className="mt-3 text-sm text-accent">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* Titres */}
|
||||
<div className="mt-6 flex flex-wrap items-center gap-2">
|
||||
<button onClick={() => setEditing((v) => !v)} className={cx('chip', editing && 'chip-on')}>
|
||||
{editing ? <Check size={14} /> : <Plus size={14} />}
|
||||
{editing ? t('lists.done') : t('lists.addRemove')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{editing && <LibraryPicker list={list} onChanged={refresh} />}
|
||||
|
||||
{list.items.length === 0 ? (
|
||||
<div className="mt-4">
|
||||
<EmptyState title={t('lists.emptyTitle')} text={t('shared.emptyText')} />
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-5 grid grid-cols-2 gap-x-3.5 gap-y-6 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8">
|
||||
{list.items.map((it) => (
|
||||
<SharedItemCard
|
||||
key={it.externalId}
|
||||
item={it}
|
||||
editing={editing}
|
||||
busy={busyKey === `i:${it.externalId}`}
|
||||
onOpen={() => social.openTitle(it)}
|
||||
onRemove={() => void act(`i:${it.externalId}`, () => removeSharedListItem(list.id, it.externalId))}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Quitter / supprimer */}
|
||||
<div className="mt-10 border-t border-line pt-5">
|
||||
{list.isOwner ? (
|
||||
<button onClick={() => setConfirm('delete')} className="flex items-center gap-2 text-sm font-medium text-accent">
|
||||
<Trash2 size={16} /> {t('shared.delete')}
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={() => setConfirm('leave')} className="flex items-center gap-2 text-sm font-medium text-accent">
|
||||
<LogOut size={16} className="rtl:-scale-x-100" /> {t('shared.leave')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ConfirmDialog
|
||||
open={confirm !== null}
|
||||
title={t('confirm.title')}
|
||||
message={list ? (confirm === 'delete' ? t('shared.deleteConfirm', { name: list.name }) : t('shared.leaveConfirm', { name: list.name })) : undefined}
|
||||
confirmLabel={confirm === 'delete' ? t('common.delete') : t('shared.leaveShort')}
|
||||
onCancel={() => setConfirm(null)}
|
||||
onConfirm={async () => {
|
||||
if (!list) return
|
||||
const kind = confirm
|
||||
setConfirm(null)
|
||||
try {
|
||||
if (kind === 'delete') await deleteSharedList(list.id)
|
||||
else await leaveSharedList(list.id)
|
||||
social.bumpShared()
|
||||
onClose()
|
||||
} catch (e) {
|
||||
setError((e as Error).message)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
|
||||
function SharedItemCard({ item, editing, busy, onOpen, onRemove }: { item: SharedListItem; editing: boolean; busy: boolean; onOpen: () => void; onRemove: () => void }) {
|
||||
return (
|
||||
<div className="relative">
|
||||
<button onClick={onOpen} className="block w-full text-start">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
<p className="mt-2 line-clamp-2 text-sm font-semibold leading-snug">{item.title}</p>
|
||||
<p className="mt-0.5 text-xs text-ink-3">{[item.year, TYPE_BY_VALUE[item.type].label].filter(Boolean).join(' · ')}</p>
|
||||
</button>
|
||||
{item.addedBy && (
|
||||
<p className="mt-1 flex items-center gap-1.5 text-[11px] text-ink-3">
|
||||
<Avatar url={item.addedBy.avatarUrl} name={item.addedBy.displayName} size={16} />
|
||||
<span className="truncate">{t('shared.addedBy', { name: item.addedBy.displayName })}</span>
|
||||
</p>
|
||||
)}
|
||||
{editing && (
|
||||
<button
|
||||
onClick={onRemove}
|
||||
disabled={busy}
|
||||
className="absolute end-1.5 top-1.5 grid size-8 place-items-center rounded-full border border-line-strong bg-bg/90 text-ink"
|
||||
aria-label={t('shared.removeTitle', { title: item.title })}
|
||||
>
|
||||
{busy ? <Loader2 size={14} className="animate-spin" /> : <X size={15} />}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Ajouter / retirer des titres de ma bibliothèque (ceux qui ont une référence TMDB / AniList). */
|
||||
function LibraryPicker({ list, onChanged }: { list: SharedList; onChanged: () => void }) {
|
||||
const { items } = useMedia()
|
||||
const social = useSocial()
|
||||
const [query, setQuery] = useState('')
|
||||
const [busy, setBusy] = useState<string>()
|
||||
const [err, setErr] = useState<string>()
|
||||
const inList = useMemo(() => new Set(list.items.map((i) => i.externalId)), [list.items])
|
||||
|
||||
const candidates = useMemo(() => {
|
||||
const q = normalizeText(query)
|
||||
return items
|
||||
.filter((i) => i.externalId && (!q || normalizeText(`${i.title} ${i.originalTitle ?? ''}`).includes(q)))
|
||||
.sort((a, b) => a.title.localeCompare(b.title, locale()))
|
||||
.slice(0, 60)
|
||||
}, [items, query])
|
||||
|
||||
const toggle = async (item: (typeof items)[number]) => {
|
||||
const snap = snapshotOf(item)
|
||||
if (!snap) return
|
||||
setBusy(item.id)
|
||||
setErr(undefined)
|
||||
try {
|
||||
if (inList.has(snap.externalId)) await removeSharedListItem(list.id, snap.externalId)
|
||||
else await addSharedListItem(list.id, snap)
|
||||
onChanged()
|
||||
social.bumpShared()
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setBusy(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-4 rounded-2xl border border-line p-3">
|
||||
<div className="relative mb-2">
|
||||
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
|
||||
<input type="search" value={query} onChange={(e) => setQuery(e.target.value)} placeholder={t('lists.searchLibrary')} className="field ps-10" aria-label={t('lists.searchLibrary')} />
|
||||
</div>
|
||||
{err && (
|
||||
<p role="alert" className="mb-2 text-xs text-accent">
|
||||
{err}
|
||||
</p>
|
||||
)}
|
||||
<ul className="max-h-80 divide-y divide-line overflow-y-auto overscroll-contain">
|
||||
{candidates.map((item) => {
|
||||
const on = inList.has(item.externalId!)
|
||||
return (
|
||||
<li key={item.id}>
|
||||
<button onClick={() => void toggle(item)} disabled={busy === item.id} className="flex w-full items-center gap-3 py-2.5 text-start">
|
||||
<div className="w-9 shrink-0">
|
||||
<Poster src={item.poster} title={item.title} />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="truncate text-sm font-medium">{item.title}</p>
|
||||
<div className="mt-1">
|
||||
<TypeBadge item={item} />
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
className={cx(
|
||||
'grid size-7 shrink-0 place-items-center rounded-full border',
|
||||
on ? 'border-accent-fill bg-accent-fill text-on-accent' : 'border-line-strong text-transparent',
|
||||
)}
|
||||
>
|
||||
{busy === item.id ? <Loader2 size={13} className="animate-spin text-ink-3" /> : <Check size={14} strokeWidth={3} />}
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
{candidates.length === 0 && <li className="py-4 text-center text-sm text-ink-3">{t('shared.noCandidates')}</li>}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// ════════════════════════ Inviter des membres ════════════════════════
|
||||
|
||||
export function InvitePeople({ listId, listName, onClose }: { listId: string; listName: string; onClose: () => void }) {
|
||||
const social = useSocial()
|
||||
const [q, setQ] = useState('')
|
||||
const [people, setPeople] = useState<ProfileCard[]>()
|
||||
const [invited, setInvited] = useState<Set<string>>(new Set())
|
||||
const [busy, setBusy] = useState<string>()
|
||||
const [err, setErr] = useState<string>()
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
const timer = setTimeout(
|
||||
() => {
|
||||
inviteCandidates(listId, q)
|
||||
.then((r) => alive && setPeople(r))
|
||||
.catch((e) => alive && (setPeople([]), setErr((e as Error).message)))
|
||||
},
|
||||
q ? 250 : 0,
|
||||
)
|
||||
return () => {
|
||||
alive = false
|
||||
clearTimeout(timer)
|
||||
}
|
||||
}, [listId, q])
|
||||
|
||||
const invite = async (p: ProfileCard) => {
|
||||
setBusy(p.id)
|
||||
setErr(undefined)
|
||||
try {
|
||||
await inviteToSharedList(listId, p.id)
|
||||
setInvited((s) => new Set(s).add(p.id))
|
||||
social.bumpShared()
|
||||
} catch (e) {
|
||||
setErr((e as Error).message)
|
||||
} finally {
|
||||
setBusy(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Sheet title={t('shared.inviteTitle')} label={t('shared.inviteTitle')} onClose={onClose}>
|
||||
<div className="px-4 pt-4">
|
||||
<p className="text-sm text-ink-3">{t('shared.inviteHint', { name: listName })}</p>
|
||||
<div className="relative mt-3">
|
||||
<Search size={17} className="pointer-events-none absolute start-3.5 top-1/2 -translate-y-1/2 text-ink-3" />
|
||||
<input type="search" value={q} onChange={(e) => setQ(e.target.value)} placeholder={t('shared.searchPeople')} className="field ps-10" autoFocus aria-label={t('shared.searchPeople')} />
|
||||
</div>
|
||||
{err && (
|
||||
<p role="alert" className="mt-2 text-xs text-accent">
|
||||
{err}
|
||||
</p>
|
||||
)}
|
||||
{people === undefined ? (
|
||||
<p className="flex justify-center py-10 text-ink-3">
|
||||
<Loader2 size={18} className="animate-spin" />
|
||||
</p>
|
||||
) : people.length === 0 ? (
|
||||
<p className="py-10 text-center text-sm text-ink-3">{t('shared.noPeople')}</p>
|
||||
) : (
|
||||
<div className="mt-2 divide-y divide-line">
|
||||
{people.map((p) => (
|
||||
<PersonRow
|
||||
key={p.id}
|
||||
person={p}
|
||||
actions={
|
||||
<button
|
||||
onClick={() => void invite(p)}
|
||||
disabled={busy === p.id || invited.has(p.id)}
|
||||
className={cx(
|
||||
'flex h-8 shrink-0 items-center gap-1 rounded-full px-3 text-xs font-semibold transition active:scale-95',
|
||||
invited.has(p.id) ? 'border border-line-strong text-ink-2' : 'bg-accent-fill text-on-accent',
|
||||
)}
|
||||
>
|
||||
{busy === p.id ? <Loader2 size={13} className="animate-spin" /> : invited.has(p.id) ? <Check size={13} /> : <UserPlus size={13} />}
|
||||
{invited.has(p.id) ? t('shared.invited') : t('shared.inviteShort')}
|
||||
</button>
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
@@ -12,6 +12,11 @@ import TitleReviews from './TitleReviews'
|
||||
import Notifications from './Notifications'
|
||||
import { useOnResume } from '../../lib/onResume'
|
||||
import WelcomeProfile, { RANDOM_USERNAME } from './WelcomeProfile'
|
||||
import CommentsSheet from './CommentsSheet'
|
||||
import { InvitePeople, SharedListSheet } from './SharedLists'
|
||||
import { getAniListById, type SearchResult } from '../../lib/catalogApi'
|
||||
import { TYPE_BY_VALUE } from '../../lib/constants'
|
||||
import type { SharedListItem } from '../../lib/cloud/sharedLists'
|
||||
|
||||
interface SocialApi {
|
||||
/** Réseau disponible (compte connecté) */
|
||||
@@ -32,6 +37,17 @@ interface SocialApi {
|
||||
peek: (item: MediaItem, owner?: PeekOwner) => void
|
||||
/** Ouvre la fiche si elle est à moi, sinon l'aperçu */
|
||||
openItem: (item: MediaItem, owner?: PeekOwner) => void
|
||||
/** Fil de commentaires d'un avis, en plein écran (depuis une notification) */
|
||||
openComments: (authorId: string, itemId: string, title: string) => void
|
||||
/** Liste partagée */
|
||||
openSharedList: (id: string) => void
|
||||
/** Inviter des membres dans une liste partagée */
|
||||
openInvite: (listId: string, listName: string) => void
|
||||
/** Fiche d'un titre d'une liste partagée : la mienne si je l'ai, sinon la fiche du catalogue (ajout possible) */
|
||||
openTitle: (title: SharedListItem) => void
|
||||
/** Change à chaque modification des listes partagées (pour recharger les écrans qui les affichent) */
|
||||
sharedTick: number
|
||||
bumpShared: () => void
|
||||
}
|
||||
|
||||
const SocialContext = createContext<SocialApi>({
|
||||
@@ -48,6 +64,12 @@ const SocialContext = createContext<SocialApi>({
|
||||
unread: 0,
|
||||
peek: () => {},
|
||||
openItem: () => {},
|
||||
openComments: () => {},
|
||||
openSharedList: () => {},
|
||||
openInvite: () => {},
|
||||
openTitle: () => {},
|
||||
sharedTick: 0,
|
||||
bumpShared: () => {},
|
||||
})
|
||||
|
||||
export const useSocial = () => useContext(SocialContext)
|
||||
@@ -59,9 +81,21 @@ type Overlay =
|
||||
| { kind: 'follows'; profile: Profile; list: 'followers' | 'following' }
|
||||
| { kind: 'reviews'; externalId: string; title: string }
|
||||
| { kind: 'notifications' }
|
||||
| { kind: 'comments'; authorId: string; itemId: string; title: string }
|
||||
| { kind: 'sharedList'; id: string }
|
||||
| { kind: 'invite'; listId: string; listName: string }
|
||||
|
||||
/** Profils, recherche et aperçus : affichés par-dessus l'app, empilés (le bouton fermer revient au précédent). */
|
||||
export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNode; onOpenOwnItem: (item: MediaItem) => void }) {
|
||||
export function SocialProvider({
|
||||
children,
|
||||
onOpenOwnItem,
|
||||
onOpenSeed,
|
||||
}: {
|
||||
children: ReactNode
|
||||
onOpenOwnItem: (item: MediaItem) => void
|
||||
/** Ouvre la fiche d'un titre pas encore dans ma bibliothèque */
|
||||
onOpenSeed?: (seed: SearchResult) => void
|
||||
}) {
|
||||
const { account, items } = useMedia()
|
||||
const enabled = !!account
|
||||
const [me, setMe] = useState<Profile | null>(null)
|
||||
@@ -69,6 +103,8 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
const [unread, setUnread] = useState(0)
|
||||
const [stack, setStack] = useState<Overlay[]>([])
|
||||
const [peeked, setPeeked] = useState<{ item: MediaItem; owner?: PeekOwner }>()
|
||||
const [sharedTick, setSharedTick] = useState(0)
|
||||
const bumpShared = useCallback(() => setSharedTick((n) => n + 1), [])
|
||||
// « Plus tard » sur le choix du pseudo : redemandé au prochain lancement
|
||||
const [welcomeLater, setWelcomeLater] = useState(() => {
|
||||
try {
|
||||
@@ -131,6 +167,30 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
[items, me?.username, onOpenOwnItem],
|
||||
)
|
||||
|
||||
const openTitle = useCallback(
|
||||
async (s: SharedListItem) => {
|
||||
const local = items.find((i) => i.externalId === s.externalId)
|
||||
if (local) return onOpenOwnItem(local)
|
||||
const anilist = s.externalId.startsWith('anilist:')
|
||||
// AniList : fiche complète si possible (sinon l'instantané de la liste suffit pour l'ouvrir)
|
||||
const full = anilist && navigator.onLine ? await getAniListById(s.externalId).catch(() => null) : null
|
||||
onOpenSeed?.(
|
||||
full ?? {
|
||||
source: anilist ? 'anilist' : 'tmdb',
|
||||
externalId: s.externalId,
|
||||
title: s.title,
|
||||
year: s.year,
|
||||
thumb: s.poster,
|
||||
posterUrl: s.poster,
|
||||
kindLabel: TYPE_BY_VALUE[s.type].label,
|
||||
typeGuess: s.type,
|
||||
prefill: anilist ? { title: s.title, year: s.year, type: s.type, externalId: s.externalId, genres: [] } : undefined,
|
||||
},
|
||||
)
|
||||
},
|
||||
[items, onOpenOwnItem, onOpenSeed],
|
||||
)
|
||||
|
||||
const api = useMemo<SocialApi>(
|
||||
() => ({
|
||||
enabled,
|
||||
@@ -150,8 +210,14 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
unread,
|
||||
peek: (item, owner) => setPeeked({ item, owner }),
|
||||
openItem,
|
||||
openComments: (authorId, itemId, title) => push({ kind: 'comments', authorId, itemId, title }),
|
||||
openSharedList: (id) => push({ kind: 'sharedList', id }),
|
||||
openInvite: (listId, listName) => push({ kind: 'invite', listId, listName }),
|
||||
openTitle: (s) => void openTitle(s),
|
||||
sharedTick,
|
||||
bumpShared,
|
||||
}),
|
||||
[enabled, me, requests, unread, refresh, push, openItem],
|
||||
[enabled, me, requests, unread, refresh, push, openItem, openTitle, sharedTick, bumpShared],
|
||||
)
|
||||
|
||||
return (
|
||||
@@ -169,6 +235,12 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
<FollowList key={k} profile={o.profile} initial={o.list} onClose={pop} />
|
||||
) : o.kind === 'reviews' ? (
|
||||
<TitleReviews key={k} externalId={o.externalId} title={o.title} onClose={pop} onOpenProfile={(u) => push({ kind: 'profile', username: u })} />
|
||||
) : o.kind === 'comments' ? (
|
||||
<CommentsSheet key={k} authorId={o.authorId} itemId={o.itemId} title={o.title} onClose={pop} />
|
||||
) : o.kind === 'sharedList' ? (
|
||||
<SharedListSheet key={k} id={o.id} onClose={pop} />
|
||||
) : o.kind === 'invite' ? (
|
||||
<InvitePeople key={k} listId={o.listId} listName={o.listName} onClose={pop} />
|
||||
) : (
|
||||
<Notifications
|
||||
key={k}
|
||||
@@ -181,6 +253,15 @@ export function SocialProvider({ children, onOpenOwnItem }: { children: ReactNod
|
||||
onOpenOwnItem(it)
|
||||
}
|
||||
}}
|
||||
onOpenComments={(itemId, title) => {
|
||||
if (!me) return
|
||||
pop()
|
||||
push({ kind: 'comments', authorId: me.id, itemId, title })
|
||||
}}
|
||||
onOpenSharedList={(id) => {
|
||||
pop()
|
||||
push({ kind: 'sharedList', id })
|
||||
}}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
import { Loader2, Star } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { useBlocked } from '../../lib/cloud/moderation'
|
||||
import { titleReviews, type TitleReview, type TitleReviews as TitleReviewsData } from '../../lib/cloud/reviews'
|
||||
import { formatRating } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import ReportButton from '../moderation/ReportButton'
|
||||
import Avatar from './Avatar'
|
||||
import Reactions from './Reactions'
|
||||
import ReviewComments from './ReviewComments'
|
||||
import ReviewText from './ReviewText'
|
||||
import Sheet from './Sheet'
|
||||
|
||||
/** Écran plein : tous les avis sur un même titre (amis / autres membres) avec réactions. */
|
||||
export default function TitleReviews({ externalId, title, onClose, onOpenProfile }: { externalId: string; title: string; onClose: () => void; onOpenProfile: (username: string) => void }) {
|
||||
const [data, setData] = useState<TitleReviewsData>()
|
||||
const [error, setError] = useState(false)
|
||||
// Avis des comptes que j'ai bloqués : masqués
|
||||
const { isBlocked } = useBlocked()
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
@@ -23,7 +29,9 @@ export default function TitleReviews({ externalId, title, onClose, onOpenProfile
|
||||
}
|
||||
}, [externalId])
|
||||
|
||||
const bothEmpty = !!data && data.friends.length === 0 && data.others.length === 0
|
||||
const friends = data?.friends.filter((r) => !isBlocked(r.user_id)) ?? []
|
||||
const others = data?.others.filter((r) => !isBlocked(r.user_id)) ?? []
|
||||
const bothEmpty = !!data && friends.length === 0 && others.length === 0
|
||||
|
||||
return (
|
||||
<Sheet title={title} label={t('reviews.title')} onClose={onClose} elevated>
|
||||
@@ -36,8 +44,8 @@ export default function TitleReviews({ externalId, title, onClose, onOpenProfile
|
||||
<p className="px-4 py-16 text-center text-sm text-ink-3">{t('reviews.none')}</p>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 gap-4 px-4 pt-4 sm:grid-cols-2">
|
||||
<ReviewColumn heading={t('reviews.friends')} empty={t('reviews.noneFriends')} list={data.friends} onOpenProfile={onOpenProfile} />
|
||||
<ReviewColumn heading={t('reviews.others')} empty={t('reviews.noneOthers')} list={data.others} onOpenProfile={onOpenProfile} />
|
||||
<ReviewColumn heading={t('reviews.friends')} empty={t('reviews.noneFriends')} list={friends} onOpenProfile={onOpenProfile} />
|
||||
<ReviewColumn heading={t('reviews.others')} empty={t('reviews.noneOthers')} list={others} onOpenProfile={onOpenProfile} />
|
||||
</div>
|
||||
)}
|
||||
</Sheet>
|
||||
@@ -77,10 +85,13 @@ function ReviewCard({ r, onOpenProfile }: { r: TitleReview; onOpenProfile: (user
|
||||
{formatRating(r.rating, settings.ratingScale)}
|
||||
</span>
|
||||
)}
|
||||
<ReportButton target={{ type: 'review', id: r.item_id, userId: r.user_id }} className="-me-1.5" size={16} />
|
||||
</div>
|
||||
{r.notes && <p className="mt-2 whitespace-pre-line text-sm leading-relaxed text-ink-2">{r.notes}</p>}
|
||||
{r.notes && <ReviewText text={r.notes} spoiler={r.spoiler} />}
|
||||
<div className="mt-3">
|
||||
<Reactions authorId={r.user_id} itemId={r.item_id} reactions={r.reactions} mine={r.mine} />
|
||||
<ReviewComments authorId={r.user_id} itemId={r.item_id} count={r.comments} hidden={r.comments === null}>
|
||||
<Reactions authorId={r.user_id} itemId={r.item_id} reactions={r.reactions} mine={r.mine} />
|
||||
</ReviewComments>
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { X } from 'lucide-react'
|
||||
import { EyeOff, X } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { useBackToClose } from '../../lib/backNav'
|
||||
@@ -6,11 +6,24 @@ import { useEscape } from '../../lib/escape'
|
||||
import { LIMITS } from '../../lib/security'
|
||||
|
||||
/** Écriture de mon avis, en plein écran pour avoir la place d'écrire. */
|
||||
export default function ReviewEditor({ title, initial, onSave, onClose }: { title: string; initial: string; onSave: (notes: string) => void; onClose: () => void }) {
|
||||
export default function ReviewEditor({
|
||||
title,
|
||||
initial,
|
||||
initialSpoiler = false,
|
||||
onSave,
|
||||
onClose,
|
||||
}: {
|
||||
title: string
|
||||
initial: string
|
||||
initialSpoiler?: boolean
|
||||
onSave: (notes: string, spoiler: boolean) => void
|
||||
onClose: () => void
|
||||
}) {
|
||||
const [text, setText] = useState(initial)
|
||||
const [spoiler, setSpoiler] = useState(initialSpoiler)
|
||||
useEscape(onClose)
|
||||
useBackToClose(onClose)
|
||||
const changed = text.trim() !== initial.trim()
|
||||
const changed = text.trim() !== initial.trim() || (spoiler !== initialSpoiler && !!text.trim())
|
||||
return (
|
||||
<div className="sheet sheet-in z-[60]" role="dialog" aria-modal="true" aria-label={t('form.review')}>
|
||||
<header className="safe-top border-b border-line">
|
||||
@@ -19,7 +32,7 @@ export default function ReviewEditor({ title, initial, onSave, onClose }: { titl
|
||||
<X size={22} />
|
||||
</button>
|
||||
<h2 className="min-w-0 flex-1 truncate text-center text-base font-semibold">{title}</h2>
|
||||
<button onClick={() => onSave(text.trim())} disabled={!changed} className="btn btn-light px-4 py-2 text-sm">
|
||||
<button onClick={() => onSave(text.trim(), spoiler && !!text.trim())} disabled={!changed} className="btn btn-light px-4 py-2 text-sm">
|
||||
{t('common.save')}
|
||||
</button>
|
||||
</div>
|
||||
@@ -35,6 +48,15 @@ export default function ReviewEditor({ title, initial, onSave, onClose }: { titl
|
||||
maxLength={LIMITS.notes}
|
||||
autoFocus
|
||||
/>
|
||||
<label className="mt-3 flex cursor-pointer items-start gap-3 rounded-xl border border-line px-3.5 py-3">
|
||||
<input type="checkbox" checked={spoiler} onChange={(e) => setSpoiler(e.target.checked)} className="mt-0.5 size-4 shrink-0 accent-accent-fill" />
|
||||
<span className="min-w-0">
|
||||
<span className="flex items-center gap-1.5 text-sm font-medium text-ink">
|
||||
<EyeOff size={14} className="text-accent" aria-hidden="true" /> {t('spoiler.checkbox')}
|
||||
</span>
|
||||
<span className="mt-0.5 block text-xs text-ink-3">{t('spoiler.checkboxHint')}</span>
|
||||
</span>
|
||||
</label>
|
||||
<p className="mt-2 text-xs text-ink-3">{t('title.reviewPublicHint')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,9 @@ import { backdropSrcSet, tmdbSized } from '../../lib/tmdbImage'
|
||||
import { renderItemCard, slug } from '../../lib/shareCard'
|
||||
import { cx, formatDate, formatDuration, formatRating, todayISO } from '../../lib/utils'
|
||||
import { useMedia } from '../../store'
|
||||
import { allTags, cleanTag } from '../../lib/bulk'
|
||||
import { useLibraryActions } from '../library/useLibraryActions'
|
||||
import TagInput from '../TagInput'
|
||||
import type { MediaInput, MediaItem, RatingScale, WatchStatus } from '../../types'
|
||||
import ConfirmDialog from '../ConfirmDialog'
|
||||
import EpisodeList from '../EpisodeList'
|
||||
@@ -25,6 +28,9 @@ import { RatingInput } from '../Rating'
|
||||
import SharePreview from '../SharePreview'
|
||||
import EditDetails from './EditDetails'
|
||||
import ReviewEditor from './ReviewEditor'
|
||||
import WhereToWatch from './WhereToWatch'
|
||||
import ReviewComments from '../social/ReviewComments'
|
||||
import SharedListPicker from '../social/SharedListPicker'
|
||||
|
||||
/** Suivi « vide » d'un titre qu'on ajoute. */
|
||||
const BLANK: Pick<MediaInput, 'criteria' | 'episodesWatched' | 'genres'> = { criteria: {}, episodesWatched: 0, genres: [] }
|
||||
@@ -43,7 +49,8 @@ interface Props {
|
||||
* Vu / En cours / À voir, note, coup de cœur, avis, épisodes, casting et note moyenne du public.
|
||||
*/
|
||||
export default function TitleSheet({ item: initial, seed, onClose, onGoToSettings }: Props) {
|
||||
const { items, settings, add, update, remove, lists, patchMany } = useMedia()
|
||||
const { items, settings, add, update, lists, patchMany } = useMedia()
|
||||
const actions = useLibraryActions()
|
||||
const social = useSocial()
|
||||
useScrollLock()
|
||||
useEscape(onClose)
|
||||
@@ -183,7 +190,11 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
const cap = episodeCap(item ?? { episodesTotal: data.episodesTotal, seasons: data.seasons })
|
||||
if (episodic && cap) patch.episodesWatched = cap
|
||||
}
|
||||
void save(patch)
|
||||
// Changement de statut d'un titre déjà suivi : « Annuler » remet la fiche telle quelle (dates, épisodes…)
|
||||
const before = item
|
||||
void save(patch).then(() => {
|
||||
if (before) actions.offerUndo(t('toast.status', { title: before.title, status: STATUS_BY_VALUE[s].label }), [before])
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,13 +265,25 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
}
|
||||
}
|
||||
|
||||
const onDelete = async () => {
|
||||
const onDelete = () => {
|
||||
if (!item) return
|
||||
setConfirmDelete(false)
|
||||
await remove(item.id)
|
||||
// Le message « Supprimé · Annuler » reste affiché après la fermeture de la fiche
|
||||
void actions.deleteItems([item.id])
|
||||
onClose()
|
||||
}
|
||||
|
||||
/** Suivi modifié ; retirer le titre d'une liste propose « Annuler ». */
|
||||
const changeTracking = (patch: Partial<MediaInput>) => {
|
||||
if (!item) return
|
||||
const before = item
|
||||
const removed = patch.listIds ? (before.listIds ?? []).filter((id) => !patch.listIds!.includes(id)) : []
|
||||
void update(before.id, patch).then(() => {
|
||||
const list = removed.length === 1 ? lists.find((l) => l.id === removed[0]) : undefined
|
||||
if (list) actions.offerUndo(t('toast.removedFromList', { title: before.title, list: list.name }), [before])
|
||||
})
|
||||
}
|
||||
|
||||
const heroImage = backdrop ?? extras?.backdrop
|
||||
const average = extras?.average ?? data.publicRating
|
||||
const source = externalId?.startsWith('anilist:') ? 'AniList' : externalId ? 'TMDB' : undefined
|
||||
@@ -324,6 +347,16 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
<Check size={13} className="text-accent" /> {t('title.inLibrary')} · {STATUS_BY_VALUE[status].label}
|
||||
</p>
|
||||
)}
|
||||
{/* Mes tags perso : discrets, visibles par moi seul */}
|
||||
{item?.tags && item.tags.length > 0 && (
|
||||
<ul className="mt-2 flex flex-wrap gap-1.5" aria-label={t('tags.label')}>
|
||||
{item.tags.map((tag) => (
|
||||
<li key={tag} className="rounded-full border border-line px-2 py-0.5 text-[11px] text-ink-3">
|
||||
#{tag}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -435,12 +468,23 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
{/* Mon avis */}
|
||||
<section className="mx-4 mt-4">
|
||||
{item?.notes ? (
|
||||
<button onClick={() => setReviewing(true)} className="card block w-full p-4 text-left">
|
||||
<span className="eyebrow flex items-center justify-between">
|
||||
{t('form.review')} <Pencil size={13} />
|
||||
</span>
|
||||
<p className="mt-2 line-clamp-6 whitespace-pre-line text-sm leading-relaxed text-ink">{item.notes}</p>
|
||||
</button>
|
||||
<div className="card p-4">
|
||||
<button onClick={() => setReviewing(true)} className="block w-full text-start">
|
||||
<span className="eyebrow flex items-center justify-between">
|
||||
<span className="flex items-center gap-2">
|
||||
{t('form.review')}
|
||||
{item.notesSpoiler && <span className="rounded-full border border-accent/50 px-1.5 py-px text-[10px] text-accent">{t('spoiler.badge')}</span>}
|
||||
</span>
|
||||
<Pencil size={13} />
|
||||
</span>
|
||||
<p className="mt-2 line-clamp-6 whitespace-pre-line text-sm leading-relaxed text-ink">{item.notes}</p>
|
||||
</button>
|
||||
{social.enabled && social.me && (
|
||||
<div className="mt-3 border-t border-line pt-3">
|
||||
<ReviewComments key={item.id} authorId={social.me.id} itemId={item.id} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<button onClick={() => setReviewing(true)} disabled={busy} className="flex w-full items-center gap-2 rounded-2xl border border-dashed border-line-strong px-4 py-3.5 text-left text-sm text-ink-2">
|
||||
<Pencil size={16} className="text-accent" /> {t('title.writeReview')}
|
||||
@@ -471,6 +515,9 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
</section>
|
||||
)}
|
||||
|
||||
{/* Où regarder (plateformes de streaming) */}
|
||||
<WhereToWatch extras={extras} />
|
||||
|
||||
{/* Casting */}
|
||||
{extras && extras.cast.length > 0 && (
|
||||
<section className="mt-8">
|
||||
@@ -492,7 +539,12 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
)}
|
||||
|
||||
{/* Mon suivi : dates, plateforme, listes, revisionnages */}
|
||||
{item && <Tracking item={item} lists={lists} onChange={(patch) => void update(item.id, patch)} />}
|
||||
{item && <Tracking item={item} lists={lists} tagSuggestions={allTags(items)} onChange={changeTracking} />}
|
||||
|
||||
{/* Listes partagées avec d'autres membres (titre de ma bibliothèque ou pas encore ajouté) */}
|
||||
{externalId && social.enabled && (
|
||||
<SharedListPicker snapshot={{ externalId, title, type, year: data.year, poster: item?.poster ?? poster }} posterFallback={seed?.posterUrl} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -522,11 +574,12 @@ export default function TitleSheet({ item: initial, seed, onClose, onGoToSetting
|
||||
<ReviewEditor
|
||||
title={title}
|
||||
initial={item?.notes ?? ''}
|
||||
initialSpoiler={!!item?.notesSpoiler}
|
||||
onClose={() => setReviewing(false)}
|
||||
onSave={async (notes) => {
|
||||
onSave={async (notes, spoiler) => {
|
||||
setReviewing(false)
|
||||
// Écrire un avis sur un titre pas encore ajouté le marque comme vu
|
||||
await save({ notes: notes || undefined, ...(item ? {} : { status: 'termine' as const, endDate: todayISO() }) })
|
||||
await save({ notes: notes || undefined, notesSpoiler: (notes && spoiler) || undefined, ...(item ? {} : { status: 'termine' as const, endDate: todayISO() }) })
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -685,7 +738,7 @@ function Synopsis({ text }: { text: string }) {
|
||||
}
|
||||
|
||||
/** Dates, plateforme, listes et revisionnages : enregistrés dès qu'on les change. */
|
||||
function Tracking({ item, lists, onChange }: { item: MediaItem; lists: { id: string; name: string }[]; onChange: (p: Partial<MediaInput>) => void }) {
|
||||
function Tracking({ item, lists, tagSuggestions, onChange }: { item: MediaItem; lists: { id: string; name: string }[]; tagSuggestions: string[]; onChange: (p: Partial<MediaInput>) => void }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
// Plus récent en premier (la sauvegarde les range dans l'autre sens)
|
||||
const rewatches = [...(item.rewatchDates ?? [])].sort().reverse()
|
||||
@@ -737,6 +790,18 @@ function Tracking({ item, lists, onChange }: { item: MediaItem; lists: { id: str
|
||||
)}
|
||||
<NewListForm onCreated={(l) => onChange({ listIds: [...(item.listIds ?? []), l.id] })} />
|
||||
</div>
|
||||
<div>
|
||||
<span className="label">{t('tags.label')}</span>
|
||||
<TagInput
|
||||
value={item.tags ?? []}
|
||||
onChange={(tags) => onChange({ tags: tags.length ? tags.slice(0, 30) : undefined })}
|
||||
suggestions={tagSuggestions}
|
||||
placeholder={t('tags.placeholder')}
|
||||
normalize={(v) => cleanTag(v, tagSuggestions)}
|
||||
showAll
|
||||
/>
|
||||
<p className="mt-1.5 text-xs text-ink-3">{t('tags.private')}</p>
|
||||
</div>
|
||||
<div>
|
||||
<span className="label">{t('form.rewatches')}</span>
|
||||
{rewatches.length > 0 && (
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
import { ChevronDown, ExternalLink, Globe } from 'lucide-react'
|
||||
import { useMemo, type ReactNode } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import type { TitleExtras } from '../../lib/catalogApi'
|
||||
import { tmdbSized } from '../../lib/tmdbImage'
|
||||
import { countryName, defaultWatchRegion, OFFER_KINDS, setWatchRegion, useWatchRegion, type StreamLink, type WatchProvider } from '../../lib/watchProviders'
|
||||
|
||||
const JUSTWATCH = 'https://www.justwatch.com'
|
||||
|
||||
/**
|
||||
* « Où regarder » sur la fiche d'un titre :
|
||||
* - TMDB : offres du pays choisi (abonnement, gratuit, location, achat), données JustWatch ;
|
||||
* - AniList : liens directs vers les plateformes de streaming.
|
||||
* Rien de connu → rien n'est affiché.
|
||||
*/
|
||||
export default function WhereToWatch({ extras }: { extras?: TitleExtras }) {
|
||||
if (extras?.watch && Object.keys(extras.watch).length > 0) return <TmdbOffers watch={extras.watch} />
|
||||
if (extras?.streaming && extras.streaming.length > 0) return <StreamLinks links={extras.streaming} />
|
||||
return null
|
||||
}
|
||||
|
||||
function Section({ children, aside }: { children: ReactNode; aside?: ReactNode }) {
|
||||
return (
|
||||
<section className="mx-4 mt-8" aria-labelledby="where-to-watch">
|
||||
<div className="mb-3 flex items-center justify-between gap-3">
|
||||
<h3 id="where-to-watch" className="eyebrow text-ink-2">
|
||||
{t('watch.title')}
|
||||
</h3>
|
||||
{aside}
|
||||
</div>
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
function TmdbOffers({ watch }: { watch: NonNullable<TitleExtras['watch']> }) {
|
||||
const country = useWatchRegion()
|
||||
const offers = watch[country]
|
||||
const rows = OFFER_KINDS.map((kind) => ({ kind, list: offers?.[kind] ?? [] })).filter((r) => r.list.length > 0)
|
||||
|
||||
// Pays proposés : ceux où le titre est disponible (+ le pays actuel), triés par nom
|
||||
const countries = useMemo(() => {
|
||||
const codes = new Set([...Object.keys(watch), country])
|
||||
return [...codes].map((code) => ({ code, name: countryName(code) })).sort((a, b) => a.name.localeCompare(b.name))
|
||||
}, [watch, country])
|
||||
|
||||
const picker = (
|
||||
<label className="relative flex items-center gap-1 rounded-full border border-line py-1 pe-2 ps-2 text-xs text-ink-2 focus-within:border-line-strong">
|
||||
<Globe size={13} className="shrink-0 text-ink-3" aria-hidden />
|
||||
<span className="sr-only">{t('watch.country')}</span>
|
||||
<select
|
||||
value={country}
|
||||
onChange={(e) => setWatchRegion(e.target.value === defaultWatchRegion() ? null : e.target.value)}
|
||||
className="max-w-36 appearance-none truncate bg-transparent pe-0.5 text-xs font-medium text-ink outline-none"
|
||||
>
|
||||
{countries.map((c) => (
|
||||
<option key={c.code} value={c.code} className="bg-surface text-ink">
|
||||
{c.name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<ChevronDown size={12} className="pointer-events-none shrink-0 text-ink-3" aria-hidden />
|
||||
</label>
|
||||
)
|
||||
|
||||
return (
|
||||
<Section aside={picker}>
|
||||
{rows.length > 0 ? (
|
||||
<div className="space-y-3">
|
||||
{rows.map(({ kind, list }) => (
|
||||
<div key={kind} className="flex items-start gap-3">
|
||||
<span className="w-20 shrink-0 pt-3 text-xs text-ink-3">{t(`watch.${kind}`)}</span>
|
||||
<ul className="flex min-w-0 flex-1 flex-wrap gap-2">
|
||||
{list.map((p) => (
|
||||
<li key={p.id}>
|
||||
<ProviderLogo provider={p} href={offers?.link} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-ink-3">{t('watch.none')}</p>
|
||||
)}
|
||||
<p className="mt-3 text-[11px] text-ink-3">
|
||||
<a href={JUSTWATCH} target="_blank" rel="noopener noreferrer" className="underline-offset-2 hover:underline">
|
||||
{t('watch.source')}
|
||||
</a>
|
||||
</p>
|
||||
</Section>
|
||||
)
|
||||
}
|
||||
|
||||
function ProviderLogo({ provider, href }: { provider: WatchProvider; href?: string }) {
|
||||
const logo = provider.logo ? (
|
||||
<img
|
||||
src={provider.logo}
|
||||
srcSet={`${provider.logo} 1x, ${tmdbSized(provider.logo, 'w154')} 2x`}
|
||||
alt={provider.name}
|
||||
title={provider.name}
|
||||
loading="lazy"
|
||||
className="size-11 rounded-xl border border-line bg-surface-2 object-cover"
|
||||
/>
|
||||
) : (
|
||||
<span title={provider.name} className="grid size-11 place-items-center rounded-xl border border-line bg-surface-2 text-sm font-semibold text-ink-2">
|
||||
<span aria-hidden>{provider.name.charAt(0)}</span>
|
||||
<span className="sr-only">{provider.name}</span>
|
||||
</span>
|
||||
)
|
||||
if (!href) return logo
|
||||
return (
|
||||
<a href={href} target="_blank" rel="noopener noreferrer" aria-label={t('watch.open', { name: provider.name })} className="block rounded-xl transition-transform active:scale-95">
|
||||
{logo}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
function StreamLinks({ links }: { links: StreamLink[] }) {
|
||||
return (
|
||||
<Section>
|
||||
<ul className="flex flex-wrap gap-2">
|
||||
{links.map((l) => (
|
||||
<li key={l.site}>
|
||||
<a
|
||||
href={l.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label={t('watch.open', { name: l.site })}
|
||||
title={l.language ? `${l.site} · ${l.language}` : l.site}
|
||||
className="flex items-center gap-2 rounded-full border border-line py-1 pe-3 ps-1 text-sm font-medium text-ink transition-colors active:bg-surface-2"
|
||||
>
|
||||
{l.icon ? (
|
||||
<span className="grid size-7 shrink-0 place-items-center rounded-full bg-surface-2" style={l.color ? { backgroundColor: l.color } : undefined}>
|
||||
<img src={l.icon} alt="" loading="lazy" className="size-4 object-contain" />
|
||||
</span>
|
||||
) : (
|
||||
<span className="grid size-7 shrink-0 place-items-center rounded-full bg-surface-2 text-xs font-semibold text-ink-2" aria-hidden>
|
||||
{l.site.charAt(0)}
|
||||
</span>
|
||||
)}
|
||||
{l.site}
|
||||
<ExternalLink size={13} className="text-ink-3" aria-hidden />
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</Section>
|
||||
)
|
||||
}
|
||||
@@ -190,6 +190,9 @@ const dict: Translations = {
|
||||
'legal.notice': "الإشعار القانوني",
|
||||
'legal.credits': "الاعتمادات",
|
||||
'legal.tmdb': "يستخدم هذا المنتج واجهة TMDB البرمجية لكنه غير معتمد أو مصادق عليه من TMDB.",
|
||||
'notFound.title': "حُذف هذا المشهد أثناء المونتاج",
|
||||
'notFound.text': "الصفحة التي تبحث عنها غير موجودة أو تم نقلها.",
|
||||
'notFound.back': "العودة إلى الرئيسية",
|
||||
'auth.newPasswordTitle': 'اختر كلمة المرور الجديدة.',
|
||||
'auth.newPassword': 'كلمة المرور الجديدة',
|
||||
'auth.err.credentials': 'البريد الإلكتروني أو كلمة المرور غير صحيحة.',
|
||||
@@ -1032,6 +1035,462 @@ const dict: Translations = {
|
||||
'sync.pending_two': "تعديلان في الانتظار",
|
||||
'sync.pending_few': "{count} تعديلات في الانتظار",
|
||||
'sync.pending_many': "{count} تعديلًا في الانتظار",
|
||||
// — Où regarder —
|
||||
'watch.title': "أين تشاهد",
|
||||
'watch.flatrate': "اشتراك",
|
||||
'watch.free': "مجاني",
|
||||
'watch.rent': "استئجار",
|
||||
'watch.buy': "شراء",
|
||||
'watch.country': "البلد",
|
||||
'watch.none': "غير متاح للبث في هذا البلد.",
|
||||
'watch.source': "البيانات من JustWatch",
|
||||
'watch.open': "شاهد على {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "وسوم شخصية",
|
||||
"tags.placeholder": "مريح، هالوين، لإعادة المشاهدة مع ليا…",
|
||||
"tags.private": "مرئية لك وحدك، ولا تظهر أبدًا في ملفك الشخصي.",
|
||||
"tags.filter": "وسوم شخصية",
|
||||
"select.start": "تحديد",
|
||||
"select.exit": "إنهاء التحديد",
|
||||
"select.all": "تحديد الكل",
|
||||
"select.none": "إلغاء تحديد الكل",
|
||||
"select.toggle": "تحديد «{title}»",
|
||||
"select.actions": "إجراءات التحديد",
|
||||
"select.status": "الحالة",
|
||||
"select.list": "قائمة",
|
||||
"select.tag": "وسم",
|
||||
"select.noLists": "لا توجد قوائم بعد — أنشئ واحدة أدناه.",
|
||||
"select.inList": "موجودة بالفعل: {n}/{total}",
|
||||
"select.addTo": "إضافة إلى «{list}»",
|
||||
"select.removeFrom": "إزالة من «{list}»",
|
||||
"select.removeTag": "إزالة وسم",
|
||||
"toast.undo": "تراجع",
|
||||
"toast.undone": "تم التراجع",
|
||||
"toast.undoFailed": "تعذّر التراجع",
|
||||
"toast.deleted": "تم حذف «{title}»",
|
||||
"toast.status": "«{title}»: {status}",
|
||||
"toast.removedFromList": "تمت إزالة «{title}» من «{list}»",
|
||||
"select.count_zero": "لم يُحدَّد أي عنوان",
|
||||
"select.count_one": "تم تحديد عنوان واحد",
|
||||
"select.count_two": "تم تحديد عنوانين",
|
||||
"select.count_few": "تم تحديد {count} عناوين",
|
||||
"select.count_many": "تم تحديد {count} عنوانًا",
|
||||
"select.count_other": "تم تحديد {count} عنوان",
|
||||
"select.statusTitle_one": "حالة عنوان واحد",
|
||||
"select.statusTitle_two": "حالة عنوانان",
|
||||
"select.statusTitle_few": "حالة {count} عناوين",
|
||||
"select.statusTitle_many": "حالة {count} عنوانًا",
|
||||
"select.statusTitle_other": "حالة {count} عنوان",
|
||||
"select.listTitle_one": "القوائم · عنوان واحد",
|
||||
"select.listTitle_two": "القوائم · عنوانان",
|
||||
"select.listTitle_few": "القوائم · {count} عناوين",
|
||||
"select.listTitle_many": "القوائم · {count} عنوانًا",
|
||||
"select.listTitle_other": "القوائم · {count} عنوان",
|
||||
"select.tagTitle_one": "وسم · عنوان واحد",
|
||||
"select.tagTitle_two": "وسم · عنوانان",
|
||||
"select.tagTitle_few": "وسم · {count} عناوين",
|
||||
"select.tagTitle_many": "وسم · {count} عنوانًا",
|
||||
"select.tagTitle_other": "وسم · {count} عنوان",
|
||||
"select.deleteConfirm_one": "حذف عنوان واحد من مكتبتك؟",
|
||||
"select.deleteConfirm_two": "حذف عنوانين من مكتبتك؟",
|
||||
"select.deleteConfirm_few": "حذف {count} عناوين من مكتبتك؟",
|
||||
"select.deleteConfirm_many": "حذف {count} عنوانًا من مكتبتك؟",
|
||||
"select.deleteConfirm_other": "حذف {count} عنوان من مكتبتك؟",
|
||||
"toast.deletedMany_one": "تم حذف عنوان واحد",
|
||||
"toast.deletedMany_two": "تم حذف عنوانين",
|
||||
"toast.deletedMany_few": "تم حذف {count} عناوين",
|
||||
"toast.deletedMany_many": "تم حذف {count} عنوانًا",
|
||||
"toast.deletedMany_other": "تم حذف {count} عنوان",
|
||||
"toast.statusMany_one": "عنوان واحد: {status}",
|
||||
"toast.statusMany_two": "عنوانان: {status}",
|
||||
"toast.statusMany_few": "{count} عناوين: {status}",
|
||||
"toast.statusMany_many": "{count} عنوانًا: {status}",
|
||||
"toast.statusMany_other": "{count} عنوان: {status}",
|
||||
"toast.addedToList_one": "تمت إضافة عنوان واحد إلى «{list}»",
|
||||
"toast.addedToList_two": "تمت إضافة عنوانين إلى «{list}»",
|
||||
"toast.addedToList_few": "تمت إضافة {count} عناوين إلى «{list}»",
|
||||
"toast.addedToList_many": "تمت إضافة {count} عنوانًا إلى «{list}»",
|
||||
"toast.addedToList_other": "تمت إضافة {count} عنوان إلى «{list}»",
|
||||
"toast.removedFromListMany_one": "تمت إزالة عنوان واحد من «{list}»",
|
||||
"toast.removedFromListMany_two": "تمت إزالة عنوانين من «{list}»",
|
||||
"toast.removedFromListMany_few": "تمت إزالة {count} عناوين من «{list}»",
|
||||
"toast.removedFromListMany_many": "تمت إزالة {count} عنوانًا من «{list}»",
|
||||
"toast.removedFromListMany_other": "تمت إزالة {count} عنوان من «{list}»",
|
||||
"toast.tagged_one": "تمت إضافة #{tag} إلى عنوان واحد",
|
||||
"toast.tagged_two": "تمت إضافة #{tag} إلى عنوانين",
|
||||
"toast.tagged_few": "تمت إضافة #{tag} إلى {count} عناوين",
|
||||
"toast.tagged_many": "تمت إضافة #{tag} إلى {count} عنوانًا",
|
||||
"toast.tagged_other": "تمت إضافة #{tag} إلى {count} عنوان",
|
||||
"toast.untagged_one": "تمت إزالة #{tag} من عنوان واحد",
|
||||
"toast.untagged_two": "تمت إزالة #{tag} من عنوانين",
|
||||
"toast.untagged_few": "تمت إزالة #{tag} من {count} عناوين",
|
||||
"toast.untagged_many": "تمت إزالة #{tag} من {count} عنوانًا",
|
||||
"toast.untagged_other": "تمت إزالة #{tag} من {count} عنوان",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "الاستيراد من تطبيق آخر",
|
||||
'import.rowHint': "Letterboxd وTV Time وMyAnimeList وAniList",
|
||||
'import.title': "استيراد مكتبتي",
|
||||
'import.chooseSource': "من أين تأتي عناوينك؟",
|
||||
'import.src.letterboxd': "أفلام وتقييمات ويوميات وقائمة مشاهدة وإعجابات",
|
||||
'import.src.tvtime': "المسلسلات المتابَعة والحلقات المشاهَدة",
|
||||
'import.src.mal': "قائمة الأنمي (تصدير XML)",
|
||||
'import.src.anilist': "قائمة أنمي عامة، باسم المستخدم",
|
||||
'import.how': "الحصول على ملف التصدير",
|
||||
'import.steps.letterboxd': "على letterboxd.com افتح Settings ← Import & Export ← Export your data.\nستحصل على ملف ZIP: أفلته هنا كما هو (أو ملفات CSV التي فيه).",
|
||||
'import.steps.tvtime': "في TV Time اطلب نسخة من بياناتك (الإعدادات ← الخصوصية، أو الدعم «Request my data»).\nأفلت هنا ملف ZIP الذي وصلك بالبريد، أو ملفات CSV التي فيه.",
|
||||
'import.steps.mal': "على myanimelist.net افتح ملفك ← Export (Anime List) ← Export My List.\nأفلت هنا ملف .xml.gz الذي نزّلته (أو .xml).",
|
||||
'import.steps.anilist': "يجب أن تكون قائمتك على AniList عامة (Settings ← Lists).\nأدخل اسم المستخدم: لا حاجة لتسجيل الدخول.",
|
||||
'import.drop': "اختر الملف أو أفلته",
|
||||
'import.privacy': "يُقرأ الملف على جهازك: لا يُبحث على الإنترنت إلا عن العناوين.",
|
||||
'import.userName': "اسم المستخدم على AniList",
|
||||
'import.continue': "متابعة",
|
||||
'import.back': "رجوع",
|
||||
'import.reading': "جارٍ قراءة الملف…",
|
||||
'import.resolving': "جارٍ البحث عن العناوين…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "تم بلوغ حد الطلبات، الاستئناف بعد {s} ث…",
|
||||
'import.cancel': "إلغاء",
|
||||
'import.noTmdb': "بدون TMDB لا يمكن التعرف على الأفلام والمسلسلات: أضف مفتاحًا في الإعدادات ← قواعد البيانات (أو سجّل الدخول)، أو استوردها بلا ملصق.",
|
||||
'import.found': "العناوين المقروءة من التصدير: {n}",
|
||||
'import.new': "سجلات جديدة",
|
||||
'import.toUpdate': "سجلات مكتملة",
|
||||
'import.already': "محدّثة مسبقًا",
|
||||
'import.notFound': "غير موجودة",
|
||||
'import.showNotFound': "عرض العناوين غير الموجودة",
|
||||
'import.hideNotFound': "إخفاء القائمة",
|
||||
'import.includeUnmatched': "إضافة العناوين غير الموجودة أيضًا (بلا ملصق)",
|
||||
'import.mergeHint': "لا يُستبدل شيء: تبقى تقييماتك وحالاتك وتواريخك الأحدث، ولا تُنشأ أي نسخ مكررة.",
|
||||
'import.confirm': "استيراد ({n})",
|
||||
'import.importing': "جارٍ الاستيراد…",
|
||||
'import.nothing': "لا جديد للاستيراد.",
|
||||
'import.done': "اكتمل الاستيراد",
|
||||
'import.doneAdded': "المضافة",
|
||||
'import.close': "إنهاء",
|
||||
'import.err.tooBig': "الملف كبير جدًا.",
|
||||
'import.err.badZip': "تعذّرت قراءة أرشيف ZIP.",
|
||||
'import.err.encrypted': "أرشيف محمي بكلمة مرور: تتعذّر قراءته.",
|
||||
'import.err.unsupported': "لا يستطيع متصفحك فك ضغط هذا الملف: أفلت ملفات CSV / XML غير المضغوطة بدلًا منه.",
|
||||
'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} تحدٍّ آخر",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "الإشعارات على هذا الجهاز",
|
||||
'push.deviceHint': "حتى عندما يكون التطبيق مغلقًا. تنطبق الخيارات أدناه أيضًا.",
|
||||
'push.iosInstall': "على iPhone وiPad، أضف AzuuCine أولًا إلى الشاشة الرئيسية (iOS 16.4 أو أحدث)، ثم افتح التطبيق من أيقونته لتفعيل الإشعارات.",
|
||||
'push.unsupported': "هذا المتصفح لا يدعم الإشعارات الفورية.",
|
||||
'push.denied': "الإشعارات محظورة لهذا الموقع. اسمح بها من إعدادات المتصفح ثم حاول مجددًا.",
|
||||
'push.notReady': "الإشعارات الفورية غير متاحة على الخادم بعد.",
|
||||
'push.error': "تعذّر تفعيل الإشعارات. تحقق من اتصالك وحاول مجددًا.",
|
||||
'netPill.offlineSync': "غير متصل — ستتم مزامنة تعديلاتك",
|
||||
'netPill.offlineLocal': "غير متصل — كل شيء محفوظ على هذا الجهاز",
|
||||
'netPill.synced': "تمت المزامنة",
|
||||
'netPill.hide': "إخفاء",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "عذرًا… حدث خطأ ما",
|
||||
"crash.text": "تعطّل العرض. بياناتك في أمان: أعد تحميل التطبيق للمتابعة.",
|
||||
"crash.reload": "إعادة التحميل",
|
||||
"crash.retry": "إعادة المحاولة",
|
||||
"crash.privacy": "عندما يكون التطبيق متصلًا، يُبلَّغ عن المشكلة تلقائيًا دون أي بيانات شخصية.",
|
||||
"bug.title": "الإبلاغ عن خطأ",
|
||||
"bug.hint": "صِف المشكلة وسنتولّى الأمر",
|
||||
"bug.hintLocal": "تواصل معنا عبر rdacet.fr",
|
||||
"bug.intro": "اشرح ما حدث وما كنت تتوقعه. كلما كان الوصف أدق كان الإصلاح أسرع.",
|
||||
"bug.description": "الوصف",
|
||||
"bug.placeholder": "مثال: عند فتح مسلسل من الصفحة الرئيسية تبقى قائمة الحلقات فارغة…",
|
||||
"bug.techTitle": "المعلومات التقنية المرفقة",
|
||||
"bug.techPrivacy": "لا شيء شخصي: لا بريدك الإلكتروني ولا مكتبتك. يرى الفريق اسم المستخدم الخاص بك ليتمكن من الرد عليك.",
|
||||
"bug.send": "إرسال",
|
||||
"bug.thanks": "شكرًا!",
|
||||
"bug.thanksText": "تم إرسال بلاغك. سنطّلع عليه في أقرب وقت.",
|
||||
"bug.info.version": "الإصدار",
|
||||
"bug.info.browser": "المتصفح",
|
||||
"bug.info.os": "النظام",
|
||||
"bug.info.lang": "اللغة",
|
||||
"bug.info.theme": "المظهر",
|
||||
"bug.info.screen": "الشاشة",
|
||||
"bug.info.viewport": "النافذة",
|
||||
"bug.info.route": "الصفحة",
|
||||
"bug.info.standalone": "تطبيق مثبّت",
|
||||
"bug.info.online": "متصل",
|
||||
"report.more": "خيارات أخرى",
|
||||
"report.action": "إبلاغ",
|
||||
"report.titleReview": "الإبلاغ عن هذه المراجعة",
|
||||
"report.titleProfile": "الإبلاغ عن هذا الملف الشخصي",
|
||||
"report.titleComment": "الإبلاغ عن هذا التعليق",
|
||||
"report.titleList": "الإبلاغ عن هذه القائمة",
|
||||
"report.intro": "لن يعرف الشخص المعني من أبلغ عنه. سيراجع فريق الإشراف بلاغك.",
|
||||
"report.reason": "السبب",
|
||||
"report.reason.spoiler": "حرق أحداث دون تنبيه",
|
||||
"report.reason.harassment": "تحرّش أو تنمّر",
|
||||
"report.reason.hate": "خطاب كراهية",
|
||||
"report.reason.sexual": "محتوى جنسي",
|
||||
"report.reason.spam": "رسائل مزعجة أو إعلانات",
|
||||
"report.reason.impersonation": "انتحال شخصية",
|
||||
"report.reason.other": "أخرى",
|
||||
"report.details": "تفاصيل (اختياري)",
|
||||
"report.detailsPlaceholder": "أضف سياقًا مفيدًا للإشراف…",
|
||||
"report.send": "إرسال",
|
||||
"report.privacy": "قد تؤدي البلاغات الكيدية إلى تعليق حسابك.",
|
||||
"report.thanks": "شكرًا على بلاغك",
|
||||
"report.already": "تم الإبلاغ مسبقًا",
|
||||
"report.thanksText": "سيراجعه فريق الإشراف. يمكنك أيضًا حظر هذا الحساب من ملفه الشخصي.",
|
||||
"report.errRate": "بلاغات كثيرة جدًا اليوم. حاول مجددًا غدًا.",
|
||||
"report.errNotFound": "هذا المحتوى لم يعد موجودًا أو لم يعد مرئيًا لك.",
|
||||
"report.errUnavailable": "الإبلاغ غير متاح بعد. حاول لاحقًا.",
|
||||
"block.block": "حظر",
|
||||
"block.unblock": "إلغاء الحظر",
|
||||
"block.done": "تم حظر الحساب: {name}",
|
||||
"block.undone": "تم إلغاء حظر الحساب: {name}",
|
||||
"block.notice": "لقد حظرت هذا الحساب: لم يعد بإمكانه متابعتك أو التفاعل مع مراجعاتك، ومراجعاته مخفية عنك.",
|
||||
"block.confirmTitle": "حظر {name}؟",
|
||||
"block.confirmText": "لن يتابع أحدكما الآخر بعد الآن. لن يتمكن هذا الحساب من متابعتك أو التفاعل مع مراجعاتك، وستُخفى مراجعاته عنك. لن يتلقى أي إشعار.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "يحتوي على حرق للأحداث",
|
||||
'spoiler.checkboxHint': "سيُخفى تقييمك عن الآخرين حتى يختاروا قراءته.",
|
||||
'spoiler.warning': "هذا التقييم يحرق الأحداث",
|
||||
'spoiler.show': "إظهار المحتوى",
|
||||
'spoiler.badge': "حرق أحداث",
|
||||
'comments.title': "التعليقات",
|
||||
'comments.none': "لا تعليقات بعد. ابدأ النقاش!",
|
||||
'comments.placeholder': "اكتب تعليقًا…",
|
||||
'comments.send': "إرسال",
|
||||
'comments.delete': "حذف التعليق",
|
||||
'comments.deleteConfirm': "حذف هذا التعليق؟",
|
||||
'comments.loadError': "تعذّر تحميل التعليقات.",
|
||||
'comments.unavailable': "التعليقات غير متاحة حاليًا.",
|
||||
'comments.err.rate': "تعلّق بسرعة كبيرة، حاول مجددًا بعد دقيقة.",
|
||||
'comments.err.gone': "لم يعد هذا التقييم متاحًا.",
|
||||
'comments.err.invalid': "التعليق فارغ أو طويل جدًا (500 حرف كحد أقصى).",
|
||||
'notif.review_comment': "علّق على تقييمك",
|
||||
'notif.shared_list_invite': "دعاك إلى القائمة المشتركة",
|
||||
'settings.notifComments': "التعليقات على تقييماتي",
|
||||
'settings.notifLists': "دعوات القوائم المشتركة",
|
||||
'shared.title': "القوائم المشتركة",
|
||||
'shared.hint': "قوائم جماعية: يمكن لكل عضو إضافة العناوين أو إزالتها.",
|
||||
'shared.new': "قائمة مشتركة جديدة",
|
||||
'shared.namePh': "اسم القائمة (مثلًا: أفلام نشاهدها معًا)",
|
||||
'shared.none': "لا قوائم مشتركة بعد. أنشئ واحدة وادعُ أصدقاءك.",
|
||||
'shared.invitesYou': "يدعوك للانضمام إلى",
|
||||
'shared.accept': "قبول",
|
||||
'shared.decline': "رفض",
|
||||
'shared.by': "بواسطة {name}",
|
||||
'shared.badge': "قائمة مشتركة",
|
||||
'shared.members': "الأعضاء",
|
||||
'shared.invite': "دعوة",
|
||||
'shared.owner': "المالك",
|
||||
'shared.pending': "بانتظار الرد",
|
||||
'shared.removeMember': "إزالة {name} من القائمة",
|
||||
'shared.removeTitle': "إزالة {title} من القائمة",
|
||||
'shared.addedBy': "أضافه {name}",
|
||||
'shared.emptyText': "أضف العناوين من صفحاتها أو من مكتبتك.",
|
||||
'shared.delete': "حذف القائمة المشتركة",
|
||||
'shared.deleteConfirm': "ستُحذف القائمة «{name}» لجميع أعضائها.",
|
||||
'shared.leave': "مغادرة القائمة",
|
||||
'shared.leaveShort': "مغادرة",
|
||||
'shared.leaveConfirm': "لن ترى القائمة «{name}» بعد الآن. يمكن لمالكها دعوتك من جديد.",
|
||||
'shared.notFound': "القائمة غير موجودة",
|
||||
'shared.noCandidates': "لا توجد عناوين في مكتبتك.",
|
||||
'shared.inviteTitle': "دعوة أعضاء",
|
||||
'shared.inviteHint': "ادعُ إلى «{name}» أشخاصًا تتابعهم أو يتابعونك.",
|
||||
'shared.searchPeople': "ابحث عن اسم مستخدم…",
|
||||
'shared.noPeople': "لا أحد لدعوته: يمكن فقط لمتابعيك ومن تتابعهم الانضمام.",
|
||||
'shared.inviteShort': "دعوة",
|
||||
'shared.invited': "تمت الدعوة",
|
||||
'shared.expired': "انتهت صلاحية الدعوة",
|
||||
'shared.addTo': "إضافة إلى قائمة مشتركة",
|
||||
'shared.unavailable': "القوائم المشتركة غير متاحة حاليًا.",
|
||||
'shared.err.rate': "إجراءات كثيرة متتالية، حاول مجددًا بعد دقيقة.",
|
||||
'shared.err.members': "بلغت هذه القائمة الحد الأقصى للأعضاء.",
|
||||
'shared.err.lists': "بلغت الحد الأقصى للقوائم المشتركة.",
|
||||
'shared.err.full': "هذه القائمة ممتلئة (500 عنوان).",
|
||||
'shared.err.notConnected': "يمكنك دعوة متابعيك ومن تتابعهم فقط.",
|
||||
'shared.err.forbidden': "غير مسموح: ليس لديك حق الوصول إلى هذه القائمة.",
|
||||
'comments.toggle_zero': "لا تعليقات",
|
||||
'comments.toggle_one': "تعليق واحد",
|
||||
'comments.toggle_two': "تعليقان",
|
||||
'comments.toggle_few': "{count} تعليقات",
|
||||
'comments.toggle_many': "{count} تعليقًا",
|
||||
'comments.toggle_other': "{count} تعليق",
|
||||
'shared.nMembers_zero': "لا أعضاء",
|
||||
'shared.nMembers_one': "عضو واحد",
|
||||
'shared.nMembers_two': "عضوان",
|
||||
'shared.nMembers_few': "{count} أعضاء",
|
||||
'shared.nMembers_many': "{count} عضوًا",
|
||||
'shared.nMembers_other': "{count} عضو",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Impressum",
|
||||
'legal.credits': "Credits",
|
||||
'legal.tmdb': "Dieses Produkt nutzt die TMDB-API, ist aber nicht von TMDB unterstützt oder zertifiziert.",
|
||||
'notFound.title': "Diese Szene ist im Schnitt gelandet",
|
||||
'notFound.text': "Die gesuchte Seite existiert nicht oder wurde verschoben.",
|
||||
'notFound.back': "Zur Startseite",
|
||||
'auth.newPasswordTitle': 'Wähl dein neues Passwort.',
|
||||
'auth.newPassword': 'Neues Passwort',
|
||||
'auth.err.credentials': 'E-Mail oder Passwort falsch.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} Änderung ausstehend",
|
||||
'sync.pending_other': "{count} Änderungen ausstehend",
|
||||
'sync.now': "Jetzt synchronisieren",
|
||||
// — Où regarder —
|
||||
'watch.title': "Wo ansehen",
|
||||
'watch.flatrate': "Abo",
|
||||
'watch.free': "Kostenlos",
|
||||
'watch.rent': "Leihen",
|
||||
'watch.buy': "Kaufen",
|
||||
'watch.country': "Land",
|
||||
'watch.none': "In diesem Land nicht im Stream verfügbar.",
|
||||
'watch.source': "Daten von JustWatch",
|
||||
'watch.open': "Auf {name} ansehen",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Eigene Tags",
|
||||
"tags.placeholder": "comfort, halloween, mit Lea nochmal schauen…",
|
||||
"tags.private": "Nur für dich sichtbar, nie auf deinem Profil.",
|
||||
"tags.filter": "Eigene Tags",
|
||||
"select.start": "Auswählen",
|
||||
"select.exit": "Auswahl beenden",
|
||||
"select.all": "Alle auswählen",
|
||||
"select.none": "Auswahl aufheben",
|
||||
"select.toggle": "„{title}“ auswählen",
|
||||
"select.actions": "Aktionen für die Auswahl",
|
||||
"select.status": "Status",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Noch keine Listen – erstelle unten eine.",
|
||||
"select.inList": "Schon drin: {n}/{total}",
|
||||
"select.addTo": "Zu „{list}“ hinzufügen",
|
||||
"select.removeFrom": "Aus „{list}“ entfernen",
|
||||
"select.removeTag": "Tag entfernen",
|
||||
"toast.undo": "Rückgängig",
|
||||
"toast.undone": "Rückgängig gemacht",
|
||||
"toast.undoFailed": "Rückgängig machen fehlgeschlagen",
|
||||
"toast.deleted": "„{title}“ gelöscht",
|
||||
"toast.status": "„{title}“ → {status}",
|
||||
"toast.removedFromList": "„{title}“ aus „{list}“ entfernt",
|
||||
"select.count_zero": "Kein Titel ausgewählt",
|
||||
"select.count_one": "{count} ausgewählt",
|
||||
"select.count_other": "{count} ausgewählt",
|
||||
"select.statusTitle_one": "Status von {count} Titel",
|
||||
"select.statusTitle_other": "Status von {count} Titeln",
|
||||
"select.listTitle_one": "Listen · {count} Titel",
|
||||
"select.listTitle_other": "Listen · {count} Titel",
|
||||
"select.tagTitle_one": "Tag · {count} Titel",
|
||||
"select.tagTitle_other": "Tag · {count} Titel",
|
||||
"select.deleteConfirm_one": "{count} Titel aus deiner Bibliothek löschen?",
|
||||
"select.deleteConfirm_other": "{count} Titel aus deiner Bibliothek löschen?",
|
||||
"toast.deletedMany_one": "{count} Titel gelöscht",
|
||||
"toast.deletedMany_other": "{count} Titel gelöscht",
|
||||
"toast.statusMany_one": "{count} Titel → {status}",
|
||||
"toast.statusMany_other": "{count} Titel → {status}",
|
||||
"toast.addedToList_one": "{count} Titel zu „{list}“ hinzugefügt",
|
||||
"toast.addedToList_other": "{count} Titel zu „{list}“ hinzugefügt",
|
||||
"toast.removedFromListMany_one": "{count} Titel aus „{list}“ entfernt",
|
||||
"toast.removedFromListMany_other": "{count} Titel aus „{list}“ entfernt",
|
||||
"toast.tagged_one": "#{tag} zu {count} Titel hinzugefügt",
|
||||
"toast.tagged_other": "#{tag} zu {count} Titeln hinzugefügt",
|
||||
"toast.untagged_one": "#{tag} von {count} Titel entfernt",
|
||||
"toast.untagged_other": "#{tag} von {count} Titeln entfernt",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Aus einer anderen App importieren",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Meine Bibliothek importieren",
|
||||
'import.chooseSource': "Woher kommen deine Titel?",
|
||||
'import.src.letterboxd': "Filme, Bewertungen, Tagebuch, Watchlist und Likes",
|
||||
'import.src.tvtime': "Verfolgte Serien und gesehene Folgen",
|
||||
'import.src.mal': "Anime-Liste (XML-Export)",
|
||||
'import.src.anilist': "Öffentliche Anime-Liste, per Benutzername",
|
||||
'import.how': "Export besorgen",
|
||||
'import.steps.letterboxd': "Öffne auf letterboxd.com Settings → Import & Export → Export your data.\nDu erhältst eine ZIP-Datei: lege sie unverändert hier ab (oder ihre CSV-Dateien).",
|
||||
'import.steps.tvtime': "Fordere in TV Time eine Kopie deiner Daten an (Einstellungen → Datenschutz oder Support „Request my data“).\nLege die per E-Mail erhaltene ZIP-Datei oder ihre CSV-Dateien hier ab.",
|
||||
'import.steps.mal': "Öffne auf myanimelist.net dein Profil → Export (Anime List) → Export My List.\nLege die heruntergeladene .xml.gz-Datei (oder die .xml) hier ab.",
|
||||
'import.steps.anilist': "Deine AniList-Liste muss öffentlich sein (Settings → Lists).\nGib deinen Benutzernamen ein: keine Anmeldung nötig.",
|
||||
'import.drop': "Datei wählen oder ablegen",
|
||||
'import.privacy': "Die Datei wird auf deinem Gerät gelesen: nur die Titel werden online gesucht.",
|
||||
'import.userName': "AniList-Benutzername",
|
||||
'import.continue': "Weiter",
|
||||
'import.back': "Zurück",
|
||||
'import.reading': "Datei wird gelesen…",
|
||||
'import.resolving': "Titel werden gesucht…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Anfragelimit erreicht, weiter in {s} s…",
|
||||
'import.cancel': "Abbrechen",
|
||||
'import.noTmdb': "Ohne TMDB können Filme und Serien nicht erkannt werden: füge in Einstellungen → Datenbanken einen Schlüssel hinzu (oder melde dich an) oder importiere sie ohne Poster.",
|
||||
'import.found': "Aus dem Export gelesene Titel: {n}",
|
||||
'import.new': "Neue Einträge",
|
||||
'import.toUpdate': "Ergänzte Einträge",
|
||||
'import.already': "Bereits aktuell",
|
||||
'import.notFound': "Nicht gefunden",
|
||||
'import.showNotFound': "Nicht gefundene Titel anzeigen",
|
||||
'import.hideNotFound': "Liste ausblenden",
|
||||
'import.includeUnmatched': "Nicht gefundene Titel trotzdem hinzufügen (ohne Poster)",
|
||||
'import.mergeHint': "Nichts wird überschrieben: deine neueren Bewertungen, Status und Daten bleiben erhalten, und es entstehen keine Duplikate.",
|
||||
'import.confirm': "Importieren ({n})",
|
||||
'import.importing': "Import läuft…",
|
||||
'import.nothing': "Nichts Neues zu importieren.",
|
||||
'import.done': "Import abgeschlossen",
|
||||
'import.doneAdded': "Hinzugefügt",
|
||||
'import.close': "Fertig",
|
||||
'import.err.tooBig': "Datei zu groß.",
|
||||
'import.err.badZip': "ZIP-Archiv nicht lesbar.",
|
||||
'import.err.encrypted': "Passwortgeschütztes Archiv: kann nicht gelesen werden.",
|
||||
'import.err.unsupported': "Dein Browser kann diese Datei nicht entpacken: lege stattdessen die entpackten CSV-/XML-Dateien ab.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Benachrichtigungen auf diesem Gerät",
|
||||
'push.deviceHint': "Auch wenn die App geschlossen ist. Die Auswahl unten gilt ebenfalls.",
|
||||
'push.iosInstall': "Auf iPhone und iPad füge AzuuCine zuerst zum Home-Bildschirm hinzu (iOS 16.4 oder neuer) und öffne die App dann über ihr Symbol, um Benachrichtigungen zu aktivieren.",
|
||||
'push.unsupported': "Dieser Browser unterstützt keine Push-Benachrichtigungen.",
|
||||
'push.denied': "Benachrichtigungen sind für diese Seite blockiert. Erlaube sie in den Browser-Einstellungen und versuche es erneut.",
|
||||
'push.notReady': "Push-Benachrichtigungen sind auf dem Server noch nicht verfügbar.",
|
||||
'push.error': "Benachrichtigungen konnten nicht aktiviert werden. Prüfe deine Verbindung und versuche es erneut.",
|
||||
'netPill.offlineSync': "Offline — deine Änderungen werden synchronisiert",
|
||||
'netPill.offlineLocal': "Offline — alles bleibt auf diesem Gerät gespeichert",
|
||||
'netPill.synced': "Synchronisiert",
|
||||
'netPill.hide': "Ausblenden",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Hoppla… etwas ist schiefgelaufen",
|
||||
"crash.text": "Die Anzeige ist abgestürzt. Deine Daten sind sicher: Lade die App neu, um weiterzumachen.",
|
||||
"crash.reload": "Neu laden",
|
||||
"crash.retry": "Erneut versuchen",
|
||||
"crash.privacy": "Wenn die App online ist, wird uns das Problem automatisch gemeldet – ohne persönliche Daten.",
|
||||
"bug.title": "Fehler melden",
|
||||
"bug.hint": "Beschreibe das Problem, wir kümmern uns darum",
|
||||
"bug.hintLocal": "Kontaktiere uns über rdacet.fr",
|
||||
"bug.intro": "Erkläre, was passiert ist und was du erwartet hast. Je genauer, desto schneller die Lösung.",
|
||||
"bug.description": "Beschreibung",
|
||||
"bug.placeholder": "Z. B.: Beim Öffnen einer Serie von der Startseite bleibt die Episodenliste leer…",
|
||||
"bug.techTitle": "Angehängte technische Infos",
|
||||
"bug.techPrivacy": "Nichts Persönliches: weder deine E-Mail noch deine Bibliothek. Das Team sieht deinen Benutzernamen, um dir antworten zu können.",
|
||||
"bug.send": "Senden",
|
||||
"bug.thanks": "Danke!",
|
||||
"bug.thanksText": "Deine Meldung wurde gesendet. Wir sehen sie uns so schnell wie möglich an.",
|
||||
"bug.info.version": "Version",
|
||||
"bug.info.browser": "Browser",
|
||||
"bug.info.os": "System",
|
||||
"bug.info.lang": "Sprache",
|
||||
"bug.info.theme": "Design",
|
||||
"bug.info.screen": "Bildschirm",
|
||||
"bug.info.viewport": "Fenster",
|
||||
"bug.info.route": "Seite",
|
||||
"bug.info.standalone": "Installierte App",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Weitere Optionen",
|
||||
"report.action": "Melden",
|
||||
"report.titleReview": "Diese Rezension melden",
|
||||
"report.titleProfile": "Dieses Profil melden",
|
||||
"report.titleComment": "Diesen Kommentar melden",
|
||||
"report.titleList": "Diese Liste melden",
|
||||
"report.intro": "Die Person erfährt nicht, wer sie gemeldet hat. Das Moderationsteam prüft deine Meldung.",
|
||||
"report.reason": "Grund",
|
||||
"report.reason.spoiler": "Nicht gekennzeichneter Spoiler",
|
||||
"report.reason.harassment": "Belästigung oder Mobbing",
|
||||
"report.reason.hate": "Hassrede",
|
||||
"report.reason.sexual": "Sexuelle Inhalte",
|
||||
"report.reason.spam": "Spam oder Werbung",
|
||||
"report.reason.impersonation": "Identitätsdiebstahl",
|
||||
"report.reason.other": "Sonstiges",
|
||||
"report.details": "Details (optional)",
|
||||
"report.detailsPlaceholder": "Füge hilfreichen Kontext für die Moderation hinzu…",
|
||||
"report.send": "Senden",
|
||||
"report.privacy": "Missbräuchliche Meldungen können zur Sperrung deines Kontos führen.",
|
||||
"report.thanks": "Danke für deine Meldung",
|
||||
"report.already": "Bereits gemeldet",
|
||||
"report.thanksText": "Das Moderationsteam prüft sie. Du kannst dieses Konto auch über sein Profil blockieren.",
|
||||
"report.errRate": "Zu viele Meldungen heute. Versuche es morgen erneut.",
|
||||
"report.errNotFound": "Dieser Inhalt existiert nicht mehr oder ist für dich nicht mehr sichtbar.",
|
||||
"report.errUnavailable": "Melden ist noch nicht verfügbar. Bitte versuche es später erneut.",
|
||||
"block.block": "Blockieren",
|
||||
"block.unblock": "Blockierung aufheben",
|
||||
"block.done": "Konto blockiert: {name}",
|
||||
"block.undone": "Blockierung aufgehoben: {name}",
|
||||
"block.notice": "Du hast dieses Konto blockiert: Es kann dir nicht mehr folgen oder auf deine Rezensionen reagieren, und seine Rezensionen werden dir ausgeblendet.",
|
||||
"block.confirmTitle": "{name} blockieren?",
|
||||
"block.confirmText": "Ihr folgt euch nicht mehr. Dieses Konto kann dir nicht mehr folgen oder auf deine Rezensionen reagieren, und seine Rezensionen werden dir ausgeblendet. Es wird nicht benachrichtigt.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Enthält Spoiler",
|
||||
'spoiler.checkboxHint': "Deine Kritik wird für andere verborgen, bis sie sie bewusst lesen.",
|
||||
'spoiler.warning': "Diese Kritik enthält Spoiler",
|
||||
'spoiler.show': "Spoiler anzeigen",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Kommentare",
|
||||
'comments.none': "Noch keine Kommentare. Starte die Unterhaltung!",
|
||||
'comments.placeholder': "Kommentar schreiben…",
|
||||
'comments.send': "Senden",
|
||||
'comments.delete': "Kommentar löschen",
|
||||
'comments.deleteConfirm': "Diesen Kommentar löschen?",
|
||||
'comments.loadError': "Kommentare konnten nicht geladen werden.",
|
||||
'comments.unavailable': "Kommentare sind gerade nicht verfügbar.",
|
||||
'comments.err.rate': "Du kommentierst zu schnell – versuch es in einer Minute erneut.",
|
||||
'comments.err.gone': "Diese Kritik ist nicht mehr verfügbar.",
|
||||
'comments.err.invalid': "Kommentar leer oder zu lang (max. 500 Zeichen).",
|
||||
'notif.review_comment': "hat deine Kritik kommentiert",
|
||||
'notif.shared_list_invite': "hat dich in die geteilte Liste eingeladen",
|
||||
'settings.notifComments': "Kommentare zu meinen Kritiken",
|
||||
'settings.notifLists': "Einladungen zu geteilten Listen",
|
||||
'shared.title': "Geteilte Listen",
|
||||
'shared.hint': "Listen für mehrere: Jedes Mitglied kann Titel hinzufügen oder entfernen.",
|
||||
'shared.new': "Neue geteilte Liste",
|
||||
'shared.namePh': "Name der Liste (z. B. Filme für zu zweit)",
|
||||
'shared.none': "Noch keine geteilten Listen. Erstelle eine und lade Freunde ein.",
|
||||
'shared.invitesYou': "lädt dich ein zu",
|
||||
'shared.accept': "Annehmen",
|
||||
'shared.decline': "Ablehnen",
|
||||
'shared.by': "von {name}",
|
||||
'shared.badge': "Geteilte Liste",
|
||||
'shared.members': "Mitglieder",
|
||||
'shared.invite': "Einladen",
|
||||
'shared.owner': "Inhaber",
|
||||
'shared.pending': "Ausstehend",
|
||||
'shared.removeMember': "{name} aus der Liste entfernen",
|
||||
'shared.removeTitle': "{title} aus der Liste entfernen",
|
||||
'shared.addedBy': "Hinzugefügt von {name}",
|
||||
'shared.emptyText': "Füge Titel über ihre Seite oder aus deiner Bibliothek hinzu.",
|
||||
'shared.delete': "Geteilte Liste löschen",
|
||||
'shared.deleteConfirm': "Die Liste „{name}“ wird für alle Mitglieder gelöscht.",
|
||||
'shared.leave': "Liste verlassen",
|
||||
'shared.leaveShort': "Verlassen",
|
||||
'shared.leaveConfirm': "Du siehst die Liste „{name}“ nicht mehr. Der Inhaber kann dich erneut einladen.",
|
||||
'shared.notFound': "Liste nicht gefunden",
|
||||
'shared.noCandidates': "Keine Titel in deiner Bibliothek gefunden.",
|
||||
'shared.inviteTitle': "Mitglieder einladen",
|
||||
'shared.inviteHint': "Lade Personen, denen du folgst oder die dir folgen, in „{name}“ ein.",
|
||||
'shared.searchPeople': "Benutzernamen suchen…",
|
||||
'shared.noPeople': "Niemand zum Einladen: Nur deine Follower und Personen, denen du folgst, können beitreten.",
|
||||
'shared.inviteShort': "Einladen",
|
||||
'shared.invited': "Eingeladen",
|
||||
'shared.expired': "Einladung abgelaufen",
|
||||
'shared.addTo': "Zu einer geteilten Liste hinzufügen",
|
||||
'shared.unavailable': "Geteilte Listen sind gerade nicht verfügbar.",
|
||||
'shared.err.rate': "Zu viele Aktionen hintereinander – versuch es in einer Minute erneut.",
|
||||
'shared.err.members': "Diese Liste hat die maximale Mitgliederzahl erreicht.",
|
||||
'shared.err.lists': "Du hast die maximale Anzahl geteilter Listen erreicht.",
|
||||
'shared.err.full': "Diese Liste ist voll (500 Titel).",
|
||||
'shared.err.notConnected': "Du kannst nur deine Follower und Personen, denen du folgst, einladen.",
|
||||
'shared.err.forbidden': "Nicht erlaubt: Du hast keinen Zugriff auf diese Liste.",
|
||||
'comments.toggle_one': "{count} Kommentar",
|
||||
'comments.toggle_other': "{count} Kommentare",
|
||||
'shared.nMembers_one': "{count} Mitglied",
|
||||
'shared.nMembers_other': "{count} Mitglieder",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Legal notice",
|
||||
'legal.credits': "Credits",
|
||||
'legal.tmdb': "This product uses the TMDB API but is not endorsed or certified by TMDB.",
|
||||
'notFound.title': "This scene was cut in editing",
|
||||
'notFound.text': "The page you're looking for doesn't exist or has moved.",
|
||||
'notFound.back': "Back to home",
|
||||
'auth.newPasswordTitle': 'Pick your new password.',
|
||||
'auth.newPassword': 'New password',
|
||||
'auth.err.credentials': 'Wrong email or password.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} change waiting",
|
||||
'sync.pending_other': "{count} changes waiting",
|
||||
'sync.now': "Sync now",
|
||||
// — Où regarder —
|
||||
'watch.title': "Where to watch",
|
||||
'watch.flatrate': "Stream",
|
||||
'watch.free': "Free",
|
||||
'watch.rent': "Rent",
|
||||
'watch.buy': "Buy",
|
||||
'watch.country': "Country",
|
||||
'watch.none': "Not available to stream in this country.",
|
||||
'watch.source': "Data by JustWatch",
|
||||
'watch.open': "Watch on {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Personal tags",
|
||||
"tags.placeholder": "comfort, halloween, rewatch with Lea…",
|
||||
"tags.private": "Only you can see them, never on your profile.",
|
||||
"tags.filter": "Personal tags",
|
||||
"select.start": "Select",
|
||||
"select.exit": "Exit selection",
|
||||
"select.all": "Select all",
|
||||
"select.none": "Deselect all",
|
||||
"select.toggle": "Select “{title}”",
|
||||
"select.actions": "Selection actions",
|
||||
"select.status": "Status",
|
||||
"select.list": "List",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "No lists yet — create one below.",
|
||||
"select.inList": "Already in: {n}/{total}",
|
||||
"select.addTo": "Add to “{list}”",
|
||||
"select.removeFrom": "Remove from “{list}”",
|
||||
"select.removeTag": "Remove a tag",
|
||||
"toast.undo": "Undo",
|
||||
"toast.undone": "Undone",
|
||||
"toast.undoFailed": "Couldn’t undo",
|
||||
"toast.deleted": "“{title}” deleted",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” removed from “{list}”",
|
||||
"select.count_zero": "No titles selected",
|
||||
"select.count_one": "{count} selected",
|
||||
"select.count_other": "{count} selected",
|
||||
"select.statusTitle_one": "Status of {count} title",
|
||||
"select.statusTitle_other": "Status of {count} titles",
|
||||
"select.listTitle_one": "Lists · {count} title",
|
||||
"select.listTitle_other": "Lists · {count} titles",
|
||||
"select.tagTitle_one": "Tag · {count} title",
|
||||
"select.tagTitle_other": "Tag · {count} titles",
|
||||
"select.deleteConfirm_one": "Delete {count} title from your library?",
|
||||
"select.deleteConfirm_other": "Delete {count} titles from your library?",
|
||||
"toast.deletedMany_one": "{count} title deleted",
|
||||
"toast.deletedMany_other": "{count} titles deleted",
|
||||
"toast.statusMany_one": "{count} title → {status}",
|
||||
"toast.statusMany_other": "{count} titles → {status}",
|
||||
"toast.addedToList_one": "{count} title added to “{list}”",
|
||||
"toast.addedToList_other": "{count} titles added to “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} title removed from “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} titles removed from “{list}”",
|
||||
"toast.tagged_one": "#{tag} added to {count} title",
|
||||
"toast.tagged_other": "#{tag} added to {count} titles",
|
||||
"toast.untagged_one": "#{tag} removed from {count} title",
|
||||
"toast.untagged_other": "#{tag} removed from {count} titles",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Import from another app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Import my library",
|
||||
'import.chooseSource': "Where are your titles coming from?",
|
||||
'import.src.letterboxd': "Films, ratings, diary, watchlist and likes",
|
||||
'import.src.tvtime': "Followed shows and watched episodes",
|
||||
'import.src.mal': "Anime list (XML export)",
|
||||
'import.src.anilist': "Public anime list, by username",
|
||||
'import.how': "Getting the export",
|
||||
'import.steps.letterboxd': "On letterboxd.com, open Settings → Import & Export → Export your data.\nYou get a ZIP file: drop it here as is (or its CSV files).",
|
||||
'import.steps.tvtime': "In TV Time, request a copy of your data (Settings → Privacy, or support “Request my data”).\nDrop the ZIP you received by email here, or its CSV files.",
|
||||
'import.steps.mal': "On myanimelist.net, open your profile → Export (Anime List) → Export My List.\nDrop the downloaded .xml.gz file here (or the .xml).",
|
||||
'import.steps.anilist': "Your AniList list must be public (Settings → Lists).\nEnter your username: no sign-in needed.",
|
||||
'import.drop': "Choose or drop the file",
|
||||
'import.privacy': "The file is read on your device: only titles are looked up online.",
|
||||
'import.userName': "AniList username",
|
||||
'import.continue': "Continue",
|
||||
'import.back': "Back",
|
||||
'import.reading': "Reading the file…",
|
||||
'import.resolving': "Finding titles…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Request limit reached, resuming in {s} s…",
|
||||
'import.cancel': "Cancel",
|
||||
'import.noTmdb': "Without TMDB, films and shows cannot be recognised: add a key in Settings → Databases (or sign in), or import them without posters.",
|
||||
'import.found': "Titles read from the export: {n}",
|
||||
'import.new': "New entries",
|
||||
'import.toUpdate': "Entries completed",
|
||||
'import.already': "Already up to date",
|
||||
'import.notFound': "Not found",
|
||||
'import.showNotFound': "Show titles not found",
|
||||
'import.hideNotFound': "Hide the list",
|
||||
'import.includeUnmatched': "Also add titles not found (without poster)",
|
||||
'import.mergeHint': "Nothing is overwritten: your newer ratings, statuses and dates are kept, and no duplicates are created.",
|
||||
'import.confirm': "Import ({n})",
|
||||
'import.importing': "Importing…",
|
||||
'import.nothing': "Nothing new to import.",
|
||||
'import.done': "Import complete",
|
||||
'import.doneAdded': "Added",
|
||||
'import.close': "Done",
|
||||
'import.err.tooBig': "File too large.",
|
||||
'import.err.badZip': "Unreadable ZIP archive.",
|
||||
'import.err.encrypted': "Password-protected archive: it cannot be read.",
|
||||
'import.err.unsupported': "Your browser cannot decompress this file: drop the uncompressed CSV / XML files instead.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifications on this device",
|
||||
'push.deviceHint': "Even when the app is closed. The choices below apply too.",
|
||||
'push.iosInstall': "On iPhone and iPad, first add AzuuCine to your Home Screen (iOS 16.4 or later), then open the app from its icon to turn on notifications.",
|
||||
'push.unsupported': "This browser doesn’t support push notifications.",
|
||||
'push.denied': "Notifications are blocked for this site. Allow them in your browser settings, then try again.",
|
||||
'push.notReady': "Push notifications aren’t available on the server yet.",
|
||||
'push.error': "Couldn’t turn on notifications. Check your connection and try again.",
|
||||
'netPill.offlineSync': "Offline — your changes will sync",
|
||||
'netPill.offlineLocal': "Offline — everything stays saved on this device",
|
||||
'netPill.synced': "Synced",
|
||||
'netPill.hide': "Hide",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Oops… something went wrong",
|
||||
"crash.text": "The screen crashed. Your data is safe: reload the app to get going again.",
|
||||
"crash.reload": "Reload",
|
||||
"crash.retry": "Try again",
|
||||
"crash.privacy": "When the app is online, the problem is reported to us automatically, without any personal data.",
|
||||
"bug.title": "Report a bug",
|
||||
"bug.hint": "Describe the problem and we'll look into it",
|
||||
"bug.hintLocal": "Contact us via rdacet.fr",
|
||||
"bug.intro": "Explain what happened and what you expected. The more precise, the faster the fix.",
|
||||
"bug.description": "Description",
|
||||
"bug.placeholder": "E.g. when opening a series from Home, the episode list stays empty…",
|
||||
"bug.techTitle": "Attached technical info",
|
||||
"bug.techPrivacy": "Nothing personal: not your email, not your library. The team sees your username so they can reply.",
|
||||
"bug.send": "Send",
|
||||
"bug.thanks": "Thank you!",
|
||||
"bug.thanksText": "Your report has been sent. We'll look at it as soon as possible.",
|
||||
"bug.info.version": "Version",
|
||||
"bug.info.browser": "Browser",
|
||||
"bug.info.os": "System",
|
||||
"bug.info.lang": "Language",
|
||||
"bug.info.theme": "Theme",
|
||||
"bug.info.screen": "Screen",
|
||||
"bug.info.viewport": "Window",
|
||||
"bug.info.route": "Page",
|
||||
"bug.info.standalone": "Installed app",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "More options",
|
||||
"report.action": "Report",
|
||||
"report.titleReview": "Report this review",
|
||||
"report.titleProfile": "Report this profile",
|
||||
"report.titleComment": "Report this comment",
|
||||
"report.titleList": "Report this list",
|
||||
"report.intro": "The person won't know who reported them. The moderation team will review your report.",
|
||||
"report.reason": "Reason",
|
||||
"report.reason.spoiler": "Unmarked spoiler",
|
||||
"report.reason.harassment": "Harassment or bullying",
|
||||
"report.reason.hate": "Hate speech",
|
||||
"report.reason.sexual": "Sexual content",
|
||||
"report.reason.spam": "Spam or advertising",
|
||||
"report.reason.impersonation": "Impersonation",
|
||||
"report.reason.other": "Other",
|
||||
"report.details": "Details (optional)",
|
||||
"report.detailsPlaceholder": "Add context that helps moderation…",
|
||||
"report.send": "Send",
|
||||
"report.privacy": "Abusive reports may lead to your account being suspended.",
|
||||
"report.thanks": "Thanks for your report",
|
||||
"report.already": "Already reported",
|
||||
"report.thanksText": "The moderation team will review it. You can also block this account from their profile.",
|
||||
"report.errRate": "Too many reports today. Try again tomorrow.",
|
||||
"report.errNotFound": "This content no longer exists or is no longer visible to you.",
|
||||
"report.errUnavailable": "Reporting isn't available yet. Please try again later.",
|
||||
"block.block": "Block",
|
||||
"block.unblock": "Unblock",
|
||||
"block.done": "Account blocked: {name}",
|
||||
"block.undone": "Account unblocked: {name}",
|
||||
"block.notice": "You blocked this account: they can no longer follow you or react to your reviews, and their reviews are hidden from you.",
|
||||
"block.confirmTitle": "Block {name}?",
|
||||
"block.confirmText": "You'll no longer follow each other. This account won't be able to follow you or react to your reviews, and their reviews will be hidden from you. They won't be notified.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Contains spoilers",
|
||||
'spoiler.checkboxHint': "Your review will be hidden from others until they choose to read it.",
|
||||
'spoiler.warning': "This review contains spoilers",
|
||||
'spoiler.show': "Show spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Comments",
|
||||
'comments.none': "No comments yet. Start the conversation!",
|
||||
'comments.placeholder': "Write a comment…",
|
||||
'comments.send': "Send",
|
||||
'comments.delete': "Delete comment",
|
||||
'comments.deleteConfirm': "Delete this comment?",
|
||||
'comments.loadError': "Couldn’t load comments.",
|
||||
'comments.unavailable': "Comments are unavailable right now.",
|
||||
'comments.err.rate': "You’re commenting too fast — try again in a minute.",
|
||||
'comments.err.gone': "This review is no longer available.",
|
||||
'comments.err.invalid': "Comment is empty or too long (500 characters max).",
|
||||
'notif.review_comment': "commented on your review",
|
||||
'notif.shared_list_invite': "invited you to the shared list",
|
||||
'settings.notifComments': "Comments on my reviews",
|
||||
'settings.notifLists': "Shared list invitations",
|
||||
'shared.title': "Shared lists",
|
||||
'shared.hint': "Lists you build together: every member can add or remove titles.",
|
||||
'shared.new': "New shared list",
|
||||
'shared.namePh': "List name (e.g. Movies to watch together)",
|
||||
'shared.none': "No shared lists yet. Create one and invite your friends.",
|
||||
'shared.invitesYou': "invited you to join",
|
||||
'shared.accept': "Accept",
|
||||
'shared.decline': "Decline",
|
||||
'shared.by': "by {name}",
|
||||
'shared.badge': "Shared list",
|
||||
'shared.members': "Members",
|
||||
'shared.invite': "Invite",
|
||||
'shared.owner': "Owner",
|
||||
'shared.pending': "Pending",
|
||||
'shared.removeMember': "Remove {name} from the list",
|
||||
'shared.removeTitle': "Remove {title} from the list",
|
||||
'shared.addedBy': "Added by {name}",
|
||||
'shared.emptyText': "Add titles from their page or from your library.",
|
||||
'shared.delete': "Delete shared list",
|
||||
'shared.deleteConfirm': "The list “{name}” will be deleted for all its members.",
|
||||
'shared.leave': "Leave list",
|
||||
'shared.leaveShort': "Leave",
|
||||
'shared.leaveConfirm': "You will no longer see “{name}”. Its owner can invite you again.",
|
||||
'shared.notFound': "List not found",
|
||||
'shared.noCandidates': "No titles found in your library.",
|
||||
'shared.inviteTitle': "Invite members",
|
||||
'shared.inviteHint': "Invite people you follow or who follow you to “{name}”.",
|
||||
'shared.searchPeople': "Search a username…",
|
||||
'shared.noPeople': "Nobody to invite: only your followers and the people you follow can join the list.",
|
||||
'shared.inviteShort': "Invite",
|
||||
'shared.invited': "Invited",
|
||||
'shared.expired': "invitation expired",
|
||||
'shared.addTo': "Add to a shared list",
|
||||
'shared.unavailable': "Shared lists are unavailable right now.",
|
||||
'shared.err.rate': "Too many actions in a row — try again in a minute.",
|
||||
'shared.err.members': "This list has reached the maximum number of members.",
|
||||
'shared.err.lists': "You’ve reached the maximum number of shared lists.",
|
||||
'shared.err.full': "This list is full (500 titles).",
|
||||
'shared.err.notConnected': "You can only invite your followers and the people you follow.",
|
||||
'shared.err.forbidden': "Not allowed: you don’t have access to this list.",
|
||||
'comments.toggle_one': "{count} comment",
|
||||
'comments.toggle_other': "{count} comments",
|
||||
'shared.nMembers_one': "{count} member",
|
||||
'shared.nMembers_other': "{count} members",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Aviso legal",
|
||||
'legal.credits': "Créditos",
|
||||
'legal.tmdb': "Este producto usa la API de TMDB pero no está respaldado ni certificado por TMDB.",
|
||||
'notFound.title': "Esta escena se quedó en la sala de montaje",
|
||||
'notFound.text': "La página que buscas no existe o se ha movido.",
|
||||
'notFound.back': "Volver al inicio",
|
||||
'auth.newPasswordTitle': 'Elige tu nueva contraseña.',
|
||||
'auth.newPassword': 'Nueva contraseña',
|
||||
'auth.err.credentials': 'Correo o contraseña incorrectos.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} cambio pendiente",
|
||||
'sync.pending_other': "{count} cambios pendientes",
|
||||
'sync.now': "Sincronizar",
|
||||
// — Où regarder —
|
||||
'watch.title': "Dónde ver",
|
||||
'watch.flatrate': "Suscripción",
|
||||
'watch.free': "Gratis",
|
||||
'watch.rent': "Alquiler",
|
||||
'watch.buy': "Compra",
|
||||
'watch.country': "País",
|
||||
'watch.none': "No disponible en streaming en este país.",
|
||||
'watch.source': "Datos de JustWatch",
|
||||
'watch.open': "Ver en {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Etiquetas personales",
|
||||
"tags.placeholder": "comfort, halloween, volver a ver con Lea…",
|
||||
"tags.private": "Solo tú las ves, nunca en tu perfil.",
|
||||
"tags.filter": "Etiquetas personales",
|
||||
"select.start": "Seleccionar",
|
||||
"select.exit": "Salir de la selección",
|
||||
"select.all": "Seleccionar todo",
|
||||
"select.none": "Deseleccionar todo",
|
||||
"select.toggle": "Seleccionar «{title}»",
|
||||
"select.actions": "Acciones de la selección",
|
||||
"select.status": "Estado",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Etiqueta",
|
||||
"select.noLists": "Aún no hay listas: crea una abajo.",
|
||||
"select.inList": "Ya incluidos: {n}/{total}",
|
||||
"select.addTo": "Añadir a «{list}»",
|
||||
"select.removeFrom": "Quitar de «{list}»",
|
||||
"select.removeTag": "Quitar una etiqueta",
|
||||
"toast.undo": "Deshacer",
|
||||
"toast.undone": "Deshecho",
|
||||
"toast.undoFailed": "No se pudo deshacer",
|
||||
"toast.deleted": "«{title}» eliminado",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» quitado de «{list}»",
|
||||
"select.count_zero": "Ningún título seleccionado",
|
||||
"select.count_one": "{count} seleccionado",
|
||||
"select.count_other": "{count} seleccionados",
|
||||
"select.statusTitle_one": "Estado de {count} título",
|
||||
"select.statusTitle_other": "Estado de {count} títulos",
|
||||
"select.listTitle_one": "Listas · {count} título",
|
||||
"select.listTitle_other": "Listas · {count} títulos",
|
||||
"select.tagTitle_one": "Etiqueta · {count} título",
|
||||
"select.tagTitle_other": "Etiqueta · {count} títulos",
|
||||
"select.deleteConfirm_one": "¿Eliminar {count} título de tu biblioteca?",
|
||||
"select.deleteConfirm_other": "¿Eliminar {count} títulos de tu biblioteca?",
|
||||
"toast.deletedMany_one": "{count} título eliminado",
|
||||
"toast.deletedMany_other": "{count} títulos eliminados",
|
||||
"toast.statusMany_one": "{count} título → {status}",
|
||||
"toast.statusMany_other": "{count} títulos → {status}",
|
||||
"toast.addedToList_one": "{count} título añadido a «{list}»",
|
||||
"toast.addedToList_other": "{count} títulos añadidos a «{list}»",
|
||||
"toast.removedFromListMany_one": "{count} título quitado de «{list}»",
|
||||
"toast.removedFromListMany_other": "{count} títulos quitados de «{list}»",
|
||||
"toast.tagged_one": "#{tag} añadida a {count} título",
|
||||
"toast.tagged_other": "#{tag} añadida a {count} títulos",
|
||||
"toast.untagged_one": "#{tag} quitada de {count} título",
|
||||
"toast.untagged_other": "#{tag} quitada de {count} títulos",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importar desde otra app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Importar mi biblioteca",
|
||||
'import.chooseSource': "¿De dónde vienen tus títulos?",
|
||||
'import.src.letterboxd': "Películas, notas, diario, pendientes y favoritas",
|
||||
'import.src.tvtime': "Series seguidas y episodios vistos",
|
||||
'import.src.mal': "Lista de animes (exportación XML)",
|
||||
'import.src.anilist': "Lista de animes pública, por nombre de usuario",
|
||||
'import.how': "Obtener la exportación",
|
||||
'import.steps.letterboxd': "En letterboxd.com, abre Settings → Import & Export → Export your data.\nRecibes un archivo ZIP: suéltalo aquí tal cual (o sus archivos CSV).",
|
||||
'import.steps.tvtime': "En TV Time, solicita una copia de tus datos (Ajustes → Privacidad, o soporte «Request my data»).\nSuelta aquí el ZIP recibido por correo, o sus archivos CSV.",
|
||||
'import.steps.mal': "En myanimelist.net, abre tu perfil → Export (Anime List) → Export My List.\nSuelta aquí el archivo .xml.gz descargado (o el .xml).",
|
||||
'import.steps.anilist': "Tu lista de AniList debe ser pública (Settings → Lists).\nIndica tu nombre de usuario: no hace falta iniciar sesión.",
|
||||
'import.drop': "Elegir o soltar el archivo",
|
||||
'import.privacy': "El archivo se lee en tu dispositivo: solo se buscan los títulos en línea.",
|
||||
'import.userName': "Nombre de usuario de AniList",
|
||||
'import.continue': "Continuar",
|
||||
'import.back': "Volver",
|
||||
'import.reading': "Leyendo el archivo…",
|
||||
'import.resolving': "Buscando las fichas…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Límite de solicitudes alcanzado, se reanuda en {s} s…",
|
||||
'import.cancel': "Cancelar",
|
||||
'import.noTmdb': "Sin TMDB, las películas y series no se pueden reconocer: añade una clave en Ajustes → Bases de datos (o inicia sesión), o impórtalas sin póster.",
|
||||
'import.found': "Títulos leídos en la exportación: {n}",
|
||||
'import.new': "Fichas nuevas",
|
||||
'import.toUpdate': "Fichas completadas",
|
||||
'import.already': "Ya al día",
|
||||
'import.notFound': "No encontrados",
|
||||
'import.showNotFound': "Ver los títulos no encontrados",
|
||||
'import.hideNotFound': "Ocultar la lista",
|
||||
'import.includeUnmatched': "Añadir también los títulos no encontrados (sin póster)",
|
||||
'import.mergeHint': "No se sobrescribe nada: se conservan tus notas, estados y fechas más recientes, y no se crean duplicados.",
|
||||
'import.confirm': "Importar ({n})",
|
||||
'import.importing': "Importando…",
|
||||
'import.nothing': "Nada nuevo que importar.",
|
||||
'import.done': "Importación terminada",
|
||||
'import.doneAdded': "Añadidos",
|
||||
'import.close': "Terminar",
|
||||
'import.err.tooBig': "Archivo demasiado grande.",
|
||||
'import.err.badZip': "Archivo ZIP ilegible.",
|
||||
'import.err.encrypted': "Archivo protegido con contraseña: no se puede leer.",
|
||||
'import.err.unsupported': "Tu navegador no puede descomprimir este archivo: suelta mejor los archivos CSV / XML descomprimidos.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notificaciones en este dispositivo",
|
||||
'push.deviceHint': "Incluso con la app cerrada. Las opciones de abajo también se aplican.",
|
||||
'push.iosInstall': "En iPhone y iPad, primero añade AzuuCine a la pantalla de inicio (iOS 16.4 o posterior) y abre la app desde su icono para activar las notificaciones.",
|
||||
'push.unsupported': "Este navegador no admite notificaciones push.",
|
||||
'push.denied': "Las notificaciones están bloqueadas para este sitio. Permítelas en los ajustes del navegador y vuelve a intentarlo.",
|
||||
'push.notReady': "Las notificaciones push aún no están disponibles en el servidor.",
|
||||
'push.error': "No se pudieron activar las notificaciones. Comprueba tu conexión e inténtalo de nuevo.",
|
||||
'netPill.offlineSync': "Sin conexión — tus cambios se sincronizarán",
|
||||
'netPill.offlineLocal': "Sin conexión — todo queda guardado en este dispositivo",
|
||||
'netPill.synced': "Sincronizado",
|
||||
'netPill.hide': "Ocultar",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Vaya… algo ha salido mal",
|
||||
"crash.text": "La pantalla ha fallado. Tus datos están a salvo: recarga la app para continuar.",
|
||||
"crash.reload": "Recargar",
|
||||
"crash.retry": "Reintentar",
|
||||
"crash.privacy": "Cuando la app está en línea, el problema se nos notifica automáticamente, sin ningún dato personal.",
|
||||
"bug.title": "Informar de un error",
|
||||
"bug.hint": "Describe el problema y nos encargamos",
|
||||
"bug.hintLocal": "Contáctanos en rdacet.fr",
|
||||
"bug.intro": "Explica qué pasó y qué esperabas. Cuanto más preciso, más rápido se corrige.",
|
||||
"bug.description": "Descripción",
|
||||
"bug.placeholder": "Ej.: al abrir una serie desde Inicio, la lista de episodios sigue vacía…",
|
||||
"bug.techTitle": "Información técnica adjunta",
|
||||
"bug.techPrivacy": "Nada personal: ni tu correo ni tu biblioteca. El equipo ve tu nombre de usuario para poder responderte.",
|
||||
"bug.send": "Enviar",
|
||||
"bug.thanks": "¡Gracias!",
|
||||
"bug.thanksText": "Tu informe se ha enviado. Lo revisaremos lo antes posible.",
|
||||
"bug.info.version": "Versión",
|
||||
"bug.info.browser": "Navegador",
|
||||
"bug.info.os": "Sistema",
|
||||
"bug.info.lang": "Idioma",
|
||||
"bug.info.theme": "Tema",
|
||||
"bug.info.screen": "Pantalla",
|
||||
"bug.info.viewport": "Ventana",
|
||||
"bug.info.route": "Página",
|
||||
"bug.info.standalone": "App instalada",
|
||||
"bug.info.online": "En línea",
|
||||
"report.more": "Más opciones",
|
||||
"report.action": "Denunciar",
|
||||
"report.titleReview": "Denunciar esta reseña",
|
||||
"report.titleProfile": "Denunciar este perfil",
|
||||
"report.titleComment": "Denunciar este comentario",
|
||||
"report.titleList": "Denunciar esta lista",
|
||||
"report.intro": "La persona no sabrá quién la denunció. El equipo de moderación revisará tu denuncia.",
|
||||
"report.reason": "Motivo",
|
||||
"report.reason.spoiler": "Spoiler sin avisar",
|
||||
"report.reason.harassment": "Acoso o intimidación",
|
||||
"report.reason.hate": "Discurso de odio",
|
||||
"report.reason.sexual": "Contenido sexual",
|
||||
"report.reason.spam": "Spam o publicidad",
|
||||
"report.reason.impersonation": "Suplantación de identidad",
|
||||
"report.reason.other": "Otro",
|
||||
"report.details": "Detalles (opcional)",
|
||||
"report.detailsPlaceholder": "Añade contexto útil para la moderación…",
|
||||
"report.send": "Enviar",
|
||||
"report.privacy": "Las denuncias abusivas pueden suponer la suspensión de tu cuenta.",
|
||||
"report.thanks": "Gracias por tu denuncia",
|
||||
"report.already": "Ya denunciado",
|
||||
"report.thanksText": "El equipo de moderación lo revisará. También puedes bloquear esta cuenta desde su perfil.",
|
||||
"report.errRate": "Demasiadas denuncias hoy. Vuelve a intentarlo mañana.",
|
||||
"report.errNotFound": "Este contenido ya no existe o ya no es visible para ti.",
|
||||
"report.errUnavailable": "Las denuncias aún no están disponibles. Inténtalo más tarde.",
|
||||
"block.block": "Bloquear",
|
||||
"block.unblock": "Desbloquear",
|
||||
"block.done": "Cuenta bloqueada: {name}",
|
||||
"block.undone": "Cuenta desbloqueada: {name}",
|
||||
"block.notice": "Has bloqueado esta cuenta: ya no puede seguirte ni reaccionar a tus reseñas, y sus reseñas están ocultas para ti.",
|
||||
"block.confirmTitle": "¿Bloquear a {name}?",
|
||||
"block.confirmText": "Dejaréis de seguiros. Esta cuenta no podrá seguirte ni reaccionar a tus reseñas, y sus reseñas se te ocultarán. No recibirá ningún aviso.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Contiene spoilers",
|
||||
'spoiler.checkboxHint': "Tu reseña quedará oculta para los demás hasta que decidan leerla.",
|
||||
'spoiler.warning': "Esta reseña contiene spoilers",
|
||||
'spoiler.show': "Mostrar spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Comentarios",
|
||||
'comments.none': "Aún no hay comentarios. ¡Empieza la conversación!",
|
||||
'comments.placeholder': "Escribe un comentario…",
|
||||
'comments.send': "Enviar",
|
||||
'comments.delete': "Eliminar comentario",
|
||||
'comments.deleteConfirm': "¿Eliminar este comentario?",
|
||||
'comments.loadError': "No se pudieron cargar los comentarios.",
|
||||
'comments.unavailable': "Los comentarios no están disponibles por ahora.",
|
||||
'comments.err.rate': "Comentas demasiado rápido: vuelve a intentarlo en un minuto.",
|
||||
'comments.err.gone': "Esta reseña ya no está disponible.",
|
||||
'comments.err.invalid': "Comentario vacío o demasiado largo (máx. 500 caracteres).",
|
||||
'notif.review_comment': "comentó tu reseña",
|
||||
'notif.shared_list_invite': "te invitó a la lista compartida",
|
||||
'settings.notifComments': "Comentarios en mis reseñas",
|
||||
'settings.notifLists': "Invitaciones a listas compartidas",
|
||||
'shared.title': "Listas compartidas",
|
||||
'shared.hint': "Listas entre varios: cada miembro puede añadir o quitar títulos.",
|
||||
'shared.new': "Nueva lista compartida",
|
||||
'shared.namePh': "Nombre de la lista (p. ej. Pelis para ver juntos)",
|
||||
'shared.none': "Aún no tienes listas compartidas. Crea una e invita a tus amigos.",
|
||||
'shared.invitesYou': "te invitó a unirte a",
|
||||
'shared.accept': "Aceptar",
|
||||
'shared.decline': "Rechazar",
|
||||
'shared.by': "de {name}",
|
||||
'shared.badge': "Lista compartida",
|
||||
'shared.members': "Miembros",
|
||||
'shared.invite': "Invitar",
|
||||
'shared.owner': "Propietario",
|
||||
'shared.pending': "Pendiente",
|
||||
'shared.removeMember': "Quitar a {name} de la lista",
|
||||
'shared.removeTitle': "Quitar {title} de la lista",
|
||||
'shared.addedBy': "Añadido por {name}",
|
||||
'shared.emptyText': "Añade títulos desde su ficha o desde tu biblioteca.",
|
||||
'shared.delete': "Eliminar la lista compartida",
|
||||
'shared.deleteConfirm': "La lista «{name}» se eliminará para todos sus miembros.",
|
||||
'shared.leave': "Salir de la lista",
|
||||
'shared.leaveShort': "Salir",
|
||||
'shared.leaveConfirm': "Dejarás de ver la lista «{name}». Su propietario podrá volver a invitarte.",
|
||||
'shared.notFound': "Lista no encontrada",
|
||||
'shared.noCandidates': "No se encontraron títulos en tu biblioteca.",
|
||||
'shared.inviteTitle': "Invitar miembros",
|
||||
'shared.inviteHint': "Invita a «{name}» a personas que sigues o que te siguen.",
|
||||
'shared.searchPeople': "Buscar un usuario…",
|
||||
'shared.noPeople': "Nadie a quien invitar: solo tus seguidores y las personas que sigues pueden unirse.",
|
||||
'shared.inviteShort': "Invitar",
|
||||
'shared.invited': "Invitado",
|
||||
'shared.expired': "invitación caducada",
|
||||
'shared.addTo': "Añadir a una lista compartida",
|
||||
'shared.unavailable': "Las listas compartidas no están disponibles por ahora.",
|
||||
'shared.err.rate': "Demasiadas acciones seguidas: vuelve a intentarlo en un minuto.",
|
||||
'shared.err.members': "Esta lista alcanzó el número máximo de miembros.",
|
||||
'shared.err.lists': "Alcanzaste el número máximo de listas compartidas.",
|
||||
'shared.err.full': "Esta lista está llena (500 títulos).",
|
||||
'shared.err.notConnected': "Solo puedes invitar a tus seguidores y a las personas que sigues.",
|
||||
'shared.err.forbidden': "Acción no permitida: no tienes acceso a esta lista.",
|
||||
'comments.toggle_one': "{count} comentario",
|
||||
'comments.toggle_other': "{count} comentarios",
|
||||
'shared.nMembers_one': "{count} miembro",
|
||||
'shared.nMembers_other': "{count} miembros",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -189,6 +189,9 @@ const dict = {
|
||||
'legal.notice': "Mentions légales",
|
||||
'legal.credits': "Crédits",
|
||||
'legal.tmdb': "Cette application utilise l'API TMDB mais n'est ni approuvée ni certifiée par TMDB.",
|
||||
'notFound.title': "Cette scène a été coupée au montage",
|
||||
'notFound.text': "La page que tu cherches n'existe pas ou a été déplacée.",
|
||||
'notFound.back': "Retour à l'accueil",
|
||||
'auth.newPasswordTitle': 'Choisis ton nouveau mot de passe.',
|
||||
'auth.newPassword': 'Nouveau mot de passe',
|
||||
'auth.err.credentials': 'Email ou mot de passe incorrect.',
|
||||
@@ -896,6 +899,377 @@ const dict = {
|
||||
'sync.pending_one': "{count} modification en attente",
|
||||
'sync.pending_other': "{count} modifications en attente",
|
||||
'sync.now': "Synchroniser",
|
||||
// — Où regarder —
|
||||
'watch.title': "Où regarder",
|
||||
'watch.flatrate': "Abonnement",
|
||||
'watch.free': "Gratuit",
|
||||
'watch.rent': "Location",
|
||||
'watch.buy': "Achat",
|
||||
'watch.country': "Pays",
|
||||
'watch.none': "Pas disponible en streaming dans ce pays.",
|
||||
'watch.source': "Données JustWatch",
|
||||
'watch.open': "Regarder sur {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tags perso",
|
||||
"tags.placeholder": "comfort, halloween, à revoir avec Léa…",
|
||||
"tags.private": "Visibles par vous seul, jamais sur votre profil.",
|
||||
"tags.filter": "Tags perso",
|
||||
"select.start": "Sélectionner",
|
||||
"select.exit": "Quitter la sélection",
|
||||
"select.all": "Tout sélectionner",
|
||||
"select.none": "Tout désélectionner",
|
||||
"select.toggle": "Sélectionner « {title} »",
|
||||
"select.actions": "Actions sur la sélection",
|
||||
"select.status": "Statut",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Aucune liste pour l’instant : créez-en une ci-dessous.",
|
||||
"select.inList": "Déjà dedans : {n}/{total}",
|
||||
"select.addTo": "Ajouter à « {list} »",
|
||||
"select.removeFrom": "Retirer de « {list} »",
|
||||
"select.removeTag": "Retirer un tag",
|
||||
"toast.undo": "Annuler",
|
||||
"toast.undone": "Action annulée",
|
||||
"toast.undoFailed": "Impossible d’annuler",
|
||||
"toast.deleted": "« {title} » supprimé",
|
||||
"toast.status": "« {title} » → {status}",
|
||||
"toast.removedFromList": "« {title} » retiré de « {list} »",
|
||||
"select.count_zero": "Aucun titre sélectionné",
|
||||
"select.count_one": "{count} sélectionné",
|
||||
"select.count_other": "{count} sélectionnés",
|
||||
"select.statusTitle_one": "Statut de {count} titre",
|
||||
"select.statusTitle_other": "Statut de {count} titres",
|
||||
"select.listTitle_one": "Listes · {count} titre",
|
||||
"select.listTitle_other": "Listes · {count} titres",
|
||||
"select.tagTitle_one": "Tag · {count} titre",
|
||||
"select.tagTitle_other": "Tag · {count} titres",
|
||||
"select.deleteConfirm_one": "Supprimer {count} titre de votre bibliothèque ?",
|
||||
"select.deleteConfirm_other": "Supprimer {count} titres de votre bibliothèque ?",
|
||||
"toast.deletedMany_one": "{count} titre supprimé",
|
||||
"toast.deletedMany_other": "{count} titres supprimés",
|
||||
"toast.statusMany_one": "{count} titre → {status}",
|
||||
"toast.statusMany_other": "{count} titres → {status}",
|
||||
"toast.addedToList_one": "{count} titre ajouté à « {list} »",
|
||||
"toast.addedToList_other": "{count} titres ajoutés à « {list} »",
|
||||
"toast.removedFromListMany_one": "{count} titre retiré de « {list} »",
|
||||
"toast.removedFromListMany_other": "{count} titres retirés de « {list} »",
|
||||
"toast.tagged_one": "#{tag} ajouté à {count} titre",
|
||||
"toast.tagged_other": "#{tag} ajouté à {count} titres",
|
||||
"toast.untagged_one": "#{tag} retiré de {count} titre",
|
||||
"toast.untagged_other": "#{tag} retiré de {count} titres",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importer depuis une autre app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Importer ma bibliothèque",
|
||||
'import.chooseSource': "D'où viennent tes titres ?",
|
||||
'import.src.letterboxd': "Films, notes, journal, envies et coups de cœur",
|
||||
'import.src.tvtime': "Séries suivies et épisodes vus",
|
||||
'import.src.mal': "Liste d'animes (export XML)",
|
||||
'import.src.anilist': "Liste d'animes publique, par nom d'utilisateur",
|
||||
'import.how': "Récupérer l'export",
|
||||
'import.steps.letterboxd': "Sur letterboxd.com, ouvre Settings → Import & Export → Export your data.\nTu reçois un fichier ZIP : dépose-le ici tel quel (ou ses fichiers CSV).",
|
||||
'import.steps.tvtime': "Dans TV Time, demande une copie de tes données (Paramètres → Confidentialité, ou support « Request my data »).\nDépose ici le ZIP reçu par e-mail, ou ses fichiers CSV.",
|
||||
'import.steps.mal': "Sur myanimelist.net, ouvre ton profil → Export (Anime List) → Export My List.\nDépose ici le fichier .xml.gz téléchargé (ou le .xml).",
|
||||
'import.steps.anilist': "Ta liste AniList doit être publique (Settings → Lists).\nIndique ton nom d'utilisateur : aucune connexion n'est nécessaire.",
|
||||
'import.drop': "Choisir ou déposer le fichier",
|
||||
'import.privacy': "Le fichier est lu sur ton appareil : seuls les titres sont recherchés en ligne.",
|
||||
'import.userName': "Nom d'utilisateur AniList",
|
||||
'import.continue': "Continuer",
|
||||
'import.back': "Retour",
|
||||
'import.reading': "Lecture du fichier…",
|
||||
'import.resolving': "Recherche des fiches…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Limite de requêtes atteinte, reprise dans {s} s…",
|
||||
'import.cancel': "Annuler",
|
||||
'import.noTmdb': "Sans TMDB, les films et séries ne peuvent pas être reconnus : ajoute une clé dans Réglages → Bases de données (ou connecte-toi), ou importe-les sans affiche.",
|
||||
'import.found': "Titres lus dans l'export : {n}",
|
||||
'import.new': "Nouvelles fiches",
|
||||
'import.toUpdate': "Fiches complétées",
|
||||
'import.already': "Déjà à jour",
|
||||
'import.notFound': "Non trouvés",
|
||||
'import.showNotFound': "Voir les titres non trouvés",
|
||||
'import.hideNotFound': "Masquer la liste",
|
||||
'import.includeUnmatched': "Ajouter aussi les titres non trouvés (sans affiche)",
|
||||
'import.mergeHint': "Rien n'est écrasé : tes notes, statuts et dates plus récents sont gardés, et aucun doublon n'est créé.",
|
||||
'import.confirm': "Importer ({n})",
|
||||
'import.importing': "Import en cours…",
|
||||
'import.nothing': "Rien de nouveau à importer.",
|
||||
'import.done': "Import terminé",
|
||||
'import.doneAdded': "Ajoutés",
|
||||
'import.close': "Terminer",
|
||||
'import.err.tooBig': "Fichier trop volumineux.",
|
||||
'import.err.badZip': "Archive ZIP illisible.",
|
||||
'import.err.encrypted': "Archive protégée par un mot de passe : impossible de la lire.",
|
||||
'import.err.unsupported': "Ton navigateur ne sait pas décompresser ce fichier : dépose plutôt les fichiers CSV / XML décompressés.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifications sur cet appareil",
|
||||
'push.deviceHint': "Même quand l’app est fermée. Les choix ci-dessous s’appliquent aussi.",
|
||||
'push.iosInstall': "Sur iPhone et iPad, ajoute d’abord AzuuCine à l’écran d’accueil (iOS 16.4 ou plus récent), puis ouvre l’app depuis son icône pour activer les notifications.",
|
||||
'push.unsupported': "Ce navigateur ne gère pas les notifications push.",
|
||||
'push.denied': "Notifications bloquées pour ce site. Autorise-les dans les réglages du navigateur, puis réessaie.",
|
||||
'push.notReady': "Les notifications push ne sont pas encore disponibles sur le serveur.",
|
||||
'push.error': "Impossible d’activer les notifications. Vérifie ta connexion et réessaie.",
|
||||
'netPill.offlineSync': "Hors ligne — tes modifs seront synchronisées",
|
||||
'netPill.offlineLocal': "Hors ligne — tout reste enregistré sur cet appareil",
|
||||
'netPill.synced': "Synchronisé",
|
||||
'netPill.hide': "Masquer",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Oups… quelque chose s'est mal passé",
|
||||
"crash.text": "L'affichage a planté. Tes données sont en sécurité : recharge l'app pour repartir.",
|
||||
"crash.reload": "Recharger",
|
||||
"crash.retry": "Réessayer",
|
||||
"crash.privacy": "Quand l'app est en ligne, le problème nous est signalé automatiquement, sans aucune donnée personnelle.",
|
||||
"bug.title": "Signaler un bug",
|
||||
"bug.hint": "Décris le problème, on s'en occupe",
|
||||
"bug.hintLocal": "Contacte-nous via rdacet.fr",
|
||||
"bug.intro": "Explique ce qui s'est passé et ce que tu attendais. Plus c'est précis, plus c'est rapide à corriger.",
|
||||
"bug.description": "Description",
|
||||
"bug.placeholder": "Ex. : en ouvrant une série depuis l'accueil, la liste des épisodes reste vide…",
|
||||
"bug.techTitle": "Infos techniques jointes",
|
||||
"bug.techPrivacy": "Rien de personnel : ni ton e-mail, ni ta bibliothèque. L'équipe voit ton pseudo pour pouvoir te répondre.",
|
||||
"bug.send": "Envoyer",
|
||||
"bug.thanks": "Merci !",
|
||||
"bug.thanksText": "Ton signalement a bien été envoyé. On le regarde au plus vite.",
|
||||
"bug.info.version": "Version",
|
||||
"bug.info.browser": "Navigateur",
|
||||
"bug.info.os": "Système",
|
||||
"bug.info.lang": "Langue",
|
||||
"bug.info.theme": "Thème",
|
||||
"bug.info.screen": "Écran",
|
||||
"bug.info.viewport": "Fenêtre",
|
||||
"bug.info.route": "Page",
|
||||
"bug.info.standalone": "App installée",
|
||||
"bug.info.online": "En ligne",
|
||||
"report.more": "Plus d'options",
|
||||
"report.action": "Signaler",
|
||||
"report.titleReview": "Signaler cet avis",
|
||||
"report.titleProfile": "Signaler ce profil",
|
||||
"report.titleComment": "Signaler ce commentaire",
|
||||
"report.titleList": "Signaler cette liste",
|
||||
"report.intro": "La personne concernée ne saura pas qui l'a signalée. L'équipe de modération examinera ton signalement.",
|
||||
"report.reason": "Motif",
|
||||
"report.reason.spoiler": "Spoiler non signalé",
|
||||
"report.reason.harassment": "Harcèlement ou intimidation",
|
||||
"report.reason.hate": "Discours haineux",
|
||||
"report.reason.sexual": "Contenu sexuel",
|
||||
"report.reason.spam": "Spam ou publicité",
|
||||
"report.reason.impersonation": "Usurpation d'identité",
|
||||
"report.reason.other": "Autre",
|
||||
"report.details": "Précision (facultatif)",
|
||||
"report.detailsPlaceholder": "Ajoute un contexte utile pour la modération…",
|
||||
"report.send": "Envoyer",
|
||||
"report.privacy": "Les signalements abusifs peuvent entraîner la suspension de ton compte.",
|
||||
"report.thanks": "Merci pour ton signalement",
|
||||
"report.already": "Déjà signalé",
|
||||
"report.thanksText": "L'équipe de modération va l'examiner. Tu peux aussi bloquer ce compte depuis son profil.",
|
||||
"report.errRate": "Trop de signalements pour aujourd'hui. Réessaie demain.",
|
||||
"report.errNotFound": "Ce contenu n'existe plus ou ne t'est plus visible.",
|
||||
"report.errUnavailable": "Le signalement n'est pas encore disponible. Réessaie plus tard.",
|
||||
"block.block": "Bloquer",
|
||||
"block.unblock": "Débloquer",
|
||||
"block.done": "Compte bloqué : {name}",
|
||||
"block.undone": "Compte débloqué : {name}",
|
||||
"block.notice": "Tu as bloqué ce compte : il ne peut plus te suivre ni réagir à tes avis, et ses avis te sont masqués.",
|
||||
"block.confirmTitle": "Bloquer {name} ?",
|
||||
"block.confirmText": "Vous ne vous suivrez plus. Ce compte ne pourra plus te suivre ni réagir à tes avis, et ses avis te seront masqués. Il n'en est pas averti.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Signalements",
|
||||
"adminMod.tabSuspended": "Suspendus",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Erreurs",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Avis",
|
||||
"adminMod.typeProfile": "Profil",
|
||||
"adminMod.typeComment": "Commentaire",
|
||||
"adminMod.typeList": "Liste",
|
||||
"adminMod.reportCount_one": "{count} signalement",
|
||||
"adminMod.reportCount_other": "{count} signalements",
|
||||
"adminMod.repeat_one": "{count} contenu de ce compte signalé",
|
||||
"adminMod.repeat_other": "{count} contenus de ce compte signalés",
|
||||
"adminMod.contentGone": "Contenu effacé depuis — copie prise au moment du signalement :",
|
||||
"adminMod.noPreview": "Pas d'aperçu pour ce contenu (id {id}).",
|
||||
"adminMod.editedSince": "Modifié depuis le signalement — voir la version signalée",
|
||||
"adminMod.reportsDetail_one": "Voir le signalement",
|
||||
"adminMod.reportsDetail_other": "Voir les {count} derniers signalements",
|
||||
"adminMod.resetProfile": "Réinitialiser le profil",
|
||||
"adminMod.deleteContent": "Supprimer le contenu",
|
||||
"adminMod.resolve": "Marquer résolu",
|
||||
"adminMod.dismiss": "Classer sans suite",
|
||||
"adminMod.statusResolved": "Résolu",
|
||||
"adminMod.statusDismissed": "Classé sans suite",
|
||||
"adminMod.open": "À traiter",
|
||||
"adminMod.closed": "Traités",
|
||||
"adminMod.actionFailed": "Action impossible : {error}",
|
||||
"adminMod.migrationHint": "La migration SQL de modération n'est peut-être pas encore appliquée.",
|
||||
"adminMod.noOpen": "Aucun signalement en attente",
|
||||
"adminMod.noClosed": "Aucun signalement traité",
|
||||
"adminMod.confirmResetTitle": "Réinitialiser ce profil ?",
|
||||
"adminMod.confirmResetMsg": "La bio, la photo et la bannière seront effacées, et le nom affiché remplacé par le pseudo.",
|
||||
"adminMod.confirm": "Confirmer",
|
||||
"adminMod.noSuspended": "Aucun compte suspendu",
|
||||
"adminMod.suspendedOn": "Suspendu le {date}",
|
||||
"adminMod.suspendedUnknown": "Date de suspension inconnue",
|
||||
"adminMod.bugNew": "Nouveau",
|
||||
"adminMod.bugInProgress": "En cours",
|
||||
"adminMod.bugFixed": "Corrigé",
|
||||
"adminMod.all": "Tous",
|
||||
"adminMod.noBugs": "Aucun bug signalé",
|
||||
"adminMod.srcError": "Erreur JS",
|
||||
"adminMod.srcRejection": "Promesse rejetée",
|
||||
"adminMod.srcRender": "Plantage d'affichage",
|
||||
"adminMod.errNew": "Nouvelle",
|
||||
"adminMod.errFixed": "Corrigée",
|
||||
"adminMod.firstSeen": "Vue la 1re fois le {date}",
|
||||
"adminMod.stack": "Pile d'appels et navigateur",
|
||||
"adminMod.markFixed": "Marquer corrigée",
|
||||
"adminMod.forget": "Oublier",
|
||||
"adminMod.noErrors": "Aucune erreur remontée",
|
||||
"adminMod.noErrorsHint": "Les erreurs de l'app (sans donnée personnelle) apparaîtront ici.",
|
||||
"adminMod.alertReports_one": "{count} signalement",
|
||||
"adminMod.alertReports_other": "{count} signalements",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} nouvelle erreur",
|
||||
"adminMod.alertErrors_other": "{count} nouvelles erreurs",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Contient des spoilers",
|
||||
'spoiler.checkboxHint': "Ton avis sera masqué chez les autres jusqu’à ce qu’ils choisissent de le lire.",
|
||||
'spoiler.warning': "Cet avis contient des spoilers",
|
||||
'spoiler.show': "Afficher le spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Commentaires",
|
||||
'comments.none': "Pas encore de commentaire. Lance la discussion !",
|
||||
'comments.placeholder': "Écrire un commentaire…",
|
||||
'comments.send': "Envoyer",
|
||||
'comments.delete': "Supprimer le commentaire",
|
||||
'comments.deleteConfirm': "Supprimer ce commentaire ?",
|
||||
'comments.loadError': "Impossible de charger les commentaires.",
|
||||
'comments.unavailable': "Commentaires indisponibles pour le moment.",
|
||||
'comments.err.rate': "Tu commentes trop vite : réessaie dans une minute.",
|
||||
'comments.err.gone': "Cet avis n’est plus disponible.",
|
||||
'comments.err.invalid': "Commentaire vide ou trop long (500 caractères max).",
|
||||
'notif.review_comment': "a commenté ton avis",
|
||||
'notif.shared_list_invite': "t’invite dans la liste partagée",
|
||||
'settings.notifComments': "Commentaires sur mes avis",
|
||||
'settings.notifLists': "Invitations aux listes partagées",
|
||||
'shared.title': "Listes partagées",
|
||||
'shared.hint': "Des listes à plusieurs : chaque membre ajoute ou retire des titres.",
|
||||
'shared.new': "Nouvelle liste partagée",
|
||||
'shared.namePh': "Nom de la liste (ex. Films à voir à deux)",
|
||||
'shared.none': "Aucune liste partagée. Crées-en une et invite tes amis.",
|
||||
'shared.invitesYou': "t’invite à rejoindre",
|
||||
'shared.accept': "Accepter",
|
||||
'shared.decline': "Refuser",
|
||||
'shared.by': "par {name}",
|
||||
'shared.badge': "Liste partagée",
|
||||
'shared.members': "Membres",
|
||||
'shared.invite': "Inviter",
|
||||
'shared.owner': "Propriétaire",
|
||||
'shared.pending': "En attente",
|
||||
'shared.removeMember': "Retirer {name} de la liste",
|
||||
'shared.removeTitle': "Retirer {title} de la liste",
|
||||
'shared.addedBy': "Ajouté par {name}",
|
||||
'shared.emptyText': "Ajoute des titres depuis leur fiche ou depuis ta bibliothèque.",
|
||||
'shared.delete': "Supprimer la liste partagée",
|
||||
'shared.deleteConfirm': "La liste « {name} » sera supprimée pour tous ses membres.",
|
||||
'shared.leave': "Quitter la liste",
|
||||
'shared.leaveShort': "Quitter",
|
||||
'shared.leaveConfirm': "Tu ne verras plus la liste « {name} ». Son propriétaire pourra te réinviter.",
|
||||
'shared.notFound': "Liste introuvable",
|
||||
'shared.noCandidates': "Aucun titre trouvé dans ta bibliothèque.",
|
||||
'shared.inviteTitle': "Inviter des membres",
|
||||
'shared.inviteHint': "Invite des personnes que tu suis ou qui te suivent dans « {name} ».",
|
||||
'shared.searchPeople': "Chercher un pseudo…",
|
||||
'shared.noPeople': "Personne à inviter : seuls tes abonnés et tes abonnements peuvent rejoindre la liste.",
|
||||
'shared.inviteShort': "Inviter",
|
||||
'shared.invited': "Invité",
|
||||
'shared.expired': "invitation expirée",
|
||||
'shared.addTo': "Ajouter à une liste partagée",
|
||||
'shared.unavailable': "Listes partagées indisponibles pour le moment.",
|
||||
'shared.err.rate': "Trop d’actions d’affilée : réessaie dans une minute.",
|
||||
'shared.err.members': "Cette liste a atteint le nombre maximum de membres.",
|
||||
'shared.err.lists': "Tu as atteint le nombre maximum de listes partagées.",
|
||||
'shared.err.full': "Cette liste est pleine (500 titres).",
|
||||
'shared.err.notConnected': "Tu ne peux inviter que tes abonnés et tes abonnements.",
|
||||
'shared.err.forbidden': "Action impossible : tu n’as pas accès à cette liste.",
|
||||
'comments.toggle_one': "{count} commentaire",
|
||||
'comments.toggle_other': "{count} commentaires",
|
||||
'shared.nMembers_one': "{count} membre",
|
||||
'shared.nMembers_other': "{count} membres",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "कानूनी सूचना",
|
||||
'legal.credits': "श्रेय",
|
||||
'legal.tmdb': "यह उत्पाद TMDB API का उपयोग करता है, लेकिन TMDB द्वारा समर्थित या प्रमाणित नहीं है।",
|
||||
'notFound.title': "यह सीन एडिटिंग में कट गया",
|
||||
'notFound.text': "आप जो पेज ढूंढ रहे हैं वह मौजूद नहीं है या हटा दिया गया है।",
|
||||
'notFound.back': "होम पर लौटें",
|
||||
'auth.newPasswordTitle': 'अपना नया पासवर्ड चुनें।',
|
||||
'auth.newPassword': 'नया पासवर्ड',
|
||||
'auth.err.credentials': 'ईमेल या पासवर्ड गलत है।',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} बदलाव बाकी",
|
||||
'sync.pending_other': "{count} बदलाव बाकी",
|
||||
'sync.now': "अभी सिंक करें",
|
||||
// — Où regarder —
|
||||
'watch.title': "कहाँ देखें",
|
||||
'watch.flatrate': "सब्सक्रिप्शन",
|
||||
'watch.free': "मुफ़्त",
|
||||
'watch.rent': "किराया",
|
||||
'watch.buy': "खरीदें",
|
||||
'watch.country': "देश",
|
||||
'watch.none': "इस देश में स्ट्रीमिंग पर उपलब्ध नहीं।",
|
||||
'watch.source': "डेटा: JustWatch",
|
||||
'watch.open': "{name} पर देखें",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "निजी टैग",
|
||||
"tags.placeholder": "comfort, हैलोवीन, लेआ के साथ फिर देखें…",
|
||||
"tags.private": "सिर्फ़ आपको दिखते हैं, प्रोफ़ाइल पर कभी नहीं।",
|
||||
"tags.filter": "निजी टैग",
|
||||
"select.start": "चुनें",
|
||||
"select.exit": "चयन बंद करें",
|
||||
"select.all": "सभी चुनें",
|
||||
"select.none": "सभी का चयन हटाएँ",
|
||||
"select.toggle": "“{title}” चुनें",
|
||||
"select.actions": "चयन पर कार्रवाई",
|
||||
"select.status": "स्थिति",
|
||||
"select.list": "सूची",
|
||||
"select.tag": "टैग",
|
||||
"select.noLists": "अभी कोई सूची नहीं — नीचे एक बनाएँ।",
|
||||
"select.inList": "पहले से शामिल: {n}/{total}",
|
||||
"select.addTo": "“{list}” में जोड़ें",
|
||||
"select.removeFrom": "“{list}” से हटाएँ",
|
||||
"select.removeTag": "टैग हटाएँ",
|
||||
"toast.undo": "पूर्ववत करें",
|
||||
"toast.undone": "पूर्ववत किया गया",
|
||||
"toast.undoFailed": "पूर्ववत नहीं हो सका",
|
||||
"toast.deleted": "“{title}” हटाया गया",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” को “{list}” से हटाया गया",
|
||||
"select.count_zero": "कोई टाइटल नहीं चुना गया",
|
||||
"select.count_one": "{count} चुना गया",
|
||||
"select.count_other": "{count} चुने गए",
|
||||
"select.statusTitle_one": "{count} टाइटल की स्थिति",
|
||||
"select.statusTitle_other": "{count} टाइटल की स्थिति",
|
||||
"select.listTitle_one": "सूचियाँ · {count} टाइटल",
|
||||
"select.listTitle_other": "सूचियाँ · {count} टाइटल",
|
||||
"select.tagTitle_one": "टैग · {count} टाइटल",
|
||||
"select.tagTitle_other": "टैग · {count} टाइटल",
|
||||
"select.deleteConfirm_one": "अपनी लाइब्रेरी से {count} टाइटल हटाएँ?",
|
||||
"select.deleteConfirm_other": "अपनी लाइब्रेरी से {count} टाइटल हटाएँ?",
|
||||
"toast.deletedMany_one": "{count} टाइटल हटाया गया",
|
||||
"toast.deletedMany_other": "{count} टाइटल हटाए गए",
|
||||
"toast.statusMany_one": "{count} टाइटल → {status}",
|
||||
"toast.statusMany_other": "{count} टाइटल → {status}",
|
||||
"toast.addedToList_one": "{count} टाइटल “{list}” में जोड़ा गया",
|
||||
"toast.addedToList_other": "{count} टाइटल “{list}” में जोड़े गए",
|
||||
"toast.removedFromListMany_one": "{count} टाइटल “{list}” से हटाया गया",
|
||||
"toast.removedFromListMany_other": "{count} टाइटल “{list}” से हटाए गए",
|
||||
"toast.tagged_one": "#{tag} {count} टाइटल में जोड़ा गया",
|
||||
"toast.tagged_other": "#{tag} {count} टाइटल में जोड़ा गया",
|
||||
"toast.untagged_one": "#{tag} {count} टाइटल से हटाया गया",
|
||||
"toast.untagged_other": "#{tag} {count} टाइटल से हटाया गया",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "दूसरे ऐप से इंपोर्ट करें",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "मेरी लाइब्रेरी इंपोर्ट करें",
|
||||
'import.chooseSource': "आपके टाइटल कहाँ से आ रहे हैं?",
|
||||
'import.src.letterboxd': "फ़िल्में, रेटिंग, डायरी, वॉचलिस्ट और पसंद",
|
||||
'import.src.tvtime': "फ़ॉलो की गई सीरीज़ और देखे गए एपिसोड",
|
||||
'import.src.mal': "एनीमे सूची (XML एक्सपोर्ट)",
|
||||
'import.src.anilist': "सार्वजनिक एनीमे सूची, यूज़रनेम से",
|
||||
'import.how': "एक्सपोर्ट कैसे पाएँ",
|
||||
'import.steps.letterboxd': "letterboxd.com पर Settings → Import & Export → Export your data खोलें।\nआपको एक ZIP फ़ाइल मिलेगी: उसे जैसी है वैसी यहाँ छोड़ें (या उसकी CSV फ़ाइलें)।",
|
||||
'import.steps.tvtime': "TV Time में अपने डेटा की कॉपी माँगें (सेटिंग्स → प्राइवेसी, या सपोर्ट “Request my data”)।\nईमेल से मिली ZIP या उसकी CSV फ़ाइलें यहाँ छोड़ें।",
|
||||
'import.steps.mal': "myanimelist.net पर अपनी प्रोफ़ाइल → Export (Anime List) → Export My List खोलें।\nडाउनलोड की गई .xml.gz फ़ाइल (या .xml) यहाँ छोड़ें।",
|
||||
'import.steps.anilist': "आपकी AniList सूची सार्वजनिक होनी चाहिए (Settings → Lists)।\nअपना यूज़रनेम लिखें: लॉग इन की ज़रूरत नहीं।",
|
||||
'import.drop': "फ़ाइल चुनें या छोड़ें",
|
||||
'import.privacy': "फ़ाइल आपके डिवाइस पर पढ़ी जाती है: ऑनलाइन सिर्फ़ टाइटल खोजे जाते हैं।",
|
||||
'import.userName': "AniList यूज़रनेम",
|
||||
'import.continue': "आगे बढ़ें",
|
||||
'import.back': "वापस",
|
||||
'import.reading': "फ़ाइल पढ़ी जा रही है…",
|
||||
'import.resolving': "टाइटल खोजे जा रहे हैं…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "अनुरोध सीमा पूरी हुई, {s} सेकंड में फिर शुरू…",
|
||||
'import.cancel': "रद्द करें",
|
||||
'import.noTmdb': "TMDB के बिना फ़िल्में और सीरीज़ पहचानी नहीं जा सकतीं: सेटिंग्स → डेटाबेस में कुंजी जोड़ें (या लॉग इन करें), या उन्हें बिना पोस्टर के इंपोर्ट करें।",
|
||||
'import.found': "एक्सपोर्ट से पढ़े गए टाइटल: {n}",
|
||||
'import.new': "नई प्रविष्टियाँ",
|
||||
'import.toUpdate': "पूरी की गई प्रविष्टियाँ",
|
||||
'import.already': "पहले से अपडेट",
|
||||
'import.notFound': "नहीं मिले",
|
||||
'import.showNotFound': "न मिले टाइटल देखें",
|
||||
'import.hideNotFound': "सूची छिपाएँ",
|
||||
'import.includeUnmatched': "न मिले टाइटल भी जोड़ें (बिना पोस्टर)",
|
||||
'import.mergeHint': "कुछ भी ओवरराइट नहीं होता: आपकी नई रेटिंग, स्टेटस और तारीखें रहती हैं, और कोई डुप्लिकेट नहीं बनता।",
|
||||
'import.confirm': "इंपोर्ट करें ({n})",
|
||||
'import.importing': "इंपोर्ट हो रहा है…",
|
||||
'import.nothing': "इंपोर्ट करने को कुछ नया नहीं।",
|
||||
'import.done': "इंपोर्ट पूरा हुआ",
|
||||
'import.doneAdded': "जोड़े गए",
|
||||
'import.close': "पूरा",
|
||||
'import.err.tooBig': "फ़ाइल बहुत बड़ी है।",
|
||||
'import.err.badZip': "ZIP आर्काइव पढ़ा नहीं जा सका।",
|
||||
'import.err.encrypted': "पासवर्ड से सुरक्षित आर्काइव: पढ़ा नहीं जा सकता।",
|
||||
'import.err.unsupported': "आपका ब्राउज़र यह फ़ाइल अनज़िप नहीं कर सकता: अनज़िप की हुई CSV / XML फ़ाइलें छोड़ें।",
|
||||
'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} और चुनौतियाँ",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "इस डिवाइस पर सूचनाएँ",
|
||||
'push.deviceHint': "ऐप बंद होने पर भी। नीचे दिए विकल्प भी लागू होते हैं।",
|
||||
'push.iosInstall': "iPhone और iPad पर पहले AzuuCine को होम स्क्रीन पर जोड़ें (iOS 16.4 या नया), फिर सूचनाएँ चालू करने के लिए ऐप को उसके आइकन से खोलें।",
|
||||
'push.unsupported': "यह ब्राउज़र पुश सूचनाएँ सपोर्ट नहीं करता।",
|
||||
'push.denied': "इस साइट के लिए सूचनाएँ ब्लॉक हैं। ब्राउज़र सेटिंग्स में अनुमति दें, फिर दोबारा कोशिश करें।",
|
||||
'push.notReady': "पुश सूचनाएँ अभी सर्वर पर उपलब्ध नहीं हैं।",
|
||||
'push.error': "सूचनाएँ चालू नहीं हो सकीं। अपना कनेक्शन जाँचें और दोबारा कोशिश करें।",
|
||||
'netPill.offlineSync': "ऑफ़लाइन — आपके बदलाव सिंक हो जाएँगे",
|
||||
'netPill.offlineLocal': "ऑफ़लाइन — सब कुछ इस डिवाइस पर सहेजा रहता है",
|
||||
'netPill.synced': "सिंक हो गया",
|
||||
'netPill.hide': "छिपाएँ",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "उफ़… कुछ गड़बड़ हो गई",
|
||||
"crash.text": "स्क्रीन क्रैश हो गई। आपका डेटा सुरक्षित है: जारी रखने के लिए ऐप रीलोड करें।",
|
||||
"crash.reload": "रीलोड करें",
|
||||
"crash.retry": "फिर से कोशिश करें",
|
||||
"crash.privacy": "ऐप ऑनलाइन होने पर समस्या हमें अपने आप, बिना किसी निजी डेटा के, भेज दी जाती है।",
|
||||
"bug.title": "बग रिपोर्ट करें",
|
||||
"bug.hint": "समस्या बताइए, हम देख लेंगे",
|
||||
"bug.hintLocal": "rdacet.fr के ज़रिए संपर्क करें",
|
||||
"bug.intro": "बताइए क्या हुआ और आप क्या उम्मीद कर रहे थे। जितना सटीक, उतना जल्दी सुधार।",
|
||||
"bug.description": "विवरण",
|
||||
"bug.placeholder": "जैसे: होम से कोई सीरीज़ खोलने पर एपिसोड की सूची खाली रहती है…",
|
||||
"bug.techTitle": "संलग्न तकनीकी जानकारी",
|
||||
"bug.techPrivacy": "कुछ भी निजी नहीं: न आपका ईमेल, न आपकी लाइब्रेरी। जवाब देने के लिए टीम आपका यूज़रनेम देखती है।",
|
||||
"bug.send": "भेजें",
|
||||
"bug.thanks": "धन्यवाद!",
|
||||
"bug.thanksText": "आपकी रिपोर्ट भेज दी गई है। हम इसे जल्द से जल्द देखेंगे।",
|
||||
"bug.info.version": "संस्करण",
|
||||
"bug.info.browser": "ब्राउज़र",
|
||||
"bug.info.os": "सिस्टम",
|
||||
"bug.info.lang": "भाषा",
|
||||
"bug.info.theme": "थीम",
|
||||
"bug.info.screen": "स्क्रीन",
|
||||
"bug.info.viewport": "विंडो",
|
||||
"bug.info.route": "पेज",
|
||||
"bug.info.standalone": "इंस्टॉल किया गया ऐप",
|
||||
"bug.info.online": "ऑनलाइन",
|
||||
"report.more": "और विकल्प",
|
||||
"report.action": "रिपोर्ट करें",
|
||||
"report.titleReview": "इस समीक्षा की रिपोर्ट करें",
|
||||
"report.titleProfile": "इस प्रोफ़ाइल की रिपोर्ट करें",
|
||||
"report.titleComment": "इस टिप्पणी की रिपोर्ट करें",
|
||||
"report.titleList": "इस सूची की रिपोर्ट करें",
|
||||
"report.intro": "संबंधित व्यक्ति को पता नहीं चलेगा कि रिपोर्ट किसने की। मॉडरेशन टीम आपकी रिपोर्ट की जाँच करेगी।",
|
||||
"report.reason": "कारण",
|
||||
"report.reason.spoiler": "बिना चेतावनी का स्पॉइलर",
|
||||
"report.reason.harassment": "उत्पीड़न या धमकाना",
|
||||
"report.reason.hate": "नफ़रत भरी भाषा",
|
||||
"report.reason.sexual": "यौन सामग्री",
|
||||
"report.reason.spam": "स्पैम या विज्ञापन",
|
||||
"report.reason.impersonation": "किसी और का रूप धारण करना",
|
||||
"report.reason.other": "अन्य",
|
||||
"report.details": "विवरण (वैकल्पिक)",
|
||||
"report.detailsPlaceholder": "मॉडरेशन के लिए उपयोगी संदर्भ जोड़ें…",
|
||||
"report.send": "भेजें",
|
||||
"report.privacy": "गलत इरादे से की गई रिपोर्ट आपके खाते को निलंबित करवा सकती है।",
|
||||
"report.thanks": "रिपोर्ट के लिए धन्यवाद",
|
||||
"report.already": "पहले ही रिपोर्ट किया जा चुका है",
|
||||
"report.thanksText": "मॉडरेशन टीम इसकी जाँच करेगी। आप इस खाते को उसकी प्रोफ़ाइल से ब्लॉक भी कर सकते हैं।",
|
||||
"report.errRate": "आज बहुत सारी रिपोर्ट हो गईं। कल फिर कोशिश करें।",
|
||||
"report.errNotFound": "यह सामग्री अब मौजूद नहीं है या अब आपको दिखाई नहीं देती।",
|
||||
"report.errUnavailable": "रिपोर्ट करना अभी उपलब्ध नहीं है। बाद में कोशिश करें।",
|
||||
"block.block": "ब्लॉक करें",
|
||||
"block.unblock": "अनब्लॉक करें",
|
||||
"block.done": "खाता ब्लॉक किया गया: {name}",
|
||||
"block.undone": "खाता अनब्लॉक किया गया: {name}",
|
||||
"block.notice": "आपने इस खाते को ब्लॉक किया है: यह अब आपको फ़ॉलो नहीं कर सकता और न ही आपकी समीक्षाओं पर प्रतिक्रिया दे सकता है, और इसकी समीक्षाएँ आपसे छिपी हैं।",
|
||||
"block.confirmTitle": "{name} को ब्लॉक करें?",
|
||||
"block.confirmText": "आप एक-दूसरे को फ़ॉलो नहीं करेंगे। यह खाता आपको फ़ॉलो नहीं कर पाएगा और न ही आपकी समीक्षाओं पर प्रतिक्रिया दे पाएगा, और इसकी समीक्षाएँ आपसे छिपा दी जाएँगी। उसे कोई सूचना नहीं मिलेगी।",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "इसमें स्पॉइलर हैं",
|
||||
'spoiler.checkboxHint': "आपका रिव्यू दूसरों से तब तक छिपा रहेगा जब तक वे उसे पढ़ना न चुनें।",
|
||||
'spoiler.warning': "इस रिव्यू में स्पॉइलर हैं",
|
||||
'spoiler.show': "स्पॉइलर दिखाएँ",
|
||||
'spoiler.badge': "स्पॉइलर",
|
||||
'comments.title': "टिप्पणियाँ",
|
||||
'comments.none': "अभी कोई टिप्पणी नहीं। बातचीत शुरू करें!",
|
||||
'comments.placeholder': "टिप्पणी लिखें…",
|
||||
'comments.send': "भेजें",
|
||||
'comments.delete': "टिप्पणी हटाएँ",
|
||||
'comments.deleteConfirm': "यह टिप्पणी हटाएँ?",
|
||||
'comments.loadError': "टिप्पणियाँ लोड नहीं हो सकीं।",
|
||||
'comments.unavailable': "टिप्पणियाँ अभी उपलब्ध नहीं हैं।",
|
||||
'comments.err.rate': "आप बहुत तेज़ी से टिप्पणी कर रहे हैं — एक मिनट बाद फिर कोशिश करें।",
|
||||
'comments.err.gone': "यह रिव्यू अब उपलब्ध नहीं है।",
|
||||
'comments.err.invalid': "टिप्पणी खाली है या बहुत लंबी है (अधिकतम 500 अक्षर)।",
|
||||
'notif.review_comment': "ने आपके रिव्यू पर टिप्पणी की",
|
||||
'notif.shared_list_invite': "ने आपको साझा सूची में आमंत्रित किया",
|
||||
'settings.notifComments': "मेरे रिव्यू पर टिप्पणियाँ",
|
||||
'settings.notifLists': "साझा सूचियों के आमंत्रण",
|
||||
'shared.title': "साझा सूचियाँ",
|
||||
'shared.hint': "मिलकर बनाई गई सूचियाँ: हर सदस्य टाइटल जोड़ या हटा सकता है।",
|
||||
'shared.new': "नई साझा सूची",
|
||||
'shared.namePh': "सूची का नाम (जैसे साथ में देखने वाली फ़िल्में)",
|
||||
'shared.none': "अभी कोई साझा सूची नहीं। एक बनाएँ और दोस्तों को आमंत्रित करें।",
|
||||
'shared.invitesYou': "ने आपको इसमें शामिल होने का न्योता दिया:",
|
||||
'shared.accept': "स्वीकार करें",
|
||||
'shared.decline': "अस्वीकार करें",
|
||||
'shared.by': "{name} द्वारा",
|
||||
'shared.badge': "साझा सूची",
|
||||
'shared.members': "सदस्य",
|
||||
'shared.invite': "आमंत्रित करें",
|
||||
'shared.owner': "मालिक",
|
||||
'shared.pending': "प्रतीक्षा में",
|
||||
'shared.removeMember': "{name} को सूची से हटाएँ",
|
||||
'shared.removeTitle': "{title} को सूची से हटाएँ",
|
||||
'shared.addedBy': "{name} ने जोड़ा",
|
||||
'shared.emptyText': "टाइटल उनके पेज से या अपनी लाइब्रेरी से जोड़ें।",
|
||||
'shared.delete': "साझा सूची हटाएँ",
|
||||
'shared.deleteConfirm': "सूची “{name}” सभी सदस्यों के लिए हटा दी जाएगी।",
|
||||
'shared.leave': "सूची छोड़ें",
|
||||
'shared.leaveShort': "छोड़ें",
|
||||
'shared.leaveConfirm': "अब आपको सूची “{name}” नहीं दिखेगी। इसका मालिक आपको फिर से आमंत्रित कर सकता है।",
|
||||
'shared.notFound': "सूची नहीं मिली",
|
||||
'shared.noCandidates': "आपकी लाइब्रेरी में कोई टाइटल नहीं मिला।",
|
||||
'shared.inviteTitle': "सदस्य आमंत्रित करें",
|
||||
'shared.inviteHint': "“{name}” में उन लोगों को आमंत्रित करें जिन्हें आप फ़ॉलो करते हैं या जो आपको फ़ॉलो करते हैं।",
|
||||
'shared.searchPeople': "यूज़रनेम खोजें…",
|
||||
'shared.noPeople': "आमंत्रित करने के लिए कोई नहीं: केवल आपके फ़ॉलोअर्स और जिन्हें आप फ़ॉलो करते हैं, वही जुड़ सकते हैं।",
|
||||
'shared.inviteShort': "आमंत्रित करें",
|
||||
'shared.invited': "आमंत्रित",
|
||||
'shared.expired': "आमंत्रण की अवधि समाप्त",
|
||||
'shared.addTo': "साझा सूची में जोड़ें",
|
||||
'shared.unavailable': "साझा सूचियाँ अभी उपलब्ध नहीं हैं।",
|
||||
'shared.err.rate': "लगातार बहुत सारी कार्रवाइयाँ — एक मिनट बाद फिर कोशिश करें।",
|
||||
'shared.err.members': "इस सूची में सदस्यों की अधिकतम संख्या पूरी हो गई है।",
|
||||
'shared.err.lists': "आप साझा सूचियों की अधिकतम संख्या तक पहुँच गए हैं।",
|
||||
'shared.err.full': "यह सूची भर गई है (500 टाइटल)।",
|
||||
'shared.err.notConnected': "आप केवल अपने फ़ॉलोअर्स और जिन्हें आप फ़ॉलो करते हैं, उन्हें ही आमंत्रित कर सकते हैं।",
|
||||
'shared.err.forbidden': "अनुमति नहीं: इस सूची तक आपकी पहुँच नहीं है।",
|
||||
'comments.toggle_one': "{count} टिप्पणी",
|
||||
'comments.toggle_other': "{count} टिप्पणियाँ",
|
||||
'shared.nMembers_one': "{count} सदस्य",
|
||||
'shared.nMembers_other': "{count} सदस्य",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Informasi hukum",
|
||||
'legal.credits': "Kredit",
|
||||
'legal.tmdb': "Produk ini menggunakan API TMDB tetapi tidak didukung atau disertifikasi oleh TMDB.",
|
||||
'notFound.title': "Adegan ini terpotong saat penyuntingan",
|
||||
'notFound.text': "Halaman yang kamu cari tidak ada atau sudah dipindahkan.",
|
||||
'notFound.back': "Kembali ke beranda",
|
||||
'auth.newPasswordTitle': 'Pilih kata sandi barumu.',
|
||||
'auth.newPassword': 'Kata sandi baru',
|
||||
'auth.err.credentials': 'Email atau kata sandi salah.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} perubahan menunggu",
|
||||
'sync.pending_other': "{count} perubahan menunggu",
|
||||
'sync.now': "Sinkronkan",
|
||||
// — Où regarder —
|
||||
'watch.title': "Tempat menonton",
|
||||
'watch.flatrate': "Langganan",
|
||||
'watch.free': "Gratis",
|
||||
'watch.rent': "Sewa",
|
||||
'watch.buy': "Beli",
|
||||
'watch.country': "Negara",
|
||||
'watch.none': "Tidak tersedia untuk streaming di negara ini.",
|
||||
'watch.source': "Data dari JustWatch",
|
||||
'watch.open': "Tonton di {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tag pribadi",
|
||||
"tags.placeholder": "comfort, halloween, tonton ulang bareng Lea…",
|
||||
"tags.private": "Hanya terlihat olehmu, tidak pernah di profil.",
|
||||
"tags.filter": "Tag pribadi",
|
||||
"select.start": "Pilih",
|
||||
"select.exit": "Keluar dari pilihan",
|
||||
"select.all": "Pilih semua",
|
||||
"select.none": "Batalkan semua pilihan",
|
||||
"select.toggle": "Pilih “{title}”",
|
||||
"select.actions": "Tindakan untuk pilihan",
|
||||
"select.status": "Status",
|
||||
"select.list": "Daftar",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Belum ada daftar — buat di bawah.",
|
||||
"select.inList": "Sudah ada: {n}/{total}",
|
||||
"select.addTo": "Tambahkan ke “{list}”",
|
||||
"select.removeFrom": "Hapus dari “{list}”",
|
||||
"select.removeTag": "Hapus tag",
|
||||
"toast.undo": "Urungkan",
|
||||
"toast.undone": "Diurungkan",
|
||||
"toast.undoFailed": "Gagal mengurungkan",
|
||||
"toast.deleted": "“{title}” dihapus",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” dihapus dari “{list}”",
|
||||
"select.count_zero": "Belum ada judul dipilih",
|
||||
"select.count_one": "{count} dipilih",
|
||||
"select.count_other": "{count} dipilih",
|
||||
"select.statusTitle_one": "Status {count} judul",
|
||||
"select.statusTitle_other": "Status {count} judul",
|
||||
"select.listTitle_one": "Daftar · {count} judul",
|
||||
"select.listTitle_other": "Daftar · {count} judul",
|
||||
"select.tagTitle_one": "Tag · {count} judul",
|
||||
"select.tagTitle_other": "Tag · {count} judul",
|
||||
"select.deleteConfirm_one": "Hapus {count} judul dari koleksimu?",
|
||||
"select.deleteConfirm_other": "Hapus {count} judul dari koleksimu?",
|
||||
"toast.deletedMany_one": "{count} judul dihapus",
|
||||
"toast.deletedMany_other": "{count} judul dihapus",
|
||||
"toast.statusMany_one": "{count} judul → {status}",
|
||||
"toast.statusMany_other": "{count} judul → {status}",
|
||||
"toast.addedToList_one": "{count} judul ditambahkan ke “{list}”",
|
||||
"toast.addedToList_other": "{count} judul ditambahkan ke “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} judul dihapus dari “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} judul dihapus dari “{list}”",
|
||||
"toast.tagged_one": "#{tag} ditambahkan ke {count} judul",
|
||||
"toast.tagged_other": "#{tag} ditambahkan ke {count} judul",
|
||||
"toast.untagged_one": "#{tag} dihapus dari {count} judul",
|
||||
"toast.untagged_other": "#{tag} dihapus dari {count} judul",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Impor dari aplikasi lain",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Impor perpustakaanku",
|
||||
'import.chooseSource': "Dari mana judul-judulmu berasal?",
|
||||
'import.src.letterboxd': "Film, rating, diary, watchlist, dan suka",
|
||||
'import.src.tvtime': "Serial yang diikuti dan episode yang ditonton",
|
||||
'import.src.mal': "Daftar anime (ekspor XML)",
|
||||
'import.src.anilist': "Daftar anime publik, lewat nama pengguna",
|
||||
'import.how': "Cara mendapatkan ekspor",
|
||||
'import.steps.letterboxd': "Di letterboxd.com, buka Settings → Import & Export → Export your data.\nKamu akan mendapat file ZIP: letakkan di sini apa adanya (atau file CSV-nya).",
|
||||
'import.steps.tvtime': "Di TV Time, minta salinan datamu (Pengaturan → Privasi, atau dukungan “Request my data”).\nLetakkan di sini ZIP yang diterima lewat email, atau file CSV-nya.",
|
||||
'import.steps.mal': "Di myanimelist.net, buka profil → Export (Anime List) → Export My List.\nLetakkan file .xml.gz yang diunduh (atau .xml) di sini.",
|
||||
'import.steps.anilist': "Daftar AniList-mu harus publik (Settings → Lists).\nMasukkan nama pengguna: tidak perlu masuk.",
|
||||
'import.drop': "Pilih atau letakkan file",
|
||||
'import.privacy': "File dibaca di perangkatmu: hanya judul yang dicari secara online.",
|
||||
'import.userName': "Nama pengguna AniList",
|
||||
'import.continue': "Lanjut",
|
||||
'import.back': "Kembali",
|
||||
'import.reading': "Membaca file…",
|
||||
'import.resolving': "Mencari judul…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Batas permintaan tercapai, lanjut dalam {s} dtk…",
|
||||
'import.cancel': "Batal",
|
||||
'import.noTmdb': "Tanpa TMDB, film dan serial tidak bisa dikenali: tambahkan kunci di Pengaturan → Basis data (atau masuk), atau impor tanpa poster.",
|
||||
'import.found': "Judul yang terbaca dari ekspor: {n}",
|
||||
'import.new': "Entri baru",
|
||||
'import.toUpdate': "Entri dilengkapi",
|
||||
'import.already': "Sudah terbaru",
|
||||
'import.notFound': "Tidak ditemukan",
|
||||
'import.showNotFound': "Lihat judul yang tidak ditemukan",
|
||||
'import.hideNotFound': "Sembunyikan daftar",
|
||||
'import.includeUnmatched': "Tambahkan juga judul yang tidak ditemukan (tanpa poster)",
|
||||
'import.mergeHint': "Tidak ada yang ditimpa: rating, status, dan tanggal terbarumu tetap disimpan, dan tidak ada duplikat.",
|
||||
'import.confirm': "Impor ({n})",
|
||||
'import.importing': "Mengimpor…",
|
||||
'import.nothing': "Tidak ada yang baru untuk diimpor.",
|
||||
'import.done': "Impor selesai",
|
||||
'import.doneAdded': "Ditambahkan",
|
||||
'import.close': "Selesai",
|
||||
'import.err.tooBig': "File terlalu besar.",
|
||||
'import.err.badZip': "Arsip ZIP tidak terbaca.",
|
||||
'import.err.encrypted': "Arsip dilindungi kata sandi: tidak bisa dibaca.",
|
||||
'import.err.unsupported': "Browsermu tidak bisa mengekstrak file ini: letakkan file CSV / XML yang sudah diekstrak.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifikasi di perangkat ini",
|
||||
'push.deviceHint': "Bahkan saat aplikasi ditutup. Pilihan di bawah juga berlaku.",
|
||||
'push.iosInstall': "Di iPhone dan iPad, tambahkan dulu AzuuCine ke Layar Utama (iOS 16.4 atau lebih baru), lalu buka aplikasi dari ikonnya untuk mengaktifkan notifikasi.",
|
||||
'push.unsupported': "Browser ini tidak mendukung notifikasi push.",
|
||||
'push.denied': "Notifikasi diblokir untuk situs ini. Izinkan di pengaturan browser, lalu coba lagi.",
|
||||
'push.notReady': "Notifikasi push belum tersedia di server.",
|
||||
'push.error': "Tidak dapat mengaktifkan notifikasi. Periksa koneksimu dan coba lagi.",
|
||||
'netPill.offlineSync': "Offline — perubahanmu akan disinkronkan",
|
||||
'netPill.offlineLocal': "Offline — semuanya tetap tersimpan di perangkat ini",
|
||||
'netPill.synced': "Tersinkron",
|
||||
'netPill.hide': "Sembunyikan",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ups… ada yang salah",
|
||||
"crash.text": "Tampilan mengalami crash. Datamu aman: muat ulang aplikasi untuk melanjutkan.",
|
||||
"crash.reload": "Muat ulang",
|
||||
"crash.retry": "Coba lagi",
|
||||
"crash.privacy": "Saat aplikasi online, masalah dilaporkan ke kami secara otomatis, tanpa data pribadi apa pun.",
|
||||
"bug.title": "Laporkan bug",
|
||||
"bug.hint": "Jelaskan masalahnya, kami akan menanganinya",
|
||||
"bug.hintLocal": "Hubungi kami lewat rdacet.fr",
|
||||
"bug.intro": "Jelaskan apa yang terjadi dan apa yang kamu harapkan. Semakin jelas, semakin cepat diperbaiki.",
|
||||
"bug.description": "Deskripsi",
|
||||
"bug.placeholder": "Mis.: saat membuka serial dari Beranda, daftar episode tetap kosong…",
|
||||
"bug.techTitle": "Info teknis terlampir",
|
||||
"bug.techPrivacy": "Tidak ada yang pribadi: bukan emailmu, bukan pustakamu. Tim melihat nama penggunamu agar bisa membalas.",
|
||||
"bug.send": "Kirim",
|
||||
"bug.thanks": "Terima kasih!",
|
||||
"bug.thanksText": "Laporanmu sudah terkirim. Kami akan memeriksanya secepatnya.",
|
||||
"bug.info.version": "Versi",
|
||||
"bug.info.browser": "Peramban",
|
||||
"bug.info.os": "Sistem",
|
||||
"bug.info.lang": "Bahasa",
|
||||
"bug.info.theme": "Tema",
|
||||
"bug.info.screen": "Layar",
|
||||
"bug.info.viewport": "Jendela",
|
||||
"bug.info.route": "Halaman",
|
||||
"bug.info.standalone": "Aplikasi terpasang",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Opsi lainnya",
|
||||
"report.action": "Laporkan",
|
||||
"report.titleReview": "Laporkan ulasan ini",
|
||||
"report.titleProfile": "Laporkan profil ini",
|
||||
"report.titleComment": "Laporkan komentar ini",
|
||||
"report.titleList": "Laporkan daftar ini",
|
||||
"report.intro": "Orang tersebut tidak akan tahu siapa yang melaporkannya. Tim moderasi akan meninjau laporanmu.",
|
||||
"report.reason": "Alasan",
|
||||
"report.reason.spoiler": "Spoiler tanpa peringatan",
|
||||
"report.reason.harassment": "Pelecehan atau perundungan",
|
||||
"report.reason.hate": "Ujaran kebencian",
|
||||
"report.reason.sexual": "Konten seksual",
|
||||
"report.reason.spam": "Spam atau iklan",
|
||||
"report.reason.impersonation": "Peniruan identitas",
|
||||
"report.reason.other": "Lainnya",
|
||||
"report.details": "Detail (opsional)",
|
||||
"report.detailsPlaceholder": "Tambahkan konteks yang berguna untuk moderasi…",
|
||||
"report.send": "Kirim",
|
||||
"report.privacy": "Laporan yang disalahgunakan dapat membuat akunmu ditangguhkan.",
|
||||
"report.thanks": "Terima kasih atas laporanmu",
|
||||
"report.already": "Sudah dilaporkan",
|
||||
"report.thanksText": "Tim moderasi akan meninjaunya. Kamu juga bisa memblokir akun ini dari profilnya.",
|
||||
"report.errRate": "Terlalu banyak laporan hari ini. Coba lagi besok.",
|
||||
"report.errNotFound": "Konten ini sudah tidak ada atau tidak lagi terlihat olehmu.",
|
||||
"report.errUnavailable": "Fitur laporan belum tersedia. Coba lagi nanti.",
|
||||
"block.block": "Blokir",
|
||||
"block.unblock": "Buka blokir",
|
||||
"block.done": "Akun diblokir: {name}",
|
||||
"block.undone": "Blokir dibuka: {name}",
|
||||
"block.notice": "Kamu memblokir akun ini: akun ini tidak bisa lagi mengikutimu atau bereaksi pada ulasanmu, dan ulasannya disembunyikan darimu.",
|
||||
"block.confirmTitle": "Blokir {name}?",
|
||||
"block.confirmText": "Kalian tidak akan saling mengikuti lagi. Akun ini tidak bisa mengikutimu atau bereaksi pada ulasanmu, dan ulasannya akan disembunyikan darimu. Akun ini tidak diberi tahu.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Mengandung spoiler",
|
||||
'spoiler.checkboxHint': "Ulasanmu akan disembunyikan dari orang lain sampai mereka memilih untuk membacanya.",
|
||||
'spoiler.warning': "Ulasan ini mengandung spoiler",
|
||||
'spoiler.show': "Tampilkan spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Komentar",
|
||||
'comments.none': "Belum ada komentar. Mulai percakapan!",
|
||||
'comments.placeholder': "Tulis komentar…",
|
||||
'comments.send': "Kirim",
|
||||
'comments.delete': "Hapus komentar",
|
||||
'comments.deleteConfirm': "Hapus komentar ini?",
|
||||
'comments.loadError': "Gagal memuat komentar.",
|
||||
'comments.unavailable': "Komentar sedang tidak tersedia.",
|
||||
'comments.err.rate': "Kamu berkomentar terlalu cepat — coba lagi dalam satu menit.",
|
||||
'comments.err.gone': "Ulasan ini sudah tidak tersedia.",
|
||||
'comments.err.invalid': "Komentar kosong atau terlalu panjang (maks. 500 karakter).",
|
||||
'notif.review_comment': "mengomentari ulasanmu",
|
||||
'notif.shared_list_invite': "mengundangmu ke daftar bersama",
|
||||
'settings.notifComments': "Komentar di ulasanku",
|
||||
'settings.notifLists': "Undangan daftar bersama",
|
||||
'shared.title': "Daftar bersama",
|
||||
'shared.hint': "Daftar yang dibuat bersama: setiap anggota bisa menambah atau menghapus judul.",
|
||||
'shared.new': "Daftar bersama baru",
|
||||
'shared.namePh': "Nama daftar (mis. Film untuk ditonton berdua)",
|
||||
'shared.none': "Belum ada daftar bersama. Buat satu dan undang temanmu.",
|
||||
'shared.invitesYou': "mengundangmu bergabung ke",
|
||||
'shared.accept': "Terima",
|
||||
'shared.decline': "Tolak",
|
||||
'shared.by': "oleh {name}",
|
||||
'shared.badge': "Daftar bersama",
|
||||
'shared.members': "Anggota",
|
||||
'shared.invite': "Undang",
|
||||
'shared.owner': "Pemilik",
|
||||
'shared.pending': "Menunggu",
|
||||
'shared.removeMember': "Keluarkan {name} dari daftar",
|
||||
'shared.removeTitle': "Hapus {title} dari daftar",
|
||||
'shared.addedBy': "Ditambahkan oleh {name}",
|
||||
'shared.emptyText': "Tambahkan judul dari halamannya atau dari pustakamu.",
|
||||
'shared.delete': "Hapus daftar bersama",
|
||||
'shared.deleteConfirm': "Daftar “{name}” akan dihapus untuk semua anggotanya.",
|
||||
'shared.leave': "Keluar dari daftar",
|
||||
'shared.leaveShort': "Keluar",
|
||||
'shared.leaveConfirm': "Kamu tidak akan melihat daftar “{name}” lagi. Pemiliknya bisa mengundangmu kembali.",
|
||||
'shared.notFound': "Daftar tidak ditemukan",
|
||||
'shared.noCandidates': "Tidak ada judul di pustakamu.",
|
||||
'shared.inviteTitle': "Undang anggota",
|
||||
'shared.inviteHint': "Undang orang yang kamu ikuti atau yang mengikutimu ke “{name}”.",
|
||||
'shared.searchPeople': "Cari nama pengguna…",
|
||||
'shared.noPeople': "Tidak ada yang bisa diundang: hanya pengikut dan yang kamu ikuti yang bisa bergabung.",
|
||||
'shared.inviteShort': "Undang",
|
||||
'shared.invited': "Diundang",
|
||||
'shared.expired': "undangan kedaluwarsa",
|
||||
'shared.addTo': "Tambahkan ke daftar bersama",
|
||||
'shared.unavailable': "Daftar bersama sedang tidak tersedia.",
|
||||
'shared.err.rate': "Terlalu banyak tindakan berturut-turut — coba lagi dalam satu menit.",
|
||||
'shared.err.members': "Daftar ini sudah mencapai jumlah anggota maksimum.",
|
||||
'shared.err.lists': "Kamu sudah mencapai jumlah maksimum daftar bersama.",
|
||||
'shared.err.full': "Daftar ini penuh (500 judul).",
|
||||
'shared.err.notConnected': "Kamu hanya bisa mengundang pengikut dan orang yang kamu ikuti.",
|
||||
'shared.err.forbidden': "Tidak diizinkan: kamu tidak punya akses ke daftar ini.",
|
||||
'comments.toggle_one': "{count} komentar",
|
||||
'comments.toggle_other': "{count} komentar",
|
||||
'shared.nMembers_one': "{count} anggota",
|
||||
'shared.nMembers_other': "{count} anggota",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Note legali",
|
||||
'legal.credits': "Crediti",
|
||||
'legal.tmdb': "Questo prodotto usa l'API di TMDB ma non è approvato né certificato da TMDB.",
|
||||
'notFound.title': "Questa scena è stata tagliata al montaggio",
|
||||
'notFound.text': "La pagina che cerchi non esiste o è stata spostata.",
|
||||
'notFound.back': "Torna alla home",
|
||||
'auth.newPasswordTitle': 'Scegli la tua nuova password.',
|
||||
'auth.newPassword': 'Nuova password',
|
||||
'auth.err.credentials': 'Email o password errata.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} modifica in attesa",
|
||||
'sync.pending_other': "{count} modifiche in attesa",
|
||||
'sync.now': "Sincronizza",
|
||||
// — Où regarder —
|
||||
'watch.title': "Dove guardarlo",
|
||||
'watch.flatrate': "Abbonamento",
|
||||
'watch.free': "Gratis",
|
||||
'watch.rent': "Noleggio",
|
||||
'watch.buy': "Acquisto",
|
||||
'watch.country': "Paese",
|
||||
'watch.none': "Non disponibile in streaming in questo paese.",
|
||||
'watch.source': "Dati JustWatch",
|
||||
'watch.open': "Guarda su {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tag personali",
|
||||
"tags.placeholder": "comfort, halloween, da rivedere con Lea…",
|
||||
"tags.private": "Visibili solo a te, mai sul tuo profilo.",
|
||||
"tags.filter": "Tag personali",
|
||||
"select.start": "Seleziona",
|
||||
"select.exit": "Esci dalla selezione",
|
||||
"select.all": "Seleziona tutto",
|
||||
"select.none": "Deseleziona tutto",
|
||||
"select.toggle": "Seleziona «{title}»",
|
||||
"select.actions": "Azioni sulla selezione",
|
||||
"select.status": "Stato",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Ancora nessuna lista: creane una qui sotto.",
|
||||
"select.inList": "Già presenti: {n}/{total}",
|
||||
"select.addTo": "Aggiungi a «{list}»",
|
||||
"select.removeFrom": "Rimuovi da «{list}»",
|
||||
"select.removeTag": "Rimuovi un tag",
|
||||
"toast.undo": "Annulla",
|
||||
"toast.undone": "Annullato",
|
||||
"toast.undoFailed": "Impossibile annullare",
|
||||
"toast.deleted": "«{title}» eliminato",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» rimosso da «{list}»",
|
||||
"select.count_zero": "Nessun titolo selezionato",
|
||||
"select.count_one": "{count} selezionato",
|
||||
"select.count_other": "{count} selezionati",
|
||||
"select.statusTitle_one": "Stato di {count} titolo",
|
||||
"select.statusTitle_other": "Stato di {count} titoli",
|
||||
"select.listTitle_one": "Liste · {count} titolo",
|
||||
"select.listTitle_other": "Liste · {count} titoli",
|
||||
"select.tagTitle_one": "Tag · {count} titolo",
|
||||
"select.tagTitle_other": "Tag · {count} titoli",
|
||||
"select.deleteConfirm_one": "Eliminare {count} titolo dalla tua libreria?",
|
||||
"select.deleteConfirm_other": "Eliminare {count} titoli dalla tua libreria?",
|
||||
"toast.deletedMany_one": "{count} titolo eliminato",
|
||||
"toast.deletedMany_other": "{count} titoli eliminati",
|
||||
"toast.statusMany_one": "{count} titolo → {status}",
|
||||
"toast.statusMany_other": "{count} titoli → {status}",
|
||||
"toast.addedToList_one": "{count} titolo aggiunto a «{list}»",
|
||||
"toast.addedToList_other": "{count} titoli aggiunti a «{list}»",
|
||||
"toast.removedFromListMany_one": "{count} titolo rimosso da «{list}»",
|
||||
"toast.removedFromListMany_other": "{count} titoli rimossi da «{list}»",
|
||||
"toast.tagged_one": "#{tag} aggiunto a {count} titolo",
|
||||
"toast.tagged_other": "#{tag} aggiunto a {count} titoli",
|
||||
"toast.untagged_one": "#{tag} rimosso da {count} titolo",
|
||||
"toast.untagged_other": "#{tag} rimosso da {count} titoli",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importa da un'altra app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Importa la mia libreria",
|
||||
'import.chooseSource': "Da dove arrivano i tuoi titoli?",
|
||||
'import.src.letterboxd': "Film, voti, diario, da vedere e preferiti",
|
||||
'import.src.tvtime': "Serie seguite ed episodi visti",
|
||||
'import.src.mal': "Lista anime (esportazione XML)",
|
||||
'import.src.anilist': "Lista anime pubblica, per nome utente",
|
||||
'import.how': "Ottenere l'esportazione",
|
||||
'import.steps.letterboxd': "Su letterboxd.com, apri Settings → Import & Export → Export your data.\nRicevi un file ZIP: rilascialo qui così com’è (o i suoi file CSV).",
|
||||
'import.steps.tvtime': "In TV Time, richiedi una copia dei tuoi dati (Impostazioni → Privacy, o supporto «Request my data»).\nRilascia qui lo ZIP ricevuto via e-mail, o i suoi file CSV.",
|
||||
'import.steps.mal': "Su myanimelist.net, apri il profilo → Export (Anime List) → Export My List.\nRilascia qui il file .xml.gz scaricato (o il .xml).",
|
||||
'import.steps.anilist': "La tua lista AniList deve essere pubblica (Settings → Lists).\nInserisci il nome utente: non serve accedere.",
|
||||
'import.drop': "Scegli o rilascia il file",
|
||||
'import.privacy': "Il file viene letto sul tuo dispositivo: online si cercano solo i titoli.",
|
||||
'import.userName': "Nome utente AniList",
|
||||
'import.continue': "Continua",
|
||||
'import.back': "Indietro",
|
||||
'import.reading': "Lettura del file…",
|
||||
'import.resolving': "Ricerca delle schede…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Limite di richieste raggiunto, si riprende tra {s} s…",
|
||||
'import.cancel': "Annulla",
|
||||
'import.noTmdb': "Senza TMDB, film e serie non possono essere riconosciuti: aggiungi una chiave in Impostazioni → Database (o accedi), oppure importali senza locandina.",
|
||||
'import.found': "Titoli letti dall'esportazione: {n}",
|
||||
'import.new': "Nuove schede",
|
||||
'import.toUpdate': "Schede completate",
|
||||
'import.already': "Già aggiornate",
|
||||
'import.notFound': "Non trovati",
|
||||
'import.showNotFound': "Vedi i titoli non trovati",
|
||||
'import.hideNotFound': "Nascondi la lista",
|
||||
'import.includeUnmatched': "Aggiungi anche i titoli non trovati (senza locandina)",
|
||||
'import.mergeHint': "Niente viene sovrascritto: i tuoi voti, stati e date più recenti restano, e non si creano doppioni.",
|
||||
'import.confirm': "Importa ({n})",
|
||||
'import.importing': "Importazione…",
|
||||
'import.nothing': "Niente di nuovo da importare.",
|
||||
'import.done': "Importazione completata",
|
||||
'import.doneAdded': "Aggiunti",
|
||||
'import.close': "Fine",
|
||||
'import.err.tooBig': "File troppo grande.",
|
||||
'import.err.badZip': "Archivio ZIP illeggibile.",
|
||||
'import.err.encrypted': "Archivio protetto da password: impossibile leggerlo.",
|
||||
'import.err.unsupported': "Il tuo browser non sa decomprimere questo file: rilascia piuttosto i file CSV / XML decompressi.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notifiche su questo dispositivo",
|
||||
'push.deviceHint': "Anche con l’app chiusa. Valgono anche le scelte qui sotto.",
|
||||
'push.iosInstall': "Su iPhone e iPad, aggiungi prima AzuuCine alla schermata Home (iOS 16.4 o successivo), poi apri l’app dalla sua icona per attivare le notifiche.",
|
||||
'push.unsupported': "Questo browser non supporta le notifiche push.",
|
||||
'push.denied': "Le notifiche sono bloccate per questo sito. Consentile nelle impostazioni del browser, poi riprova.",
|
||||
'push.notReady': "Le notifiche push non sono ancora disponibili sul server.",
|
||||
'push.error': "Impossibile attivare le notifiche. Controlla la connessione e riprova.",
|
||||
'netPill.offlineSync': "Offline — le modifiche verranno sincronizzate",
|
||||
'netPill.offlineLocal': "Offline — tutto resta salvato su questo dispositivo",
|
||||
'netPill.synced': "Sincronizzato",
|
||||
'netPill.hide': "Nascondi",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ops… qualcosa è andato storto",
|
||||
"crash.text": "La schermata si è bloccata. I tuoi dati sono al sicuro: ricarica l'app per ripartire.",
|
||||
"crash.reload": "Ricarica",
|
||||
"crash.retry": "Riprova",
|
||||
"crash.privacy": "Quando l'app è online, il problema ci viene segnalato automaticamente, senza alcun dato personale.",
|
||||
"bug.title": "Segnala un bug",
|
||||
"bug.hint": "Descrivi il problema, ce ne occupiamo noi",
|
||||
"bug.hintLocal": "Contattaci tramite rdacet.fr",
|
||||
"bug.intro": "Spiega cosa è successo e cosa ti aspettavi. Più sei preciso, più la correzione è rapida.",
|
||||
"bug.description": "Descrizione",
|
||||
"bug.placeholder": "Es.: aprendo una serie dalla Home, l'elenco degli episodi resta vuoto…",
|
||||
"bug.techTitle": "Informazioni tecniche allegate",
|
||||
"bug.techPrivacy": "Niente di personale: né la tua email né la tua libreria. Il team vede il tuo nome utente per poterti rispondere.",
|
||||
"bug.send": "Invia",
|
||||
"bug.thanks": "Grazie!",
|
||||
"bug.thanksText": "La tua segnalazione è stata inviata. La esamineremo al più presto.",
|
||||
"bug.info.version": "Versione",
|
||||
"bug.info.browser": "Browser",
|
||||
"bug.info.os": "Sistema",
|
||||
"bug.info.lang": "Lingua",
|
||||
"bug.info.theme": "Tema",
|
||||
"bug.info.screen": "Schermo",
|
||||
"bug.info.viewport": "Finestra",
|
||||
"bug.info.route": "Pagina",
|
||||
"bug.info.standalone": "App installata",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Altre opzioni",
|
||||
"report.action": "Segnala",
|
||||
"report.titleReview": "Segnala questa recensione",
|
||||
"report.titleProfile": "Segnala questo profilo",
|
||||
"report.titleComment": "Segnala questo commento",
|
||||
"report.titleList": "Segnala questa lista",
|
||||
"report.intro": "La persona non saprà chi l'ha segnalata. Il team di moderazione esaminerà la tua segnalazione.",
|
||||
"report.reason": "Motivo",
|
||||
"report.reason.spoiler": "Spoiler non segnalato",
|
||||
"report.reason.harassment": "Molestie o bullismo",
|
||||
"report.reason.hate": "Incitamento all'odio",
|
||||
"report.reason.sexual": "Contenuto sessuale",
|
||||
"report.reason.spam": "Spam o pubblicità",
|
||||
"report.reason.impersonation": "Furto d'identità",
|
||||
"report.reason.other": "Altro",
|
||||
"report.details": "Dettagli (facoltativo)",
|
||||
"report.detailsPlaceholder": "Aggiungi un contesto utile alla moderazione…",
|
||||
"report.send": "Invia",
|
||||
"report.privacy": "Le segnalazioni abusive possono portare alla sospensione del tuo account.",
|
||||
"report.thanks": "Grazie per la segnalazione",
|
||||
"report.already": "Già segnalato",
|
||||
"report.thanksText": "Il team di moderazione la esaminerà. Puoi anche bloccare questo account dal suo profilo.",
|
||||
"report.errRate": "Troppe segnalazioni per oggi. Riprova domani.",
|
||||
"report.errNotFound": "Questo contenuto non esiste più o non è più visibile per te.",
|
||||
"report.errUnavailable": "Le segnalazioni non sono ancora disponibili. Riprova più tardi.",
|
||||
"block.block": "Blocca",
|
||||
"block.unblock": "Sblocca",
|
||||
"block.done": "Account bloccato: {name}",
|
||||
"block.undone": "Account sbloccato: {name}",
|
||||
"block.notice": "Hai bloccato questo account: non può più seguirti né reagire alle tue recensioni, e le sue recensioni ti sono nascoste.",
|
||||
"block.confirmTitle": "Bloccare {name}?",
|
||||
"block.confirmText": "Non vi seguirete più. Questo account non potrà seguirti né reagire alle tue recensioni, e le sue recensioni ti saranno nascoste. Non riceverà alcun avviso.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Contiene spoiler",
|
||||
'spoiler.checkboxHint': "La tua recensione sarà nascosta agli altri finché non sceglieranno di leggerla.",
|
||||
'spoiler.warning': "Questa recensione contiene spoiler",
|
||||
'spoiler.show': "Mostra spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Commenti",
|
||||
'comments.none': "Ancora nessun commento. Inizia tu la conversazione!",
|
||||
'comments.placeholder': "Scrivi un commento…",
|
||||
'comments.send': "Invia",
|
||||
'comments.delete': "Elimina commento",
|
||||
'comments.deleteConfirm': "Eliminare questo commento?",
|
||||
'comments.loadError': "Impossibile caricare i commenti.",
|
||||
'comments.unavailable': "Commenti non disponibili al momento.",
|
||||
'comments.err.rate': "Stai commentando troppo in fretta: riprova tra un minuto.",
|
||||
'comments.err.gone': "Questa recensione non è più disponibile.",
|
||||
'comments.err.invalid': "Commento vuoto o troppo lungo (max 500 caratteri).",
|
||||
'notif.review_comment': "ha commentato la tua recensione",
|
||||
'notif.shared_list_invite': "ti ha invitato nella lista condivisa",
|
||||
'settings.notifComments': "Commenti alle mie recensioni",
|
||||
'settings.notifLists': "Inviti alle liste condivise",
|
||||
'shared.title': "Liste condivise",
|
||||
'shared.hint': "Liste a più mani: ogni membro può aggiungere o togliere titoli.",
|
||||
'shared.new': "Nuova lista condivisa",
|
||||
'shared.namePh': "Nome della lista (es. Film da vedere insieme)",
|
||||
'shared.none': "Nessuna lista condivisa. Creane una e invita i tuoi amici.",
|
||||
'shared.invitesYou': "ti ha invitato a unirti a",
|
||||
'shared.accept': "Accetta",
|
||||
'shared.decline': "Rifiuta",
|
||||
'shared.by': "di {name}",
|
||||
'shared.badge': "Lista condivisa",
|
||||
'shared.members': "Membri",
|
||||
'shared.invite': "Invita",
|
||||
'shared.owner': "Proprietario",
|
||||
'shared.pending': "In attesa",
|
||||
'shared.removeMember': "Rimuovi {name} dalla lista",
|
||||
'shared.removeTitle': "Rimuovi {title} dalla lista",
|
||||
'shared.addedBy': "Aggiunto da {name}",
|
||||
'shared.emptyText': "Aggiungi titoli dalla loro scheda o dalla tua libreria.",
|
||||
'shared.delete': "Elimina la lista condivisa",
|
||||
'shared.deleteConfirm': "La lista «{name}» verrà eliminata per tutti i membri.",
|
||||
'shared.leave': "Lascia la lista",
|
||||
'shared.leaveShort': "Lascia",
|
||||
'shared.leaveConfirm': "Non vedrai più la lista «{name}». Il proprietario potrà invitarti di nuovo.",
|
||||
'shared.notFound': "Lista non trovata",
|
||||
'shared.noCandidates': "Nessun titolo trovato nella tua libreria.",
|
||||
'shared.inviteTitle': "Invita membri",
|
||||
'shared.inviteHint': "Invita in «{name}» persone che segui o che ti seguono.",
|
||||
'shared.searchPeople': "Cerca un nome utente…",
|
||||
'shared.noPeople': "Nessuno da invitare: solo i tuoi follower e le persone che segui possono unirsi.",
|
||||
'shared.inviteShort': "Invita",
|
||||
'shared.invited': "Invitato",
|
||||
'shared.expired': "invito scaduto",
|
||||
'shared.addTo': "Aggiungi a una lista condivisa",
|
||||
'shared.unavailable': "Liste condivise non disponibili al momento.",
|
||||
'shared.err.rate': "Troppe azioni di fila: riprova tra un minuto.",
|
||||
'shared.err.members': "Questa lista ha raggiunto il numero massimo di membri.",
|
||||
'shared.err.lists': "Hai raggiunto il numero massimo di liste condivise.",
|
||||
'shared.err.full': "Questa lista è piena (500 titoli).",
|
||||
'shared.err.notConnected': "Puoi invitare solo i tuoi follower e le persone che segui.",
|
||||
'shared.err.forbidden': "Azione non consentita: non hai accesso a questa lista.",
|
||||
'comments.toggle_one': "{count} commento",
|
||||
'comments.toggle_other': "{count} commenti",
|
||||
'shared.nMembers_one': "{count} membro",
|
||||
'shared.nMembers_other': "{count} membri",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "法的表示",
|
||||
'legal.credits': "クレジット",
|
||||
'legal.tmdb': "この製品は TMDB API を使用していますが、TMDB による承認・認定を受けたものではありません。",
|
||||
'notFound.title': "このシーンは編集でカットされました",
|
||||
'notFound.text': "お探しのページは存在しないか、移動しました。",
|
||||
'notFound.back': "ホームに戻る",
|
||||
'auth.newPasswordTitle': '新しいパスワードを設定してください。',
|
||||
'auth.newPassword': '新しいパスワード',
|
||||
'auth.err.credentials': 'メールアドレスまたはパスワードが違います。',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} 件の変更が保留中",
|
||||
'sync.pending_other': "{count} 件の変更が保留中",
|
||||
'sync.now': "今すぐ同期",
|
||||
// — Où regarder —
|
||||
'watch.title': "視聴方法",
|
||||
'watch.flatrate': "定額見放題",
|
||||
'watch.free': "無料",
|
||||
'watch.rent': "レンタル",
|
||||
'watch.buy': "購入",
|
||||
'watch.country': "国",
|
||||
'watch.none': "この国では配信されていません。",
|
||||
'watch.source': "データ提供:JustWatch",
|
||||
'watch.open': "{name}で見る",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "マイタグ",
|
||||
"tags.placeholder": "comfort、ハロウィン、Leaと再視聴…",
|
||||
"tags.private": "自分だけに表示され、プロフィールには出ません。",
|
||||
"tags.filter": "マイタグ",
|
||||
"select.start": "選択",
|
||||
"select.exit": "選択を終了",
|
||||
"select.all": "すべて選択",
|
||||
"select.none": "すべて選択解除",
|
||||
"select.toggle": "「{title}」を選択",
|
||||
"select.actions": "選択した作品の操作",
|
||||
"select.status": "ステータス",
|
||||
"select.list": "リスト",
|
||||
"select.tag": "タグ",
|
||||
"select.noLists": "リストはまだありません。下で作成できます。",
|
||||
"select.inList": "追加済み:{n}/{total}",
|
||||
"select.addTo": "「{list}」に追加",
|
||||
"select.removeFrom": "「{list}」から外す",
|
||||
"select.removeTag": "タグを外す",
|
||||
"toast.undo": "元に戻す",
|
||||
"toast.undone": "元に戻しました",
|
||||
"toast.undoFailed": "元に戻せませんでした",
|
||||
"toast.deleted": "「{title}」を削除しました",
|
||||
"toast.status": "「{title}」→ {status}",
|
||||
"toast.removedFromList": "「{title}」を「{list}」から外しました",
|
||||
"select.count_zero": "未選択",
|
||||
"select.count_one": "{count}件を選択中",
|
||||
"select.count_other": "{count}件を選択中",
|
||||
"select.statusTitle_one": "{count}作品のステータス",
|
||||
"select.statusTitle_other": "{count}作品のステータス",
|
||||
"select.listTitle_one": "リスト · {count}作品",
|
||||
"select.listTitle_other": "リスト · {count}作品",
|
||||
"select.tagTitle_one": "タグ · {count}作品",
|
||||
"select.tagTitle_other": "タグ · {count}作品",
|
||||
"select.deleteConfirm_one": "{count}作品をライブラリから削除しますか?",
|
||||
"select.deleteConfirm_other": "{count}作品をライブラリから削除しますか?",
|
||||
"toast.deletedMany_one": "{count}作品を削除しました",
|
||||
"toast.deletedMany_other": "{count}作品を削除しました",
|
||||
"toast.statusMany_one": "{count}作品 → {status}",
|
||||
"toast.statusMany_other": "{count}作品 → {status}",
|
||||
"toast.addedToList_one": "{count}作品を「{list}」に追加しました",
|
||||
"toast.addedToList_other": "{count}作品を「{list}」に追加しました",
|
||||
"toast.removedFromListMany_one": "{count}作品を「{list}」から外しました",
|
||||
"toast.removedFromListMany_other": "{count}作品を「{list}」から外しました",
|
||||
"toast.tagged_one": "{count}作品に #{tag} を追加しました",
|
||||
"toast.tagged_other": "{count}作品に #{tag} を追加しました",
|
||||
"toast.untagged_one": "{count}作品から #{tag} を外しました",
|
||||
"toast.untagged_other": "{count}作品から #{tag} を外しました",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "他のアプリからインポート",
|
||||
'import.rowHint': "Letterboxd、TV Time、MyAnimeList、AniList",
|
||||
'import.title': "ライブラリをインポート",
|
||||
'import.chooseSource': "どのアプリから取り込みますか?",
|
||||
'import.src.letterboxd': "映画、評価、日記、ウォッチリスト、お気に入り",
|
||||
'import.src.tvtime': "フォロー中のシリーズと視聴済みエピソード",
|
||||
'import.src.mal': "アニメリスト(XML エクスポート)",
|
||||
'import.src.anilist': "公開アニメリスト(ユーザー名で)",
|
||||
'import.how': "エクスポートの入手方法",
|
||||
'import.steps.letterboxd': "letterboxd.com で Settings → Import & Export → Export your data を開きます。\nZIP ファイルが届くので、そのままここにドロップしてください(中の CSV でも可)。",
|
||||
'import.steps.tvtime': "TV Time でデータのコピーを依頼します(設定 → プライバシー、またはサポートの「Request my data」)。\nメールで届いた ZIP、またはその CSV をここにドロップしてください。",
|
||||
'import.steps.mal': "myanimelist.net でプロフィール → Export (Anime List) → Export My List を開きます。\nダウンロードした .xml.gz(または .xml)をここにドロップしてください。",
|
||||
'import.steps.anilist': "AniList のリストは公開設定にしてください(Settings → Lists)。\nユーザー名を入力するだけで、ログインは不要です。",
|
||||
'import.drop': "ファイルを選択またはドロップ",
|
||||
'import.privacy': "ファイルは端末上で読み込まれ、オンラインではタイトルのみを検索します。",
|
||||
'import.userName': "AniList のユーザー名",
|
||||
'import.continue': "続ける",
|
||||
'import.back': "戻る",
|
||||
'import.reading': "ファイルを読み込み中…",
|
||||
'import.resolving': "作品を検索中…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "リクエスト上限に達しました。{s} 秒後に再開します…",
|
||||
'import.cancel': "キャンセル",
|
||||
'import.noTmdb': "TMDB がないと映画やシリーズを認識できません。設定 → データベースでキーを追加する(またはログインする)か、ポスターなしでインポートしてください。",
|
||||
'import.found': "エクスポートから読み込んだ作品:{n}",
|
||||
'import.new': "新規",
|
||||
'import.toUpdate': "補完した作品",
|
||||
'import.already': "最新の状態",
|
||||
'import.notFound': "見つからない",
|
||||
'import.showNotFound': "見つからない作品を表示",
|
||||
'import.hideNotFound': "リストを隠す",
|
||||
'import.includeUnmatched': "見つからない作品も追加する(ポスターなし)",
|
||||
'import.mergeHint': "上書きはされません。新しい評価・ステータス・日付はそのまま残り、重複も作られません。",
|
||||
'import.confirm': "インポート({n})",
|
||||
'import.importing': "インポート中…",
|
||||
'import.nothing': "新しくインポートするものはありません。",
|
||||
'import.done': "インポート完了",
|
||||
'import.doneAdded': "追加",
|
||||
'import.close': "完了",
|
||||
'import.err.tooBig': "ファイルが大きすぎます。",
|
||||
'import.err.badZip': "ZIP アーカイブを読み込めません。",
|
||||
'import.err.encrypted': "パスワード付きのアーカイブは読み込めません。",
|
||||
'import.err.unsupported': "お使いのブラウザではこのファイルを展開できません。展開済みの CSV / XML をドロップしてください。",
|
||||
'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}件のチャレンジ",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "このデバイスの通知",
|
||||
'push.deviceHint': "アプリを閉じていても届きます。下の設定も適用されます。",
|
||||
'push.iosInstall': "iPhone・iPad では、まず AzuuCine をホーム画面に追加し(iOS 16.4 以降)、アイコンからアプリを開いて通知をオンにしてください。",
|
||||
'push.unsupported': "このブラウザはプッシュ通知に対応していません。",
|
||||
'push.denied': "このサイトの通知はブロックされています。ブラウザの設定で許可してから、もう一度お試しください。",
|
||||
'push.notReady': "プッシュ通知はまだサーバーで利用できません。",
|
||||
'push.error': "通知をオンにできませんでした。接続を確認して、もう一度お試しください。",
|
||||
'netPill.offlineSync': "オフライン — 変更は後で同期されます",
|
||||
'netPill.offlineLocal': "オフライン — すべてこのデバイスに保存されています",
|
||||
'netPill.synced': "同期済み",
|
||||
'netPill.hide': "閉じる",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "おっと…問題が発生しました",
|
||||
"crash.text": "画面がクラッシュしました。データは無事です。アプリを再読み込みして続けてください。",
|
||||
"crash.reload": "再読み込み",
|
||||
"crash.retry": "もう一度試す",
|
||||
"crash.privacy": "アプリがオンラインのとき、問題は個人データを含めずに自動で報告されます。",
|
||||
"bug.title": "不具合を報告",
|
||||
"bug.hint": "問題を教えてください。対応します",
|
||||
"bug.hintLocal": "rdacet.fr からお問い合わせください",
|
||||
"bug.intro": "何が起きたか、どうなるはずだったかを説明してください。詳しいほど早く直せます。",
|
||||
"bug.description": "説明",
|
||||
"bug.placeholder": "例:ホームからシリーズを開くと、エピソード一覧が空のままになる…",
|
||||
"bug.techTitle": "添付される技術情報",
|
||||
"bug.techPrivacy": "個人的な情報は含まれません:メールアドレスもライブラリも送られません。返信のため、チームにはユーザー名が表示されます。",
|
||||
"bug.send": "送信",
|
||||
"bug.thanks": "ありがとうございます!",
|
||||
"bug.thanksText": "報告を送信しました。できるだけ早く確認します。",
|
||||
"bug.info.version": "バージョン",
|
||||
"bug.info.browser": "ブラウザ",
|
||||
"bug.info.os": "システム",
|
||||
"bug.info.lang": "言語",
|
||||
"bug.info.theme": "テーマ",
|
||||
"bug.info.screen": "画面",
|
||||
"bug.info.viewport": "ウィンドウ",
|
||||
"bug.info.route": "ページ",
|
||||
"bug.info.standalone": "インストール済みアプリ",
|
||||
"bug.info.online": "オンライン",
|
||||
"report.more": "その他のオプション",
|
||||
"report.action": "報告",
|
||||
"report.titleReview": "このレビューを報告",
|
||||
"report.titleProfile": "このプロフィールを報告",
|
||||
"report.titleComment": "このコメントを報告",
|
||||
"report.titleList": "このリストを報告",
|
||||
"report.intro": "相手に誰が報告したかは伝わりません。モデレーションチームが報告を確認します。",
|
||||
"report.reason": "理由",
|
||||
"report.reason.spoiler": "ネタバレ表示なし",
|
||||
"report.reason.harassment": "嫌がらせ・いじめ",
|
||||
"report.reason.hate": "ヘイトスピーチ",
|
||||
"report.reason.sexual": "性的なコンテンツ",
|
||||
"report.reason.spam": "スパム・宣伝",
|
||||
"report.reason.impersonation": "なりすまし",
|
||||
"report.reason.other": "その他",
|
||||
"report.details": "詳細(任意)",
|
||||
"report.detailsPlaceholder": "モデレーションに役立つ情報を追加…",
|
||||
"report.send": "送信",
|
||||
"report.privacy": "不当な報告を繰り返すとアカウントが停止される場合があります。",
|
||||
"report.thanks": "報告ありがとうございます",
|
||||
"report.already": "報告済み",
|
||||
"report.thanksText": "モデレーションチームが確認します。このアカウントはプロフィールからブロックすることもできます。",
|
||||
"report.errRate": "今日の報告数が多すぎます。明日もう一度お試しください。",
|
||||
"report.errNotFound": "このコンテンツは存在しないか、表示できなくなりました。",
|
||||
"report.errUnavailable": "報告機能はまだ利用できません。しばらくしてからお試しください。",
|
||||
"block.block": "ブロック",
|
||||
"block.unblock": "ブロック解除",
|
||||
"block.done": "ブロックしました:{name}",
|
||||
"block.undone": "ブロックを解除しました:{name}",
|
||||
"block.notice": "このアカウントをブロックしています:あなたをフォローしたりレビューにリアクションしたりできず、相手のレビューはあなたに表示されません。",
|
||||
"block.confirmTitle": "{name} をブロックしますか?",
|
||||
"block.confirmText": "お互いのフォローは解除されます。このアカウントはあなたをフォローしたりレビューにリアクションしたりできなくなり、相手のレビューはあなたに表示されなくなります。相手には通知されません。",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "ネタバレを含む",
|
||||
'spoiler.checkboxHint': "あなたのレビューは、他の人が読むことを選ぶまで非表示になります。",
|
||||
'spoiler.warning': "このレビューにはネタバレが含まれます",
|
||||
'spoiler.show': "ネタバレを表示",
|
||||
'spoiler.badge': "ネタバレ",
|
||||
'comments.title': "コメント",
|
||||
'comments.none': "まだコメントはありません。話しかけてみましょう!",
|
||||
'comments.placeholder': "コメントを書く…",
|
||||
'comments.send': "送信",
|
||||
'comments.delete': "コメントを削除",
|
||||
'comments.deleteConfirm': "このコメントを削除しますか?",
|
||||
'comments.loadError': "コメントを読み込めませんでした。",
|
||||
'comments.unavailable': "コメントは現在利用できません。",
|
||||
'comments.err.rate': "コメントの投稿が速すぎます。1分後にもう一度お試しください。",
|
||||
'comments.err.gone': "このレビューはもう利用できません。",
|
||||
'comments.err.invalid': "コメントが空か長すぎます(最大500文字)。",
|
||||
'notif.review_comment': "があなたのレビューにコメントしました",
|
||||
'notif.shared_list_invite': "があなたを共有リストに招待しました",
|
||||
'settings.notifComments': "自分のレビューへのコメント",
|
||||
'settings.notifLists': "共有リストへの招待",
|
||||
'shared.title': "共有リスト",
|
||||
'shared.hint': "みんなで作るリスト:メンバー全員が作品を追加・削除できます。",
|
||||
'shared.new': "新しい共有リスト",
|
||||
'shared.namePh': "リスト名(例:一緒に観たい映画)",
|
||||
'shared.none': "共有リストはまだありません。作成して友達を招待しましょう。",
|
||||
'shared.invitesYou': "から招待が届いています:",
|
||||
'shared.accept': "承認",
|
||||
'shared.decline': "辞退",
|
||||
'shared.by': "{name} のリスト",
|
||||
'shared.badge': "共有リスト",
|
||||
'shared.members': "メンバー",
|
||||
'shared.invite': "招待",
|
||||
'shared.owner': "オーナー",
|
||||
'shared.pending': "招待中",
|
||||
'shared.removeMember': "{name} をリストから外す",
|
||||
'shared.removeTitle': "「{title}」をリストから外す",
|
||||
'shared.addedBy': "{name} が追加",
|
||||
'shared.emptyText': "作品ページやライブラリから作品を追加できます。",
|
||||
'shared.delete': "共有リストを削除",
|
||||
'shared.deleteConfirm': "リスト「{name}」はすべてのメンバーから削除されます。",
|
||||
'shared.leave': "リストから抜ける",
|
||||
'shared.leaveShort': "抜ける",
|
||||
'shared.leaveConfirm': "リスト「{name}」は表示されなくなります。オーナーは再度招待できます。",
|
||||
'shared.notFound': "リストが見つかりません",
|
||||
'shared.noCandidates': "ライブラリに作品が見つかりません。",
|
||||
'shared.inviteTitle': "メンバーを招待",
|
||||
'shared.inviteHint': "フォローしている人やフォロワーを「{name}」に招待しましょう。",
|
||||
'shared.searchPeople': "ユーザー名を検索…",
|
||||
'shared.noPeople': "招待できる人がいません:参加できるのはフォロワーとフォロー中の人だけです。",
|
||||
'shared.inviteShort': "招待",
|
||||
'shared.invited': "招待済み",
|
||||
'shared.expired': "招待の期限切れ",
|
||||
'shared.addTo': "共有リストに追加",
|
||||
'shared.unavailable': "共有リストは現在利用できません。",
|
||||
'shared.err.rate': "操作が続きすぎています。1分後にもう一度お試しください。",
|
||||
'shared.err.members': "このリストのメンバー数が上限に達しました。",
|
||||
'shared.err.lists': "共有リストの数が上限に達しました。",
|
||||
'shared.err.full': "このリストは満杯です(500作品)。",
|
||||
'shared.err.notConnected': "招待できるのはフォロワーとフォロー中の人だけです。",
|
||||
'shared.err.forbidden': "操作できません:このリストへのアクセス権がありません。",
|
||||
'comments.toggle_one': "コメント{count}件",
|
||||
'comments.toggle_other': "コメント{count}件",
|
||||
'shared.nMembers_one': "メンバー{count}人",
|
||||
'shared.nMembers_other': "メンバー{count}人",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "법적 고지",
|
||||
'legal.credits': "크레딧",
|
||||
'legal.tmdb': "이 제품은 TMDB API를 사용하지만 TMDB의 보증이나 인증을 받지 않았습니다.",
|
||||
'notFound.title': "이 장면은 편집에서 잘렸어요",
|
||||
'notFound.text': "찾는 페이지가 없거나 이동되었어요.",
|
||||
'notFound.back': "홈으로 돌아가기",
|
||||
'auth.newPasswordTitle': '새 비밀번호를 정해 주세요.',
|
||||
'auth.newPassword': '새 비밀번호',
|
||||
'auth.err.credentials': '이메일 또는 비밀번호가 올바르지 않아요.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "변경 {count}개 대기 중",
|
||||
'sync.pending_other': "변경 {count}개 대기 중",
|
||||
'sync.now': "지금 동기화",
|
||||
// — Où regarder —
|
||||
'watch.title': "볼 수 있는 곳",
|
||||
'watch.flatrate': "구독",
|
||||
'watch.free': "무료",
|
||||
'watch.rent': "대여",
|
||||
'watch.buy': "구매",
|
||||
'watch.country': "국가",
|
||||
'watch.none': "이 국가에서는 스트리밍되지 않아요.",
|
||||
'watch.source': "데이터 제공: JustWatch",
|
||||
'watch.open': "{name}에서 보기",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "개인 태그",
|
||||
"tags.placeholder": "comfort, 핼러윈, 레아랑 다시 보기…",
|
||||
"tags.private": "나만 볼 수 있으며 프로필에는 표시되지 않아요.",
|
||||
"tags.filter": "개인 태그",
|
||||
"select.start": "선택",
|
||||
"select.exit": "선택 종료",
|
||||
"select.all": "모두 선택",
|
||||
"select.none": "모두 선택 해제",
|
||||
"select.toggle": "“{title}” 선택",
|
||||
"select.actions": "선택 항목 작업",
|
||||
"select.status": "상태",
|
||||
"select.list": "리스트",
|
||||
"select.tag": "태그",
|
||||
"select.noLists": "아직 리스트가 없어요. 아래에서 만들어 보세요.",
|
||||
"select.inList": "이미 포함: {n}/{total}",
|
||||
"select.addTo": "“{list}”에 추가",
|
||||
"select.removeFrom": "“{list}”에서 제거",
|
||||
"select.removeTag": "태그 제거",
|
||||
"toast.undo": "실행 취소",
|
||||
"toast.undone": "실행 취소됨",
|
||||
"toast.undoFailed": "실행 취소할 수 없어요",
|
||||
"toast.deleted": "“{title}” 삭제됨",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}”을(를) “{list}”에서 제거했어요",
|
||||
"select.count_zero": "선택한 작품 없음",
|
||||
"select.count_one": "{count}개 선택됨",
|
||||
"select.count_other": "{count}개 선택됨",
|
||||
"select.statusTitle_one": "작품 {count}개의 상태",
|
||||
"select.statusTitle_other": "작품 {count}개의 상태",
|
||||
"select.listTitle_one": "리스트 · 작품 {count}개",
|
||||
"select.listTitle_other": "리스트 · 작품 {count}개",
|
||||
"select.tagTitle_one": "태그 · 작품 {count}개",
|
||||
"select.tagTitle_other": "태그 · 작품 {count}개",
|
||||
"select.deleteConfirm_one": "라이브러리에서 작품 {count}개를 삭제할까요?",
|
||||
"select.deleteConfirm_other": "라이브러리에서 작품 {count}개를 삭제할까요?",
|
||||
"toast.deletedMany_one": "작품 {count}개 삭제됨",
|
||||
"toast.deletedMany_other": "작품 {count}개 삭제됨",
|
||||
"toast.statusMany_one": "작품 {count}개 → {status}",
|
||||
"toast.statusMany_other": "작품 {count}개 → {status}",
|
||||
"toast.addedToList_one": "작품 {count}개를 “{list}”에 추가했어요",
|
||||
"toast.addedToList_other": "작품 {count}개를 “{list}”에 추가했어요",
|
||||
"toast.removedFromListMany_one": "작품 {count}개를 “{list}”에서 제거했어요",
|
||||
"toast.removedFromListMany_other": "작품 {count}개를 “{list}”에서 제거했어요",
|
||||
"toast.tagged_one": "작품 {count}개에 #{tag} 추가",
|
||||
"toast.tagged_other": "작품 {count}개에 #{tag} 추가",
|
||||
"toast.untagged_one": "작품 {count}개에서 #{tag} 제거",
|
||||
"toast.untagged_other": "작품 {count}개에서 #{tag} 제거",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "다른 앱에서 가져오기",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "내 라이브러리 가져오기",
|
||||
'import.chooseSource': "작품을 어디서 가져올까요?",
|
||||
'import.src.letterboxd': "영화, 평점, 다이어리, 보고 싶어요, 좋아요",
|
||||
'import.src.tvtime': "팔로우한 시리즈와 본 에피소드",
|
||||
'import.src.mal': "애니 목록 (XML 내보내기)",
|
||||
'import.src.anilist': "공개 애니 목록, 사용자 이름으로",
|
||||
'import.how': "내보내기 파일 받기",
|
||||
'import.steps.letterboxd': "letterboxd.com에서 Settings → Import & Export → Export your data를 여세요.\nZIP 파일을 받으면 그대로 여기에 놓으세요 (또는 안의 CSV 파일).",
|
||||
'import.steps.tvtime': "TV Time에서 내 데이터 사본을 요청하세요 (설정 → 개인정보, 또는 지원 “Request my data”).\n이메일로 받은 ZIP이나 그 안의 CSV 파일을 여기에 놓으세요.",
|
||||
'import.steps.mal': "myanimelist.net에서 프로필 → Export (Anime List) → Export My List를 여세요.\n다운로드한 .xml.gz 파일(또는 .xml)을 여기에 놓으세요.",
|
||||
'import.steps.anilist': "AniList 목록이 공개 상태여야 합니다 (Settings → Lists).\n사용자 이름만 입력하면 되고 로그인은 필요 없습니다.",
|
||||
'import.drop': "파일 선택 또는 놓기",
|
||||
'import.privacy': "파일은 기기에서 읽히며, 온라인에서는 제목만 검색합니다.",
|
||||
'import.userName': "AniList 사용자 이름",
|
||||
'import.continue': "계속",
|
||||
'import.back': "뒤로",
|
||||
'import.reading': "파일 읽는 중…",
|
||||
'import.resolving': "작품 찾는 중…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "요청 한도에 도달했어요. {s}초 후 다시 시작…",
|
||||
'import.cancel': "취소",
|
||||
'import.noTmdb': "TMDB 없이는 영화와 시리즈를 인식할 수 없어요. 설정 → 데이터베이스에서 키를 추가하거나(또는 로그인) 포스터 없이 가져오세요.",
|
||||
'import.found': "내보내기에서 읽은 작품: {n}",
|
||||
'import.new': "새 항목",
|
||||
'import.toUpdate': "보완된 항목",
|
||||
'import.already': "이미 최신",
|
||||
'import.notFound': "찾지 못함",
|
||||
'import.showNotFound': "찾지 못한 작품 보기",
|
||||
'import.hideNotFound': "목록 숨기기",
|
||||
'import.includeUnmatched': "찾지 못한 작품도 추가 (포스터 없음)",
|
||||
'import.mergeHint': "덮어쓰지 않아요. 더 최근의 평점, 상태, 날짜는 유지되고 중복도 생기지 않아요.",
|
||||
'import.confirm': "가져오기 ({n})",
|
||||
'import.importing': "가져오는 중…",
|
||||
'import.nothing': "새로 가져올 항목이 없어요.",
|
||||
'import.done': "가져오기 완료",
|
||||
'import.doneAdded': "추가됨",
|
||||
'import.close': "완료",
|
||||
'import.err.tooBig': "파일이 너무 커요.",
|
||||
'import.err.badZip': "ZIP 파일을 읽을 수 없어요.",
|
||||
'import.err.encrypted': "비밀번호로 보호된 압축 파일은 읽을 수 없어요.",
|
||||
'import.err.unsupported': "브라우저가 이 파일의 압축을 풀 수 없어요. 압축을 푼 CSV / XML 파일을 놓아 주세요.",
|
||||
'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}개 더",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "이 기기의 알림",
|
||||
'push.deviceHint': "앱이 닫혀 있어도 받아요. 아래 선택 사항도 적용돼요.",
|
||||
'push.iosInstall': "iPhone과 iPad에서는 먼저 AzuuCine을 홈 화면에 추가한 뒤(iOS 16.4 이상) 아이콘으로 앱을 열어 알림을 켜 주세요.",
|
||||
'push.unsupported': "이 브라우저는 푸시 알림을 지원하지 않아요.",
|
||||
'push.denied': "이 사이트의 알림이 차단되어 있어요. 브라우저 설정에서 허용한 뒤 다시 시도해 주세요.",
|
||||
'push.notReady': "서버에서 아직 푸시 알림을 사용할 수 없어요.",
|
||||
'push.error': "알림을 켜지 못했어요. 연결을 확인하고 다시 시도해 주세요.",
|
||||
'netPill.offlineSync': "오프라인 — 변경 사항은 나중에 동기화돼요",
|
||||
'netPill.offlineLocal': "오프라인 — 모든 내용이 이 기기에 저장돼 있어요",
|
||||
'netPill.synced': "동기화됨",
|
||||
'netPill.hide': "숨기기",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "앗… 문제가 발생했어요",
|
||||
"crash.text": "화면에 오류가 났어요. 데이터는 안전해요. 앱을 새로고침해 계속하세요.",
|
||||
"crash.reload": "새로고침",
|
||||
"crash.retry": "다시 시도",
|
||||
"crash.privacy": "앱이 온라인일 때 문제는 개인 정보 없이 자동으로 저희에게 보고돼요.",
|
||||
"bug.title": "버그 신고",
|
||||
"bug.hint": "문제를 알려 주시면 처리할게요",
|
||||
"bug.hintLocal": "rdacet.fr로 문의하세요",
|
||||
"bug.intro": "무슨 일이 있었고 어떻게 될 거라 예상했는지 설명해 주세요. 자세할수록 빨리 고칠 수 있어요.",
|
||||
"bug.description": "설명",
|
||||
"bug.placeholder": "예: 홈에서 시리즈를 열면 에피소드 목록이 비어 있어요…",
|
||||
"bug.techTitle": "첨부되는 기술 정보",
|
||||
"bug.techPrivacy": "개인 정보는 없어요: 이메일도, 라이브러리도 보내지 않아요. 답변을 위해 팀에는 사용자 이름이 보여요.",
|
||||
"bug.send": "보내기",
|
||||
"bug.thanks": "감사합니다!",
|
||||
"bug.thanksText": "신고가 전송됐어요. 최대한 빨리 확인할게요.",
|
||||
"bug.info.version": "버전",
|
||||
"bug.info.browser": "브라우저",
|
||||
"bug.info.os": "시스템",
|
||||
"bug.info.lang": "언어",
|
||||
"bug.info.theme": "테마",
|
||||
"bug.info.screen": "화면",
|
||||
"bug.info.viewport": "창",
|
||||
"bug.info.route": "페이지",
|
||||
"bug.info.standalone": "설치된 앱",
|
||||
"bug.info.online": "온라인",
|
||||
"report.more": "더 보기",
|
||||
"report.action": "신고",
|
||||
"report.titleReview": "이 리뷰 신고",
|
||||
"report.titleProfile": "이 프로필 신고",
|
||||
"report.titleComment": "이 댓글 신고",
|
||||
"report.titleList": "이 리스트 신고",
|
||||
"report.intro": "상대방은 누가 신고했는지 알 수 없어요. 운영팀이 신고를 검토할게요.",
|
||||
"report.reason": "사유",
|
||||
"report.reason.spoiler": "표시 없는 스포일러",
|
||||
"report.reason.harassment": "괴롭힘 또는 따돌림",
|
||||
"report.reason.hate": "혐오 발언",
|
||||
"report.reason.sexual": "성적인 콘텐츠",
|
||||
"report.reason.spam": "스팸 또는 광고",
|
||||
"report.reason.impersonation": "사칭",
|
||||
"report.reason.other": "기타",
|
||||
"report.details": "상세 내용 (선택)",
|
||||
"report.detailsPlaceholder": "운영에 도움이 되는 맥락을 추가해 주세요…",
|
||||
"report.send": "보내기",
|
||||
"report.privacy": "악의적인 신고는 계정 정지로 이어질 수 있어요.",
|
||||
"report.thanks": "신고해 주셔서 감사해요",
|
||||
"report.already": "이미 신고함",
|
||||
"report.thanksText": "운영팀이 검토할게요. 프로필에서 이 계정을 차단할 수도 있어요.",
|
||||
"report.errRate": "오늘 신고 횟수가 너무 많아요. 내일 다시 시도해 주세요.",
|
||||
"report.errNotFound": "이 콘텐츠는 더 이상 없거나 볼 수 없어요.",
|
||||
"report.errUnavailable": "신고 기능을 아직 사용할 수 없어요. 나중에 다시 시도해 주세요.",
|
||||
"block.block": "차단",
|
||||
"block.unblock": "차단 해제",
|
||||
"block.done": "계정을 차단했어요: {name}",
|
||||
"block.undone": "차단을 해제했어요: {name}",
|
||||
"block.notice": "이 계정을 차단했어요: 나를 팔로우하거나 내 리뷰에 반응할 수 없고, 이 계정의 리뷰는 나에게 숨겨져요.",
|
||||
"block.confirmTitle": "{name} 님을 차단할까요?",
|
||||
"block.confirmText": "서로 팔로우가 해제돼요. 이 계정은 나를 팔로우하거나 내 리뷰에 반응할 수 없고, 이 계정의 리뷰는 나에게 숨겨져요. 상대방에게 알림은 가지 않아요.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "스포일러 포함",
|
||||
'spoiler.checkboxHint': "다른 사람이 직접 읽기로 선택할 때까지 리뷰가 가려집니다.",
|
||||
'spoiler.warning': "이 리뷰에는 스포일러가 있습니다",
|
||||
'spoiler.show': "스포일러 보기",
|
||||
'spoiler.badge': "스포일러",
|
||||
'comments.title': "댓글",
|
||||
'comments.none': "아직 댓글이 없어요. 대화를 시작해 보세요!",
|
||||
'comments.placeholder': "댓글 쓰기…",
|
||||
'comments.send': "보내기",
|
||||
'comments.delete': "댓글 삭제",
|
||||
'comments.deleteConfirm': "이 댓글을 삭제할까요?",
|
||||
'comments.loadError': "댓글을 불러오지 못했습니다.",
|
||||
'comments.unavailable': "지금은 댓글을 사용할 수 없습니다.",
|
||||
'comments.err.rate': "댓글을 너무 빨리 달고 있어요. 1분 후 다시 시도하세요.",
|
||||
'comments.err.gone': "이 리뷰는 더 이상 볼 수 없습니다.",
|
||||
'comments.err.invalid': "댓글이 비어 있거나 너무 깁니다(최대 500자).",
|
||||
'notif.review_comment': "님이 내 리뷰에 댓글을 남겼습니다",
|
||||
'notif.shared_list_invite': "님이 공유 목록에 초대했습니다",
|
||||
'settings.notifComments': "내 리뷰에 달린 댓글",
|
||||
'settings.notifLists': "공유 목록 초대",
|
||||
'shared.title': "공유 목록",
|
||||
'shared.hint': "함께 만드는 목록: 모든 멤버가 작품을 추가하거나 뺄 수 있어요.",
|
||||
'shared.new': "새 공유 목록",
|
||||
'shared.namePh': "목록 이름 (예: 같이 볼 영화)",
|
||||
'shared.none': "아직 공유 목록이 없어요. 하나 만들고 친구를 초대해 보세요.",
|
||||
'shared.invitesYou': "님이 초대했습니다:",
|
||||
'shared.accept': "수락",
|
||||
'shared.decline': "거절",
|
||||
'shared.by': "{name} 님의 목록",
|
||||
'shared.badge': "공유 목록",
|
||||
'shared.members': "멤버",
|
||||
'shared.invite': "초대",
|
||||
'shared.owner': "소유자",
|
||||
'shared.pending': "대기 중",
|
||||
'shared.removeMember': "{name} 님을 목록에서 내보내기",
|
||||
'shared.removeTitle': "목록에서 {title} 빼기",
|
||||
'shared.addedBy': "{name} 님이 추가",
|
||||
'shared.emptyText': "작품 페이지나 내 라이브러리에서 작품을 추가하세요.",
|
||||
'shared.delete': "공유 목록 삭제",
|
||||
'shared.deleteConfirm': "‘{name}’ 목록이 모든 멤버에게서 삭제됩니다.",
|
||||
'shared.leave': "목록 나가기",
|
||||
'shared.leaveShort': "나가기",
|
||||
'shared.leaveConfirm': "‘{name}’ 목록이 더 이상 보이지 않습니다. 소유자가 다시 초대할 수 있어요.",
|
||||
'shared.notFound': "목록을 찾을 수 없습니다",
|
||||
'shared.noCandidates': "라이브러리에서 작품을 찾지 못했습니다.",
|
||||
'shared.inviteTitle': "멤버 초대",
|
||||
'shared.inviteHint': "내가 팔로우하거나 나를 팔로우하는 사람을 ‘{name}’에 초대하세요.",
|
||||
'shared.searchPeople': "사용자 이름 검색…",
|
||||
'shared.noPeople': "초대할 사람이 없어요: 팔로워와 내가 팔로우하는 사람만 참여할 수 있습니다.",
|
||||
'shared.inviteShort': "초대",
|
||||
'shared.invited': "초대함",
|
||||
'shared.expired': "초대 만료",
|
||||
'shared.addTo': "공유 목록에 추가",
|
||||
'shared.unavailable': "지금은 공유 목록을 사용할 수 없습니다.",
|
||||
'shared.err.rate': "연속 작업이 너무 많아요. 1분 후 다시 시도하세요.",
|
||||
'shared.err.members': "이 목록의 멤버 수가 최대에 도달했습니다.",
|
||||
'shared.err.lists': "공유 목록 개수가 최대에 도달했습니다.",
|
||||
'shared.err.full': "이 목록이 가득 찼습니다(500편).",
|
||||
'shared.err.notConnected': "팔로워와 내가 팔로우하는 사람만 초대할 수 있어요.",
|
||||
'shared.err.forbidden': "허용되지 않음: 이 목록에 접근할 수 없습니다.",
|
||||
'comments.toggle_one': "댓글 {count}개",
|
||||
'comments.toggle_other': "댓글 {count}개",
|
||||
'shared.nMembers_one': "멤버 {count}명",
|
||||
'shared.nMembers_other': "멤버 {count}명",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Juridische informatie",
|
||||
'legal.credits': "Credits",
|
||||
'legal.tmdb': "Dit product gebruikt de TMDB-API maar wordt niet door TMDB onderschreven of gecertificeerd.",
|
||||
'notFound.title': "Deze scène is eruit geknipt",
|
||||
'notFound.text': "De pagina die je zoekt bestaat niet of is verplaatst.",
|
||||
'notFound.back': "Terug naar start",
|
||||
'auth.newPasswordTitle': 'Kies je nieuwe wachtwoord.',
|
||||
'auth.newPassword': 'Nieuw wachtwoord',
|
||||
'auth.err.credentials': 'Onjuist e-mailadres of wachtwoord.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} wijziging in wachtrij",
|
||||
'sync.pending_other': "{count} wijzigingen in wachtrij",
|
||||
'sync.now': "Nu synchroniseren",
|
||||
// — Où regarder —
|
||||
'watch.title': "Waar te kijken",
|
||||
'watch.flatrate': "Abonnement",
|
||||
'watch.free': "Gratis",
|
||||
'watch.rent': "Huren",
|
||||
'watch.buy': "Kopen",
|
||||
'watch.country': "Land",
|
||||
'watch.none': "Niet te streamen in dit land.",
|
||||
'watch.source': "Gegevens van JustWatch",
|
||||
'watch.open': "Kijk op {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Eigen tags",
|
||||
"tags.placeholder": "comfort, halloween, opnieuw kijken met Lea…",
|
||||
"tags.private": "Alleen voor jou zichtbaar, nooit op je profiel.",
|
||||
"tags.filter": "Eigen tags",
|
||||
"select.start": "Selecteren",
|
||||
"select.exit": "Selectie sluiten",
|
||||
"select.all": "Alles selecteren",
|
||||
"select.none": "Alles deselecteren",
|
||||
"select.toggle": "‘{title}’ selecteren",
|
||||
"select.actions": "Acties voor de selectie",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lijst",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Nog geen lijsten — maak er hieronder een.",
|
||||
"select.inList": "Er al in: {n}/{total}",
|
||||
"select.addTo": "Toevoegen aan ‘{list}’",
|
||||
"select.removeFrom": "Verwijderen uit ‘{list}’",
|
||||
"select.removeTag": "Tag verwijderen",
|
||||
"toast.undo": "Ongedaan maken",
|
||||
"toast.undone": "Ongedaan gemaakt",
|
||||
"toast.undoFailed": "Ongedaan maken mislukt",
|
||||
"toast.deleted": "‘{title}’ verwijderd",
|
||||
"toast.status": "‘{title}’ → {status}",
|
||||
"toast.removedFromList": "‘{title}’ verwijderd uit ‘{list}’",
|
||||
"select.count_zero": "Geen titels geselecteerd",
|
||||
"select.count_one": "{count} geselecteerd",
|
||||
"select.count_other": "{count} geselecteerd",
|
||||
"select.statusTitle_one": "Status van {count} titel",
|
||||
"select.statusTitle_other": "Status van {count} titels",
|
||||
"select.listTitle_one": "Lijsten · {count} titel",
|
||||
"select.listTitle_other": "Lijsten · {count} titels",
|
||||
"select.tagTitle_one": "Tag · {count} titel",
|
||||
"select.tagTitle_other": "Tag · {count} titels",
|
||||
"select.deleteConfirm_one": "{count} titel uit je bibliotheek verwijderen?",
|
||||
"select.deleteConfirm_other": "{count} titels uit je bibliotheek verwijderen?",
|
||||
"toast.deletedMany_one": "{count} titel verwijderd",
|
||||
"toast.deletedMany_other": "{count} titels verwijderd",
|
||||
"toast.statusMany_one": "{count} titel → {status}",
|
||||
"toast.statusMany_other": "{count} titels → {status}",
|
||||
"toast.addedToList_one": "{count} titel toegevoegd aan ‘{list}’",
|
||||
"toast.addedToList_other": "{count} titels toegevoegd aan ‘{list}’",
|
||||
"toast.removedFromListMany_one": "{count} titel verwijderd uit ‘{list}’",
|
||||
"toast.removedFromListMany_other": "{count} titels verwijderd uit ‘{list}’",
|
||||
"toast.tagged_one": "#{tag} toegevoegd aan {count} titel",
|
||||
"toast.tagged_other": "#{tag} toegevoegd aan {count} titels",
|
||||
"toast.untagged_one": "#{tag} verwijderd van {count} titel",
|
||||
"toast.untagged_other": "#{tag} verwijderd van {count} titels",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importeren uit een andere app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Mijn bibliotheek importeren",
|
||||
'import.chooseSource': "Waar komen je titels vandaan?",
|
||||
'import.src.letterboxd': "Films, beoordelingen, dagboek, watchlist en likes",
|
||||
'import.src.tvtime': "Gevolgde series en bekeken afleveringen",
|
||||
'import.src.mal': "Animelijst (XML-export)",
|
||||
'import.src.anilist': "Openbare animelijst, via gebruikersnaam",
|
||||
'import.how': "Export ophalen",
|
||||
'import.steps.letterboxd': "Open op letterboxd.com Settings → Import & Export → Export your data.\nJe krijgt een ZIP-bestand: zet het hier neer zoals het is (of de CSV-bestanden).",
|
||||
'import.steps.tvtime': "Vraag in TV Time een kopie van je gegevens aan (Instellingen → Privacy, of support “Request my data”).\nZet de per e-mail ontvangen ZIP hier neer, of de CSV-bestanden.",
|
||||
'import.steps.mal': "Open op myanimelist.net je profiel → Export (Anime List) → Export My List.\nZet het gedownloade .xml.gz-bestand (of de .xml) hier neer.",
|
||||
'import.steps.anilist': "Je AniList-lijst moet openbaar zijn (Settings → Lists).\nVul je gebruikersnaam in: inloggen is niet nodig.",
|
||||
'import.drop': "Bestand kiezen of neerzetten",
|
||||
'import.privacy': "Het bestand wordt op je apparaat gelezen: alleen de titels worden online gezocht.",
|
||||
'import.userName': "AniList-gebruikersnaam",
|
||||
'import.continue': "Doorgaan",
|
||||
'import.back': "Terug",
|
||||
'import.reading': "Bestand lezen…",
|
||||
'import.resolving': "Titels zoeken…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Limiet van verzoeken bereikt, verder over {s} s…",
|
||||
'import.cancel': "Annuleren",
|
||||
'import.noTmdb': "Zonder TMDB kunnen films en series niet worden herkend: voeg een sleutel toe in Instellingen → Databases (of log in), of importeer ze zonder poster.",
|
||||
'import.found': "Titels gelezen uit de export: {n}",
|
||||
'import.new': "Nieuwe items",
|
||||
'import.toUpdate': "Aangevulde items",
|
||||
'import.already': "Al bijgewerkt",
|
||||
'import.notFound': "Niet gevonden",
|
||||
'import.showNotFound': "Niet gevonden titels tonen",
|
||||
'import.hideNotFound': "Lijst verbergen",
|
||||
'import.includeUnmatched': "Niet gevonden titels ook toevoegen (zonder poster)",
|
||||
'import.mergeHint': "Er wordt niets overschreven: je recentere beoordelingen, statussen en datums blijven behouden, en er ontstaan geen dubbele items.",
|
||||
'import.confirm': "Importeren ({n})",
|
||||
'import.importing': "Bezig met importeren…",
|
||||
'import.nothing': "Niets nieuws om te importeren.",
|
||||
'import.done': "Import voltooid",
|
||||
'import.doneAdded': "Toegevoegd",
|
||||
'import.close': "Klaar",
|
||||
'import.err.tooBig': "Bestand te groot.",
|
||||
'import.err.badZip': "ZIP-archief onleesbaar.",
|
||||
'import.err.encrypted': "Archief met wachtwoord: kan niet worden gelezen.",
|
||||
'import.err.unsupported': "Je browser kan dit bestand niet uitpakken: zet liever de uitgepakte CSV-/XML-bestanden neer.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Meldingen op dit apparaat",
|
||||
'push.deviceHint': "Ook als de app gesloten is. De keuzes hieronder gelden ook.",
|
||||
'push.iosInstall': "Voeg op iPhone en iPad AzuuCine eerst toe aan je beginscherm (iOS 16.4 of nieuwer) en open de app via het pictogram om meldingen aan te zetten.",
|
||||
'push.unsupported': "Deze browser ondersteunt geen pushmeldingen.",
|
||||
'push.denied': "Meldingen zijn geblokkeerd voor deze site. Sta ze toe in je browserinstellingen en probeer het opnieuw.",
|
||||
'push.notReady': "Pushmeldingen zijn nog niet beschikbaar op de server.",
|
||||
'push.error': "Kon meldingen niet aanzetten. Controleer je verbinding en probeer het opnieuw.",
|
||||
'netPill.offlineSync': "Offline — je wijzigingen worden gesynchroniseerd",
|
||||
'netPill.offlineLocal': "Offline — alles blijft op dit apparaat bewaard",
|
||||
'netPill.synced': "Gesynchroniseerd",
|
||||
'netPill.hide': "Verbergen",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Oeps… er ging iets mis",
|
||||
"crash.text": "Het scherm is vastgelopen. Je gegevens zijn veilig: herlaad de app om verder te gaan.",
|
||||
"crash.reload": "Herladen",
|
||||
"crash.retry": "Opnieuw proberen",
|
||||
"crash.privacy": "Als de app online is, wordt het probleem automatisch aan ons gemeld, zonder persoonlijke gegevens.",
|
||||
"bug.title": "Bug melden",
|
||||
"bug.hint": "Beschrijf het probleem, wij zoeken het uit",
|
||||
"bug.hintLocal": "Neem contact op via rdacet.fr",
|
||||
"bug.intro": "Leg uit wat er gebeurde en wat je verwachtte. Hoe preciezer, hoe sneller het opgelost is.",
|
||||
"bug.description": "Beschrijving",
|
||||
"bug.placeholder": "Bijv.: bij het openen van een serie vanaf Home blijft de afleveringslijst leeg…",
|
||||
"bug.techTitle": "Bijgevoegde technische info",
|
||||
"bug.techPrivacy": "Niets persoonlijks: niet je e-mail, niet je bibliotheek. Het team ziet je gebruikersnaam zodat het je kan antwoorden.",
|
||||
"bug.send": "Versturen",
|
||||
"bug.thanks": "Bedankt!",
|
||||
"bug.thanksText": "Je melding is verstuurd. We bekijken het zo snel mogelijk.",
|
||||
"bug.info.version": "Versie",
|
||||
"bug.info.browser": "Browser",
|
||||
"bug.info.os": "Systeem",
|
||||
"bug.info.lang": "Taal",
|
||||
"bug.info.theme": "Thema",
|
||||
"bug.info.screen": "Scherm",
|
||||
"bug.info.viewport": "Venster",
|
||||
"bug.info.route": "Pagina",
|
||||
"bug.info.standalone": "Geïnstalleerde app",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Meer opties",
|
||||
"report.action": "Rapporteren",
|
||||
"report.titleReview": "Deze recensie rapporteren",
|
||||
"report.titleProfile": "Dit profiel rapporteren",
|
||||
"report.titleComment": "Deze reactie rapporteren",
|
||||
"report.titleList": "Deze lijst rapporteren",
|
||||
"report.intro": "De persoon weet niet wie hem of haar heeft gerapporteerd. Het moderatieteam bekijkt je melding.",
|
||||
"report.reason": "Reden",
|
||||
"report.reason.spoiler": "Niet-aangegeven spoiler",
|
||||
"report.reason.harassment": "Intimidatie of pesten",
|
||||
"report.reason.hate": "Haatzaaiende taal",
|
||||
"report.reason.sexual": "Seksuele inhoud",
|
||||
"report.reason.spam": "Spam of reclame",
|
||||
"report.reason.impersonation": "Identiteitsfraude",
|
||||
"report.reason.other": "Anders",
|
||||
"report.details": "Details (optioneel)",
|
||||
"report.detailsPlaceholder": "Voeg nuttige context toe voor de moderatie…",
|
||||
"report.send": "Versturen",
|
||||
"report.privacy": "Misbruik van meldingen kan leiden tot schorsing van je account.",
|
||||
"report.thanks": "Bedankt voor je melding",
|
||||
"report.already": "Al gerapporteerd",
|
||||
"report.thanksText": "Het moderatieteam gaat het bekijken. Je kunt dit account ook blokkeren via het profiel.",
|
||||
"report.errRate": "Te veel meldingen vandaag. Probeer het morgen opnieuw.",
|
||||
"report.errNotFound": "Deze inhoud bestaat niet meer of is niet meer zichtbaar voor jou.",
|
||||
"report.errUnavailable": "Rapporteren is nog niet beschikbaar. Probeer het later opnieuw.",
|
||||
"block.block": "Blokkeren",
|
||||
"block.unblock": "Deblokkeren",
|
||||
"block.done": "Account geblokkeerd: {name}",
|
||||
"block.undone": "Account gedeblokkeerd: {name}",
|
||||
"block.notice": "Je hebt dit account geblokkeerd: het kan je niet meer volgen of reageren op je recensies, en de recensies ervan zijn voor jou verborgen.",
|
||||
"block.confirmTitle": "{name} blokkeren?",
|
||||
"block.confirmText": "Jullie volgen elkaar niet meer. Dit account kan je niet meer volgen of op je recensies reageren, en de recensies ervan worden voor jou verborgen. Het krijgt hier geen melding van.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Bevat spoilers",
|
||||
'spoiler.checkboxHint': "Je recensie wordt voor anderen verborgen tot ze ervoor kiezen hem te lezen.",
|
||||
'spoiler.warning': "Deze recensie bevat spoilers",
|
||||
'spoiler.show': "Spoiler tonen",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Reacties",
|
||||
'comments.none': "Nog geen reacties. Begin het gesprek!",
|
||||
'comments.placeholder': "Schrijf een reactie…",
|
||||
'comments.send': "Versturen",
|
||||
'comments.delete': "Reactie verwijderen",
|
||||
'comments.deleteConfirm': "Deze reactie verwijderen?",
|
||||
'comments.loadError': "Reacties konden niet worden geladen.",
|
||||
'comments.unavailable': "Reacties zijn nu niet beschikbaar.",
|
||||
'comments.err.rate': "Je reageert te snel – probeer het over een minuut opnieuw.",
|
||||
'comments.err.gone': "Deze recensie is niet meer beschikbaar.",
|
||||
'comments.err.invalid': "Reactie leeg of te lang (max. 500 tekens).",
|
||||
'notif.review_comment': "reageerde op je recensie",
|
||||
'notif.shared_list_invite': "nodigde je uit voor de gedeelde lijst",
|
||||
'settings.notifComments': "Reacties op mijn recensies",
|
||||
'settings.notifLists': "Uitnodigingen voor gedeelde lijsten",
|
||||
'shared.title': "Gedeelde lijsten",
|
||||
'shared.hint': "Lijsten voor meerdere mensen: elk lid kan titels toevoegen of verwijderen.",
|
||||
'shared.new': "Nieuwe gedeelde lijst",
|
||||
'shared.namePh': "Naam van de lijst (bijv. Films om samen te kijken)",
|
||||
'shared.none': "Nog geen gedeelde lijsten. Maak er een en nodig je vrienden uit.",
|
||||
'shared.invitesYou': "nodigt je uit voor",
|
||||
'shared.accept': "Accepteren",
|
||||
'shared.decline': "Weigeren",
|
||||
'shared.by': "van {name}",
|
||||
'shared.badge': "Gedeelde lijst",
|
||||
'shared.members': "Leden",
|
||||
'shared.invite': "Uitnodigen",
|
||||
'shared.owner': "Eigenaar",
|
||||
'shared.pending': "In afwachting",
|
||||
'shared.removeMember': "{name} uit de lijst verwijderen",
|
||||
'shared.removeTitle': "{title} uit de lijst verwijderen",
|
||||
'shared.addedBy': "Toegevoegd door {name}",
|
||||
'shared.emptyText': "Voeg titels toe vanaf hun pagina of uit je bibliotheek.",
|
||||
'shared.delete': "Gedeelde lijst verwijderen",
|
||||
'shared.deleteConfirm': "De lijst ‘{name}’ wordt voor alle leden verwijderd.",
|
||||
'shared.leave': "Lijst verlaten",
|
||||
'shared.leaveShort': "Verlaten",
|
||||
'shared.leaveConfirm': "Je ziet de lijst ‘{name}’ niet meer. De eigenaar kan je opnieuw uitnodigen.",
|
||||
'shared.notFound': "Lijst niet gevonden",
|
||||
'shared.noCandidates': "Geen titels gevonden in je bibliotheek.",
|
||||
'shared.inviteTitle': "Leden uitnodigen",
|
||||
'shared.inviteHint': "Nodig mensen die je volgt of die jou volgen uit voor ‘{name}’.",
|
||||
'shared.searchPeople': "Zoek een gebruikersnaam…",
|
||||
'shared.noPeople': "Niemand om uit te nodigen: alleen je volgers en mensen die je volgt kunnen meedoen.",
|
||||
'shared.inviteShort': "Uitnodigen",
|
||||
'shared.invited': "Uitgenodigd",
|
||||
'shared.expired': "uitnodiging verlopen",
|
||||
'shared.addTo': "Toevoegen aan een gedeelde lijst",
|
||||
'shared.unavailable': "Gedeelde lijsten zijn nu niet beschikbaar.",
|
||||
'shared.err.rate': "Te veel acties achter elkaar – probeer het over een minuut opnieuw.",
|
||||
'shared.err.members': "Deze lijst heeft het maximale aantal leden bereikt.",
|
||||
'shared.err.lists': "Je hebt het maximale aantal gedeelde lijsten bereikt.",
|
||||
'shared.err.full': "Deze lijst is vol (500 titels).",
|
||||
'shared.err.notConnected': "Je kunt alleen je volgers en mensen die je volgt uitnodigen.",
|
||||
'shared.err.forbidden': "Niet toegestaan: je hebt geen toegang tot deze lijst.",
|
||||
'comments.toggle_one': "{count} reactie",
|
||||
'comments.toggle_other': "{count} reacties",
|
||||
'shared.nMembers_one': "{count} lid",
|
||||
'shared.nMembers_other': "{count} leden",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -189,6 +189,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Informacje prawne",
|
||||
'legal.credits': "Podziękowania",
|
||||
'legal.tmdb': "Ten produkt korzysta z API TMDB, ale nie jest zatwierdzony ani certyfikowany przez TMDB.",
|
||||
'notFound.title': "Ta scena wypadła przy montażu",
|
||||
'notFound.text': "Strona, której szukasz, nie istnieje lub została przeniesiona.",
|
||||
'notFound.back': "Wróć do strony głównej",
|
||||
'auth.newPasswordTitle': 'Wybierz nowe hasło.',
|
||||
'auth.newPassword': 'Nowe hasło',
|
||||
'auth.err.credentials': 'Nieprawidłowy e-mail lub hasło.',
|
||||
@@ -986,6 +989,425 @@ const dict: Translations = {
|
||||
'sync.now': "Synchronizuj",
|
||||
'sync.pending_few': "{count} zmiany oczekują",
|
||||
'sync.pending_many': "{count} zmian oczekuje",
|
||||
// — Où regarder —
|
||||
'watch.title': "Gdzie obejrzeć",
|
||||
'watch.flatrate': "Abonament",
|
||||
'watch.free': "Za darmo",
|
||||
'watch.rent': "Wypożyczenie",
|
||||
'watch.buy': "Zakup",
|
||||
'watch.country': "Kraj",
|
||||
'watch.none': "Niedostępne w streamingu w tym kraju.",
|
||||
'watch.source': "Dane: JustWatch",
|
||||
'watch.open': "Oglądaj w {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Własne tagi",
|
||||
"tags.placeholder": "comfort, halloween, obejrzeć znów z Leą…",
|
||||
"tags.private": "Widoczne tylko dla ciebie, nigdy na profilu.",
|
||||
"tags.filter": "Własne tagi",
|
||||
"select.start": "Zaznacz",
|
||||
"select.exit": "Zakończ zaznaczanie",
|
||||
"select.all": "Zaznacz wszystko",
|
||||
"select.none": "Odznacz wszystko",
|
||||
"select.toggle": "Zaznacz „{title}”",
|
||||
"select.actions": "Działania na zaznaczonych",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Brak list — utwórz ją poniżej.",
|
||||
"select.inList": "Już na liście: {n}/{total}",
|
||||
"select.addTo": "Dodaj do „{list}”",
|
||||
"select.removeFrom": "Usuń z „{list}”",
|
||||
"select.removeTag": "Usuń tag",
|
||||
"toast.undo": "Cofnij",
|
||||
"toast.undone": "Cofnięto",
|
||||
"toast.undoFailed": "Nie udało się cofnąć",
|
||||
"toast.deleted": "Usunięto „{title}”",
|
||||
"toast.status": "„{title}” → {status}",
|
||||
"toast.removedFromList": "Usunięto „{title}” z „{list}”",
|
||||
"select.count_zero": "Nic nie zaznaczono",
|
||||
"select.count_one": "Zaznaczono: {count}",
|
||||
"select.count_few": "Zaznaczono: {count}",
|
||||
"select.count_many": "Zaznaczono: {count}",
|
||||
"select.count_other": "Zaznaczono: {count}",
|
||||
"select.statusTitle_one": "Status: {count} tytuł",
|
||||
"select.statusTitle_few": "Status: {count} tytuły",
|
||||
"select.statusTitle_many": "Status: {count} tytułów",
|
||||
"select.statusTitle_other": "Status: {count} tytułu",
|
||||
"select.listTitle_one": "Listy · {count} tytuł",
|
||||
"select.listTitle_few": "Listy · {count} tytuły",
|
||||
"select.listTitle_many": "Listy · {count} tytułów",
|
||||
"select.listTitle_other": "Listy · {count} tytułu",
|
||||
"select.tagTitle_one": "Tag · {count} tytuł",
|
||||
"select.tagTitle_few": "Tag · {count} tytuły",
|
||||
"select.tagTitle_many": "Tag · {count} tytułów",
|
||||
"select.tagTitle_other": "Tag · {count} tytułu",
|
||||
"select.deleteConfirm_one": "Usunąć z biblioteki: {count} tytuł?",
|
||||
"select.deleteConfirm_few": "Usunąć z biblioteki: {count} tytuły?",
|
||||
"select.deleteConfirm_many": "Usunąć z biblioteki: {count} tytułów?",
|
||||
"select.deleteConfirm_other": "Usunąć z biblioteki: {count} tytułu?",
|
||||
"toast.deletedMany_one": "Usunięto: {count} tytuł",
|
||||
"toast.deletedMany_few": "Usunięto: {count} tytuły",
|
||||
"toast.deletedMany_many": "Usunięto: {count} tytułów",
|
||||
"toast.deletedMany_other": "Usunięto: {count} tytułu",
|
||||
"toast.statusMany_one": "{count} tytuł → {status}",
|
||||
"toast.statusMany_few": "{count} tytuły → {status}",
|
||||
"toast.statusMany_many": "{count} tytułów → {status}",
|
||||
"toast.statusMany_other": "{count} tytułu → {status}",
|
||||
"toast.addedToList_one": "Dodano do „{list}”: {count} tytuł",
|
||||
"toast.addedToList_few": "Dodano do „{list}”: {count} tytuły",
|
||||
"toast.addedToList_many": "Dodano do „{list}”: {count} tytułów",
|
||||
"toast.addedToList_other": "Dodano do „{list}”: {count} tytułu",
|
||||
"toast.removedFromListMany_one": "Usunięto z „{list}”: {count} tytuł",
|
||||
"toast.removedFromListMany_few": "Usunięto z „{list}”: {count} tytuły",
|
||||
"toast.removedFromListMany_many": "Usunięto z „{list}”: {count} tytułów",
|
||||
"toast.removedFromListMany_other": "Usunięto z „{list}”: {count} tytułu",
|
||||
"toast.tagged_one": "Dodano #{tag}: {count} tytuł",
|
||||
"toast.tagged_few": "Dodano #{tag}: {count} tytuły",
|
||||
"toast.tagged_many": "Dodano #{tag}: {count} tytułów",
|
||||
"toast.tagged_other": "Dodano #{tag}: {count} tytułu",
|
||||
"toast.untagged_one": "Usunięto #{tag}: {count} tytuł",
|
||||
"toast.untagged_few": "Usunięto #{tag}: {count} tytuły",
|
||||
"toast.untagged_many": "Usunięto #{tag}: {count} tytułów",
|
||||
"toast.untagged_other": "Usunięto #{tag}: {count} tytułu",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importuj z innej aplikacji",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Importuj moją bibliotekę",
|
||||
'import.chooseSource': "Skąd pochodzą twoje tytuły?",
|
||||
'import.src.letterboxd': "Filmy, oceny, dziennik, do obejrzenia i polubione",
|
||||
'import.src.tvtime': "Obserwowane seriale i obejrzane odcinki",
|
||||
'import.src.mal': "Lista anime (eksport XML)",
|
||||
'import.src.anilist': "Publiczna lista anime, po nazwie użytkownika",
|
||||
'import.how': "Jak pobrać eksport",
|
||||
'import.steps.letterboxd': "Na letterboxd.com otwórz Settings → Import & Export → Export your data.\nOtrzymasz plik ZIP: upuść go tutaj bez zmian (albo jego pliki CSV).",
|
||||
'import.steps.tvtime': "W TV Time poproś o kopię swoich danych (Ustawienia → Prywatność lub wsparcie „Request my data”).\nUpuść tutaj ZIP otrzymany e-mailem albo jego pliki CSV.",
|
||||
'import.steps.mal': "Na myanimelist.net otwórz profil → Export (Anime List) → Export My List.\nUpuść tutaj pobrany plik .xml.gz (albo .xml).",
|
||||
'import.steps.anilist': "Twoja lista AniList musi być publiczna (Settings → Lists).\nPodaj nazwę użytkownika: logowanie nie jest potrzebne.",
|
||||
'import.drop': "Wybierz lub upuść plik",
|
||||
'import.privacy': "Plik jest odczytywany na twoim urządzeniu: online wyszukiwane są tylko tytuły.",
|
||||
'import.userName': "Nazwa użytkownika AniList",
|
||||
'import.continue': "Dalej",
|
||||
'import.back': "Wstecz",
|
||||
'import.reading': "Odczytywanie pliku…",
|
||||
'import.resolving': "Wyszukiwanie tytułów…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Osiągnięto limit zapytań, wznowienie za {s} s…",
|
||||
'import.cancel': "Anuluj",
|
||||
'import.noTmdb': "Bez TMDB filmy i seriale nie mogą zostać rozpoznane: dodaj klucz w Ustawienia → Bazy danych (lub zaloguj się) albo zaimportuj je bez plakatu.",
|
||||
'import.found': "Tytuły odczytane z eksportu: {n}",
|
||||
'import.new': "Nowe pozycje",
|
||||
'import.toUpdate': "Uzupełnione pozycje",
|
||||
'import.already': "Już aktualne",
|
||||
'import.notFound': "Nie znaleziono",
|
||||
'import.showNotFound': "Pokaż nieznalezione tytuły",
|
||||
'import.hideNotFound': "Ukryj listę",
|
||||
'import.includeUnmatched': "Dodaj też nieznalezione tytuły (bez plakatu)",
|
||||
'import.mergeHint': "Nic nie zostanie nadpisane: twoje nowsze oceny, statusy i daty zostają, a duplikaty nie powstają.",
|
||||
'import.confirm': "Importuj ({n})",
|
||||
'import.importing': "Importowanie…",
|
||||
'import.nothing': "Nic nowego do zaimportowania.",
|
||||
'import.done': "Import zakończony",
|
||||
'import.doneAdded': "Dodane",
|
||||
'import.close': "Zakończ",
|
||||
'import.err.tooBig': "Plik jest za duży.",
|
||||
'import.err.badZip': "Nieczytelne archiwum ZIP.",
|
||||
'import.err.encrypted': "Archiwum chronione hasłem: nie można go odczytać.",
|
||||
'import.err.unsupported': "Twoja przeglądarka nie potrafi rozpakować tego pliku: upuść rozpakowane pliki CSV / XML.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Powiadomienia na tym urządzeniu",
|
||||
'push.deviceHint': "Nawet gdy aplikacja jest zamknięta. Poniższe ustawienia też obowiązują.",
|
||||
'push.iosInstall': "Na iPhonie i iPadzie najpierw dodaj AzuuCine do ekranu początkowego (iOS 16.4 lub nowszy), a potem otwórz aplikację z jej ikony, aby włączyć powiadomienia.",
|
||||
'push.unsupported': "Ta przeglądarka nie obsługuje powiadomień push.",
|
||||
'push.denied': "Powiadomienia są zablokowane dla tej witryny. Zezwól na nie w ustawieniach przeglądarki i spróbuj ponownie.",
|
||||
'push.notReady': "Powiadomienia push nie są jeszcze dostępne na serwerze.",
|
||||
'push.error': "Nie udało się włączyć powiadomień. Sprawdź połączenie i spróbuj ponownie.",
|
||||
'netPill.offlineSync': "Offline — zmiany zostaną zsynchronizowane",
|
||||
'netPill.offlineLocal': "Offline — wszystko zostaje zapisane na tym urządzeniu",
|
||||
'netPill.synced': "Zsynchronizowano",
|
||||
'netPill.hide': "Ukryj",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ups… coś poszło nie tak",
|
||||
"crash.text": "Ekran przestał działać. Twoje dane są bezpieczne: odśwież aplikację, aby kontynuować.",
|
||||
"crash.reload": "Odśwież",
|
||||
"crash.retry": "Spróbuj ponownie",
|
||||
"crash.privacy": "Gdy aplikacja jest online, problem jest zgłaszany automatycznie, bez żadnych danych osobowych.",
|
||||
"bug.title": "Zgłoś błąd",
|
||||
"bug.hint": "Opisz problem, a my się nim zajmiemy",
|
||||
"bug.hintLocal": "Skontaktuj się przez rdacet.fr",
|
||||
"bug.intro": "Wyjaśnij, co się stało i czego oczekiwałeś. Im dokładniej, tym szybsza poprawka.",
|
||||
"bug.description": "Opis",
|
||||
"bug.placeholder": "Np. po otwarciu serialu z ekranu głównego lista odcinków jest pusta…",
|
||||
"bug.techTitle": "Dołączone informacje techniczne",
|
||||
"bug.techPrivacy": "Nic osobistego: ani e-mail, ani biblioteka. Zespół widzi Twoją nazwę użytkownika, aby móc odpowiedzieć.",
|
||||
"bug.send": "Wyślij",
|
||||
"bug.thanks": "Dziękujemy!",
|
||||
"bug.thanksText": "Zgłoszenie zostało wysłane. Przyjrzymy się mu jak najszybciej.",
|
||||
"bug.info.version": "Wersja",
|
||||
"bug.info.browser": "Przeglądarka",
|
||||
"bug.info.os": "System",
|
||||
"bug.info.lang": "Język",
|
||||
"bug.info.theme": "Motyw",
|
||||
"bug.info.screen": "Ekran",
|
||||
"bug.info.viewport": "Okno",
|
||||
"bug.info.route": "Strona",
|
||||
"bug.info.standalone": "Zainstalowana aplikacja",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Więcej opcji",
|
||||
"report.action": "Zgłoś",
|
||||
"report.titleReview": "Zgłoś tę recenzję",
|
||||
"report.titleProfile": "Zgłoś ten profil",
|
||||
"report.titleComment": "Zgłoś ten komentarz",
|
||||
"report.titleList": "Zgłoś tę listę",
|
||||
"report.intro": "Ta osoba nie dowie się, kto ją zgłosił. Zespół moderacji rozpatrzy Twoje zgłoszenie.",
|
||||
"report.reason": "Powód",
|
||||
"report.reason.spoiler": "Nieoznaczony spoiler",
|
||||
"report.reason.harassment": "Nękanie lub zastraszanie",
|
||||
"report.reason.hate": "Mowa nienawiści",
|
||||
"report.reason.sexual": "Treści seksualne",
|
||||
"report.reason.spam": "Spam lub reklama",
|
||||
"report.reason.impersonation": "Podszywanie się",
|
||||
"report.reason.other": "Inne",
|
||||
"report.details": "Szczegóły (opcjonalnie)",
|
||||
"report.detailsPlaceholder": "Dodaj kontekst przydatny dla moderacji…",
|
||||
"report.send": "Wyślij",
|
||||
"report.privacy": "Nadużywanie zgłoszeń może skutkować zawieszeniem konta.",
|
||||
"report.thanks": "Dziękujemy za zgłoszenie",
|
||||
"report.already": "Już zgłoszono",
|
||||
"report.thanksText": "Zespół moderacji je rozpatrzy. Możesz też zablokować to konto z poziomu jego profilu.",
|
||||
"report.errRate": "Zbyt wiele zgłoszeń dzisiaj. Spróbuj jutro.",
|
||||
"report.errNotFound": "Ta treść już nie istnieje lub nie jest już dla Ciebie widoczna.",
|
||||
"report.errUnavailable": "Zgłaszanie nie jest jeszcze dostępne. Spróbuj później.",
|
||||
"block.block": "Zablokuj",
|
||||
"block.unblock": "Odblokuj",
|
||||
"block.done": "Zablokowano konto: {name}",
|
||||
"block.undone": "Odblokowano konto: {name}",
|
||||
"block.notice": "Zablokowałeś to konto: nie może Cię już obserwować ani reagować na Twoje recenzje, a jego recenzje są przed Tobą ukryte.",
|
||||
"block.confirmTitle": "Zablokować {name}?",
|
||||
"block.confirmText": "Przestaniecie się obserwować. To konto nie będzie mogło Cię obserwować ani reagować na Twoje recenzje, a jego recenzje zostaną przed Tobą ukryte. Nie zostanie o tym powiadomione.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Zawiera spoilery",
|
||||
'spoiler.checkboxHint': "Twoja recenzja będzie ukryta dla innych, dopóki nie zdecydują się jej przeczytać.",
|
||||
'spoiler.warning': "Ta recenzja zawiera spoilery",
|
||||
'spoiler.show': "Pokaż spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Komentarze",
|
||||
'comments.none': "Brak komentarzy. Rozpocznij rozmowę!",
|
||||
'comments.placeholder': "Napisz komentarz…",
|
||||
'comments.send': "Wyślij",
|
||||
'comments.delete': "Usuń komentarz",
|
||||
'comments.deleteConfirm': "Usunąć ten komentarz?",
|
||||
'comments.loadError': "Nie udało się wczytać komentarzy.",
|
||||
'comments.unavailable': "Komentarze są teraz niedostępne.",
|
||||
'comments.err.rate': "Komentujesz zbyt szybko – spróbuj ponownie za minutę.",
|
||||
'comments.err.gone': "Ta recenzja nie jest już dostępna.",
|
||||
'comments.err.invalid': "Komentarz jest pusty lub za długi (maks. 500 znaków).",
|
||||
'notif.review_comment': "skomentował(a) twoją recenzję",
|
||||
'notif.shared_list_invite': "zaprasza cię do wspólnej listy",
|
||||
'settings.notifComments': "Komentarze do moich recenzji",
|
||||
'settings.notifLists': "Zaproszenia do wspólnych list",
|
||||
'shared.title': "Wspólne listy",
|
||||
'shared.hint': "Listy tworzone razem: każdy członek może dodawać i usuwać tytuły.",
|
||||
'shared.new': "Nowa wspólna lista",
|
||||
'shared.namePh': "Nazwa listy (np. Filmy do obejrzenia we dwoje)",
|
||||
'shared.none': "Brak wspólnych list. Utwórz jedną i zaproś znajomych.",
|
||||
'shared.invitesYou': "zaprasza cię do",
|
||||
'shared.accept': "Akceptuj",
|
||||
'shared.decline': "Odrzuć",
|
||||
'shared.by': "od {name}",
|
||||
'shared.badge': "Wspólna lista",
|
||||
'shared.members': "Członkowie",
|
||||
'shared.invite': "Zaproś",
|
||||
'shared.owner': "Właściciel",
|
||||
'shared.pending': "Oczekuje",
|
||||
'shared.removeMember': "Usuń {name} z listy",
|
||||
'shared.removeTitle': "Usuń {title} z listy",
|
||||
'shared.addedBy': "Dodane przez {name}",
|
||||
'shared.emptyText': "Dodawaj tytuły z ich strony lub ze swojej biblioteki.",
|
||||
'shared.delete': "Usuń wspólną listę",
|
||||
'shared.deleteConfirm': "Lista „{name}” zostanie usunięta dla wszystkich członków.",
|
||||
'shared.leave': "Opuść listę",
|
||||
'shared.leaveShort': "Opuść",
|
||||
'shared.leaveConfirm': "Nie będziesz już widzieć listy „{name}”. Właściciel może zaprosić cię ponownie.",
|
||||
'shared.notFound': "Nie znaleziono listy",
|
||||
'shared.noCandidates': "Nie znaleziono tytułów w twojej bibliotece.",
|
||||
'shared.inviteTitle': "Zaproś członków",
|
||||
'shared.inviteHint': "Zaproś do „{name}” osoby, które obserwujesz lub które obserwują ciebie.",
|
||||
'shared.searchPeople': "Szukaj nazwy użytkownika…",
|
||||
'shared.noPeople': "Nie ma kogo zaprosić: dołączyć mogą tylko twoi obserwujący i obserwowani.",
|
||||
'shared.inviteShort': "Zaproś",
|
||||
'shared.invited': "Zaproszono",
|
||||
'shared.expired': "zaproszenie wygasło",
|
||||
'shared.addTo': "Dodaj do wspólnej listy",
|
||||
'shared.unavailable': "Wspólne listy są teraz niedostępne.",
|
||||
'shared.err.rate': "Zbyt wiele działań naraz – spróbuj ponownie za minutę.",
|
||||
'shared.err.members': "Ta lista osiągnęła maksymalną liczbę członków.",
|
||||
'shared.err.lists': "Osiągnięto maksymalną liczbę wspólnych list.",
|
||||
'shared.err.full': "Ta lista jest pełna (500 tytułów).",
|
||||
'shared.err.notConnected': "Możesz zapraszać tylko obserwujących i obserwowanych.",
|
||||
'shared.err.forbidden': "Niedozwolone: nie masz dostępu do tej listy.",
|
||||
'comments.toggle_one': "{count} komentarz",
|
||||
'comments.toggle_few': "{count} komentarze",
|
||||
'comments.toggle_many': "{count} komentarzy",
|
||||
'comments.toggle_other': "{count} komentarza",
|
||||
'shared.nMembers_one': "{count} członek",
|
||||
'shared.nMembers_few': "{count} członków",
|
||||
'shared.nMembers_many': "{count} członków",
|
||||
'shared.nMembers_other': "{count} członka",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Aviso legal",
|
||||
'legal.credits': "Créditos",
|
||||
'legal.tmdb': "Este produto usa a API do TMDB, mas não é endossado nem certificado pelo TMDB.",
|
||||
'notFound.title': "Esta cena foi cortada na montagem",
|
||||
'notFound.text': "A página que procuras não existe ou foi movida.",
|
||||
'notFound.back': "Voltar ao início",
|
||||
'auth.newPasswordTitle': 'Escolha sua nova senha.',
|
||||
'auth.newPassword': 'Nova senha',
|
||||
'auth.err.credentials': 'E-mail ou senha incorretos.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} alteração pendente",
|
||||
'sync.pending_other': "{count} alterações pendentes",
|
||||
'sync.now': "Sincronizar",
|
||||
// — Où regarder —
|
||||
'watch.title': "Onde assistir",
|
||||
'watch.flatrate': "Assinatura",
|
||||
'watch.free': "Grátis",
|
||||
'watch.rent': "Aluguel",
|
||||
'watch.buy': "Compra",
|
||||
'watch.country': "País",
|
||||
'watch.none': "Indisponível em streaming neste país.",
|
||||
'watch.source': "Dados do JustWatch",
|
||||
'watch.open': "Assistir em {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Tags pessoais",
|
||||
"tags.placeholder": "comfort, halloween, rever com a Lea…",
|
||||
"tags.private": "Só você as vê, nunca no seu perfil.",
|
||||
"tags.filter": "Tags pessoais",
|
||||
"select.start": "Selecionar",
|
||||
"select.exit": "Sair da seleção",
|
||||
"select.all": "Selecionar tudo",
|
||||
"select.none": "Desmarcar tudo",
|
||||
"select.toggle": "Selecionar “{title}”",
|
||||
"select.actions": "Ações da seleção",
|
||||
"select.status": "Status",
|
||||
"select.list": "Lista",
|
||||
"select.tag": "Tag",
|
||||
"select.noLists": "Nenhuma lista ainda — crie uma abaixo.",
|
||||
"select.inList": "Já incluídos: {n}/{total}",
|
||||
"select.addTo": "Adicionar a “{list}”",
|
||||
"select.removeFrom": "Remover de “{list}”",
|
||||
"select.removeTag": "Remover uma tag",
|
||||
"toast.undo": "Desfazer",
|
||||
"toast.undone": "Desfeito",
|
||||
"toast.undoFailed": "Não foi possível desfazer",
|
||||
"toast.deleted": "“{title}” excluído",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}” removido de “{list}”",
|
||||
"select.count_zero": "Nenhum título selecionado",
|
||||
"select.count_one": "{count} selecionado",
|
||||
"select.count_other": "{count} selecionados",
|
||||
"select.statusTitle_one": "Status de {count} título",
|
||||
"select.statusTitle_other": "Status de {count} títulos",
|
||||
"select.listTitle_one": "Listas · {count} título",
|
||||
"select.listTitle_other": "Listas · {count} títulos",
|
||||
"select.tagTitle_one": "Tag · {count} título",
|
||||
"select.tagTitle_other": "Tag · {count} títulos",
|
||||
"select.deleteConfirm_one": "Excluir {count} título da sua biblioteca?",
|
||||
"select.deleteConfirm_other": "Excluir {count} títulos da sua biblioteca?",
|
||||
"toast.deletedMany_one": "{count} título excluído",
|
||||
"toast.deletedMany_other": "{count} títulos excluídos",
|
||||
"toast.statusMany_one": "{count} título → {status}",
|
||||
"toast.statusMany_other": "{count} títulos → {status}",
|
||||
"toast.addedToList_one": "{count} título adicionado a “{list}”",
|
||||
"toast.addedToList_other": "{count} títulos adicionados a “{list}”",
|
||||
"toast.removedFromListMany_one": "{count} título removido de “{list}”",
|
||||
"toast.removedFromListMany_other": "{count} títulos removidos de “{list}”",
|
||||
"toast.tagged_one": "#{tag} adicionada a {count} título",
|
||||
"toast.tagged_other": "#{tag} adicionada a {count} títulos",
|
||||
"toast.untagged_one": "#{tag} removida de {count} título",
|
||||
"toast.untagged_other": "#{tag} removida de {count} títulos",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Importar de outro app",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Importar minha biblioteca",
|
||||
'import.chooseSource': "De onde vêm seus títulos?",
|
||||
'import.src.letterboxd': "Filmes, notas, diário, watchlist e curtidas",
|
||||
'import.src.tvtime': "Séries seguidas e episódios vistos",
|
||||
'import.src.mal': "Lista de animes (exportação XML)",
|
||||
'import.src.anilist': "Lista de animes pública, pelo nome de usuário",
|
||||
'import.how': "Obter a exportação",
|
||||
'import.steps.letterboxd': "Em letterboxd.com, abra Settings → Import & Export → Export your data.\nVocê recebe um arquivo ZIP: solte-o aqui como está (ou os arquivos CSV dele).",
|
||||
'import.steps.tvtime': "No TV Time, peça uma cópia dos seus dados (Configurações → Privacidade, ou suporte “Request my data”).\nSolte aqui o ZIP recebido por e-mail, ou os arquivos CSV dele.",
|
||||
'import.steps.mal': "Em myanimelist.net, abra seu perfil → Export (Anime List) → Export My List.\nSolte aqui o arquivo .xml.gz baixado (ou o .xml).",
|
||||
'import.steps.anilist': "Sua lista do AniList precisa ser pública (Settings → Lists).\nInforme seu nome de usuário: não é preciso entrar.",
|
||||
'import.drop': "Escolher ou soltar o arquivo",
|
||||
'import.privacy': "O arquivo é lido no seu aparelho: só os títulos são buscados on-line.",
|
||||
'import.userName': "Nome de usuário do AniList",
|
||||
'import.continue': "Continuar",
|
||||
'import.back': "Voltar",
|
||||
'import.reading': "Lendo o arquivo…",
|
||||
'import.resolving': "Buscando os títulos…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Limite de solicitações atingido, retomando em {s} s…",
|
||||
'import.cancel': "Cancelar",
|
||||
'import.noTmdb': "Sem TMDB, filmes e séries não podem ser reconhecidos: adicione uma chave em Configurações → Bancos de dados (ou entre), ou importe-os sem pôster.",
|
||||
'import.found': "Títulos lidos na exportação: {n}",
|
||||
'import.new': "Novos registros",
|
||||
'import.toUpdate': "Registros completados",
|
||||
'import.already': "Já atualizados",
|
||||
'import.notFound': "Não encontrados",
|
||||
'import.showNotFound': "Ver títulos não encontrados",
|
||||
'import.hideNotFound': "Ocultar a lista",
|
||||
'import.includeUnmatched': "Adicionar também os títulos não encontrados (sem pôster)",
|
||||
'import.mergeHint': "Nada é sobrescrito: suas notas, status e datas mais recentes são mantidos, e nenhuma duplicata é criada.",
|
||||
'import.confirm': "Importar ({n})",
|
||||
'import.importing': "Importando…",
|
||||
'import.nothing': "Nada novo para importar.",
|
||||
'import.done': "Importação concluída",
|
||||
'import.doneAdded': "Adicionados",
|
||||
'import.close': "Concluir",
|
||||
'import.err.tooBig': "Arquivo grande demais.",
|
||||
'import.err.badZip': "Arquivo ZIP ilegível.",
|
||||
'import.err.encrypted': "Arquivo protegido por senha: não é possível lê-lo.",
|
||||
'import.err.unsupported': "Seu navegador não consegue descompactar este arquivo: solte os arquivos CSV / XML descompactados.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notificações neste dispositivo",
|
||||
'push.deviceHint': "Mesmo com o app fechado. As opções abaixo também valem.",
|
||||
'push.iosInstall': "No iPhone e iPad, primeiro adicione o AzuuCine à Tela de Início (iOS 16.4 ou mais recente) e abra o app pelo ícone para ativar as notificações.",
|
||||
'push.unsupported': "Este navegador não suporta notificações push.",
|
||||
'push.denied': "As notificações estão bloqueadas para este site. Permita-as nas configurações do navegador e tente de novo.",
|
||||
'push.notReady': "As notificações push ainda não estão disponíveis no servidor.",
|
||||
'push.error': "Não foi possível ativar as notificações. Verifique sua conexão e tente de novo.",
|
||||
'netPill.offlineSync': "Offline — suas alterações serão sincronizadas",
|
||||
'netPill.offlineLocal': "Offline — tudo fica salvo neste dispositivo",
|
||||
'netPill.synced': "Sincronizado",
|
||||
'netPill.hide': "Ocultar",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ops… algo deu errado",
|
||||
"crash.text": "A tela travou. Seus dados estão seguros: recarregue o app para continuar.",
|
||||
"crash.reload": "Recarregar",
|
||||
"crash.retry": "Tentar de novo",
|
||||
"crash.privacy": "Quando o app está online, o problema nos é informado automaticamente, sem nenhum dado pessoal.",
|
||||
"bug.title": "Relatar um bug",
|
||||
"bug.hint": "Descreva o problema e nós cuidamos disso",
|
||||
"bug.hintLocal": "Fale conosco em rdacet.fr",
|
||||
"bug.intro": "Explique o que aconteceu e o que você esperava. Quanto mais preciso, mais rápida a correção.",
|
||||
"bug.description": "Descrição",
|
||||
"bug.placeholder": "Ex.: ao abrir uma série pela Início, a lista de episódios fica vazia…",
|
||||
"bug.techTitle": "Informações técnicas anexadas",
|
||||
"bug.techPrivacy": "Nada pessoal: nem seu e-mail, nem sua biblioteca. A equipe vê seu nome de usuário para poder responder.",
|
||||
"bug.send": "Enviar",
|
||||
"bug.thanks": "Obrigado!",
|
||||
"bug.thanksText": "Seu relato foi enviado. Vamos analisá-lo o quanto antes.",
|
||||
"bug.info.version": "Versão",
|
||||
"bug.info.browser": "Navegador",
|
||||
"bug.info.os": "Sistema",
|
||||
"bug.info.lang": "Idioma",
|
||||
"bug.info.theme": "Tema",
|
||||
"bug.info.screen": "Tela",
|
||||
"bug.info.viewport": "Janela",
|
||||
"bug.info.route": "Página",
|
||||
"bug.info.standalone": "App instalado",
|
||||
"bug.info.online": "Online",
|
||||
"report.more": "Mais opções",
|
||||
"report.action": "Denunciar",
|
||||
"report.titleReview": "Denunciar esta avaliação",
|
||||
"report.titleProfile": "Denunciar este perfil",
|
||||
"report.titleComment": "Denunciar este comentário",
|
||||
"report.titleList": "Denunciar esta lista",
|
||||
"report.intro": "A pessoa não saberá quem a denunciou. A equipe de moderação vai analisar sua denúncia.",
|
||||
"report.reason": "Motivo",
|
||||
"report.reason.spoiler": "Spoiler sem aviso",
|
||||
"report.reason.harassment": "Assédio ou intimidação",
|
||||
"report.reason.hate": "Discurso de ódio",
|
||||
"report.reason.sexual": "Conteúdo sexual",
|
||||
"report.reason.spam": "Spam ou publicidade",
|
||||
"report.reason.impersonation": "Falsificação de identidade",
|
||||
"report.reason.other": "Outro",
|
||||
"report.details": "Detalhes (opcional)",
|
||||
"report.detailsPlaceholder": "Adicione um contexto útil para a moderação…",
|
||||
"report.send": "Enviar",
|
||||
"report.privacy": "Denúncias abusivas podem levar à suspensão da sua conta.",
|
||||
"report.thanks": "Obrigado pela denúncia",
|
||||
"report.already": "Já denunciado",
|
||||
"report.thanksText": "A equipe de moderação vai analisá-la. Você também pode bloquear esta conta pelo perfil dela.",
|
||||
"report.errRate": "Denúncias demais hoje. Tente novamente amanhã.",
|
||||
"report.errNotFound": "Este conteúdo não existe mais ou não está mais visível para você.",
|
||||
"report.errUnavailable": "As denúncias ainda não estão disponíveis. Tente mais tarde.",
|
||||
"block.block": "Bloquear",
|
||||
"block.unblock": "Desbloquear",
|
||||
"block.done": "Conta bloqueada: {name}",
|
||||
"block.undone": "Conta desbloqueada: {name}",
|
||||
"block.notice": "Você bloqueou esta conta: ela não pode mais seguir você nem reagir às suas avaliações, e as avaliações dela ficam ocultas para você.",
|
||||
"block.confirmTitle": "Bloquear {name}?",
|
||||
"block.confirmText": "Vocês deixarão de se seguir. Esta conta não poderá seguir você nem reagir às suas avaliações, e as avaliações dela ficarão ocultas para você. Ela não será avisada.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Contém spoilers",
|
||||
'spoiler.checkboxHint': "Sua resenha ficará oculta para os outros até que escolham lê-la.",
|
||||
'spoiler.warning': "Esta resenha contém spoilers",
|
||||
'spoiler.show': "Mostrar spoiler",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Comentários",
|
||||
'comments.none': "Nenhum comentário ainda. Comece a conversa!",
|
||||
'comments.placeholder': "Escreva um comentário…",
|
||||
'comments.send': "Enviar",
|
||||
'comments.delete': "Excluir comentário",
|
||||
'comments.deleteConfirm': "Excluir este comentário?",
|
||||
'comments.loadError': "Não foi possível carregar os comentários.",
|
||||
'comments.unavailable': "Comentários indisponíveis no momento.",
|
||||
'comments.err.rate': "Você está comentando rápido demais: tente de novo em um minuto.",
|
||||
'comments.err.gone': "Esta resenha não está mais disponível.",
|
||||
'comments.err.invalid': "Comentário vazio ou longo demais (máx. 500 caracteres).",
|
||||
'notif.review_comment': "comentou sua resenha",
|
||||
'notif.shared_list_invite': "convidou você para a lista compartilhada",
|
||||
'settings.notifComments': "Comentários nas minhas resenhas",
|
||||
'settings.notifLists': "Convites para listas compartilhadas",
|
||||
'shared.title': "Listas compartilhadas",
|
||||
'shared.hint': "Listas a várias mãos: cada membro pode adicionar ou remover títulos.",
|
||||
'shared.new': "Nova lista compartilhada",
|
||||
'shared.namePh': "Nome da lista (ex.: Filmes para ver a dois)",
|
||||
'shared.none': "Nenhuma lista compartilhada. Crie uma e convide seus amigos.",
|
||||
'shared.invitesYou': "convidou você para entrar em",
|
||||
'shared.accept': "Aceitar",
|
||||
'shared.decline': "Recusar",
|
||||
'shared.by': "de {name}",
|
||||
'shared.badge': "Lista compartilhada",
|
||||
'shared.members': "Membros",
|
||||
'shared.invite': "Convidar",
|
||||
'shared.owner': "Dono",
|
||||
'shared.pending': "Pendente",
|
||||
'shared.removeMember': "Remover {name} da lista",
|
||||
'shared.removeTitle': "Remover {title} da lista",
|
||||
'shared.addedBy': "Adicionado por {name}",
|
||||
'shared.emptyText': "Adicione títulos pela página deles ou pela sua biblioteca.",
|
||||
'shared.delete': "Excluir lista compartilhada",
|
||||
'shared.deleteConfirm': "A lista “{name}” será excluída para todos os membros.",
|
||||
'shared.leave': "Sair da lista",
|
||||
'shared.leaveShort': "Sair",
|
||||
'shared.leaveConfirm': "Você não verá mais a lista “{name}”. O dono poderá convidar você de novo.",
|
||||
'shared.notFound': "Lista não encontrada",
|
||||
'shared.noCandidates': "Nenhum título encontrado na sua biblioteca.",
|
||||
'shared.inviteTitle': "Convidar membros",
|
||||
'shared.inviteHint': "Convide para “{name}” pessoas que você segue ou que seguem você.",
|
||||
'shared.searchPeople': "Buscar um usuário…",
|
||||
'shared.noPeople': "Ninguém para convidar: só seus seguidores e quem você segue podem entrar.",
|
||||
'shared.inviteShort': "Convidar",
|
||||
'shared.invited': "Convidado",
|
||||
'shared.expired': "convite expirado",
|
||||
'shared.addTo': "Adicionar a uma lista compartilhada",
|
||||
'shared.unavailable': "Listas compartilhadas indisponíveis no momento.",
|
||||
'shared.err.rate': "Muitas ações seguidas: tente de novo em um minuto.",
|
||||
'shared.err.members': "Esta lista atingiu o número máximo de membros.",
|
||||
'shared.err.lists': "Você atingiu o número máximo de listas compartilhadas.",
|
||||
'shared.err.full': "Esta lista está cheia (500 títulos).",
|
||||
'shared.err.notConnected': "Você só pode convidar seus seguidores e quem você segue.",
|
||||
'shared.err.forbidden': "Ação não permitida: você não tem acesso a esta lista.",
|
||||
'comments.toggle_one': "{count} comentário",
|
||||
'comments.toggle_other': "{count} comentários",
|
||||
'shared.nMembers_one': "{count} membro",
|
||||
'shared.nMembers_other': "{count} membros",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -189,6 +189,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Правовая информация",
|
||||
'legal.credits': "Благодарности",
|
||||
'legal.tmdb': "Этот продукт использует API TMDB, но не одобрен и не сертифицирован TMDB.",
|
||||
'notFound.title': "Эту сцену вырезали при монтаже",
|
||||
'notFound.text': "Страница, которую ты ищешь, не существует или была перемещена.",
|
||||
'notFound.back': "На главную",
|
||||
'auth.newPasswordTitle': 'Придумай новый пароль.',
|
||||
'auth.newPassword': 'Новый пароль',
|
||||
'auth.err.credentials': 'Неверная почта или пароль.',
|
||||
@@ -986,6 +989,425 @@ const dict: Translations = {
|
||||
'sync.now': "Синхронизировать",
|
||||
'sync.pending_few': "{count} изменения ожидают",
|
||||
'sync.pending_many': "{count} изменений ожидают",
|
||||
// — Où regarder —
|
||||
'watch.title': "Где смотреть",
|
||||
'watch.flatrate': "Подписка",
|
||||
'watch.free': "Бесплатно",
|
||||
'watch.rent': "Аренда",
|
||||
'watch.buy': "Покупка",
|
||||
'watch.country': "Страна",
|
||||
'watch.none': "Недоступно для просмотра онлайн в этой стране.",
|
||||
'watch.source': "Данные JustWatch",
|
||||
'watch.open': "Смотреть на {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Личные теги",
|
||||
"tags.placeholder": "comfort, хэллоуин, пересмотреть с Леей…",
|
||||
"tags.private": "Видны только вам, никогда в профиле.",
|
||||
"tags.filter": "Личные теги",
|
||||
"select.start": "Выбрать",
|
||||
"select.exit": "Выйти из выбора",
|
||||
"select.all": "Выбрать все",
|
||||
"select.none": "Снять выбор",
|
||||
"select.toggle": "Выбрать «{title}»",
|
||||
"select.actions": "Действия с выбранным",
|
||||
"select.status": "Статус",
|
||||
"select.list": "Список",
|
||||
"select.tag": "Тег",
|
||||
"select.noLists": "Списков пока нет — создайте ниже.",
|
||||
"select.inList": "Уже в списке: {n}/{total}",
|
||||
"select.addTo": "Добавить в «{list}»",
|
||||
"select.removeFrom": "Убрать из «{list}»",
|
||||
"select.removeTag": "Убрать тег",
|
||||
"toast.undo": "Отменить",
|
||||
"toast.undone": "Отменено",
|
||||
"toast.undoFailed": "Не удалось отменить",
|
||||
"toast.deleted": "«{title}» удалён",
|
||||
"toast.status": "«{title}» → {status}",
|
||||
"toast.removedFromList": "«{title}» убран из «{list}»",
|
||||
"select.count_zero": "Ничего не выбрано",
|
||||
"select.count_one": "Выбран {count}",
|
||||
"select.count_few": "Выбрано {count}",
|
||||
"select.count_many": "Выбрано {count}",
|
||||
"select.count_other": "Выбрано {count}",
|
||||
"select.statusTitle_one": "Статус: {count} тайтл",
|
||||
"select.statusTitle_few": "Статус: {count} тайтла",
|
||||
"select.statusTitle_many": "Статус: {count} тайтлов",
|
||||
"select.statusTitle_other": "Статус: {count} тайтла",
|
||||
"select.listTitle_one": "Списки · {count} тайтл",
|
||||
"select.listTitle_few": "Списки · {count} тайтла",
|
||||
"select.listTitle_many": "Списки · {count} тайтлов",
|
||||
"select.listTitle_other": "Списки · {count} тайтла",
|
||||
"select.tagTitle_one": "Тег · {count} тайтл",
|
||||
"select.tagTitle_few": "Тег · {count} тайтла",
|
||||
"select.tagTitle_many": "Тег · {count} тайтлов",
|
||||
"select.tagTitle_other": "Тег · {count} тайтла",
|
||||
"select.deleteConfirm_one": "Удалить из библиотеки {count} тайтл?",
|
||||
"select.deleteConfirm_few": "Удалить из библиотеки {count} тайтла?",
|
||||
"select.deleteConfirm_many": "Удалить из библиотеки {count} тайтлов?",
|
||||
"select.deleteConfirm_other": "Удалить из библиотеки {count} тайтла?",
|
||||
"toast.deletedMany_one": "Удалено: {count} тайтл",
|
||||
"toast.deletedMany_few": "Удалено: {count} тайтла",
|
||||
"toast.deletedMany_many": "Удалено: {count} тайтлов",
|
||||
"toast.deletedMany_other": "Удалено: {count} тайтла",
|
||||
"toast.statusMany_one": "{count} тайтл → {status}",
|
||||
"toast.statusMany_few": "{count} тайтла → {status}",
|
||||
"toast.statusMany_many": "{count} тайтлов → {status}",
|
||||
"toast.statusMany_other": "{count} тайтла → {status}",
|
||||
"toast.addedToList_one": "Добавлено в «{list}»: {count} тайтл",
|
||||
"toast.addedToList_few": "Добавлено в «{list}»: {count} тайтла",
|
||||
"toast.addedToList_many": "Добавлено в «{list}»: {count} тайтлов",
|
||||
"toast.addedToList_other": "Добавлено в «{list}»: {count} тайтла",
|
||||
"toast.removedFromListMany_one": "Убрано из «{list}»: {count} тайтл",
|
||||
"toast.removedFromListMany_few": "Убрано из «{list}»: {count} тайтла",
|
||||
"toast.removedFromListMany_many": "Убрано из «{list}»: {count} тайтлов",
|
||||
"toast.removedFromListMany_other": "Убрано из «{list}»: {count} тайтла",
|
||||
"toast.tagged_one": "#{tag} добавлен: {count} тайтл",
|
||||
"toast.tagged_few": "#{tag} добавлен: {count} тайтла",
|
||||
"toast.tagged_many": "#{tag} добавлен: {count} тайтлов",
|
||||
"toast.tagged_other": "#{tag} добавлен: {count} тайтла",
|
||||
"toast.untagged_one": "#{tag} убран: {count} тайтл",
|
||||
"toast.untagged_few": "#{tag} убран: {count} тайтла",
|
||||
"toast.untagged_many": "#{tag} убран: {count} тайтлов",
|
||||
"toast.untagged_other": "#{tag} убран: {count} тайтла",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Импорт из другого приложения",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Импорт моей библиотеки",
|
||||
'import.chooseSource': "Откуда твои тайтлы?",
|
||||
'import.src.letterboxd': "Фильмы, оценки, дневник, список «посмотреть» и лайки",
|
||||
'import.src.tvtime': "Отслеживаемые сериалы и просмотренные серии",
|
||||
'import.src.mal': "Список аниме (экспорт XML)",
|
||||
'import.src.anilist': "Публичный список аниме по имени пользователя",
|
||||
'import.how': "Как получить экспорт",
|
||||
'import.steps.letterboxd': "На letterboxd.com открой Settings → Import & Export → Export your data.\nТы получишь ZIP-файл: перетащи его сюда как есть (или его CSV-файлы).",
|
||||
'import.steps.tvtime': "В TV Time запроси копию своих данных (Настройки → Конфиденциальность или поддержка «Request my data»).\nПеретащи сюда ZIP из письма или его CSV-файлы.",
|
||||
'import.steps.mal': "На myanimelist.net открой профиль → Export (Anime List) → Export My List.\nПеретащи сюда скачанный файл .xml.gz (или .xml).",
|
||||
'import.steps.anilist': "Твой список AniList должен быть публичным (Settings → Lists).\nУкажи имя пользователя: входить не нужно.",
|
||||
'import.drop': "Выбрать или перетащить файл",
|
||||
'import.privacy': "Файл читается на твоём устройстве: в сети ищутся только названия.",
|
||||
'import.userName': "Имя пользователя AniList",
|
||||
'import.continue': "Продолжить",
|
||||
'import.back': "Назад",
|
||||
'import.reading': "Чтение файла…",
|
||||
'import.resolving': "Поиск тайтлов…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Достигнут лимит запросов, продолжение через {s} с…",
|
||||
'import.cancel': "Отмена",
|
||||
'import.noTmdb': "Без TMDB фильмы и сериалы не распознать: добавь ключ в Настройки → Базы данных (или войди в аккаунт) либо импортируй их без постера.",
|
||||
'import.found': "Тайтлов в экспорте: {n}",
|
||||
'import.new': "Новые записи",
|
||||
'import.toUpdate': "Дополненные записи",
|
||||
'import.already': "Уже актуальны",
|
||||
'import.notFound': "Не найдено",
|
||||
'import.showNotFound': "Показать ненайденные",
|
||||
'import.hideNotFound': "Скрыть список",
|
||||
'import.includeUnmatched': "Добавить и ненайденные тайтлы (без постера)",
|
||||
'import.mergeHint': "Ничего не перезаписывается: твои более новые оценки, статусы и даты сохраняются, дубликаты не создаются.",
|
||||
'import.confirm': "Импортировать ({n})",
|
||||
'import.importing': "Импорт…",
|
||||
'import.nothing': "Нечего импортировать.",
|
||||
'import.done': "Импорт завершён",
|
||||
'import.doneAdded': "Добавлено",
|
||||
'import.close': "Готово",
|
||||
'import.err.tooBig': "Файл слишком большой.",
|
||||
'import.err.badZip': "Не удаётся прочитать ZIP-архив.",
|
||||
'import.err.encrypted': "Архив защищён паролем: прочитать его нельзя.",
|
||||
'import.err.unsupported': "Браузер не может распаковать этот файл: перетащи распакованные файлы CSV / XML.",
|
||||
'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} челленджа",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Уведомления на этом устройстве",
|
||||
'push.deviceHint': "Даже когда приложение закрыто. Настройки ниже тоже действуют.",
|
||||
'push.iosInstall': "На iPhone и iPad сначала добавьте AzuuCine на экран «Домой» (iOS 16.4 или новее), затем откройте приложение с его значка, чтобы включить уведомления.",
|
||||
'push.unsupported': "Этот браузер не поддерживает push-уведомления.",
|
||||
'push.denied': "Уведомления для этого сайта заблокированы. Разрешите их в настройках браузера и повторите попытку.",
|
||||
'push.notReady': "Push-уведомления пока недоступны на сервере.",
|
||||
'push.error': "Не удалось включить уведомления. Проверьте подключение и повторите попытку.",
|
||||
'netPill.offlineSync': "Нет сети — изменения будут синхронизированы",
|
||||
'netPill.offlineLocal': "Нет сети — всё сохранено на этом устройстве",
|
||||
'netPill.synced': "Синхронизировано",
|
||||
'netPill.hide': "Скрыть",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ой… что-то пошло не так",
|
||||
"crash.text": "Экран дал сбой. Ваши данные в безопасности: перезагрузите приложение, чтобы продолжить.",
|
||||
"crash.reload": "Перезагрузить",
|
||||
"crash.retry": "Повторить",
|
||||
"crash.privacy": "Когда приложение онлайн, проблема сообщается нам автоматически, без каких-либо личных данных.",
|
||||
"bug.title": "Сообщить об ошибке",
|
||||
"bug.hint": "Опишите проблему, и мы разберёмся",
|
||||
"bug.hintLocal": "Свяжитесь с нами через rdacet.fr",
|
||||
"bug.intro": "Объясните, что произошло и чего вы ожидали. Чем точнее, тем быстрее исправим.",
|
||||
"bug.description": "Описание",
|
||||
"bug.placeholder": "Например: при открытии сериала с главной список эпизодов остаётся пустым…",
|
||||
"bug.techTitle": "Прилагаемые технические данные",
|
||||
"bug.techPrivacy": "Ничего личного: ни e-mail, ни ваша библиотека. Команда видит ваше имя пользователя, чтобы ответить вам.",
|
||||
"bug.send": "Отправить",
|
||||
"bug.thanks": "Спасибо!",
|
||||
"bug.thanksText": "Ваше сообщение отправлено. Мы посмотрим его как можно скорее.",
|
||||
"bug.info.version": "Версия",
|
||||
"bug.info.browser": "Браузер",
|
||||
"bug.info.os": "Система",
|
||||
"bug.info.lang": "Язык",
|
||||
"bug.info.theme": "Тема",
|
||||
"bug.info.screen": "Экран",
|
||||
"bug.info.viewport": "Окно",
|
||||
"bug.info.route": "Страница",
|
||||
"bug.info.standalone": "Установленное приложение",
|
||||
"bug.info.online": "Онлайн",
|
||||
"report.more": "Другие действия",
|
||||
"report.action": "Пожаловаться",
|
||||
"report.titleReview": "Пожаловаться на отзыв",
|
||||
"report.titleProfile": "Пожаловаться на профиль",
|
||||
"report.titleComment": "Пожаловаться на комментарий",
|
||||
"report.titleList": "Пожаловаться на список",
|
||||
"report.intro": "Человек не узнает, кто на него пожаловался. Команда модерации рассмотрит вашу жалобу.",
|
||||
"report.reason": "Причина",
|
||||
"report.reason.spoiler": "Неотмеченный спойлер",
|
||||
"report.reason.harassment": "Травля или запугивание",
|
||||
"report.reason.hate": "Язык вражды",
|
||||
"report.reason.sexual": "Сексуальный контент",
|
||||
"report.reason.spam": "Спам или реклама",
|
||||
"report.reason.impersonation": "Выдача себя за другого",
|
||||
"report.reason.other": "Другое",
|
||||
"report.details": "Подробности (необязательно)",
|
||||
"report.detailsPlaceholder": "Добавьте контекст, полезный для модерации…",
|
||||
"report.send": "Отправить",
|
||||
"report.privacy": "Злоупотребление жалобами может привести к блокировке вашего аккаунта.",
|
||||
"report.thanks": "Спасибо за жалобу",
|
||||
"report.already": "Уже отправлено",
|
||||
"report.thanksText": "Команда модерации её рассмотрит. Вы также можете заблокировать этот аккаунт в его профиле.",
|
||||
"report.errRate": "Слишком много жалоб за сегодня. Попробуйте завтра.",
|
||||
"report.errNotFound": "Этот контент больше не существует или больше вам не виден.",
|
||||
"report.errUnavailable": "Жалобы пока недоступны. Попробуйте позже.",
|
||||
"block.block": "Заблокировать",
|
||||
"block.unblock": "Разблокировать",
|
||||
"block.done": "Аккаунт заблокирован: {name}",
|
||||
"block.undone": "Аккаунт разблокирован: {name}",
|
||||
"block.notice": "Вы заблокировали этот аккаунт: он больше не может подписаться на вас или реагировать на ваши отзывы, а его отзывы скрыты от вас.",
|
||||
"block.confirmTitle": "Заблокировать {name}?",
|
||||
"block.confirmText": "Вы отпишетесь друг от друга. Этот аккаунт не сможет подписаться на вас или реагировать на ваши отзывы, а его отзывы будут скрыты от вас. Он не получит уведомления.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Содержит спойлеры",
|
||||
'spoiler.checkboxHint': "Ваш отзыв будет скрыт от других, пока они сами не решат его прочитать.",
|
||||
'spoiler.warning': "Этот отзыв содержит спойлеры",
|
||||
'spoiler.show': "Показать спойлер",
|
||||
'spoiler.badge': "Спойлер",
|
||||
'comments.title': "Комментарии",
|
||||
'comments.none': "Комментариев пока нет. Начните обсуждение!",
|
||||
'comments.placeholder': "Написать комментарий…",
|
||||
'comments.send': "Отправить",
|
||||
'comments.delete': "Удалить комментарий",
|
||||
'comments.deleteConfirm': "Удалить этот комментарий?",
|
||||
'comments.loadError': "Не удалось загрузить комментарии.",
|
||||
'comments.unavailable': "Комментарии сейчас недоступны.",
|
||||
'comments.err.rate': "Вы комментируете слишком часто — попробуйте через минуту.",
|
||||
'comments.err.gone': "Этот отзыв больше недоступен.",
|
||||
'comments.err.invalid': "Комментарий пустой или слишком длинный (макс. 500 символов).",
|
||||
'notif.review_comment': "прокомментировал(а) ваш отзыв",
|
||||
'notif.shared_list_invite': "приглашает вас в общий список",
|
||||
'settings.notifComments': "Комментарии к моим отзывам",
|
||||
'settings.notifLists': "Приглашения в общие списки",
|
||||
'shared.title': "Общие списки",
|
||||
'shared.hint': "Списки на несколько человек: каждый участник может добавлять и удалять тайтлы.",
|
||||
'shared.new': "Новый общий список",
|
||||
'shared.namePh': "Название списка (напр. Фильмы посмотреть вдвоём)",
|
||||
'shared.none': "Общих списков пока нет. Создайте список и пригласите друзей.",
|
||||
'shared.invitesYou': "приглашает вас в",
|
||||
'shared.accept': "Принять",
|
||||
'shared.decline': "Отклонить",
|
||||
'shared.by': "от {name}",
|
||||
'shared.badge': "Общий список",
|
||||
'shared.members': "Участники",
|
||||
'shared.invite': "Пригласить",
|
||||
'shared.owner': "Владелец",
|
||||
'shared.pending': "Ожидает",
|
||||
'shared.removeMember': "Удалить {name} из списка",
|
||||
'shared.removeTitle': "Удалить «{title}» из списка",
|
||||
'shared.addedBy': "Добавил(а) {name}",
|
||||
'shared.emptyText': "Добавляйте тайтлы с их страницы или из своей библиотеки.",
|
||||
'shared.delete': "Удалить общий список",
|
||||
'shared.deleteConfirm': "Список «{name}» будет удалён для всех участников.",
|
||||
'shared.leave': "Покинуть список",
|
||||
'shared.leaveShort': "Покинуть",
|
||||
'shared.leaveConfirm': "Вы больше не увидите список «{name}». Владелец сможет пригласить вас снова.",
|
||||
'shared.notFound': "Список не найден",
|
||||
'shared.noCandidates': "В вашей библиотеке ничего не найдено.",
|
||||
'shared.inviteTitle': "Пригласить участников",
|
||||
'shared.inviteHint': "Пригласите в «{name}» тех, на кого вы подписаны или кто подписан на вас.",
|
||||
'shared.searchPeople': "Найти по имени пользователя…",
|
||||
'shared.noPeople': "Некого пригласить: вступить могут только ваши подписчики и подписки.",
|
||||
'shared.inviteShort': "Пригласить",
|
||||
'shared.invited': "Приглашён",
|
||||
'shared.expired': "приглашение устарело",
|
||||
'shared.addTo': "Добавить в общий список",
|
||||
'shared.unavailable': "Общие списки сейчас недоступны.",
|
||||
'shared.err.rate': "Слишком много действий подряд — попробуйте через минуту.",
|
||||
'shared.err.members': "В списке уже максимальное число участников.",
|
||||
'shared.err.lists': "Достигнуто максимальное число общих списков.",
|
||||
'shared.err.full': "Список заполнен (500 тайтлов).",
|
||||
'shared.err.notConnected': "Приглашать можно только подписчиков и подписки.",
|
||||
'shared.err.forbidden': "Действие недоступно: у вас нет доступа к этому списку.",
|
||||
'comments.toggle_one': "{count} комментарий",
|
||||
'comments.toggle_few': "{count} комментария",
|
||||
'comments.toggle_many': "{count} комментариев",
|
||||
'comments.toggle_other': "{count} комментария",
|
||||
'shared.nMembers_one': "{count} участник",
|
||||
'shared.nMembers_few': "{count} участника",
|
||||
'shared.nMembers_many': "{count} участников",
|
||||
'shared.nMembers_other': "{count} участника",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "ประกาศทางกฎหมาย",
|
||||
'legal.credits': "เครดิต",
|
||||
'legal.tmdb': "ผลิตภัณฑ์นี้ใช้ TMDB API แต่ไม่ได้รับการรับรองหรือสนับสนุนจาก TMDB",
|
||||
'notFound.title': "ฉากนี้ถูกตัดออกตอนตัดต่อ",
|
||||
'notFound.text': "ไม่พบหน้าที่คุณกำลังหา หรือหน้านั้นถูกย้ายไปแล้ว",
|
||||
'notFound.back': "กลับหน้าแรก",
|
||||
'auth.newPasswordTitle': 'ตั้งรหัสผ่านใหม่ของคุณ',
|
||||
'auth.newPassword': 'รหัสผ่านใหม่',
|
||||
'auth.err.credentials': 'อีเมลหรือรหัสผ่านไม่ถูกต้อง',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "รอซิงค์ {count} รายการ",
|
||||
'sync.pending_other': "รอซิงค์ {count} รายการ",
|
||||
'sync.now': "ซิงค์ตอนนี้",
|
||||
// — Où regarder —
|
||||
'watch.title': "ดูได้ที่ไหน",
|
||||
'watch.flatrate': "สมัครสมาชิก",
|
||||
'watch.free': "ฟรี",
|
||||
'watch.rent': "เช่า",
|
||||
'watch.buy': "ซื้อ",
|
||||
'watch.country': "ประเทศ",
|
||||
'watch.none': "ไม่มีให้สตรีมในประเทศนี้",
|
||||
'watch.source': "ข้อมูลจาก JustWatch",
|
||||
'watch.open': "ดูบน {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "แท็กส่วนตัว",
|
||||
"tags.placeholder": "comfort, ฮาโลวีน, ดูซ้ำกับลีอา…",
|
||||
"tags.private": "เห็นได้เฉพาะคุณ ไม่แสดงในโปรไฟล์",
|
||||
"tags.filter": "แท็กส่วนตัว",
|
||||
"select.start": "เลือก",
|
||||
"select.exit": "ออกจากการเลือก",
|
||||
"select.all": "เลือกทั้งหมด",
|
||||
"select.none": "ยกเลิกการเลือกทั้งหมด",
|
||||
"select.toggle": "เลือก “{title}”",
|
||||
"select.actions": "การทำงานกับรายการที่เลือก",
|
||||
"select.status": "สถานะ",
|
||||
"select.list": "ลิสต์",
|
||||
"select.tag": "แท็ก",
|
||||
"select.noLists": "ยังไม่มีลิสต์ — สร้างได้ด้านล่าง",
|
||||
"select.inList": "อยู่แล้ว: {n}/{total}",
|
||||
"select.addTo": "เพิ่มไปยัง “{list}”",
|
||||
"select.removeFrom": "นำออกจาก “{list}”",
|
||||
"select.removeTag": "ลบแท็ก",
|
||||
"toast.undo": "เลิกทำ",
|
||||
"toast.undone": "เลิกทำแล้ว",
|
||||
"toast.undoFailed": "เลิกทำไม่สำเร็จ",
|
||||
"toast.deleted": "ลบ “{title}” แล้ว",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "นำ “{title}” ออกจาก “{list}” แล้ว",
|
||||
"select.count_zero": "ยังไม่ได้เลือก",
|
||||
"select.count_one": "เลือกแล้ว {count} เรื่อง",
|
||||
"select.count_other": "เลือกแล้ว {count} เรื่อง",
|
||||
"select.statusTitle_one": "สถานะของ {count} เรื่อง",
|
||||
"select.statusTitle_other": "สถานะของ {count} เรื่อง",
|
||||
"select.listTitle_one": "ลิสต์ · {count} เรื่อง",
|
||||
"select.listTitle_other": "ลิสต์ · {count} เรื่อง",
|
||||
"select.tagTitle_one": "แท็ก · {count} เรื่อง",
|
||||
"select.tagTitle_other": "แท็ก · {count} เรื่อง",
|
||||
"select.deleteConfirm_one": "ลบ {count} เรื่องออกจากคลังของคุณ?",
|
||||
"select.deleteConfirm_other": "ลบ {count} เรื่องออกจากคลังของคุณ?",
|
||||
"toast.deletedMany_one": "ลบ {count} เรื่องแล้ว",
|
||||
"toast.deletedMany_other": "ลบ {count} เรื่องแล้ว",
|
||||
"toast.statusMany_one": "{count} เรื่อง → {status}",
|
||||
"toast.statusMany_other": "{count} เรื่อง → {status}",
|
||||
"toast.addedToList_one": "เพิ่ม {count} เรื่องไปยัง “{list}” แล้ว",
|
||||
"toast.addedToList_other": "เพิ่ม {count} เรื่องไปยัง “{list}” แล้ว",
|
||||
"toast.removedFromListMany_one": "นำ {count} เรื่องออกจาก “{list}” แล้ว",
|
||||
"toast.removedFromListMany_other": "นำ {count} เรื่องออกจาก “{list}” แล้ว",
|
||||
"toast.tagged_one": "เพิ่ม #{tag} ให้ {count} เรื่องแล้ว",
|
||||
"toast.tagged_other": "เพิ่ม #{tag} ให้ {count} เรื่องแล้ว",
|
||||
"toast.untagged_one": "ลบ #{tag} จาก {count} เรื่องแล้ว",
|
||||
"toast.untagged_other": "ลบ #{tag} จาก {count} เรื่องแล้ว",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "นำเข้าจากแอปอื่น",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "นำเข้าคลังของฉัน",
|
||||
'import.chooseSource': "รายการของคุณมาจากที่ไหน?",
|
||||
'import.src.letterboxd': "ภาพยนตร์ คะแนน ไดอารี่ รายการอยากดู และที่ชอบ",
|
||||
'import.src.tvtime': "ซีรีส์ที่ติดตามและตอนที่ดูแล้ว",
|
||||
'import.src.mal': "รายการอนิเมะ (ส่งออก XML)",
|
||||
'import.src.anilist': "รายการอนิเมะสาธารณะ ด้วยชื่อผู้ใช้",
|
||||
'import.how': "วิธีรับไฟล์ส่งออก",
|
||||
'import.steps.letterboxd': "บน letterboxd.com เปิด Settings → Import & Export → Export your data\nคุณจะได้ไฟล์ ZIP: วางไว้ที่นี่ได้เลย (หรือไฟล์ CSV ข้างใน)",
|
||||
'import.steps.tvtime': "ใน TV Time ขอสำเนาข้อมูลของคุณ (การตั้งค่า → ความเป็นส่วนตัว หรือฝ่ายช่วยเหลือ “Request my data”)\nวาง ZIP ที่ได้รับทางอีเมล หรือไฟล์ CSV ข้างในไว้ที่นี่",
|
||||
'import.steps.mal': "บน myanimelist.net เปิดโปรไฟล์ → Export (Anime List) → Export My List\nวางไฟล์ .xml.gz ที่ดาวน์โหลด (หรือ .xml) ไว้ที่นี่",
|
||||
'import.steps.anilist': "รายการ AniList ของคุณต้องเป็นสาธารณะ (Settings → Lists)\nกรอกชื่อผู้ใช้: ไม่ต้องเข้าสู่ระบบ",
|
||||
'import.drop': "เลือกหรือวางไฟล์",
|
||||
'import.privacy': "ไฟล์ถูกอ่านบนอุปกรณ์ของคุณ: ค้นหาออนไลน์เฉพาะชื่อเรื่อง",
|
||||
'import.userName': "ชื่อผู้ใช้ AniList",
|
||||
'import.continue': "ต่อไป",
|
||||
'import.back': "ย้อนกลับ",
|
||||
'import.reading': "กำลังอ่านไฟล์…",
|
||||
'import.resolving': "กำลังค้นหารายการ…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "ถึงขีดจำกัดคำขอ จะทำต่อใน {s} วินาที…",
|
||||
'import.cancel': "ยกเลิก",
|
||||
'import.noTmdb': "หากไม่มี TMDB จะจดจำภาพยนตร์และซีรีส์ไม่ได้: เพิ่มคีย์ในการตั้งค่า → ฐานข้อมูล (หรือเข้าสู่ระบบ) หรือนำเข้าโดยไม่มีโปสเตอร์",
|
||||
'import.found': "รายการที่อ่านได้จากไฟล์ส่งออก: {n}",
|
||||
'import.new': "รายการใหม่",
|
||||
'import.toUpdate': "รายการที่เติมข้อมูล",
|
||||
'import.already': "อัปเดตแล้ว",
|
||||
'import.notFound': "ไม่พบ",
|
||||
'import.showNotFound': "ดูรายการที่ไม่พบ",
|
||||
'import.hideNotFound': "ซ่อนรายการ",
|
||||
'import.includeUnmatched': "เพิ่มรายการที่ไม่พบด้วย (ไม่มีโปสเตอร์)",
|
||||
'import.mergeHint': "ไม่มีอะไรถูกเขียนทับ: คะแนน สถานะ และวันที่ล่าสุดของคุณยังอยู่ และไม่มีรายการซ้ำ",
|
||||
'import.confirm': "นำเข้า ({n})",
|
||||
'import.importing': "กำลังนำเข้า…",
|
||||
'import.nothing': "ไม่มีอะไรใหม่ให้นำเข้า",
|
||||
'import.done': "นำเข้าเสร็จแล้ว",
|
||||
'import.doneAdded': "เพิ่มแล้ว",
|
||||
'import.close': "เสร็จสิ้น",
|
||||
'import.err.tooBig': "ไฟล์ใหญ่เกินไป",
|
||||
'import.err.badZip': "อ่านไฟล์ ZIP ไม่ได้",
|
||||
'import.err.encrypted': "ไฟล์ถูกป้องกันด้วยรหัสผ่าน: อ่านไม่ได้",
|
||||
'import.err.unsupported': "เบราว์เซอร์ของคุณแตกไฟล์นี้ไม่ได้: โปรดวางไฟล์ CSV / XML ที่แตกแล้วแทน",
|
||||
'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} ชาเลนจ์",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "การแจ้งเตือนบนอุปกรณ์นี้",
|
||||
'push.deviceHint': "แม้ปิดแอปอยู่ ตัวเลือกด้านล่างก็มีผลด้วย",
|
||||
'push.iosInstall': "บน iPhone และ iPad ให้เพิ่ม AzuuCine ไปยังหน้าจอโฮมก่อน (iOS 16.4 ขึ้นไป) แล้วเปิดแอปจากไอคอนเพื่อเปิดการแจ้งเตือน",
|
||||
'push.unsupported': "เบราว์เซอร์นี้ไม่รองรับการแจ้งเตือนแบบพุช",
|
||||
'push.denied': "การแจ้งเตือนถูกบล็อกสำหรับเว็บไซต์นี้ อนุญาตในการตั้งค่าเบราว์เซอร์แล้วลองอีกครั้ง",
|
||||
'push.notReady': "เซิร์ฟเวอร์ยังไม่พร้อมสำหรับการแจ้งเตือนแบบพุช",
|
||||
'push.error': "เปิดการแจ้งเตือนไม่สำเร็จ ตรวจสอบการเชื่อมต่อแล้วลองอีกครั้ง",
|
||||
'netPill.offlineSync': "ออฟไลน์ — การเปลี่ยนแปลงจะซิงค์ภายหลัง",
|
||||
'netPill.offlineLocal': "ออฟไลน์ — ทุกอย่างยังบันทึกอยู่ในอุปกรณ์นี้",
|
||||
'netPill.synced': "ซิงค์แล้ว",
|
||||
'netPill.hide': "ซ่อน",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "อุ๊ย… มีบางอย่างผิดพลาด",
|
||||
"crash.text": "หน้าจอขัดข้อง ข้อมูลของคุณปลอดภัย: โหลดแอปใหม่เพื่อใช้งานต่อ",
|
||||
"crash.reload": "โหลดใหม่",
|
||||
"crash.retry": "ลองอีกครั้ง",
|
||||
"crash.privacy": "เมื่อแอปออนไลน์ ปัญหาจะถูกแจ้งให้เราทราบโดยอัตโนมัติ โดยไม่มีข้อมูลส่วนตัวใด ๆ",
|
||||
"bug.title": "รายงานบั๊ก",
|
||||
"bug.hint": "อธิบายปัญหา แล้วเราจะจัดการให้",
|
||||
"bug.hintLocal": "ติดต่อเราผ่าน rdacet.fr",
|
||||
"bug.intro": "อธิบายว่าเกิดอะไรขึ้นและคุณคาดหวังอะไร ยิ่งละเอียด ยิ่งแก้ไขได้เร็ว",
|
||||
"bug.description": "รายละเอียด",
|
||||
"bug.placeholder": "เช่น: เมื่อเปิดซีรีส์จากหน้าแรก รายการตอนยังว่างอยู่…",
|
||||
"bug.techTitle": "ข้อมูลทางเทคนิคที่แนบมา",
|
||||
"bug.techPrivacy": "ไม่มีข้อมูลส่วนตัว: ไม่มีอีเมลหรือคลังของคุณ ทีมงานจะเห็นชื่อผู้ใช้ของคุณเพื่อตอบกลับ",
|
||||
"bug.send": "ส่ง",
|
||||
"bug.thanks": "ขอบคุณ!",
|
||||
"bug.thanksText": "ส่งรายงานของคุณแล้ว เราจะตรวจสอบโดยเร็วที่สุด",
|
||||
"bug.info.version": "เวอร์ชัน",
|
||||
"bug.info.browser": "เบราว์เซอร์",
|
||||
"bug.info.os": "ระบบ",
|
||||
"bug.info.lang": "ภาษา",
|
||||
"bug.info.theme": "ธีม",
|
||||
"bug.info.screen": "หน้าจอ",
|
||||
"bug.info.viewport": "หน้าต่าง",
|
||||
"bug.info.route": "หน้า",
|
||||
"bug.info.standalone": "แอปที่ติดตั้ง",
|
||||
"bug.info.online": "ออนไลน์",
|
||||
"report.more": "ตัวเลือกเพิ่มเติม",
|
||||
"report.action": "รายงาน",
|
||||
"report.titleReview": "รายงานรีวิวนี้",
|
||||
"report.titleProfile": "รายงานโปรไฟล์นี้",
|
||||
"report.titleComment": "รายงานความคิดเห็นนี้",
|
||||
"report.titleList": "รายงานรายการนี้",
|
||||
"report.intro": "บุคคลนั้นจะไม่รู้ว่าใครรายงาน ทีมผู้ดูแลจะตรวจสอบรายงานของคุณ",
|
||||
"report.reason": "เหตุผล",
|
||||
"report.reason.spoiler": "สปอยล์โดยไม่เตือน",
|
||||
"report.reason.harassment": "การคุกคามหรือกลั่นแกล้ง",
|
||||
"report.reason.hate": "ถ้อยคำแสดงความเกลียดชัง",
|
||||
"report.reason.sexual": "เนื้อหาทางเพศ",
|
||||
"report.reason.spam": "สแปมหรือโฆษณา",
|
||||
"report.reason.impersonation": "การแอบอ้างตัวตน",
|
||||
"report.reason.other": "อื่น ๆ",
|
||||
"report.details": "รายละเอียด (ไม่บังคับ)",
|
||||
"report.detailsPlaceholder": "เพิ่มบริบทที่เป็นประโยชน์ต่อการดูแล…",
|
||||
"report.send": "ส่ง",
|
||||
"report.privacy": "การรายงานในทางที่ผิดอาจทำให้บัญชีของคุณถูกระงับ",
|
||||
"report.thanks": "ขอบคุณสำหรับการรายงาน",
|
||||
"report.already": "รายงานแล้ว",
|
||||
"report.thanksText": "ทีมผู้ดูแลจะตรวจสอบ คุณยังสามารถบล็อกบัญชีนี้จากโปรไฟล์ได้",
|
||||
"report.errRate": "รายงานมากเกินไปสำหรับวันนี้ ลองใหม่พรุ่งนี้",
|
||||
"report.errNotFound": "เนื้อหานี้ไม่มีอยู่แล้วหรือคุณไม่สามารถมองเห็นได้อีกต่อไป",
|
||||
"report.errUnavailable": "ยังไม่สามารถใช้การรายงานได้ ลองใหม่ภายหลัง",
|
||||
"block.block": "บล็อก",
|
||||
"block.unblock": "เลิกบล็อก",
|
||||
"block.done": "บล็อกบัญชีแล้ว: {name}",
|
||||
"block.undone": "เลิกบล็อกบัญชีแล้ว: {name}",
|
||||
"block.notice": "คุณบล็อกบัญชีนี้แล้ว: บัญชีนี้จะติดตามคุณหรือแสดงความรู้สึกต่อรีวิวของคุณไม่ได้ และรีวิวของบัญชีนี้จะถูกซ่อนจากคุณ",
|
||||
"block.confirmTitle": "บล็อก {name} ไหม?",
|
||||
"block.confirmText": "คุณจะไม่ได้ติดตามกันอีกต่อไป บัญชีนี้จะติดตามคุณหรือแสดงความรู้สึกต่อรีวิวของคุณไม่ได้ และรีวิวของบัญชีนี้จะถูกซ่อนจากคุณ โดยจะไม่มีการแจ้งเตือน",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "มีสปอยล์",
|
||||
'spoiler.checkboxHint': "รีวิวของคุณจะถูกซ่อนจากคนอื่นจนกว่าพวกเขาจะเลือกอ่าน",
|
||||
'spoiler.warning': "รีวิวนี้มีสปอยล์",
|
||||
'spoiler.show': "แสดงสปอยล์",
|
||||
'spoiler.badge': "สปอยล์",
|
||||
'comments.title': "ความคิดเห็น",
|
||||
'comments.none': "ยังไม่มีความคิดเห็น เริ่มคุยกันเลย!",
|
||||
'comments.placeholder': "เขียนความคิดเห็น…",
|
||||
'comments.send': "ส่ง",
|
||||
'comments.delete': "ลบความคิดเห็น",
|
||||
'comments.deleteConfirm': "ลบความคิดเห็นนี้ไหม?",
|
||||
'comments.loadError': "โหลดความคิดเห็นไม่ได้",
|
||||
'comments.unavailable': "ความคิดเห็นยังใช้งานไม่ได้ในขณะนี้",
|
||||
'comments.err.rate': "คุณแสดงความคิดเห็นเร็วเกินไป ลองใหม่ในอีกหนึ่งนาที",
|
||||
'comments.err.gone': "รีวิวนี้ไม่มีให้ดูแล้ว",
|
||||
'comments.err.invalid': "ความคิดเห็นว่างหรือยาวเกินไป (สูงสุด 500 ตัวอักษร)",
|
||||
'notif.review_comment': "แสดงความคิดเห็นในรีวิวของคุณ",
|
||||
'notif.shared_list_invite': "เชิญคุณเข้ารายการที่แชร์",
|
||||
'settings.notifComments': "ความคิดเห็นในรีวิวของฉัน",
|
||||
'settings.notifLists': "คำเชิญเข้ารายการที่แชร์",
|
||||
'shared.title': "รายการที่แชร์",
|
||||
'shared.hint': "รายการที่ทำร่วมกัน: สมาชิกทุกคนเพิ่มหรือนำเรื่องออกได้",
|
||||
'shared.new': "รายการที่แชร์ใหม่",
|
||||
'shared.namePh': "ชื่อรายการ (เช่น หนังที่จะดูด้วยกัน)",
|
||||
'shared.none': "ยังไม่มีรายการที่แชร์ สร้างสักรายการแล้วชวนเพื่อนสิ",
|
||||
'shared.invitesYou': "เชิญคุณเข้าร่วม",
|
||||
'shared.accept': "ยอมรับ",
|
||||
'shared.decline': "ปฏิเสธ",
|
||||
'shared.by': "โดย {name}",
|
||||
'shared.badge': "รายการที่แชร์",
|
||||
'shared.members': "สมาชิก",
|
||||
'shared.invite': "เชิญ",
|
||||
'shared.owner': "เจ้าของ",
|
||||
'shared.pending': "รอตอบรับ",
|
||||
'shared.removeMember': "นำ {name} ออกจากรายการ",
|
||||
'shared.removeTitle': "นำ {title} ออกจากรายการ",
|
||||
'shared.addedBy': "{name} เพิ่ม",
|
||||
'shared.emptyText': "เพิ่มเรื่องจากหน้าของเรื่องนั้นหรือจากคลังของคุณ",
|
||||
'shared.delete': "ลบรายการที่แชร์",
|
||||
'shared.deleteConfirm': "รายการ “{name}” จะถูกลบสำหรับสมาชิกทุกคน",
|
||||
'shared.leave': "ออกจากรายการ",
|
||||
'shared.leaveShort': "ออก",
|
||||
'shared.leaveConfirm': "คุณจะไม่เห็นรายการ “{name}” อีก เจ้าของสามารถเชิญคุณใหม่ได้",
|
||||
'shared.notFound': "ไม่พบรายการ",
|
||||
'shared.noCandidates': "ไม่พบเรื่องในคลังของคุณ",
|
||||
'shared.inviteTitle': "เชิญสมาชิก",
|
||||
'shared.inviteHint': "เชิญคนที่คุณติดตามหรือที่ติดตามคุณเข้า “{name}”",
|
||||
'shared.searchPeople': "ค้นหาชื่อผู้ใช้…",
|
||||
'shared.noPeople': "ไม่มีใครให้เชิญ: เฉพาะผู้ติดตามและคนที่คุณติดตามเท่านั้นที่เข้าร่วมได้",
|
||||
'shared.inviteShort': "เชิญ",
|
||||
'shared.invited': "เชิญแล้ว",
|
||||
'shared.expired': "คำเชิญหมดอายุ",
|
||||
'shared.addTo': "เพิ่มในรายการที่แชร์",
|
||||
'shared.unavailable': "รายการที่แชร์ยังใช้งานไม่ได้ในขณะนี้",
|
||||
'shared.err.rate': "ทำรายการติดกันมากเกินไป ลองใหม่ในอีกหนึ่งนาที",
|
||||
'shared.err.members': "รายการนี้มีสมาชิกครบจำนวนสูงสุดแล้ว",
|
||||
'shared.err.lists': "คุณมีรายการที่แชร์ครบจำนวนสูงสุดแล้ว",
|
||||
'shared.err.full': "รายการนี้เต็มแล้ว (500 เรื่อง)",
|
||||
'shared.err.notConnected': "คุณเชิญได้เฉพาะผู้ติดตามและคนที่คุณติดตาม",
|
||||
'shared.err.forbidden': "ไม่อนุญาต: คุณไม่มีสิทธิ์เข้าถึงรายการนี้",
|
||||
'comments.toggle_one': "{count} ความคิดเห็น",
|
||||
'comments.toggle_other': "{count} ความคิดเห็น",
|
||||
'shared.nMembers_one': "สมาชิก {count} คน",
|
||||
'shared.nMembers_other': "สมาชิก {count} คน",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Yasal bilgiler",
|
||||
'legal.credits': "Katkıda bulunanlar",
|
||||
'legal.tmdb': "Bu ürün TMDB API'sini kullanır ancak TMDB tarafından onaylanmamış veya sertifikalandırılmamıştır.",
|
||||
'notFound.title': "Bu sahne kurguda kesildi",
|
||||
'notFound.text': "Aradığın sayfa yok ya da taşındı.",
|
||||
'notFound.back': "Ana sayfaya dön",
|
||||
'auth.newPasswordTitle': 'Yeni şifreni seç.',
|
||||
'auth.newPassword': 'Yeni şifre',
|
||||
'auth.err.credentials': 'E-posta veya şifre hatalı.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} değişiklik bekliyor",
|
||||
'sync.pending_other': "{count} değişiklik bekliyor",
|
||||
'sync.now': "Şimdi eşitle",
|
||||
// — Où regarder —
|
||||
'watch.title': "Nerede izlenir",
|
||||
'watch.flatrate': "Abonelik",
|
||||
'watch.free': "Ücretsiz",
|
||||
'watch.rent': "Kiralık",
|
||||
'watch.buy': "Satın al",
|
||||
'watch.country': "Ülke",
|
||||
'watch.none': "Bu ülkede yayın platformlarında yok.",
|
||||
'watch.source': "Veriler: JustWatch",
|
||||
'watch.open': "{name} üzerinde izle",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Kişisel etiketler",
|
||||
"tags.placeholder": "comfort, cadılar bayramı, Lea ile tekrar izle…",
|
||||
"tags.private": "Yalnızca sen görürsün, profilinde asla görünmez.",
|
||||
"tags.filter": "Kişisel etiketler",
|
||||
"select.start": "Seç",
|
||||
"select.exit": "Seçimden çık",
|
||||
"select.all": "Tümünü seç",
|
||||
"select.none": "Seçimi kaldır",
|
||||
"select.toggle": "“{title}” seç",
|
||||
"select.actions": "Seçim işlemleri",
|
||||
"select.status": "Durum",
|
||||
"select.list": "Liste",
|
||||
"select.tag": "Etiket",
|
||||
"select.noLists": "Henüz liste yok — aşağıdan oluştur.",
|
||||
"select.inList": "Zaten içinde: {n}/{total}",
|
||||
"select.addTo": "“{list}” listesine ekle",
|
||||
"select.removeFrom": "“{list}” listesinden çıkar",
|
||||
"select.removeTag": "Etiketi kaldır",
|
||||
"toast.undo": "Geri al",
|
||||
"toast.undone": "Geri alındı",
|
||||
"toast.undoFailed": "Geri alınamadı",
|
||||
"toast.deleted": "“{title}” silindi",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "“{title}”, “{list}” listesinden çıkarıldı",
|
||||
"select.count_zero": "Hiçbir yapım seçilmedi",
|
||||
"select.count_one": "{count} seçildi",
|
||||
"select.count_other": "{count} seçildi",
|
||||
"select.statusTitle_one": "{count} yapımın durumu",
|
||||
"select.statusTitle_other": "{count} yapımın durumu",
|
||||
"select.listTitle_one": "Listeler · {count} yapım",
|
||||
"select.listTitle_other": "Listeler · {count} yapım",
|
||||
"select.tagTitle_one": "Etiket · {count} yapım",
|
||||
"select.tagTitle_other": "Etiket · {count} yapım",
|
||||
"select.deleteConfirm_one": "{count} yapım kitaplığından silinsin mi?",
|
||||
"select.deleteConfirm_other": "{count} yapım kitaplığından silinsin mi?",
|
||||
"toast.deletedMany_one": "{count} yapım silindi",
|
||||
"toast.deletedMany_other": "{count} yapım silindi",
|
||||
"toast.statusMany_one": "{count} yapım → {status}",
|
||||
"toast.statusMany_other": "{count} yapım → {status}",
|
||||
"toast.addedToList_one": "{count} yapım “{list}” listesine eklendi",
|
||||
"toast.addedToList_other": "{count} yapım “{list}” listesine eklendi",
|
||||
"toast.removedFromListMany_one": "{count} yapım “{list}” listesinden çıkarıldı",
|
||||
"toast.removedFromListMany_other": "{count} yapım “{list}” listesinden çıkarıldı",
|
||||
"toast.tagged_one": "#{tag}, {count} yapıma eklendi",
|
||||
"toast.tagged_other": "#{tag}, {count} yapıma eklendi",
|
||||
"toast.untagged_one": "#{tag}, {count} yapımdan kaldırıldı",
|
||||
"toast.untagged_other": "#{tag}, {count} yapımdan kaldırıldı",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Başka bir uygulamadan içe aktar",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Kütüphanemi içe aktar",
|
||||
'import.chooseSource': "Başlıkların nereden geliyor?",
|
||||
'import.src.letterboxd': "Filmler, puanlar, günlük, izleme listesi ve beğeniler",
|
||||
'import.src.tvtime': "Takip edilen diziler ve izlenen bölümler",
|
||||
'import.src.mal': "Anime listesi (XML dışa aktarımı)",
|
||||
'import.src.anilist': "Herkese açık anime listesi, kullanıcı adıyla",
|
||||
'import.how': "Dışa aktarımı alma",
|
||||
'import.steps.letterboxd': "letterboxd.com'da Settings → Import & Export → Export your data'yı aç.\nBir ZIP dosyası alırsın: olduğu gibi buraya bırak (ya da CSV dosyalarını).",
|
||||
'import.steps.tvtime': "TV Time’da verilerinin bir kopyasını iste (Ayarlar → Gizlilik ya da destek “Request my data”).\nE-postayla gelen ZIP’i ya da CSV dosyalarını buraya bırak.",
|
||||
'import.steps.mal': "myanimelist.net'te profilini aç → Export (Anime List) → Export My List.\nİndirilen .xml.gz dosyasını (ya da .xml) buraya bırak.",
|
||||
'import.steps.anilist': "AniList listen herkese açık olmalı (Settings → Lists).\nKullanıcı adını gir: giriş yapmak gerekmez.",
|
||||
'import.drop': "Dosya seç ya da bırak",
|
||||
'import.privacy': "Dosya cihazında okunur: çevrimiçi yalnızca başlıklar aranır.",
|
||||
'import.userName': "AniList kullanıcı adı",
|
||||
'import.continue': "Devam",
|
||||
'import.back': "Geri",
|
||||
'import.reading': "Dosya okunuyor…",
|
||||
'import.resolving': "Başlıklar aranıyor…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "İstek sınırına ulaşıldı, {s} sn sonra devam…",
|
||||
'import.cancel': "İptal",
|
||||
'import.noTmdb': "TMDB olmadan filmler ve diziler tanınamaz: Ayarlar → Veritabanları’na bir anahtar ekle (ya da giriş yap) veya afişsiz içe aktar.",
|
||||
'import.found': "Dışa aktarımdan okunan başlıklar: {n}",
|
||||
'import.new': "Yeni kayıtlar",
|
||||
'import.toUpdate': "Tamamlanan kayıtlar",
|
||||
'import.already': "Zaten güncel",
|
||||
'import.notFound': "Bulunamadı",
|
||||
'import.showNotFound': "Bulunamayanları göster",
|
||||
'import.hideNotFound': "Listeyi gizle",
|
||||
'import.includeUnmatched': "Bulunamayan başlıkları da ekle (afişsiz)",
|
||||
'import.mergeHint': "Hiçbir şeyin üzerine yazılmaz: daha yeni puanların, durumların ve tarihlerin korunur, kopya oluşturulmaz.",
|
||||
'import.confirm': "İçe aktar ({n})",
|
||||
'import.importing': "İçe aktarılıyor…",
|
||||
'import.nothing': "İçe aktarılacak yeni bir şey yok.",
|
||||
'import.done': "İçe aktarma tamamlandı",
|
||||
'import.doneAdded': "Eklendi",
|
||||
'import.close': "Bitti",
|
||||
'import.err.tooBig': "Dosya çok büyük.",
|
||||
'import.err.badZip': "ZIP arşivi okunamıyor.",
|
||||
'import.err.encrypted': "Parola korumalı arşiv: okunamıyor.",
|
||||
'import.err.unsupported': "Tarayıcın bu dosyayı açamıyor: bunun yerine açılmış CSV / XML dosyalarını bırak.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Bu cihazda bildirimler",
|
||||
'push.deviceHint': "Uygulama kapalıyken bile. Aşağıdaki seçimler de geçerlidir.",
|
||||
'push.iosInstall': "iPhone ve iPad’de önce AzuuCine’i Ana Ekran’a ekle (iOS 16.4 veya üstü), ardından bildirimleri açmak için uygulamayı simgesinden aç.",
|
||||
'push.unsupported': "Bu tarayıcı anlık bildirimleri desteklemiyor.",
|
||||
'push.denied': "Bu site için bildirimler engellendi. Tarayıcı ayarlarından izin ver ve tekrar dene.",
|
||||
'push.notReady': "Anlık bildirimler sunucuda henüz kullanılamıyor.",
|
||||
'push.error': "Bildirimler açılamadı. Bağlantını kontrol edip tekrar dene.",
|
||||
'netPill.offlineSync': "Çevrimdışı — değişikliklerin eşitlenecek",
|
||||
'netPill.offlineLocal': "Çevrimdışı — her şey bu cihazda kayıtlı kalır",
|
||||
'netPill.synced': "Eşitlendi",
|
||||
'netPill.hide': "Gizle",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Hay aksi… bir şeyler ters gitti",
|
||||
"crash.text": "Ekran çöktü. Verilerin güvende: devam etmek için uygulamayı yeniden yükle.",
|
||||
"crash.reload": "Yeniden yükle",
|
||||
"crash.retry": "Tekrar dene",
|
||||
"crash.privacy": "Uygulama çevrimiçiyken sorun bize otomatik olarak, hiçbir kişisel veri olmadan bildirilir.",
|
||||
"bug.title": "Hata bildir",
|
||||
"bug.hint": "Sorunu anlat, biz ilgilenelim",
|
||||
"bug.hintLocal": "rdacet.fr üzerinden bize ulaş",
|
||||
"bug.intro": "Ne olduğunu ve ne beklediğini açıkla. Ne kadar net olursa düzeltme o kadar hızlı olur.",
|
||||
"bug.description": "Açıklama",
|
||||
"bug.placeholder": "Örn.: Ana sayfadan bir dizi açınca bölüm listesi boş kalıyor…",
|
||||
"bug.techTitle": "Eklenen teknik bilgiler",
|
||||
"bug.techPrivacy": "Kişisel bir şey yok: ne e-postan ne kitaplığın. Ekip sana yanıt verebilmek için kullanıcı adını görür.",
|
||||
"bug.send": "Gönder",
|
||||
"bug.thanks": "Teşekkürler!",
|
||||
"bug.thanksText": "Bildirimin gönderildi. En kısa sürede inceleyeceğiz.",
|
||||
"bug.info.version": "Sürüm",
|
||||
"bug.info.browser": "Tarayıcı",
|
||||
"bug.info.os": "Sistem",
|
||||
"bug.info.lang": "Dil",
|
||||
"bug.info.theme": "Tema",
|
||||
"bug.info.screen": "Ekran",
|
||||
"bug.info.viewport": "Pencere",
|
||||
"bug.info.route": "Sayfa",
|
||||
"bug.info.standalone": "Yüklü uygulama",
|
||||
"bug.info.online": "Çevrimiçi",
|
||||
"report.more": "Diğer seçenekler",
|
||||
"report.action": "Şikâyet et",
|
||||
"report.titleReview": "Bu incelemeyi şikâyet et",
|
||||
"report.titleProfile": "Bu profili şikâyet et",
|
||||
"report.titleComment": "Bu yorumu şikâyet et",
|
||||
"report.titleList": "Bu listeyi şikâyet et",
|
||||
"report.intro": "Kişi kimin şikâyet ettiğini bilmeyecek. Moderasyon ekibi şikâyetini inceleyecek.",
|
||||
"report.reason": "Neden",
|
||||
"report.reason.spoiler": "Uyarısız spoiler",
|
||||
"report.reason.harassment": "Taciz veya zorbalık",
|
||||
"report.reason.hate": "Nefret söylemi",
|
||||
"report.reason.sexual": "Cinsel içerik",
|
||||
"report.reason.spam": "Spam veya reklam",
|
||||
"report.reason.impersonation": "Kimliğe bürünme",
|
||||
"report.reason.other": "Diğer",
|
||||
"report.details": "Ayrıntılar (isteğe bağlı)",
|
||||
"report.detailsPlaceholder": "Moderasyon için faydalı bir bağlam ekle…",
|
||||
"report.send": "Gönder",
|
||||
"report.privacy": "Kötüye kullanılan şikâyetler hesabının askıya alınmasına yol açabilir.",
|
||||
"report.thanks": "Şikâyetin için teşekkürler",
|
||||
"report.already": "Zaten şikâyet edildi",
|
||||
"report.thanksText": "Moderasyon ekibi inceleyecek. Bu hesabı profilinden engelleyebilirsin de.",
|
||||
"report.errRate": "Bugün çok fazla şikâyet gönderdin. Yarın tekrar dene.",
|
||||
"report.errNotFound": "Bu içerik artık yok ya da artık sana görünmüyor.",
|
||||
"report.errUnavailable": "Şikâyet özelliği henüz kullanılamıyor. Daha sonra tekrar dene.",
|
||||
"block.block": "Engelle",
|
||||
"block.unblock": "Engeli kaldır",
|
||||
"block.done": "Hesap engellendi: {name}",
|
||||
"block.undone": "Engel kaldırıldı: {name}",
|
||||
"block.notice": "Bu hesabı engelledin: artık seni takip edemez ya da incelemelerine tepki veremez; incelemeleri senden gizlenir.",
|
||||
"block.confirmTitle": "{name} engellensin mi?",
|
||||
"block.confirmText": "Artık birbirinizi takip etmeyeceksiniz. Bu hesap seni takip edemeyecek ya da incelemelerine tepki veremeyecek; incelemeleri senden gizlenecek. Hesaba bildirim gitmez.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Spoiler içerir",
|
||||
'spoiler.checkboxHint': "İncelemen, başkaları okumayı seçene kadar gizlenecek.",
|
||||
'spoiler.warning': "Bu inceleme spoiler içeriyor",
|
||||
'spoiler.show': "Spoiler’ı göster",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Yorumlar",
|
||||
'comments.none': "Henüz yorum yok. Sohbeti sen başlat!",
|
||||
'comments.placeholder': "Yorum yaz…",
|
||||
'comments.send': "Gönder",
|
||||
'comments.delete': "Yorumu sil",
|
||||
'comments.deleteConfirm': "Bu yorum silinsin mi?",
|
||||
'comments.loadError': "Yorumlar yüklenemedi.",
|
||||
'comments.unavailable': "Yorumlar şu anda kullanılamıyor.",
|
||||
'comments.err.rate': "Çok hızlı yorum yapıyorsun, bir dakika sonra tekrar dene.",
|
||||
'comments.err.gone': "Bu inceleme artık mevcut değil.",
|
||||
'comments.err.invalid': "Yorum boş ya da çok uzun (en fazla 500 karakter).",
|
||||
'notif.review_comment': "incelemene yorum yaptı",
|
||||
'notif.shared_list_invite': "seni ortak listeye davet etti",
|
||||
'settings.notifComments': "İncelemelerime yapılan yorumlar",
|
||||
'settings.notifLists': "Ortak liste davetleri",
|
||||
'shared.title': "Ortak listeler",
|
||||
'shared.hint': "Birlikte oluşturulan listeler: her üye başlık ekleyip çıkarabilir.",
|
||||
'shared.new': "Yeni ortak liste",
|
||||
'shared.namePh': "Liste adı (ör. Birlikte izlenecek filmler)",
|
||||
'shared.none': "Henüz ortak liste yok. Bir tane oluştur ve arkadaşlarını davet et.",
|
||||
'shared.invitesYou': "seni şu listeye davet etti:",
|
||||
'shared.accept': "Kabul et",
|
||||
'shared.decline': "Reddet",
|
||||
'shared.by': "{name} tarafından",
|
||||
'shared.badge': "Ortak liste",
|
||||
'shared.members': "Üyeler",
|
||||
'shared.invite': "Davet et",
|
||||
'shared.owner': "Sahibi",
|
||||
'shared.pending': "Bekliyor",
|
||||
'shared.removeMember': "{name} listeden çıkar",
|
||||
'shared.removeTitle': "{title} listeden çıkar",
|
||||
'shared.addedBy': "{name} ekledi",
|
||||
'shared.emptyText': "Başlıkları kendi sayfalarından ya da kütüphanenden ekle.",
|
||||
'shared.delete': "Ortak listeyi sil",
|
||||
'shared.deleteConfirm': "“{name}” listesi tüm üyeler için silinecek.",
|
||||
'shared.leave': "Listeden ayrıl",
|
||||
'shared.leaveShort': "Ayrıl",
|
||||
'shared.leaveConfirm': "“{name}” listesini artık görmeyeceksin. Sahibi seni yeniden davet edebilir.",
|
||||
'shared.notFound': "Liste bulunamadı",
|
||||
'shared.noCandidates': "Kütüphanende başlık bulunamadı.",
|
||||
'shared.inviteTitle': "Üye davet et",
|
||||
'shared.inviteHint': "Takip ettiğin ya da seni takip eden kişileri “{name}” listesine davet et.",
|
||||
'shared.searchPeople': "Kullanıcı adı ara…",
|
||||
'shared.noPeople': "Davet edilecek kimse yok: yalnızca takipçilerin ve takip ettiklerin katılabilir.",
|
||||
'shared.inviteShort': "Davet et",
|
||||
'shared.invited': "Davet edildi",
|
||||
'shared.expired': "davetin süresi doldu",
|
||||
'shared.addTo': "Ortak listeye ekle",
|
||||
'shared.unavailable': "Ortak listeler şu anda kullanılamıyor.",
|
||||
'shared.err.rate': "Art arda çok fazla işlem, bir dakika sonra tekrar dene.",
|
||||
'shared.err.members': "Bu liste azami üye sayısına ulaştı.",
|
||||
'shared.err.lists': "Azami ortak liste sayısına ulaştın.",
|
||||
'shared.err.full': "Bu liste dolu (500 başlık).",
|
||||
'shared.err.notConnected': "Yalnızca takipçilerini ve takip ettiklerini davet edebilirsin.",
|
||||
'shared.err.forbidden': "İzin verilmiyor: bu listeye erişimin yok.",
|
||||
'comments.toggle_one': "{count} yorum",
|
||||
'comments.toggle_other': "{count} yorum",
|
||||
'shared.nMembers_one': "{count} üye",
|
||||
'shared.nMembers_other': "{count} üye",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "Thông tin pháp lý",
|
||||
'legal.credits': "Ghi công",
|
||||
'legal.tmdb': "Sản phẩm này sử dụng API của TMDB nhưng không được TMDB xác nhận hay chứng nhận.",
|
||||
'notFound.title': "Cảnh này đã bị cắt khi dựng phim",
|
||||
'notFound.text': "Trang bạn tìm không tồn tại hoặc đã được chuyển đi.",
|
||||
'notFound.back': "Về trang chủ",
|
||||
'auth.newPasswordTitle': 'Chọn mật khẩu mới của bạn.',
|
||||
'auth.newPassword': 'Mật khẩu mới',
|
||||
'auth.err.credentials': 'Email hoặc mật khẩu không đúng.',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} thay đổi đang chờ",
|
||||
'sync.pending_other': "{count} thay đổi đang chờ",
|
||||
'sync.now': "Đồng bộ ngay",
|
||||
// — Où regarder —
|
||||
'watch.title': "Xem ở đâu",
|
||||
'watch.flatrate': "Gói thuê bao",
|
||||
'watch.free': "Miễn phí",
|
||||
'watch.rent': "Thuê",
|
||||
'watch.buy': "Mua",
|
||||
'watch.country': "Quốc gia",
|
||||
'watch.none': "Không có trên nền tảng streaming ở quốc gia này.",
|
||||
'watch.source': "Dữ liệu từ JustWatch",
|
||||
'watch.open': "Xem trên {name}",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "Thẻ cá nhân",
|
||||
"tags.placeholder": "comfort, halloween, xem lại với Lea…",
|
||||
"tags.private": "Chỉ mình bạn thấy, không bao giờ hiện trên hồ sơ.",
|
||||
"tags.filter": "Thẻ cá nhân",
|
||||
"select.start": "Chọn",
|
||||
"select.exit": "Thoát chế độ chọn",
|
||||
"select.all": "Chọn tất cả",
|
||||
"select.none": "Bỏ chọn tất cả",
|
||||
"select.toggle": "Chọn “{title}”",
|
||||
"select.actions": "Thao tác với mục đã chọn",
|
||||
"select.status": "Trạng thái",
|
||||
"select.list": "Danh sách",
|
||||
"select.tag": "Thẻ",
|
||||
"select.noLists": "Chưa có danh sách — tạo ở bên dưới.",
|
||||
"select.inList": "Đã có: {n}/{total}",
|
||||
"select.addTo": "Thêm vào “{list}”",
|
||||
"select.removeFrom": "Gỡ khỏi “{list}”",
|
||||
"select.removeTag": "Gỡ thẻ",
|
||||
"toast.undo": "Hoàn tác",
|
||||
"toast.undone": "Đã hoàn tác",
|
||||
"toast.undoFailed": "Không thể hoàn tác",
|
||||
"toast.deleted": "Đã xóa “{title}”",
|
||||
"toast.status": "“{title}” → {status}",
|
||||
"toast.removedFromList": "Đã gỡ “{title}” khỏi “{list}”",
|
||||
"select.count_zero": "Chưa chọn phim nào",
|
||||
"select.count_one": "Đã chọn {count}",
|
||||
"select.count_other": "Đã chọn {count}",
|
||||
"select.statusTitle_one": "Trạng thái của {count} phim",
|
||||
"select.statusTitle_other": "Trạng thái của {count} phim",
|
||||
"select.listTitle_one": "Danh sách · {count} phim",
|
||||
"select.listTitle_other": "Danh sách · {count} phim",
|
||||
"select.tagTitle_one": "Thẻ · {count} phim",
|
||||
"select.tagTitle_other": "Thẻ · {count} phim",
|
||||
"select.deleteConfirm_one": "Xóa {count} phim khỏi thư viện?",
|
||||
"select.deleteConfirm_other": "Xóa {count} phim khỏi thư viện?",
|
||||
"toast.deletedMany_one": "Đã xóa {count} phim",
|
||||
"toast.deletedMany_other": "Đã xóa {count} phim",
|
||||
"toast.statusMany_one": "{count} phim → {status}",
|
||||
"toast.statusMany_other": "{count} phim → {status}",
|
||||
"toast.addedToList_one": "Đã thêm {count} phim vào “{list}”",
|
||||
"toast.addedToList_other": "Đã thêm {count} phim vào “{list}”",
|
||||
"toast.removedFromListMany_one": "Đã gỡ {count} phim khỏi “{list}”",
|
||||
"toast.removedFromListMany_other": "Đã gỡ {count} phim khỏi “{list}”",
|
||||
"toast.tagged_one": "Đã thêm #{tag} cho {count} phim",
|
||||
"toast.tagged_other": "Đã thêm #{tag} cho {count} phim",
|
||||
"toast.untagged_one": "Đã gỡ #{tag} khỏi {count} phim",
|
||||
"toast.untagged_other": "Đã gỡ #{tag} khỏi {count} phim",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "Nhập từ ứng dụng khác",
|
||||
'import.rowHint': "Letterboxd, TV Time, MyAnimeList, AniList",
|
||||
'import.title': "Nhập thư viện của tôi",
|
||||
'import.chooseSource': "Các tựa của bạn đến từ đâu?",
|
||||
'import.src.letterboxd': "Phim, điểm, nhật ký, danh sách muốn xem và yêu thích",
|
||||
'import.src.tvtime': "Phim bộ đang theo dõi và tập đã xem",
|
||||
'import.src.mal': "Danh sách anime (xuất XML)",
|
||||
'import.src.anilist': "Danh sách anime công khai, theo tên người dùng",
|
||||
'import.how': "Cách lấy tệp xuất",
|
||||
'import.steps.letterboxd': "Trên letterboxd.com, mở Settings → Import & Export → Export your data.\nBạn nhận được tệp ZIP: thả nguyên tệp vào đây (hoặc các tệp CSV bên trong).",
|
||||
'import.steps.tvtime': "Trong TV Time, yêu cầu bản sao dữ liệu (Cài đặt → Quyền riêng tư, hoặc hỗ trợ “Request my data”).\nThả tệp ZIP nhận qua email, hoặc các tệp CSV bên trong, vào đây.",
|
||||
'import.steps.mal': "Trên myanimelist.net, mở hồ sơ → Export (Anime List) → Export My List.\nThả tệp .xml.gz đã tải (hoặc .xml) vào đây.",
|
||||
'import.steps.anilist': "Danh sách AniList của bạn phải công khai (Settings → Lists).\nNhập tên người dùng: không cần đăng nhập.",
|
||||
'import.drop': "Chọn hoặc thả tệp",
|
||||
'import.privacy': "Tệp được đọc trên thiết bị của bạn: chỉ tên tựa được tìm trực tuyến.",
|
||||
'import.userName': "Tên người dùng AniList",
|
||||
'import.continue': "Tiếp tục",
|
||||
'import.back': "Quay lại",
|
||||
'import.reading': "Đang đọc tệp…",
|
||||
'import.resolving': "Đang tìm các tựa…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "Đã chạm giới hạn yêu cầu, tiếp tục sau {s} giây…",
|
||||
'import.cancel': "Hủy",
|
||||
'import.noTmdb': "Không có TMDB thì không nhận diện được phim lẻ và phim bộ: thêm khóa trong Cài đặt → Cơ sở dữ liệu (hoặc đăng nhập), hoặc nhập mà không có áp phích.",
|
||||
'import.found': "Số tựa đọc được từ tệp xuất: {n}",
|
||||
'import.new': "Mục mới",
|
||||
'import.toUpdate': "Mục được bổ sung",
|
||||
'import.already': "Đã cập nhật",
|
||||
'import.notFound': "Không tìm thấy",
|
||||
'import.showNotFound': "Xem các tựa không tìm thấy",
|
||||
'import.hideNotFound': "Ẩn danh sách",
|
||||
'import.includeUnmatched': "Thêm cả các tựa không tìm thấy (không có áp phích)",
|
||||
'import.mergeHint': "Không ghi đè gì cả: điểm, trạng thái và ngày mới hơn của bạn được giữ, và không tạo bản trùng.",
|
||||
'import.confirm': "Nhập ({n})",
|
||||
'import.importing': "Đang nhập…",
|
||||
'import.nothing': "Không có gì mới để nhập.",
|
||||
'import.done': "Đã nhập xong",
|
||||
'import.doneAdded': "Đã thêm",
|
||||
'import.close': "Xong",
|
||||
'import.err.tooBig': "Tệp quá lớn.",
|
||||
'import.err.badZip': "Không đọc được tệp ZIP.",
|
||||
'import.err.encrypted': "Tệp nén có mật khẩu: không thể đọc.",
|
||||
'import.err.unsupported': "Trình duyệt không giải nén được tệp này: hãy thả các tệp CSV / XML đã giải nén.",
|
||||
'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",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Thông báo trên thiết bị này",
|
||||
'push.deviceHint': "Ngay cả khi ứng dụng đã đóng. Các lựa chọn bên dưới cũng được áp dụng.",
|
||||
'push.iosInstall': "Trên iPhone và iPad, trước tiên hãy thêm AzuuCine vào Màn hình chính (iOS 16.4 trở lên), sau đó mở ứng dụng từ biểu tượng để bật thông báo.",
|
||||
'push.unsupported': "Trình duyệt này không hỗ trợ thông báo đẩy.",
|
||||
'push.denied': "Thông báo đã bị chặn cho trang này. Hãy cho phép trong cài đặt trình duyệt rồi thử lại.",
|
||||
'push.notReady': "Máy chủ chưa hỗ trợ thông báo đẩy.",
|
||||
'push.error': "Không thể bật thông báo. Kiểm tra kết nối rồi thử lại.",
|
||||
'netPill.offlineSync': "Ngoại tuyến — thay đổi của bạn sẽ được đồng bộ",
|
||||
'netPill.offlineLocal': "Ngoại tuyến — mọi thứ vẫn được lưu trên thiết bị này",
|
||||
'netPill.synced': "Đã đồng bộ",
|
||||
'netPill.hide': "Ẩn",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "Ối… đã có lỗi xảy ra",
|
||||
"crash.text": "Màn hình bị lỗi. Dữ liệu của bạn vẫn an toàn: hãy tải lại ứng dụng để tiếp tục.",
|
||||
"crash.reload": "Tải lại",
|
||||
"crash.retry": "Thử lại",
|
||||
"crash.privacy": "Khi ứng dụng trực tuyến, sự cố được tự động báo cho chúng tôi, không kèm dữ liệu cá nhân nào.",
|
||||
"bug.title": "Báo lỗi",
|
||||
"bug.hint": "Mô tả sự cố, chúng tôi sẽ xử lý",
|
||||
"bug.hintLocal": "Liên hệ qua rdacet.fr",
|
||||
"bug.intro": "Giải thích điều đã xảy ra và điều bạn mong đợi. Càng chính xác, sửa càng nhanh.",
|
||||
"bug.description": "Mô tả",
|
||||
"bug.placeholder": "Ví dụ: khi mở một bộ phim từ Trang chủ, danh sách tập vẫn trống…",
|
||||
"bug.techTitle": "Thông tin kỹ thuật đính kèm",
|
||||
"bug.techPrivacy": "Không có gì cá nhân: không có email hay thư viện của bạn. Nhóm thấy tên người dùng của bạn để có thể trả lời.",
|
||||
"bug.send": "Gửi",
|
||||
"bug.thanks": "Cảm ơn!",
|
||||
"bug.thanksText": "Báo cáo của bạn đã được gửi. Chúng tôi sẽ xem sớm nhất có thể.",
|
||||
"bug.info.version": "Phiên bản",
|
||||
"bug.info.browser": "Trình duyệt",
|
||||
"bug.info.os": "Hệ thống",
|
||||
"bug.info.lang": "Ngôn ngữ",
|
||||
"bug.info.theme": "Giao diện",
|
||||
"bug.info.screen": "Màn hình",
|
||||
"bug.info.viewport": "Cửa sổ",
|
||||
"bug.info.route": "Trang",
|
||||
"bug.info.standalone": "Ứng dụng đã cài",
|
||||
"bug.info.online": "Trực tuyến",
|
||||
"report.more": "Tùy chọn khác",
|
||||
"report.action": "Báo cáo",
|
||||
"report.titleReview": "Báo cáo bài đánh giá này",
|
||||
"report.titleProfile": "Báo cáo hồ sơ này",
|
||||
"report.titleComment": "Báo cáo bình luận này",
|
||||
"report.titleList": "Báo cáo danh sách này",
|
||||
"report.intro": "Người đó sẽ không biết ai đã báo cáo. Đội kiểm duyệt sẽ xem xét báo cáo của bạn.",
|
||||
"report.reason": "Lý do",
|
||||
"report.reason.spoiler": "Tiết lộ nội dung không cảnh báo",
|
||||
"report.reason.harassment": "Quấy rối hoặc bắt nạt",
|
||||
"report.reason.hate": "Ngôn từ thù ghét",
|
||||
"report.reason.sexual": "Nội dung tình dục",
|
||||
"report.reason.spam": "Spam hoặc quảng cáo",
|
||||
"report.reason.impersonation": "Mạo danh",
|
||||
"report.reason.other": "Khác",
|
||||
"report.details": "Chi tiết (không bắt buộc)",
|
||||
"report.detailsPlaceholder": "Thêm bối cảnh hữu ích cho việc kiểm duyệt…",
|
||||
"report.send": "Gửi",
|
||||
"report.privacy": "Báo cáo sai mục đích có thể khiến tài khoản của bạn bị tạm khóa.",
|
||||
"report.thanks": "Cảm ơn bạn đã báo cáo",
|
||||
"report.already": "Đã báo cáo",
|
||||
"report.thanksText": "Đội kiểm duyệt sẽ xem xét. Bạn cũng có thể chặn tài khoản này từ hồ sơ của họ.",
|
||||
"report.errRate": "Quá nhiều báo cáo hôm nay. Hãy thử lại vào ngày mai.",
|
||||
"report.errNotFound": "Nội dung này không còn tồn tại hoặc bạn không còn xem được.",
|
||||
"report.errUnavailable": "Tính năng báo cáo chưa khả dụng. Hãy thử lại sau.",
|
||||
"block.block": "Chặn",
|
||||
"block.unblock": "Bỏ chặn",
|
||||
"block.done": "Đã chặn tài khoản: {name}",
|
||||
"block.undone": "Đã bỏ chặn tài khoản: {name}",
|
||||
"block.notice": "Bạn đã chặn tài khoản này: họ không thể theo dõi bạn hay bày tỏ cảm xúc với bài đánh giá của bạn, và bài đánh giá của họ bị ẩn với bạn.",
|
||||
"block.confirmTitle": "Chặn {name}?",
|
||||
"block.confirmText": "Hai bạn sẽ không còn theo dõi nhau. Tài khoản này sẽ không thể theo dõi bạn hay bày tỏ cảm xúc với bài đánh giá của bạn, và bài đánh giá của họ sẽ bị ẩn với bạn. Họ sẽ không được thông báo.",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "Có tiết lộ nội dung",
|
||||
'spoiler.checkboxHint': "Bài đánh giá của bạn sẽ bị ẩn với người khác cho đến khi họ chọn đọc.",
|
||||
'spoiler.warning': "Bài đánh giá này có tiết lộ nội dung",
|
||||
'spoiler.show': "Hiện nội dung",
|
||||
'spoiler.badge': "Spoiler",
|
||||
'comments.title': "Bình luận",
|
||||
'comments.none': "Chưa có bình luận. Hãy bắt đầu cuộc trò chuyện!",
|
||||
'comments.placeholder': "Viết bình luận…",
|
||||
'comments.send': "Gửi",
|
||||
'comments.delete': "Xóa bình luận",
|
||||
'comments.deleteConfirm': "Xóa bình luận này?",
|
||||
'comments.loadError': "Không tải được bình luận.",
|
||||
'comments.unavailable': "Bình luận hiện chưa khả dụng.",
|
||||
'comments.err.rate': "Bạn bình luận quá nhanh — hãy thử lại sau một phút.",
|
||||
'comments.err.gone': "Bài đánh giá này không còn nữa.",
|
||||
'comments.err.invalid': "Bình luận trống hoặc quá dài (tối đa 500 ký tự).",
|
||||
'notif.review_comment': "đã bình luận bài đánh giá của bạn",
|
||||
'notif.shared_list_invite': "đã mời bạn vào danh sách chung",
|
||||
'settings.notifComments': "Bình luận về đánh giá của tôi",
|
||||
'settings.notifLists': "Lời mời vào danh sách chung",
|
||||
'shared.title': "Danh sách chung",
|
||||
'shared.hint': "Danh sách làm cùng nhau: mọi thành viên đều có thể thêm hoặc bớt phim.",
|
||||
'shared.new': "Danh sách chung mới",
|
||||
'shared.namePh': "Tên danh sách (vd: Phim xem cùng nhau)",
|
||||
'shared.none': "Chưa có danh sách chung. Hãy tạo một danh sách và mời bạn bè.",
|
||||
'shared.invitesYou': "mời bạn tham gia",
|
||||
'shared.accept': "Chấp nhận",
|
||||
'shared.decline': "Từ chối",
|
||||
'shared.by': "của {name}",
|
||||
'shared.badge': "Danh sách chung",
|
||||
'shared.members': "Thành viên",
|
||||
'shared.invite': "Mời",
|
||||
'shared.owner': "Chủ sở hữu",
|
||||
'shared.pending': "Đang chờ",
|
||||
'shared.removeMember': "Xóa {name} khỏi danh sách",
|
||||
'shared.removeTitle': "Bỏ {title} khỏi danh sách",
|
||||
'shared.addedBy': "{name} đã thêm",
|
||||
'shared.emptyText': "Thêm phim từ trang của phim hoặc từ thư viện của bạn.",
|
||||
'shared.delete': "Xóa danh sách chung",
|
||||
'shared.deleteConfirm': "Danh sách “{name}” sẽ bị xóa với mọi thành viên.",
|
||||
'shared.leave': "Rời danh sách",
|
||||
'shared.leaveShort': "Rời",
|
||||
'shared.leaveConfirm': "Bạn sẽ không thấy danh sách “{name}” nữa. Chủ sở hữu có thể mời lại bạn.",
|
||||
'shared.notFound': "Không tìm thấy danh sách",
|
||||
'shared.noCandidates': "Không tìm thấy phim nào trong thư viện của bạn.",
|
||||
'shared.inviteTitle': "Mời thành viên",
|
||||
'shared.inviteHint': "Mời những người bạn theo dõi hoặc theo dõi bạn vào “{name}”.",
|
||||
'shared.searchPeople': "Tìm tên người dùng…",
|
||||
'shared.noPeople': "Không có ai để mời: chỉ người theo dõi bạn và người bạn theo dõi mới tham gia được.",
|
||||
'shared.inviteShort': "Mời",
|
||||
'shared.invited': "Đã mời",
|
||||
'shared.expired': "lời mời đã hết hạn",
|
||||
'shared.addTo': "Thêm vào danh sách chung",
|
||||
'shared.unavailable': "Danh sách chung hiện chưa khả dụng.",
|
||||
'shared.err.rate': "Quá nhiều thao tác liên tiếp — hãy thử lại sau một phút.",
|
||||
'shared.err.members': "Danh sách này đã đủ số thành viên tối đa.",
|
||||
'shared.err.lists': "Bạn đã đạt số danh sách chung tối đa.",
|
||||
'shared.err.full': "Danh sách này đã đầy (500 phim).",
|
||||
'shared.err.notConnected': "Bạn chỉ có thể mời người theo dõi bạn và người bạn theo dõi.",
|
||||
'shared.err.forbidden': "Không được phép: bạn không có quyền truy cập danh sách này.",
|
||||
'comments.toggle_one': "{count} bình luận",
|
||||
'comments.toggle_other': "{count} bình luận",
|
||||
'shared.nMembers_one': "{count} thành viên",
|
||||
'shared.nMembers_other': "{count} thành viên",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -187,6 +187,9 @@ const dict: Translations = {
|
||||
'legal.notice': "法律声明",
|
||||
'legal.credits': "致谢",
|
||||
'legal.tmdb': "本产品使用 TMDB API,但未获得 TMDB 的认可或认证。",
|
||||
'notFound.title': "这场戏在剪辑时被剪掉了",
|
||||
'notFound.text': "你要找的页面不存在或已被移动。",
|
||||
'notFound.back': "返回首页",
|
||||
'auth.newPasswordTitle': '设置你的新密码。',
|
||||
'auth.newPassword': '新密码',
|
||||
'auth.err.credentials': '邮箱或密码错误。',
|
||||
@@ -894,6 +897,377 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} 项更改待上传",
|
||||
'sync.pending_other': "{count} 项更改待上传",
|
||||
'sync.now': "立即同步",
|
||||
// — Où regarder —
|
||||
'watch.title': "在哪里看",
|
||||
'watch.flatrate': "订阅",
|
||||
'watch.free': "免费",
|
||||
'watch.rent': "租借",
|
||||
'watch.buy': "购买",
|
||||
'watch.country': "国家/地区",
|
||||
'watch.none': "该国家/地区暂无在线播放。",
|
||||
'watch.source': "数据来自 JustWatch",
|
||||
'watch.open': "在 {name} 观看",
|
||||
// — Bibliothèque : tags perso, actions groupées, « Annuler » —
|
||||
"tags.label": "个人标签",
|
||||
"tags.placeholder": "comfort、万圣节、和 Lea 重温…",
|
||||
"tags.private": "仅自己可见,不会显示在个人主页上。",
|
||||
"tags.filter": "个人标签",
|
||||
"select.start": "选择",
|
||||
"select.exit": "退出选择",
|
||||
"select.all": "全选",
|
||||
"select.none": "取消全选",
|
||||
"select.toggle": "选择《{title}》",
|
||||
"select.actions": "所选作品操作",
|
||||
"select.status": "状态",
|
||||
"select.list": "片单",
|
||||
"select.tag": "标签",
|
||||
"select.noLists": "还没有片单——在下方创建一个。",
|
||||
"select.inList": "已在其中:{n}/{total}",
|
||||
"select.addTo": "添加到“{list}”",
|
||||
"select.removeFrom": "从“{list}”移除",
|
||||
"select.removeTag": "移除标签",
|
||||
"toast.undo": "撤销",
|
||||
"toast.undone": "已撤销",
|
||||
"toast.undoFailed": "无法撤销",
|
||||
"toast.deleted": "已删除《{title}》",
|
||||
"toast.status": "《{title}》→ {status}",
|
||||
"toast.removedFromList": "已将《{title}》从“{list}”移除",
|
||||
"select.count_zero": "未选择任何作品",
|
||||
"select.count_one": "已选择 {count} 部",
|
||||
"select.count_other": "已选择 {count} 部",
|
||||
"select.statusTitle_one": "{count} 部作品的状态",
|
||||
"select.statusTitle_other": "{count} 部作品的状态",
|
||||
"select.listTitle_one": "片单 · {count} 部",
|
||||
"select.listTitle_other": "片单 · {count} 部",
|
||||
"select.tagTitle_one": "标签 · {count} 部",
|
||||
"select.tagTitle_other": "标签 · {count} 部",
|
||||
"select.deleteConfirm_one": "要从片库中删除 {count} 部作品吗?",
|
||||
"select.deleteConfirm_other": "要从片库中删除 {count} 部作品吗?",
|
||||
"toast.deletedMany_one": "已删除 {count} 部作品",
|
||||
"toast.deletedMany_other": "已删除 {count} 部作品",
|
||||
"toast.statusMany_one": "{count} 部作品 → {status}",
|
||||
"toast.statusMany_other": "{count} 部作品 → {status}",
|
||||
"toast.addedToList_one": "已将 {count} 部作品添加到“{list}”",
|
||||
"toast.addedToList_other": "已将 {count} 部作品添加到“{list}”",
|
||||
"toast.removedFromListMany_one": "已将 {count} 部作品从“{list}”移除",
|
||||
"toast.removedFromListMany_other": "已将 {count} 部作品从“{list}”移除",
|
||||
"toast.tagged_one": "已为 {count} 部作品添加 #{tag}",
|
||||
"toast.tagged_other": "已为 {count} 部作品添加 #{tag}",
|
||||
"toast.untagged_one": "已从 {count} 部作品移除 #{tag}",
|
||||
"toast.untagged_other": "已从 {count} 部作品移除 #{tag}",
|
||||
// — Import depuis d'autres applis —
|
||||
'import.row': "从其他应用导入",
|
||||
'import.rowHint': "Letterboxd、TV Time、MyAnimeList、AniList",
|
||||
'import.title': "导入我的片库",
|
||||
'import.chooseSource': "你的作品来自哪里?",
|
||||
'import.src.letterboxd': "电影、评分、日记、想看和喜欢",
|
||||
'import.src.tvtime': "追的剧和看过的集",
|
||||
'import.src.mal': "动画列表(XML 导出)",
|
||||
'import.src.anilist': "公开的动画列表,按用户名",
|
||||
'import.how': "获取导出文件",
|
||||
'import.steps.letterboxd': "在 letterboxd.com 打开 Settings → Import & Export → Export your data。\n你会得到一个 ZIP 文件:直接拖到这里(或其中的 CSV 文件)。",
|
||||
'import.steps.tvtime': "在 TV Time 中申请数据副本(设置 → 隐私,或客服“Request my data”)。\n把邮件收到的 ZIP 或其中的 CSV 文件拖到这里。",
|
||||
'import.steps.mal': "在 myanimelist.net 打开个人主页 → Export (Anime List) → Export My List。\n把下载的 .xml.gz 文件(或 .xml)拖到这里。",
|
||||
'import.steps.anilist': "你的 AniList 列表需要公开(Settings → Lists)。\n输入用户名即可,无需登录。",
|
||||
'import.drop': "选择或拖入文件",
|
||||
'import.privacy': "文件在你的设备上读取:只会在线搜索作品名。",
|
||||
'import.userName': "AniList 用户名",
|
||||
'import.continue': "继续",
|
||||
'import.back': "返回",
|
||||
'import.reading': "正在读取文件…",
|
||||
'import.resolving': "正在查找作品…",
|
||||
'import.progress': "{done} / {total}",
|
||||
'import.rateWait': "已达请求上限,{s} 秒后继续…",
|
||||
'import.cancel': "取消",
|
||||
'import.noTmdb': "没有 TMDB 就无法识别电影和剧集:在 设置 → 数据库 中添加密钥(或登录),或不带海报导入。",
|
||||
'import.found': "从导出中读取的作品:{n}",
|
||||
'import.new': "新条目",
|
||||
'import.toUpdate': "补充的条目",
|
||||
'import.already': "已是最新",
|
||||
'import.notFound': "未找到",
|
||||
'import.showNotFound': "查看未找到的作品",
|
||||
'import.hideNotFound': "隐藏列表",
|
||||
'import.includeUnmatched': "同时添加未找到的作品(无海报)",
|
||||
'import.mergeHint': "不会覆盖任何内容:保留你较新的评分、状态和日期,也不会产生重复条目。",
|
||||
'import.confirm': "导入({n})",
|
||||
'import.importing': "正在导入…",
|
||||
'import.nothing': "没有新的内容可导入。",
|
||||
'import.done': "导入完成",
|
||||
'import.doneAdded': "已添加",
|
||||
'import.close': "完成",
|
||||
'import.err.tooBig': "文件太大。",
|
||||
'import.err.badZip': "无法读取 ZIP 压缩包。",
|
||||
'import.err.encrypted': "压缩包有密码保护:无法读取。",
|
||||
'import.err.unsupported': "你的浏览器无法解压此文件:请拖入解压后的 CSV / XML 文件。",
|
||||
'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} 个挑战",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "此设备上的通知",
|
||||
'push.deviceHint': "即使应用已关闭也会提醒。下方的选项同样适用。",
|
||||
'push.iosInstall': "在 iPhone 和 iPad 上,请先将 AzuuCine 添加到主屏幕(iOS 16.4 或更高版本),再从图标打开应用以开启通知。",
|
||||
'push.unsupported': "此浏览器不支持推送通知。",
|
||||
'push.denied': "此网站的通知已被阻止。请在浏览器设置中允许后重试。",
|
||||
'push.notReady': "服务器暂未开放推送通知。",
|
||||
'push.error': "无法开启通知。请检查网络连接后重试。",
|
||||
'netPill.offlineSync': "离线 — 你的修改将稍后同步",
|
||||
'netPill.offlineLocal': "离线 — 所有内容都保存在此设备上",
|
||||
'netPill.synced': "已同步",
|
||||
'netPill.hide': "隐藏",
|
||||
// — Modération : signaler, bloquer, signaler un bug, écran de plantage —
|
||||
"crash.title": "哎呀……出了点问题",
|
||||
"crash.text": "界面崩溃了。你的数据是安全的:重新加载应用即可继续。",
|
||||
"crash.reload": "重新加载",
|
||||
"crash.retry": "重试",
|
||||
"crash.privacy": "应用联网时,问题会自动报告给我们,不含任何个人数据。",
|
||||
"bug.title": "报告问题",
|
||||
"bug.hint": "描述问题,我们来处理",
|
||||
"bug.hintLocal": "通过 rdacet.fr 联系我们",
|
||||
"bug.intro": "说明发生了什么以及你的预期。描述越准确,修复越快。",
|
||||
"bug.description": "描述",
|
||||
"bug.placeholder": "例如:从首页打开剧集时,剧集列表一直是空的……",
|
||||
"bug.techTitle": "附带的技术信息",
|
||||
"bug.techPrivacy": "不含任何个人信息:没有你的邮箱,也没有你的片库。团队会看到你的用户名以便回复你。",
|
||||
"bug.send": "发送",
|
||||
"bug.thanks": "谢谢!",
|
||||
"bug.thanksText": "你的报告已发送。我们会尽快查看。",
|
||||
"bug.info.version": "版本",
|
||||
"bug.info.browser": "浏览器",
|
||||
"bug.info.os": "系统",
|
||||
"bug.info.lang": "语言",
|
||||
"bug.info.theme": "主题",
|
||||
"bug.info.screen": "屏幕",
|
||||
"bug.info.viewport": "窗口",
|
||||
"bug.info.route": "页面",
|
||||
"bug.info.standalone": "已安装应用",
|
||||
"bug.info.online": "在线",
|
||||
"report.more": "更多选项",
|
||||
"report.action": "举报",
|
||||
"report.titleReview": "举报这条评价",
|
||||
"report.titleProfile": "举报这个主页",
|
||||
"report.titleComment": "举报这条评论",
|
||||
"report.titleList": "举报这个片单",
|
||||
"report.intro": "对方不会知道是谁举报的。审核团队会处理你的举报。",
|
||||
"report.reason": "原因",
|
||||
"report.reason.spoiler": "未标注的剧透",
|
||||
"report.reason.harassment": "骚扰或霸凌",
|
||||
"report.reason.hate": "仇恨言论",
|
||||
"report.reason.sexual": "色情内容",
|
||||
"report.reason.spam": "垃圾信息或广告",
|
||||
"report.reason.impersonation": "冒充他人",
|
||||
"report.reason.other": "其他",
|
||||
"report.details": "补充说明(可选)",
|
||||
"report.detailsPlaceholder": "补充对审核有帮助的背景……",
|
||||
"report.send": "发送",
|
||||
"report.privacy": "恶意举报可能导致你的账号被封禁。",
|
||||
"report.thanks": "感谢你的举报",
|
||||
"report.already": "已举报过",
|
||||
"report.thanksText": "审核团队会进行处理。你也可以在对方主页屏蔽这个账号。",
|
||||
"report.errRate": "今天的举报次数过多,请明天再试。",
|
||||
"report.errNotFound": "此内容已不存在或你已无法查看。",
|
||||
"report.errUnavailable": "举报功能暂不可用,请稍后再试。",
|
||||
"block.block": "屏蔽",
|
||||
"block.unblock": "取消屏蔽",
|
||||
"block.done": "已屏蔽:{name}",
|
||||
"block.undone": "已取消屏蔽:{name}",
|
||||
"block.notice": "你已屏蔽此账号:对方无法再关注你或回应你的评价,其评价也对你隐藏。",
|
||||
"block.confirmTitle": "屏蔽 {name}?",
|
||||
"block.confirmText": "你们将互相取消关注。此账号将无法关注你或回应你的评价,其评价也会对你隐藏。对方不会收到通知。",
|
||||
// — Modération : administration (signalements, suspendus, bugs, erreurs) —
|
||||
"adminMod.tabReports": "Reports",
|
||||
"adminMod.tabSuspended": "Suspended",
|
||||
"adminMod.tabBugs": "Bugs",
|
||||
"adminMod.tabErrors": "Errors",
|
||||
"adminMod.adminBadge": "Admin",
|
||||
"adminMod.typeReview": "Review",
|
||||
"adminMod.typeProfile": "Profile",
|
||||
"adminMod.typeComment": "Comment",
|
||||
"adminMod.typeList": "List",
|
||||
"adminMod.reportCount_one": "{count} report",
|
||||
"adminMod.reportCount_other": "{count} reports",
|
||||
"adminMod.repeat_one": "{count} item from this account reported",
|
||||
"adminMod.repeat_other": "{count} items from this account reported",
|
||||
"adminMod.contentGone": "Content deleted since — copy taken when reported:",
|
||||
"adminMod.noPreview": "No preview for this content (id {id}).",
|
||||
"adminMod.editedSince": "Edited since it was reported — see the reported version",
|
||||
"adminMod.reportsDetail_one": "See the report",
|
||||
"adminMod.reportsDetail_other": "See the last {count} reports",
|
||||
"adminMod.resetProfile": "Reset profile",
|
||||
"adminMod.deleteContent": "Delete content",
|
||||
"adminMod.resolve": "Mark resolved",
|
||||
"adminMod.dismiss": "Dismiss",
|
||||
"adminMod.statusResolved": "Resolved",
|
||||
"adminMod.statusDismissed": "Dismissed",
|
||||
"adminMod.open": "Open",
|
||||
"adminMod.closed": "Handled",
|
||||
"adminMod.actionFailed": "Action failed: {error}",
|
||||
"adminMod.migrationHint": "The moderation SQL migration may not be applied yet.",
|
||||
"adminMod.noOpen": "No pending reports",
|
||||
"adminMod.noClosed": "No handled reports",
|
||||
"adminMod.confirmResetTitle": "Reset this profile?",
|
||||
"adminMod.confirmResetMsg": "The bio, photo and banner will be erased, and the display name replaced by the username.",
|
||||
"adminMod.confirm": "Confirm",
|
||||
"adminMod.noSuspended": "No suspended accounts",
|
||||
"adminMod.suspendedOn": "Suspended on {date}",
|
||||
"adminMod.suspendedUnknown": "Suspension date unknown",
|
||||
"adminMod.bugNew": "New",
|
||||
"adminMod.bugInProgress": "In progress",
|
||||
"adminMod.bugFixed": "Fixed",
|
||||
"adminMod.all": "All",
|
||||
"adminMod.noBugs": "No bugs reported",
|
||||
"adminMod.srcError": "JS error",
|
||||
"adminMod.srcRejection": "Unhandled rejection",
|
||||
"adminMod.srcRender": "Render crash",
|
||||
"adminMod.errNew": "New",
|
||||
"adminMod.errFixed": "Fixed",
|
||||
"adminMod.firstSeen": "First seen {date}",
|
||||
"adminMod.stack": "Stack trace and browser",
|
||||
"adminMod.markFixed": "Mark fixed",
|
||||
"adminMod.forget": "Forget",
|
||||
"adminMod.noErrors": "No errors reported",
|
||||
"adminMod.noErrorsHint": "App errors (without personal data) will show up here.",
|
||||
"adminMod.alertReports_one": "{count} report",
|
||||
"adminMod.alertReports_other": "{count} reports",
|
||||
"adminMod.alertBugs_one": "{count} bug",
|
||||
"adminMod.alertBugs_other": "{count} bugs",
|
||||
"adminMod.alertErrors_one": "{count} new error",
|
||||
"adminMod.alertErrors_other": "{count} new errors",
|
||||
// — Social : spoilers, commentaires sous les avis, listes partagées —
|
||||
'spoiler.checkbox': "包含剧透",
|
||||
'spoiler.checkboxHint': "你的评论会对其他人隐藏,直到他们选择阅读。",
|
||||
'spoiler.warning': "此评论包含剧透",
|
||||
'spoiler.show': "显示剧透",
|
||||
'spoiler.badge': "剧透",
|
||||
'comments.title': "评论",
|
||||
'comments.none': "还没有评论,来开启讨论吧!",
|
||||
'comments.placeholder': "写评论…",
|
||||
'comments.send': "发送",
|
||||
'comments.delete': "删除评论",
|
||||
'comments.deleteConfirm': "删除这条评论?",
|
||||
'comments.loadError': "无法加载评论。",
|
||||
'comments.unavailable': "评论功能暂不可用。",
|
||||
'comments.err.rate': "你评论得太快了,请一分钟后再试。",
|
||||
'comments.err.gone': "此评论已不存在。",
|
||||
'comments.err.invalid': "评论为空或过长(最多 500 字)。",
|
||||
'notif.review_comment': "评论了你的影评",
|
||||
'notif.shared_list_invite': "邀请你加入共享片单",
|
||||
'settings.notifComments': "我的影评收到的评论",
|
||||
'settings.notifLists': "共享片单邀请",
|
||||
'shared.title': "共享片单",
|
||||
'shared.hint': "多人共建的片单:每位成员都可以添加或移除作品。",
|
||||
'shared.new': "新建共享片单",
|
||||
'shared.namePh': "片单名称(例如:一起看的电影)",
|
||||
'shared.none': "还没有共享片单。创建一个并邀请好友吧。",
|
||||
'shared.invitesYou': "邀请你加入",
|
||||
'shared.accept': "接受",
|
||||
'shared.decline': "拒绝",
|
||||
'shared.by': "来自 {name}",
|
||||
'shared.badge': "共享片单",
|
||||
'shared.members': "成员",
|
||||
'shared.invite': "邀请",
|
||||
'shared.owner': "创建者",
|
||||
'shared.pending': "待接受",
|
||||
'shared.removeMember': "将 {name} 移出片单",
|
||||
'shared.removeTitle': "从片单中移除《{title}》",
|
||||
'shared.addedBy': "{name} 添加",
|
||||
'shared.emptyText': "可以从作品页面或你的片库中添加作品。",
|
||||
'shared.delete': "删除共享片单",
|
||||
'shared.deleteConfirm': "片单“{name}”将对所有成员删除。",
|
||||
'shared.leave': "退出片单",
|
||||
'shared.leaveShort': "退出",
|
||||
'shared.leaveConfirm': "你将不再看到片单“{name}”。创建者可以再次邀请你。",
|
||||
'shared.notFound': "找不到片单",
|
||||
'shared.noCandidates': "你的片库中没有找到作品。",
|
||||
'shared.inviteTitle': "邀请成员",
|
||||
'shared.inviteHint': "邀请你关注的人或关注你的人加入“{name}”。",
|
||||
'shared.searchPeople': "搜索用户名…",
|
||||
'shared.noPeople': "没有可邀请的人:只有你的粉丝和你关注的人可以加入。",
|
||||
'shared.inviteShort': "邀请",
|
||||
'shared.invited': "已邀请",
|
||||
'shared.expired': "邀请已失效",
|
||||
'shared.addTo': "添加到共享片单",
|
||||
'shared.unavailable': "共享片单暂不可用。",
|
||||
'shared.err.rate': "连续操作过多,请一分钟后再试。",
|
||||
'shared.err.members': "该片单成员已达上限。",
|
||||
'shared.err.lists': "你的共享片单数量已达上限。",
|
||||
'shared.err.full': "该片单已满(500 部)。",
|
||||
'shared.err.notConnected': "你只能邀请你的粉丝和你关注的人。",
|
||||
'shared.err.forbidden': "无法操作:你无权访问此片单。",
|
||||
'comments.toggle_one': "{count} 条评论",
|
||||
'comments.toggle_other': "{count} 条评论",
|
||||
'shared.nMembers_one': "{count} 位成员",
|
||||
'shared.nMembers_other': "{count} 位成员",
|
||||
}
|
||||
|
||||
export default dict
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { getLang } from '../i18n'
|
||||
import type { ThemeMode } from '../types'
|
||||
|
||||
/** Version de l'app (package.json). */
|
||||
export const APP_VERSION = __APP_VERSION__
|
||||
|
||||
/** Navigateur et système, en clair et sans détail identifiant (« Chrome 129 », « Android 14 »). */
|
||||
export function browserInfo(ua = navigator.userAgent): { browser: string; os: string } {
|
||||
const m = (re: RegExp) => ua.match(re)?.[1]?.split('.')[0]
|
||||
const browser = /Edg\//.test(ua)
|
||||
? `Edge ${m(/Edg\/([\d.]+)/) ?? ''}`
|
||||
: /OPR\//.test(ua)
|
||||
? `Opera ${m(/OPR\/([\d.]+)/) ?? ''}`
|
||||
: /SamsungBrowser\//.test(ua)
|
||||
? `Samsung Internet ${m(/SamsungBrowser\/([\d.]+)/) ?? ''}`
|
||||
: /Firefox\/|FxiOS\//.test(ua)
|
||||
? `Firefox ${m(/(?:Firefox|FxiOS)\/([\d.]+)/) ?? ''}`
|
||||
: /CriOS\/|Chrome\//.test(ua)
|
||||
? `Chrome ${m(/(?:CriOS|Chrome)\/([\d.]+)/) ?? ''}`
|
||||
: /Safari\//.test(ua)
|
||||
? `Safari ${m(/Version\/([\d.]+)/) ?? ''}`
|
||||
: 'Other'
|
||||
const os = /Android/.test(ua)
|
||||
? `Android ${m(/Android ([\d.]+)/) ?? ''}`
|
||||
: /iPhone|iPad|iPod/.test(ua)
|
||||
? `iOS ${ua.match(/OS (\d+)_/)?.[1] ?? ''}`
|
||||
: /Mac OS X/.test(ua)
|
||||
? 'macOS'
|
||||
: /Windows/.test(ua)
|
||||
? 'Windows'
|
||||
: /CrOS/.test(ua)
|
||||
? 'ChromeOS'
|
||||
: /Linux/.test(ua)
|
||||
? 'Linux'
|
||||
: 'Other'
|
||||
return { browser: browser.trim(), os: os.trim() }
|
||||
}
|
||||
|
||||
/** Page affichée, sans ce qui pourrait identifier quelqu'un (« #/u/pseudo » → « #/u »). */
|
||||
export const currentRoute = () => (location.hash.match(/^#\/[a-z-]{1,20}/i)?.[0] ?? '#/') || '#/'
|
||||
|
||||
/**
|
||||
* Infos techniques jointes à un signalement de bug (affichées avant l'envoi).
|
||||
* Rien de personnel : ni compte, ni e-mail, ni contenu de la bibliothèque.
|
||||
*/
|
||||
export function techInfo(theme: ThemeMode): Record<string, string> {
|
||||
const { browser, os } = browserInfo()
|
||||
const standalone = window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true
|
||||
return {
|
||||
version: APP_VERSION,
|
||||
browser,
|
||||
os,
|
||||
lang: getLang(),
|
||||
theme,
|
||||
screen: `${screen.width}×${screen.height} @${Math.round((window.devicePixelRatio || 1) * 10) / 10}x`,
|
||||
viewport: `${window.innerWidth}×${window.innerHeight}`,
|
||||
route: currentRoute(),
|
||||
standalone: standalone ? 'yes' : 'no',
|
||||
online: navigator.onLine ? 'yes' : 'no',
|
||||
}
|
||||
}
|
||||
+24
-2
@@ -18,7 +18,8 @@ import {
|
||||
safeSeasons,
|
||||
safeStringList,
|
||||
} from './security'
|
||||
import { todayISO, uid } from './utils'
|
||||
import { normalizeText, todayISO, uid } from './utils'
|
||||
import { normalizeChallenges, normalizeEpisodeLog } from './challenges'
|
||||
|
||||
const TYPES = new Set<string>(MEDIA_TYPES.map((t) => t.value))
|
||||
const STATUS_SET = new Set<string>(STATUSES.map((s) => s.value))
|
||||
@@ -62,6 +63,21 @@ function safeDates(v: unknown): string[] | undefined {
|
||||
return out.length ? out : undefined
|
||||
}
|
||||
|
||||
/** Tags perso : texte court, sans doublon (casse et accents ignorés), 30 max. */
|
||||
export function safeTags(v: unknown): string[] | undefined {
|
||||
const seen = new Set<string>()
|
||||
const out: string[] = []
|
||||
for (const tag of safeStringList(v, LIMITS.tags * 2, LIMITS.tagLength)) {
|
||||
const s = tag.replace(/\s+/g, ' ').replace(/^#+/, '').trim()
|
||||
const key = normalizeText(s)
|
||||
if (!s || seen.has(key)) continue
|
||||
seen.add(key)
|
||||
out.push(s)
|
||||
if (out.length >= LIMITS.tags) break
|
||||
}
|
||||
return out.length ? out : undefined
|
||||
}
|
||||
|
||||
/** Valide et nettoie une fiche (import, synchro, écriture locale). Renvoie null si inutilisable. */
|
||||
export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
if (!isPlainObject(raw)) return null
|
||||
@@ -83,6 +99,7 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
const cap = episodeCap({ episodesTotal, seasons })
|
||||
if (cap && episodesWatched > cap) episodesWatched = cap
|
||||
const listIds = safeStringList(r.listIds, LIMITS.lists, 64).filter(isSafeId)
|
||||
const tags = safeTags(r.tags)
|
||||
return {
|
||||
id: isSafeId(r.id) ? r.id : uid(),
|
||||
title,
|
||||
@@ -105,14 +122,17 @@ export function normalizeItem(raw: unknown): MediaItem | null {
|
||||
genres: safeStringList(r.genres, LIMITS.genres),
|
||||
platform: cleanText(r.platform, LIMITS.shortText),
|
||||
notes: cleanText(r.notes, LIMITS.notes),
|
||||
notesSpoiler: (r.notesSpoiler === true && !!cleanText(r.notes, LIMITS.notes)) || undefined,
|
||||
poster: safePosterUrl(r.poster),
|
||||
backdrop: remoteImage(r.backdrop),
|
||||
overview: cleanText(r.overview, LIMITS.overview),
|
||||
externalId: isSafeExternalId(r.externalId) ? r.externalId : undefined,
|
||||
top: normalizeTop(r.top),
|
||||
listIds: listIds.length ? listIds : undefined,
|
||||
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
|
||||
@@ -132,9 +152,11 @@ export function normalizeSettings(raw: unknown): Partial<Settings> | undefined {
|
||||
if (raw.themeMode === 'auto' || raw.themeMode === 'light' || raw.themeMode === 'dark' || raw.themeMode === 'night' || raw.themeMode === 'starfield') out.themeMode = raw.themeMode
|
||||
if (isPlainObject(raw.notifPrefs)) {
|
||||
const np: NotifPrefs = {}
|
||||
for (const k of ['episodes', 'follows', 'accepted', 'reactions'] as const) if (typeof raw.notifPrefs[k] === 'boolean') np[k] = raw.notifPrefs[k] as boolean
|
||||
for (const k of ['episodes', 'follows', 'accepted', 'reactions', 'comments', 'lists'] 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
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { MediaInput, MediaItem, WatchStatus } from '../types'
|
||||
import { TYPE_BY_VALUE } from './constants'
|
||||
import { episodeCap } from './franchise'
|
||||
import { LIMITS } from './security'
|
||||
import { normalizeText, todayISO } from './utils'
|
||||
|
||||
/**
|
||||
* Nouveau statut → ce qui change sur la fiche (mêmes règles que les boutons de la fiche) :
|
||||
* « À voir » efface les dates, « Vu » date la fin (et coche tous les épisodes connus)…
|
||||
*/
|
||||
export function statusPatch(item: MediaItem, s: WatchStatus): Partial<MediaInput> {
|
||||
const patch: Partial<MediaInput> = { status: s }
|
||||
const episodic = TYPE_BY_VALUE[item.type].episodic
|
||||
const today = todayISO()
|
||||
if (s === 'a_voir') Object.assign(patch, { startDate: undefined, endDate: undefined })
|
||||
if (s === 'en_cours') Object.assign(patch, { startDate: episodic && !item.episodesWatched ? item.startDate : (item.startDate ?? today), endDate: undefined })
|
||||
if (s === 'termine') {
|
||||
patch.endDate = item.status === 'termine' && item.endDate ? item.endDate : today
|
||||
if (!item.startDate) patch.startDate = episodic && item.episodesWatched ? today : patch.endDate
|
||||
const cap = episodeCap(item)
|
||||
if (episodic && cap) patch.episodesWatched = cap
|
||||
}
|
||||
return patch
|
||||
}
|
||||
|
||||
/** Tag saisi → tag enregistré : sans « # », espaces simplifiés, et même écriture qu'un tag existant. */
|
||||
export function cleanTag(input: string, existing: string[] = []): string {
|
||||
const s = input.replace(/\s+/g, ' ').replace(/^#+/, '').trim().slice(0, LIMITS.tagLength)
|
||||
const key = normalizeText(s)
|
||||
return existing.find((e) => normalizeText(e) === key) ?? s
|
||||
}
|
||||
|
||||
/** Tous les tags utilisés dans la bibliothèque, du plus fréquent au moins fréquent. */
|
||||
export function allTags(items: MediaItem[]): string[] {
|
||||
const count = new Map<string, number>()
|
||||
for (const i of items) for (const tag of i.tags ?? []) count.set(tag, (count.get(tag) ?? 0) + 1)
|
||||
return [...count.entries()].sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).map(([tag]) => tag)
|
||||
}
|
||||
|
||||
export const hasTag = (item: MediaItem, tag: string) => {
|
||||
const key = normalizeText(tag)
|
||||
return !!item.tags?.some((x) => normalizeText(x) === key)
|
||||
}
|
||||
+71
-2
@@ -6,6 +6,7 @@ import { subtypeLabel, tmdbGenres } from './genres'
|
||||
import { franchiseKey } from './franchise'
|
||||
import { cleanText, isSafeExternalId, isSafeTmdbPath, LIMITS, remoteImage, safeCountries, safeDay, safePosterUrl, safeSeasons, safeStringList } from './security'
|
||||
import { localDay } from './utils'
|
||||
import { parseAniListLinks, parseTmdbProviders, type StreamLink, type WatchRegion } from './watchProviders'
|
||||
|
||||
/**
|
||||
* Recherche dans les bases publiques :
|
||||
@@ -107,6 +108,7 @@ interface TmdbItem {
|
||||
vote_average?: number
|
||||
vote_count?: number
|
||||
popularity?: number
|
||||
overview?: string
|
||||
}
|
||||
|
||||
/** Clé v3 (32 caractères hexadécimaux) ou jeton de lecture v4 (JWT). */
|
||||
@@ -116,7 +118,7 @@ export function isPlausibleTmdbKey(key: string): boolean {
|
||||
}
|
||||
|
||||
/** Seules ces adresses de l'API TMDB peuvent être appelées. */
|
||||
const TMDB_PATHS = /^\/(search\/multi|configuration|discover\/(movie|tv)|(movie|tv)\/\d{1,10}(\/recommendations|\/season\/\d{1,3})?)$/
|
||||
const TMDB_PATHS = /^\/(search\/multi|configuration|discover\/(movie|tv)|(movie|tv)\/\d{1,10}(\/recommendations|\/season\/\d{1,3})?|find\/(tt)?\d{1,10})$/
|
||||
|
||||
/** « Clé » spéciale : avec un compte, les requêtes passent par le serveur qui détient la vraie clé TMDB. */
|
||||
export const CLOUD_TMDB = 'cloud-proxy'
|
||||
@@ -1041,6 +1043,10 @@ export interface TitleExtras {
|
||||
tagline?: string
|
||||
runtime?: number
|
||||
seasons?: number
|
||||
/** Où regarder, par pays (TMDB / JustWatch). Absent = inconnu (ex. proxy pas encore à jour). */
|
||||
watch?: Record<string, WatchRegion>
|
||||
/** Liens directs vers les plateformes de streaming (AniList) */
|
||||
streaming?: StreamLink[]
|
||||
}
|
||||
|
||||
interface TmdbExtras {
|
||||
@@ -1056,13 +1062,19 @@ interface TmdbExtras {
|
||||
cast?: { name?: string; character?: string; profile_path?: string | null; order?: number }[]
|
||||
crew?: { name?: string; job?: string }[]
|
||||
}
|
||||
'watch/providers'?: unknown
|
||||
}
|
||||
|
||||
const extrasCache = new Map<string, Promise<TitleExtras>>()
|
||||
|
||||
async function tmdbExtras(externalId: string, key: string): Promise<TitleExtras> {
|
||||
const [, kind, id] = externalId.split(':') as ['tmdb', 'movie' | 'tv', string]
|
||||
const d = await tmdbFetch<TmdbExtras>(`/${kind}/${id}`, key, { append_to_response: 'credits' })
|
||||
// Une seule requête pour le casting et « Où regarder ». Si le proxy n'accepte pas encore la combinaison
|
||||
// (fonction serveur pas redéployée), on retombe sur le casting seul.
|
||||
const d = await tmdbFetch<TmdbExtras>(`/${kind}/${id}`, key, { append_to_response: 'credits,watch/providers' }).catch((e: unknown) => {
|
||||
if (key.trim() !== CLOUD_TMDB) throw e
|
||||
return tmdbFetch<TmdbExtras>(`/${kind}/${id}`, key, { append_to_response: 'credits' })
|
||||
})
|
||||
const cast = (Array.isArray(d.credits?.cast) ? d.credits!.cast! : [])
|
||||
.slice()
|
||||
.sort((a, b) => (a.order ?? 99) - (b.order ?? 99))
|
||||
@@ -1088,6 +1100,7 @@ async function tmdbExtras(externalId: string, key: string): Promise<TitleExtras>
|
||||
tagline: cleanText(d.tagline, 200),
|
||||
runtime: count(kind === 'movie' ? d.runtime : d.episode_run_time?.[0], 6000),
|
||||
seasons: kind === 'tv' ? count(d.number_of_seasons, 500) : undefined,
|
||||
watch: parseTmdbProviders(d['watch/providers']),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1105,6 +1118,7 @@ query ($id: Int) {
|
||||
}
|
||||
}
|
||||
staff(sort: [RELEVANCE], perPage: 12) { edges { role node { name { full } } } }
|
||||
externalLinks { site url type language color icon }
|
||||
}
|
||||
}`
|
||||
|
||||
@@ -1115,6 +1129,7 @@ interface AniExtras {
|
||||
stats?: { scoreDistribution?: { score?: number; amount?: number }[] | null } | null
|
||||
characters?: { edges?: { node?: { name?: { full?: string }; image?: { medium?: string } }; voiceActors?: { name?: { full?: string } }[] }[] } | null
|
||||
staff?: { edges?: { role?: string; node?: { name?: { full?: string } } }[] } | null
|
||||
externalLinks?: unknown
|
||||
}
|
||||
|
||||
async function aniListExtras(externalId: string): Promise<TitleExtras> {
|
||||
@@ -1153,6 +1168,7 @@ async function aniListExtras(externalId: string): Promise<TitleExtras> {
|
||||
directors: names(staff.filter((s) => /^Director$/i.test(s.role ?? '')).map((s) => s.node?.name?.full), 3),
|
||||
directorKind: 'director',
|
||||
runtime: count(m.duration, 6000),
|
||||
streaming: parseAniListLinks(m.externalLinks),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1168,3 +1184,56 @@ export function getTitleExtras(externalId: string, tmdbKey?: string): Promise<Ti
|
||||
p.catch(() => extrasCache.delete(externalId))
|
||||
return p
|
||||
}
|
||||
|
||||
// ─────────────────────────── Import depuis d'autres applis ───────────────────────────
|
||||
|
||||
/** Résultat TMDB avec de quoi créer une fiche sans requête de détail (import en masse). */
|
||||
function tmdbWithPrefill(r: TmdbItem, kind: 'movie' | 'tv'): SearchResult | null {
|
||||
const base = tmdbToResult(r, kind)
|
||||
if (!base) return null
|
||||
const guess = guessTmdbType(kind, r.genre_ids ?? [], r.origin_country ?? [], r.original_language)
|
||||
return safeResult({
|
||||
...base,
|
||||
prefill: {
|
||||
title: base.title,
|
||||
originalTitle: base.originalTitle,
|
||||
type: guess.type,
|
||||
subtype: guess.subtype,
|
||||
year: base.year,
|
||||
overview: r.overview || undefined,
|
||||
genres: tmdbGenres(r.genre_ids ?? []).filter((g) => guess.type === 'film' || g !== 'Animation'),
|
||||
externalId: base.externalId,
|
||||
countries: r.origin_country?.length ? r.origin_country.slice(0, 3) : undefined,
|
||||
poster: base.posterUrl,
|
||||
publicRating: tmdbPublicRating(r.vote_average, r.vote_count),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/** Recherche TMDB (films et séries) avec métadonnées de base, dans l'ordre de pertinence de TMDB. */
|
||||
export async function tmdbImportSearch(query: string, key: string): Promise<SearchResult[]> {
|
||||
const data = await tmdbFetch<{ results: TmdbItem[] }>('/search/multi', key, { query: query.slice(0, 100), include_adult: 'false' })
|
||||
return (Array.isArray(data.results) ? data.results : [])
|
||||
.filter((r) => r && (r.media_type === 'movie' || r.media_type === 'tv'))
|
||||
.slice(0, 20)
|
||||
.map((r) => tmdbWithPrefill(r, r.media_type as 'movie' | 'tv'))
|
||||
.filter((r): r is SearchResult => r !== null)
|
||||
}
|
||||
|
||||
/** Fiche TMDB à partir d'un identifiant TVDB (TV Time) ou IMDb. */
|
||||
export async function tmdbFindExternal(id: string, source: 'tvdb_id' | 'imdb_id', key: string): Promise<SearchResult | undefined> {
|
||||
if (!(source === 'tvdb_id' ? /^\d{1,10}$/ : /^tt\d{1,10}$/).test(id)) return undefined
|
||||
const data = await tmdbFetch<{ movie_results?: TmdbItem[]; tv_results?: TmdbItem[] }>(`/find/${id}`, key, { external_source: source })
|
||||
const tv = Array.isArray(data.tv_results) ? data.tv_results[0] : undefined
|
||||
const movie = Array.isArray(data.movie_results) ? data.movie_results[0] : undefined
|
||||
return (tv && tmdbWithPrefill(tv, 'tv')) || (movie && tmdbWithPrefill(movie, 'movie')) || undefined
|
||||
}
|
||||
|
||||
export { ANILIST, ANILIST_FIELDS, aniToResult, type AniMedia }
|
||||
/** Adresse de l'affiche TMDB d'un titre (listes partagées : la copie locale de l'affiche ne se partage pas). */
|
||||
export async function getTmdbPosterUrl(externalId: string, key: string): Promise<string | undefined> {
|
||||
if (!isSafeExternalId(externalId) || !externalId.startsWith('tmdb:')) return undefined
|
||||
const [, kind, id] = externalId.split(':') as ['tmdb', 'movie' | 'tv', string]
|
||||
const d = await tmdbFetch<{ poster_path?: string | null }>(`/${kind}/${id}`, key)
|
||||
return isSafeTmdbPath(d.poster_path) ? `${TMDB_IMG}/w342${d.poster_path}` : undefined
|
||||
}
|
||||
@@ -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<string>(['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<Challenge['period'], 'custom'>, 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<Settings>, current: Settings): Partial<Settings> {
|
||||
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<string, number> | undefined, delta: number, day = localDay()): Record<string, number> | 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<string, number> | 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<Challenge, 'media' | 'unit' | 'start' | 'end'>, items: MediaItem[]) {
|
||||
const s = toNum(c.start)
|
||||
const e = toNum(c.end)
|
||||
const perDay = new Map<number, number>()
|
||||
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<Challenge, 'period' | 'start' | 'end'>): 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<Challenge['period'], 'custom'>
|
||||
}
|
||||
|
||||
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<string> {
|
||||
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 */
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
import { cleanText, isPlainObject, safeIso } from '../security'
|
||||
import { cloudFetch } from './api'
|
||||
import type { ReportReason, ReportTargetType } from './moderation'
|
||||
import { REPORT_REASONS } from './moderation'
|
||||
import { safeMediaUrl } from './social'
|
||||
|
||||
/**
|
||||
* Administration : modération (signalements, comptes suspendus), bugs signalés, erreurs de l'app.
|
||||
* Toutes les fonctions SQL appelées ici vérifient is_admin() côté serveur.
|
||||
* Les réponses sont relues champ par champ (un contenu signalé peut être piégé).
|
||||
*/
|
||||
|
||||
async function rpc(name: string, args: Record<string, unknown> = {}): Promise<unknown> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (!res.ok) {
|
||||
const body = (await res.json().catch(() => ({}))) as { message?: unknown }
|
||||
throw new Error(typeof body.message === 'string' ? body.message.slice(0, 120) : `HTTP ${res.status}`)
|
||||
}
|
||||
const text = await res.text()
|
||||
return text ? JSON.parse(text) : null
|
||||
}
|
||||
|
||||
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
||||
const int = (v: unknown) => (typeof v === 'number' && Number.isFinite(v) ? Math.max(0, Math.floor(v)) : 0)
|
||||
const iso = (v: unknown) => safeIso(v) ?? new Date(0).toISOString()
|
||||
const list = (v: unknown) => (Array.isArray(v) ? v : [])
|
||||
|
||||
export interface AdminCard {
|
||||
id: string
|
||||
username: string
|
||||
displayName: string
|
||||
avatarUrl?: string
|
||||
suspended: boolean
|
||||
isAdmin: boolean
|
||||
}
|
||||
|
||||
function toCard(v: unknown): AdminCard | null {
|
||||
if (!isPlainObject(v) || typeof v.id !== 'string' || !UUID.test(v.id)) return null
|
||||
const username = cleanText(v.username, 20) ?? ''
|
||||
return {
|
||||
id: v.id,
|
||||
username,
|
||||
displayName: cleanText(v.display_name, 40) ?? username,
|
||||
avatarUrl: safeMediaUrl(v.avatar_url),
|
||||
suspended: v.suspended === true,
|
||||
isAdmin: v.is_admin === true,
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Alertes (badge) */
|
||||
|
||||
export interface AdminAlerts {
|
||||
reports: number
|
||||
bugs: number
|
||||
errors: number
|
||||
suspended: number
|
||||
}
|
||||
|
||||
export async function adminAlerts(): Promise<AdminAlerts> {
|
||||
const r = await rpc('admin_alerts')
|
||||
const o = isPlainObject(r) ? r : {}
|
||||
return { reports: int(o.reports), bugs: int(o.bugs), errors: int(o.errors), suspended: int(o.suspended) }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Signalements */
|
||||
|
||||
/** Contenu signalé (copie au moment du signalement, ou version actuelle). */
|
||||
export interface ReportedContent {
|
||||
title?: string
|
||||
notes?: string
|
||||
rating?: number
|
||||
username?: string
|
||||
displayName?: string
|
||||
bio?: string
|
||||
avatarUrl?: string
|
||||
}
|
||||
|
||||
export interface ReportEntry {
|
||||
reason: ReportReason
|
||||
details?: string
|
||||
createdAt: string
|
||||
reporter: AdminCard | null
|
||||
}
|
||||
|
||||
export interface ReportGroup {
|
||||
key: string
|
||||
targetType: ReportTargetType
|
||||
targetId: string
|
||||
targetUser: AdminCard | null
|
||||
total: number
|
||||
openCount: number
|
||||
firstAt: string
|
||||
lastAt: string
|
||||
status: 'open' | 'resolved' | 'dismissed'
|
||||
reasons: Partial<Record<ReportReason, number>>
|
||||
reports: ReportEntry[]
|
||||
snapshot?: ReportedContent
|
||||
/** null : le contenu n'existe plus (effacé) ; undefined : pas d'aperçu pour ce type */
|
||||
current?: ReportedContent | null
|
||||
/** Nombre de contenus différents de ce compte déjà signalés */
|
||||
userReportedTargets: number
|
||||
}
|
||||
|
||||
const TARGETS: ReportTargetType[] = ['review', 'profile', 'comment', 'list']
|
||||
const isReason = (v: unknown): v is ReportReason => (REPORT_REASONS as readonly unknown[]).includes(v)
|
||||
|
||||
function toContent(v: unknown): ReportedContent | undefined {
|
||||
if (!isPlainObject(v)) return undefined
|
||||
const rating = typeof v.rating === 'number' && v.rating > 0 && v.rating <= 10 ? v.rating : undefined
|
||||
return {
|
||||
title: cleanText(v.title, 200),
|
||||
notes: cleanText(v.notes, 3000),
|
||||
rating,
|
||||
username: cleanText(v.username, 20),
|
||||
displayName: cleanText(v.display_name, 40),
|
||||
bio: cleanText(v.bio, 300),
|
||||
avatarUrl: safeMediaUrl(v.avatar_url),
|
||||
}
|
||||
}
|
||||
|
||||
function toGroup(v: unknown): ReportGroup | null {
|
||||
if (!isPlainObject(v)) return null
|
||||
const targetType = TARGETS.find((x) => x === v.target_type)
|
||||
const targetId = cleanText(v.target_id, 200)
|
||||
if (!targetType || !targetId) return null
|
||||
const targetUser = toCard(v.target_user)
|
||||
const reasons: Partial<Record<ReportReason, number>> = {}
|
||||
if (isPlainObject(v.reasons)) for (const r of REPORT_REASONS) if (int(v.reasons[r]) > 0) reasons[r] = int(v.reasons[r])
|
||||
const status = v.status === 'resolved' || v.status === 'dismissed' ? v.status : 'open'
|
||||
return {
|
||||
key: `${targetType}:${targetId}:${targetUser?.id ?? ''}`,
|
||||
targetType,
|
||||
targetId,
|
||||
targetUser,
|
||||
total: int(v.total),
|
||||
openCount: int(v.open_count),
|
||||
firstAt: iso(v.first_at),
|
||||
lastAt: iso(v.last_at),
|
||||
status,
|
||||
reasons,
|
||||
reports: list(v.reports).flatMap((r) =>
|
||||
isPlainObject(r) && isReason(r.reason) ? [{ reason: r.reason, details: cleanText(r.details, 500), createdAt: iso(r.created_at), reporter: toCard(r.reporter) }] : [],
|
||||
),
|
||||
snapshot: toContent(v.snapshot),
|
||||
current: targetType === 'review' || targetType === 'profile' ? (toContent(v.current) ?? null) : undefined,
|
||||
userReportedTargets: int(v.user_reported_targets),
|
||||
}
|
||||
}
|
||||
|
||||
export const REPORTS_PAGE = 30
|
||||
|
||||
export async function adminReports(status: 'open' | 'closed', offset = 0): Promise<ReportGroup[]> {
|
||||
return list(await rpc('admin_reports', { p_status: status, p_offset: offset }))
|
||||
.map(toGroup)
|
||||
.filter((g): g is ReportGroup => g !== null)
|
||||
}
|
||||
|
||||
export type ReportAction = 'delete' | 'suspend' | 'unsuspend' | 'dismiss' | 'resolve'
|
||||
|
||||
export async function adminReportAction(g: Pick<ReportGroup, 'targetType' | 'targetId' | 'targetUser'>, action: ReportAction): Promise<void> {
|
||||
if (!g.targetUser) throw new Error('no target user')
|
||||
await rpc('admin_report_action', { p_type: g.targetType, p_target_id: g.targetId, p_target_user: g.targetUser.id, p_action: action })
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Comptes suspendus */
|
||||
|
||||
export interface SuspendedUser extends AdminCard {
|
||||
suspendedAt?: string
|
||||
suspendedBy?: string
|
||||
reports: number
|
||||
}
|
||||
|
||||
export async function adminSuspendedUsers(offset = 0): Promise<SuspendedUser[]> {
|
||||
return list(await rpc('admin_suspended_users', { p_offset: offset })).flatMap((r) => {
|
||||
const card = toCard(r)
|
||||
if (!card || !isPlainObject(r)) return []
|
||||
return [{ ...card, suspended: true, suspendedAt: safeIso(r.suspended_at), suspendedBy: cleanText(r.suspended_by, 20), reports: int(r.reports) }]
|
||||
})
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Bugs signalés */
|
||||
|
||||
export type BugStatus = 'new' | 'in_progress' | 'fixed'
|
||||
export const BUG_STATUSES: BugStatus[] = ['new', 'in_progress', 'fixed']
|
||||
|
||||
export interface BugReport {
|
||||
id: number
|
||||
description: string
|
||||
context: Record<string, string>
|
||||
status: BugStatus
|
||||
createdAt: string
|
||||
reporter: AdminCard | null
|
||||
}
|
||||
|
||||
export async function adminBugReports(status: BugStatus | null, offset = 0): Promise<BugReport[]> {
|
||||
return list(await rpc('admin_bug_reports', { p_status: status, p_offset: offset })).flatMap((r) => {
|
||||
if (!isPlainObject(r) || typeof r.id !== 'number') return []
|
||||
const description = cleanText(r.description, 2000)
|
||||
if (!description) return []
|
||||
const context: Record<string, string> = {}
|
||||
if (isPlainObject(r.context)) {
|
||||
for (const [k, v] of Object.entries(r.context).slice(0, 12)) {
|
||||
const val = cleanText(typeof v === 'string' ? v : String(v), 120)
|
||||
if (/^[a-z]{1,20}$/.test(k) && val) context[k] = val
|
||||
}
|
||||
}
|
||||
const status = BUG_STATUSES.find((s) => s === r.status) ?? 'new'
|
||||
return [{ id: r.id, description, context, status, createdAt: iso(r.created_at), reporter: toCard(r.reporter) }]
|
||||
})
|
||||
}
|
||||
|
||||
export async function adminSetBugStatus(id: number, status: BugStatus): Promise<void> {
|
||||
await rpc('admin_set_bug_status', { p_id: id, p_status: status })
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Erreurs de l'app */
|
||||
|
||||
export type ErrorStatus = 'new' | 'seen' | 'fixed'
|
||||
|
||||
export interface ClientError {
|
||||
fingerprint: string
|
||||
source: 'error' | 'rejection' | 'render'
|
||||
message: string
|
||||
stack?: string
|
||||
url?: string
|
||||
appVersion?: string
|
||||
userAgent?: string
|
||||
count: number
|
||||
status: ErrorStatus
|
||||
firstSeen: string
|
||||
lastSeen: string
|
||||
}
|
||||
|
||||
export async function adminClientErrors(offset = 0): Promise<ClientError[]> {
|
||||
return list(await rpc('admin_client_errors', { p_status: null, p_offset: offset })).flatMap((r) => {
|
||||
if (!isPlainObject(r) || typeof r.fingerprint !== 'string' || !/^[0-9a-f]{32}$/.test(r.fingerprint)) return []
|
||||
const message = cleanText(r.message, 500)
|
||||
if (!message) return []
|
||||
const source = r.source === 'rejection' || r.source === 'render' ? r.source : 'error'
|
||||
const status = r.status === 'seen' || r.status === 'fixed' ? r.status : 'new'
|
||||
return [
|
||||
{
|
||||
fingerprint: r.fingerprint,
|
||||
source,
|
||||
message,
|
||||
stack: cleanText(r.stack, 4000),
|
||||
url: cleanText(r.url, 300),
|
||||
appVersion: cleanText(r.app_version, 40),
|
||||
userAgent: cleanText(r.user_agent, 300),
|
||||
count: int(r.count),
|
||||
status,
|
||||
firstSeen: iso(r.first_seen),
|
||||
lastSeen: iso(r.last_seen),
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
/** fingerprint null + 'seen' : tout marquer comme vu. 'delete' : oublie l'erreur (elle revient si elle se reproduit). */
|
||||
export async function adminSetErrorStatus(fingerprint: string | null, status: ErrorStatus | 'delete'): Promise<void> {
|
||||
await rpc('admin_set_error_status', { p_fingerprint: fingerprint, p_status: status })
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import { t } from '../../i18n'
|
||||
import { cleanText, isPlainObject, safeIso } from '../security'
|
||||
import { cloudFetch } from './api'
|
||||
import { safeMediaUrl } from './social'
|
||||
|
||||
/**
|
||||
* Commentaires sous les avis. Lecture / écriture uniquement via les fonctions de la base
|
||||
* (get_review_comments, add_review_comment, delete_review_comment) qui vérifient les droits :
|
||||
* mêmes règles de visibilité que l'avis, anti-spam, suppression par l'auteur, l'auteur de l'avis ou un admin.
|
||||
*/
|
||||
|
||||
export const COMMENT_MAX = 500
|
||||
|
||||
export interface CommentAuthor {
|
||||
id: string
|
||||
username: string
|
||||
displayName: string
|
||||
avatarUrl?: string
|
||||
}
|
||||
|
||||
export interface ReviewComment {
|
||||
id: number
|
||||
body: string
|
||||
createdAt: string
|
||||
user: CommentAuthor
|
||||
mine: boolean
|
||||
canDelete: boolean
|
||||
}
|
||||
|
||||
export interface CommentThread {
|
||||
/** L'avis existe et je peux le voir */
|
||||
visible: boolean
|
||||
/** Je peux supprimer tous les commentaires (auteur de l'avis ou admin) */
|
||||
canModerate: boolean
|
||||
comments: ReviewComment[]
|
||||
}
|
||||
|
||||
/** La base n'a pas encore les commentaires (migration pas appliquée) : la fonctionnalité se masque. */
|
||||
export class CommentsUnavailable extends Error {}
|
||||
|
||||
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
||||
const USERNAME = /^[a-z0-9_]{3,20}$/
|
||||
|
||||
async function rpc(name: string, args: Record<string, unknown>): Promise<unknown> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (res.ok) return res.json()
|
||||
if (res.status === 404) throw new CommentsUnavailable(t('comments.unavailable'))
|
||||
const body = (await res.json().catch(() => ({}))) as { message?: string }
|
||||
const msg = typeof body.message === 'string' ? body.message : ''
|
||||
if (msg.includes('rate limit')) throw new Error(t('comments.err.rate'))
|
||||
if (msg.includes('review not found')) throw new Error(t('comments.err.gone'))
|
||||
if (msg.includes('invalid comment')) throw new Error(t('comments.err.invalid'))
|
||||
throw new Error(t('social.err.server', { status: res.status }))
|
||||
}
|
||||
|
||||
function toComment(v: unknown): ReviewComment | null {
|
||||
if (!isPlainObject(v) || typeof v.id !== 'number' || !isPlainObject(v.user)) return null
|
||||
const u = v.user
|
||||
const body = cleanText(v.body, COMMENT_MAX)
|
||||
const createdAt = safeIso(v.created_at)
|
||||
if (!body || !createdAt || typeof u.id !== 'string' || !UUID.test(u.id) || typeof u.username !== 'string' || !USERNAME.test(u.username)) return null
|
||||
return {
|
||||
id: v.id,
|
||||
body,
|
||||
createdAt,
|
||||
user: { id: u.id, username: u.username, displayName: cleanText(u.display_name, 40) ?? u.username, avatarUrl: safeMediaUrl(u.avatar_url) },
|
||||
mine: v.mine === true,
|
||||
canDelete: v.can_delete === true,
|
||||
}
|
||||
}
|
||||
|
||||
export async function getReviewComments(authorId: string, itemId: string): Promise<CommentThread> {
|
||||
if (!UUID.test(authorId)) return { visible: false, canModerate: false, comments: [] }
|
||||
const raw = await rpc('get_review_comments', { p_author: authorId, p_item: itemId })
|
||||
if (!isPlainObject(raw)) return { visible: false, canModerate: false, comments: [] }
|
||||
return {
|
||||
visible: raw.visible === true,
|
||||
canModerate: raw.can_moderate === true,
|
||||
comments: (Array.isArray(raw.comments) ? raw.comments.slice(0, 300) : []).map(toComment).filter((c): c is ReviewComment => c !== null),
|
||||
}
|
||||
}
|
||||
|
||||
export async function addReviewComment(authorId: string, itemId: string, body: string): Promise<ReviewComment> {
|
||||
const text = body.trim().slice(0, COMMENT_MAX)
|
||||
const c = toComment(await rpc('add_review_comment', { p_author: authorId, p_item: itemId, p_body: text }))
|
||||
if (!c) throw new Error(t('social.err.server', { status: 500 }))
|
||||
return c
|
||||
}
|
||||
|
||||
export async function deleteReviewComment(id: number): Promise<void> {
|
||||
await rpc('delete_review_comment', { p_id: id })
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { t } from '../../i18n'
|
||||
import { cleanText, isPlainObject } from '../security'
|
||||
import { cloudFetch } from './api'
|
||||
import { getSession } from './auth'
|
||||
import { safeMediaUrl } from './social'
|
||||
|
||||
/**
|
||||
* Signalements, blocages et « Signaler un bug » (côté membre).
|
||||
* Tout passe par des fonctions SQL `security definer` qui vérifient les droits et limitent les abus
|
||||
* (voir supabase/migrations/20261009160000_moderation.sql et 20261009160100_bugs_errors.sql).
|
||||
*/
|
||||
|
||||
/** Types de contenus signalables. 'comment' et 'list' : branchés par les fonctionnalités correspondantes. */
|
||||
export type ReportTargetType = 'review' | 'profile' | 'comment' | 'list'
|
||||
|
||||
export interface ReportTarget {
|
||||
type: ReportTargetType
|
||||
/** Identifiant du contenu : id de la fiche (avis), id du compte (profil), id du commentaire / de la liste */
|
||||
id: string
|
||||
/** Auteur du contenu */
|
||||
userId: string
|
||||
}
|
||||
|
||||
export const REPORT_REASONS = ['spoiler', 'harassment', 'hate', 'sexual', 'spam', 'impersonation', 'other'] as const
|
||||
export type ReportReason = (typeof REPORT_REASONS)[number]
|
||||
export const REPORT_DETAILS_MAX = 500
|
||||
export const BUG_DESCRIPTION_MIN = 10
|
||||
export const BUG_DESCRIPTION_MAX = 2000
|
||||
|
||||
/** Erreur renvoyée par le serveur, avec son code court (« rate limited », « not found »…). */
|
||||
export class ModerationError extends Error {
|
||||
constructor(
|
||||
message: string,
|
||||
readonly code: string,
|
||||
) {
|
||||
super(message)
|
||||
}
|
||||
}
|
||||
|
||||
async function rpc<T>(name: string, args: Record<string, unknown> = {}): Promise<T> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (!res.ok) {
|
||||
const body = (await res.json().catch(() => ({}))) as { message?: unknown }
|
||||
const code = typeof body.message === 'string' ? body.message.slice(0, 40) : `http ${res.status}`
|
||||
const msg =
|
||||
code === 'rate limited' ? t('report.errRate') : code === 'not found' ? t('report.errNotFound') : res.status === 404 ? t('report.errUnavailable') : t('social.err.server', { status: res.status })
|
||||
throw new ModerationError(msg, code)
|
||||
}
|
||||
const text = await res.text()
|
||||
return (text ? JSON.parse(text) : null) as T
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Signalements */
|
||||
|
||||
/** Signale un contenu. `duplicate` : déjà signalé par moi (rien n'est ajouté). */
|
||||
export async function reportContent(target: ReportTarget, reason: ReportReason, details: string): Promise<{ duplicate: boolean }> {
|
||||
const res = await rpc<unknown>('report_content', {
|
||||
p_type: target.type,
|
||||
p_target_id: target.id,
|
||||
p_target_user: target.userId,
|
||||
p_reason: reason,
|
||||
p_details: details.trim().slice(0, REPORT_DETAILS_MAX) || null,
|
||||
})
|
||||
return { duplicate: isPlainObject(res) && res.duplicate === true }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Blocages */
|
||||
|
||||
export interface BlockedUser {
|
||||
id: string
|
||||
username: string
|
||||
displayName: string
|
||||
avatarUrl?: string
|
||||
}
|
||||
|
||||
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
||||
|
||||
let blocked: BlockedUser[] = []
|
||||
let loaded: Promise<void> | null = null
|
||||
/** Compte pour lequel la liste a été chargée (changement de compte = rechargement) */
|
||||
let loadedFor: string | undefined
|
||||
const listeners = new Set<() => void>()
|
||||
const emit = () => listeners.forEach((fn) => fn())
|
||||
|
||||
/** Charge (une fois par session) la liste des comptes que j'ai bloqués. Silencieux si le serveur n'est pas à jour. */
|
||||
export function loadBlocks(force = false): Promise<void> {
|
||||
const uid = getSession()?.user.id
|
||||
if (loaded && !force && loadedFor === uid) return loaded
|
||||
if (loadedFor !== uid) blocked = []
|
||||
loadedFor = uid
|
||||
loaded = rpc<unknown>('my_blocks')
|
||||
.then((rows) => {
|
||||
blocked = (Array.isArray(rows) ? rows : []).flatMap((r) => {
|
||||
if (!isPlainObject(r) || typeof r.id !== 'string' || !UUID.test(r.id)) return []
|
||||
const username = cleanText(r.username, 20) ?? ''
|
||||
return [{ id: r.id, username, displayName: cleanText(r.display_name, 40) ?? username, avatarUrl: safeMediaUrl(r.avatar_url) }]
|
||||
})
|
||||
emit()
|
||||
})
|
||||
.catch(() => {
|
||||
/* fonction pas encore déployée / hors-ligne : rien n'est masqué */
|
||||
})
|
||||
return loaded
|
||||
}
|
||||
|
||||
export const isBlocked = (userId: string | undefined | null) => !!userId && loadedFor === getSession()?.user.id && blocked.some((b) => b.id === userId)
|
||||
|
||||
/** Liste des comptes bloqués, tenue à jour (pour masquer avis / commentaires). */
|
||||
export function useBlocked(enabled = true): { blocked: BlockedUser[]; isBlocked: (userId: string | undefined | null) => boolean } {
|
||||
const [, setTick] = useState(0)
|
||||
useEffect(() => {
|
||||
if (!enabled) return
|
||||
const fn = () => setTick((n) => n + 1)
|
||||
listeners.add(fn)
|
||||
void loadBlocks()
|
||||
return () => {
|
||||
listeners.delete(fn)
|
||||
}
|
||||
}, [enabled])
|
||||
return { blocked: enabled ? blocked : [], isBlocked: (id) => enabled && isBlocked(id) }
|
||||
}
|
||||
|
||||
export async function blockUser(user: BlockedUser): Promise<void> {
|
||||
await rpc('block_user', { p_user: user.id })
|
||||
if (!isBlocked(user.id)) blocked = [user, ...blocked]
|
||||
emit()
|
||||
}
|
||||
|
||||
export async function unblockUser(userId: string): Promise<void> {
|
||||
await rpc('unblock_user', { p_user: userId })
|
||||
blocked = blocked.filter((b) => b.id !== userId)
|
||||
emit()
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Signaler un bug */
|
||||
|
||||
export async function submitBugReport(description: string, context: Record<string, string>): Promise<void> {
|
||||
await rpc('submit_bug_report', { p_description: description.trim().slice(0, BUG_DESCRIPTION_MAX), p_context: context })
|
||||
}
|
||||
@@ -5,7 +5,15 @@ import { safeMediaUrl } from './social'
|
||||
|
||||
/** Notifications (cloche) : abonnements, demandes acceptées, réactions reçues. */
|
||||
|
||||
export type NotificationKind = 'follow_request' | 'follow_accepted' | 'new_follower' | 'reaction' | 'new_episode' | 'new_season'
|
||||
export type NotificationKind =
|
||||
| 'follow_request'
|
||||
| 'follow_accepted'
|
||||
| 'new_follower'
|
||||
| 'reaction'
|
||||
| 'new_episode'
|
||||
| 'new_season'
|
||||
| 'review_comment'
|
||||
| 'shared_list_invite'
|
||||
|
||||
export interface AppNotification {
|
||||
id: number
|
||||
@@ -19,8 +27,10 @@ export interface AppNotification {
|
||||
/** Nombre de nouveaux épisodes (épisodes) */
|
||||
ep_count: number | null
|
||||
actor: { username: string; display_name: string; avatar_url: string | null } | null
|
||||
/** Titre de la fiche concernée (réactions, épisodes) */
|
||||
/** Titre de la fiche concernée (réactions, commentaires, épisodes) ou nom de la liste partagée */
|
||||
title: string | null
|
||||
/** Invitation à une liste partagée : en attente, acceptée, ou plus valable (null) */
|
||||
invite_status: 'pending' | 'accepted' | null
|
||||
}
|
||||
|
||||
/** Épisode/saison à signaler (envoyé après la vérification des sorties). */
|
||||
@@ -54,7 +64,7 @@ async function rpc<T>(name: string, args: Record<string, unknown> = {}): Promise
|
||||
return res.json() as Promise<T>
|
||||
}
|
||||
|
||||
const KINDS: NotificationKind[] = ['follow_request', 'follow_accepted', 'new_follower', 'reaction', 'new_episode', 'new_season']
|
||||
const KINDS: NotificationKind[] = ['follow_request', 'follow_accepted', 'new_follower', 'reaction', 'new_episode', 'new_season', 'review_comment', 'shared_list_invite']
|
||||
const num = (v: unknown) => (typeof v === 'number' && Number.isFinite(v) ? v : null)
|
||||
|
||||
/** Réponse du serveur relue champ par champ (adresses d'images comprises), comme pour les profils. */
|
||||
@@ -75,6 +85,7 @@ function toNotification(v: unknown): AppNotification | null {
|
||||
ep_count: num(v.ep_count),
|
||||
actor: username ? { username, display_name: cleanText(a!.display_name, 40) ?? username, avatar_url: safeMediaUrl(a!.avatar_url) ?? null } : null,
|
||||
title: cleanText(v.title, 300) ?? null,
|
||||
invite_status: v.invite_status === 'pending' || v.invite_status === 'accepted' ? v.invite_status : null,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ export interface TitleReview {
|
||||
updated_at: string
|
||||
rating: number | null
|
||||
notes: string
|
||||
/** L'auteur a signalé des spoilers : texte masqué jusqu'au tap */
|
||||
spoiler: boolean
|
||||
/** Nombre de commentaires sous l'avis (null : serveur sans les commentaires) */
|
||||
comments: number | null
|
||||
/** emoji -> nombre */
|
||||
reactions: Record<string, number>
|
||||
total: number
|
||||
@@ -76,6 +80,8 @@ function toReview(v: unknown): TitleReview | null {
|
||||
updated_at: safeIso(v.updated_at) ?? new Date(0).toISOString(),
|
||||
rating: typeof v.rating === 'number' && v.rating > 0 && v.rating <= 10 ? v.rating : null,
|
||||
notes,
|
||||
spoiler: v.spoiler === true,
|
||||
comments: typeof v.comments === 'number' && Number.isFinite(v.comments) ? Math.min(Math.max(0, Math.floor(v.comments)), 100000) : null,
|
||||
reactions,
|
||||
total: Object.values(reactions).reduce((a, b) => a + b, 0),
|
||||
mine: (REACTION_EMOJIS as readonly string[]).includes(v.mine as string) ? (v.mine as string) : null,
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
import { t } from '../../i18n'
|
||||
import type { MediaItem, MediaType } from '../../types'
|
||||
import { cleanText, isPlainObject, isSafeExternalId, remoteImage, safeIso } from '../security'
|
||||
import { cloudFetch } from './api'
|
||||
import { safeMediaUrl, type ProfileCard } from './social'
|
||||
|
||||
/**
|
||||
* Listes partagées / collaboratives (côté serveur, réservées aux membres).
|
||||
* Différentes des listes perso (privées, synchronisées avec la bibliothèque) : un titre y est un
|
||||
* simple instantané (référence TMDB/AniList, titre, affiche, type, année) ajouté par un membre.
|
||||
* Tout passe par les fonctions de la base, qui vérifient l'appartenance à chaque appel.
|
||||
*/
|
||||
|
||||
export interface MiniUser {
|
||||
id: string
|
||||
username: string
|
||||
displayName: string
|
||||
avatarUrl?: string
|
||||
}
|
||||
|
||||
export interface SharedListCard {
|
||||
id: string
|
||||
name: string
|
||||
isOwner: boolean
|
||||
owner: MiniUser | null
|
||||
count: number
|
||||
members: number
|
||||
posters: string[]
|
||||
/** Le titre demandé (p_external_id) est déjà dans la liste */
|
||||
has: boolean
|
||||
}
|
||||
|
||||
export interface SharedListInvite {
|
||||
id: string
|
||||
name: string
|
||||
owner: MiniUser | null
|
||||
members: number
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface SharedListMember extends MiniUser {
|
||||
status: 'pending' | 'accepted'
|
||||
isOwner: boolean
|
||||
}
|
||||
|
||||
export interface SharedListItem {
|
||||
externalId: string
|
||||
title: string
|
||||
poster?: string
|
||||
type: MediaType
|
||||
year?: number
|
||||
addedAt: string
|
||||
addedBy: MiniUser | null
|
||||
}
|
||||
|
||||
export interface SharedList {
|
||||
id: string
|
||||
name: string
|
||||
isOwner: boolean
|
||||
members: SharedListMember[]
|
||||
items: SharedListItem[]
|
||||
}
|
||||
|
||||
/** Les tables / fonctions n'existent pas encore côté serveur : la fonctionnalité se masque. */
|
||||
export class SharedListsUnavailable extends Error {}
|
||||
|
||||
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
||||
const USERNAME = /^[a-z0-9_]{3,20}$/
|
||||
const TYPES = new Set<MediaType>(['film', 'serie', 'anime', 'kdrama', 'cdrama', 'autre'])
|
||||
export const SHARED_LIST_NAME_MAX = 80
|
||||
|
||||
async function rpc(name: string, args: Record<string, unknown> = {}): Promise<unknown> {
|
||||
const res = await cloudFetch(`/rest/v1/rpc/${name}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(args),
|
||||
})
|
||||
if (res.ok) return res.json()
|
||||
if (res.status === 404) throw new SharedListsUnavailable(t('shared.unavailable'))
|
||||
const body = (await res.json().catch(() => ({}))) as { message?: string }
|
||||
const msg = typeof body.message === 'string' ? body.message : ''
|
||||
if (msg.includes('rate limit')) throw new Error(t('shared.err.rate'))
|
||||
if (msg.includes('too many members')) throw new Error(t('shared.err.members'))
|
||||
if (msg.includes('too many lists')) throw new Error(t('shared.err.lists'))
|
||||
if (msg.includes('list full')) throw new Error(t('shared.err.full'))
|
||||
if (msg.includes('not connected')) throw new Error(t('shared.err.notConnected'))
|
||||
if (msg.includes('forbidden') || msg.includes('invite not found')) throw new Error(t('shared.err.forbidden'))
|
||||
throw new Error(t('social.err.server', { status: res.status }))
|
||||
}
|
||||
|
||||
function toUser(v: unknown): MiniUser | null {
|
||||
if (!isPlainObject(v) || typeof v.id !== 'string' || !UUID.test(v.id) || typeof v.username !== 'string' || !USERNAME.test(v.username)) return null
|
||||
return { id: v.id, username: v.username, displayName: cleanText(v.display_name, 40) ?? v.username, avatarUrl: safeMediaUrl(v.avatar_url) }
|
||||
}
|
||||
|
||||
const count = (v: unknown) => (typeof v === 'number' && Number.isFinite(v) && v > 0 ? Math.min(Math.floor(v), 100000) : 0)
|
||||
const listId = (v: unknown) => (typeof v === 'string' && UUID.test(v) ? v : null)
|
||||
|
||||
function toCard(v: unknown): SharedListCard | null {
|
||||
if (!isPlainObject(v)) return null
|
||||
const id = listId(v.id)
|
||||
const name = cleanText(v.name, SHARED_LIST_NAME_MAX)
|
||||
if (!id || !name) return null
|
||||
return {
|
||||
id,
|
||||
name,
|
||||
isOwner: v.is_owner === true,
|
||||
owner: toUser(v.owner),
|
||||
count: count(v.count),
|
||||
members: count(v.members),
|
||||
posters: (Array.isArray(v.posters) ? v.posters.slice(0, 4) : []).map(remoteImage).filter((p): p is string => !!p),
|
||||
has: v.has === true,
|
||||
}
|
||||
}
|
||||
|
||||
function toInvite(v: unknown): SharedListInvite | null {
|
||||
if (!isPlainObject(v)) return null
|
||||
const id = listId(v.id)
|
||||
const name = cleanText(v.name, SHARED_LIST_NAME_MAX)
|
||||
if (!id || !name) return null
|
||||
return { id, name, owner: toUser(v.owner), members: count(v.members), createdAt: safeIso(v.created_at) ?? new Date(0).toISOString() }
|
||||
}
|
||||
|
||||
function toItem(v: unknown): SharedListItem | null {
|
||||
if (!isPlainObject(v) || !isSafeExternalId(v.external_id)) return null
|
||||
const title = cleanText(v.title, 300)
|
||||
if (!title) return null
|
||||
const year = typeof v.year === 'number' && Number.isInteger(v.year) && v.year >= 1870 && v.year <= 2200 ? v.year : undefined
|
||||
return {
|
||||
externalId: v.external_id,
|
||||
title,
|
||||
poster: remoteImage(v.poster),
|
||||
type: TYPES.has(v.type as MediaType) ? (v.type as MediaType) : 'autre',
|
||||
year,
|
||||
addedAt: safeIso(v.added_at) ?? new Date(0).toISOString(),
|
||||
addedBy: toUser(v.added_by),
|
||||
}
|
||||
}
|
||||
|
||||
function toMember(v: unknown): SharedListMember | null {
|
||||
const u = toUser(v)
|
||||
if (!u || !isPlainObject(v)) return null
|
||||
return { ...u, status: v.status === 'accepted' ? 'accepted' : 'pending', isOwner: v.is_owner === true }
|
||||
}
|
||||
|
||||
const list = <T>(v: unknown, map: (x: unknown) => T | null, max = 500): T[] => (Array.isArray(v) ? v.slice(0, max) : []).map(map).filter((x): x is T => x !== null)
|
||||
|
||||
// ─── Lecture ───
|
||||
|
||||
export async function getSharedLists(externalId?: string): Promise<{ lists: SharedListCard[]; invites: SharedListInvite[] }> {
|
||||
const raw = await rpc('get_shared_lists', { p_external_id: externalId && isSafeExternalId(externalId) ? externalId : null })
|
||||
if (!isPlainObject(raw)) return { lists: [], invites: [] }
|
||||
return { lists: list(raw.lists, toCard, 200), invites: list(raw.invites, toInvite, 100) }
|
||||
}
|
||||
|
||||
export async function getSharedList(id: string): Promise<SharedList | null> {
|
||||
if (!UUID.test(id)) return null
|
||||
const raw = await rpc('get_shared_list', { p_list: id })
|
||||
if (!isPlainObject(raw)) return null
|
||||
const name = cleanText(raw.name, SHARED_LIST_NAME_MAX)
|
||||
if (!name) return null
|
||||
return { id, name, isOwner: raw.is_owner === true, members: list(raw.members, toMember, 50), items: list(raw.items, toItem, 500) }
|
||||
}
|
||||
|
||||
/** Personnes invitables (abonnés / abonnements), filtrées par pseudo ou nom. */
|
||||
export async function inviteCandidates(id: string, q: string): Promise<ProfileCard[]> {
|
||||
if (!UUID.test(id)) return []
|
||||
const raw = await rpc('shared_list_candidates', { p_list: id, p_q: q.trim().slice(0, 40) })
|
||||
return list(raw, (v) => {
|
||||
const u = toUser(v)
|
||||
return u && isPlainObject(v) ? { ...u, isPrivate: v.is_private === true, relation: 'none' as const } : null
|
||||
}, 50)
|
||||
}
|
||||
|
||||
// ─── Écriture ───
|
||||
|
||||
export async function createSharedList(name: string): Promise<string> {
|
||||
const raw = await rpc('create_shared_list', { p_name: name.trim().slice(0, SHARED_LIST_NAME_MAX) })
|
||||
const id = isPlainObject(raw) ? listId(raw.id) : null
|
||||
if (!id) throw new Error(t('social.err.server', { status: 500 }))
|
||||
return id
|
||||
}
|
||||
|
||||
export const renameSharedList = (id: string, name: string) => rpc('rename_shared_list', { p_list: id, p_name: name.trim().slice(0, SHARED_LIST_NAME_MAX) })
|
||||
export const deleteSharedList = (id: string) => rpc('delete_shared_list', { p_list: id })
|
||||
export const inviteToSharedList = (id: string, userId: string) => rpc('invite_to_shared_list', { p_list: id, p_user: userId })
|
||||
export const respondToInvite = (id: string, accept: boolean) => rpc('respond_shared_list_invite', { p_list: id, p_accept: accept })
|
||||
export const leaveSharedList = (id: string) => rpc('leave_shared_list', { p_list: id })
|
||||
export const removeSharedListMember = (id: string, userId: string) => rpc('remove_shared_list_member', { p_list: id, p_user: userId })
|
||||
export const removeSharedListItem = (id: string, externalId: string) => rpc('remove_shared_list_item', { p_list: id, p_external_id: externalId })
|
||||
|
||||
/** Instantané minimal d'un titre (jamais d'image embarquée : seulement une adresse TMDB/AniList). */
|
||||
export interface TitleSnapshot {
|
||||
externalId: string
|
||||
title: string
|
||||
poster?: string
|
||||
type: MediaType
|
||||
year?: number
|
||||
}
|
||||
|
||||
export function snapshotOf(item: Pick<MediaItem, 'externalId' | 'title' | 'poster' | 'type' | 'year'>, posterFallback?: string): TitleSnapshot | null {
|
||||
if (!isSafeExternalId(item.externalId)) return null
|
||||
return { externalId: item.externalId, title: item.title, poster: remoteImage(item.poster) ?? remoteImage(posterFallback), type: item.type, year: item.year }
|
||||
}
|
||||
|
||||
export const addSharedListItem = (id: string, s: TitleSnapshot) =>
|
||||
rpc('add_shared_list_item', {
|
||||
p_list: id,
|
||||
p_item: { external_id: s.externalId, title: s.title.slice(0, 300), poster: s.poster ?? null, type: s.type, year: s.year ?? null },
|
||||
})
|
||||
+12
-2
@@ -86,8 +86,18 @@ function toCard(raw: unknown): ProfileCard | null {
|
||||
}
|
||||
}
|
||||
|
||||
/** Fiche de quelqu'un d'autre : ses tags et listes perso restent privés (même si un ancien serveur les renvoyait). */
|
||||
function othersItem(v: unknown): MediaItem | null {
|
||||
const item = normalizeItem(v)
|
||||
if (item) {
|
||||
delete item.tags
|
||||
delete item.listIds
|
||||
}
|
||||
return item
|
||||
}
|
||||
|
||||
const toItems = (v: unknown): MediaItem[] =>
|
||||
Array.isArray(v) ? v.slice(0, 200).map(normalizeItem).filter((i): i is MediaItem => i !== null) : []
|
||||
Array.isArray(v) ? v.slice(0, 200).map(othersItem).filter((i): i is MediaItem => i !== null) : []
|
||||
|
||||
function toProfile(raw: unknown): Profile | null {
|
||||
const card = toCard(raw)
|
||||
@@ -163,7 +173,7 @@ export async function getFeed(before?: string): Promise<FeedEntry[]> {
|
||||
const out: FeedEntry[] = []
|
||||
for (const r of raw.slice(0, 50)) {
|
||||
if (!isPlainObject(r) || !isPlainObject(r.user)) continue
|
||||
const item = normalizeItem(r.item)
|
||||
const item = othersItem(r.item)
|
||||
const name = username(r.user.username)
|
||||
const createdAt = safeIso(r.created_at)
|
||||
const kind = r.kind
|
||||
|
||||
@@ -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<Settings, 'ratingScale' | 'topCategories' | 'accentColor' | 'themeMode' | 'notifPrefs'>
|
||||
export type SyncedSettings = Pick<Settings, 'ratingScale' | 'topCategories' | 'accentColor' | 'themeMode' | 'notifPrefs' | 'challenges'>
|
||||
|
||||
export interface SyncHooks {
|
||||
getLists: () => CustomList[]
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
import { SUPABASE_ANON_KEY, SUPABASE_URL, cloudEnabled } from './cloud/config'
|
||||
|
||||
/**
|
||||
* Remontée des erreurs de l'app (équivalent Sentry minimal, sans service tiers).
|
||||
* - capte window.onerror, les promesses rejetées non gérées et les plantages d'affichage React ;
|
||||
* - aucune donnée personnelle : e-mails, jetons, identifiants et paramètres d'URL sont retirés
|
||||
* (ici ET côté serveur), aucun identifiant de compte n'est envoyé ;
|
||||
* - dédoublonnage par empreinte (message + 1re ligne de pile) et 10 envois max par session ;
|
||||
* - le serveur (log_client_error) regroupe, compte et limite le débit par empreinte.
|
||||
*/
|
||||
|
||||
export type ErrorSource = 'error' | 'rejection' | 'render'
|
||||
|
||||
const MAX_PER_SESSION = 10
|
||||
const sent = new Set<string>()
|
||||
let budget = MAX_PER_SESSION
|
||||
let installed = false
|
||||
|
||||
/** Envoi activé : en production (ou en dev avec VITE_REPORT_ERRORS=1), et seulement avec Supabase. */
|
||||
const enabled = () => cloudEnabled && (import.meta.env.PROD || import.meta.env.VITE_REPORT_ERRORS === '1')
|
||||
|
||||
/** Retire ce qui pourrait identifier quelqu'un. */
|
||||
export function scrub(text: string, max: number): string {
|
||||
return (
|
||||
text
|
||||
// eslint-disable-next-line no-control-regex
|
||||
.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, '')
|
||||
.replace(/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, '[email]')
|
||||
.replace(/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]*)?/g, '[token]')
|
||||
.replace(/(sb_(publishable|secret)_|sk_|pk_)[A-Za-z0-9_-]+/g, '[key]')
|
||||
.replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, '[id]')
|
||||
// Adresses : ni paramètres ni ancre (#/u/pseudo, ?code=…)
|
||||
.replace(/(https?:\/\/[^\s?#'"()]+)[?#][^\s'"()]*/g, '$1')
|
||||
.replace(/[A-Za-z0-9_-]{40,}/g, '[token]')
|
||||
.slice(0, max)
|
||||
)
|
||||
}
|
||||
|
||||
/** Petite empreinte locale (dédoublonnage dans la session ; le serveur recalcule la sienne). */
|
||||
function fingerprint(source: ErrorSource, message: string, stack: string): string {
|
||||
const frame = stack.split('\n').find((l) => /^\s*at |@/.test(l)) ?? ''
|
||||
const key = `${source}|${message.toLowerCase().replace(/\d+/g, '0')}|${frame.replace(/:\d+(:\d+)?/g, '')}`
|
||||
let h = 5381
|
||||
for (let i = 0; i < key.length; i++) h = ((h << 5) + h + key.charCodeAt(i)) | 0
|
||||
return (h >>> 0).toString(36)
|
||||
}
|
||||
|
||||
/** Erreurs sans intérêt (réseau coupé, extensions du navigateur, bruit connu des navigateurs). */
|
||||
function isNoise(message: string, stack: string): boolean {
|
||||
if (!message || message === 'Script error.' || message === 'Script error') return true
|
||||
if (/ResizeObserver loop|AbortError|The operation was aborted|NetworkError when attempting|Failed to fetch$|Load failed$|cancelled|annulé/i.test(message)) return true
|
||||
if (/(chrome|moz|safari(-web)?)-extension:\/\//.test(stack)) return true
|
||||
return false
|
||||
}
|
||||
|
||||
function toParts(err: unknown): { message: string; stack: string } {
|
||||
if (err instanceof Error) return { message: `${err.name}: ${err.message}`, stack: err.stack ?? '' }
|
||||
if (typeof err === 'string') return { message: err, stack: '' }
|
||||
try {
|
||||
return { message: `Non-Error: ${JSON.stringify(err)?.slice(0, 200) ?? String(err)}`, stack: '' }
|
||||
} catch {
|
||||
return { message: 'Non-Error value', stack: '' }
|
||||
}
|
||||
}
|
||||
|
||||
/** Remonte une erreur (sans jamais lever d'erreur elle-même). */
|
||||
export function reportError(err: unknown, source: ErrorSource = 'error', extraStack = ''): void {
|
||||
try {
|
||||
if (!enabled() || budget <= 0) return
|
||||
const parts = toParts(err)
|
||||
const message = scrub(parts.message, 500).trim()
|
||||
const stack = scrub([parts.stack, extraStack].filter(Boolean).join('\n--- component stack ---\n'), 4000)
|
||||
if (isNoise(message, stack)) return
|
||||
if (!navigator.onLine) return
|
||||
const fp = fingerprint(source, message, stack)
|
||||
if (sent.has(fp)) return
|
||||
sent.add(fp)
|
||||
budget--
|
||||
const headers: Record<string, string> = { apikey: SUPABASE_ANON_KEY, 'Content-Type': 'application/json' }
|
||||
// Ancienne clé « anon » (JWT) : elle sert aussi de jeton. Les clés « sb_publishable_ » se passent de ce champ.
|
||||
if (SUPABASE_ANON_KEY.split('.').length === 3) headers.Authorization = `Bearer ${SUPABASE_ANON_KEY}`
|
||||
void fetch(`${SUPABASE_URL}/rest/v1/rpc/log_client_error`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify({
|
||||
p_message: message,
|
||||
p_stack: stack || null,
|
||||
p_url: `${location.origin}${location.pathname}`,
|
||||
p_version: __APP_VERSION__,
|
||||
p_ua: navigator.userAgent.slice(0, 300),
|
||||
p_source: source,
|
||||
}),
|
||||
credentials: 'omit',
|
||||
referrerPolicy: 'no-referrer',
|
||||
keepalive: true,
|
||||
}).catch(() => {})
|
||||
} catch {
|
||||
/* la remontée d'erreurs ne doit jamais casser l'app */
|
||||
}
|
||||
}
|
||||
|
||||
/** À appeler une fois au démarrage. */
|
||||
export function installErrorReporting(): void {
|
||||
if (installed || typeof window === 'undefined') return
|
||||
installed = true
|
||||
window.addEventListener('error', (e) => {
|
||||
// Erreurs de chargement de ressources (image cassée…) : ignorées
|
||||
if (!(e instanceof ErrorEvent)) return
|
||||
reportError(e.error ?? e.message, 'error')
|
||||
})
|
||||
window.addEventListener('unhandledrejection', (e) => reportError(e.reason, 'rejection'))
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
/**
|
||||
* Lecture des fichiers d'export (sans dépendance) :
|
||||
* - mini-lecteur ZIP (entrées « stockées » ou « deflate », décompressées par le navigateur) ;
|
||||
* - décompression gzip (.xml.gz de MyAnimeList) ;
|
||||
* - lecteur CSV (guillemets, retours à la ligne dans les champs, BOM).
|
||||
* Tout est borné : un fichier piégé (zip bomb, CSV géant) est refusé au lieu de bloquer l'appli.
|
||||
*/
|
||||
|
||||
/** Taille maximale décompressée, toutes entrées confondues. */
|
||||
const MAX_UNPACKED = 80 * 1024 * 1024
|
||||
/** Nombre maximal de lignes lues dans un CSV. */
|
||||
const MAX_ROWS = 200_000
|
||||
|
||||
export class ImportFileError extends Error {}
|
||||
|
||||
export interface TextFile {
|
||||
/** Chemin dans l'archive (ou nom du fichier), en minuscules, avec « / » */
|
||||
path: string
|
||||
text: string
|
||||
}
|
||||
|
||||
/** Décompresse avec le DecompressionStream du navigateur, en s'arrêtant au-delà de `max` octets. */
|
||||
async function inflate(data: Uint8Array, format: 'deflate-raw' | 'gzip', max: number): Promise<Uint8Array> {
|
||||
if (typeof DecompressionStream === 'undefined') throw new ImportFileError('unsupported')
|
||||
const stream = new Blob([data as BlobPart]).stream().pipeThrough(new DecompressionStream(format))
|
||||
const reader = stream.getReader()
|
||||
const chunks: Uint8Array[] = []
|
||||
let total = 0
|
||||
for (;;) {
|
||||
const { done, value } = await reader.read()
|
||||
if (done) break
|
||||
total += value.byteLength
|
||||
if (total > max) {
|
||||
void reader.cancel().catch(() => {})
|
||||
throw new ImportFileError('tooBig')
|
||||
}
|
||||
chunks.push(value)
|
||||
}
|
||||
const out = new Uint8Array(total)
|
||||
let pos = 0
|
||||
for (const c of chunks) {
|
||||
out.set(c, pos)
|
||||
pos += c.byteLength
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
const decoder = () => new TextDecoder('utf-8')
|
||||
|
||||
export const isZip = (b: Uint8Array) => b.length > 4 && b[0] === 0x50 && b[1] === 0x4b && b[2] === 0x03 && b[3] === 0x04
|
||||
export const isGzip = (b: Uint8Array) => b.length > 2 && b[0] === 0x1f && b[1] === 0x8b
|
||||
|
||||
/**
|
||||
* Extrait les fichiers texte d'une archive ZIP dont le nom passe le filtre.
|
||||
* Lit le répertoire central (fiable même quand les tailles locales sont différées).
|
||||
*/
|
||||
export async function unzipText(bytes: Uint8Array, keep: (path: string) => boolean): Promise<TextFile[]> {
|
||||
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength)
|
||||
// Fin du répertoire central : signature 0x06054b50, dans les 64 Ko de la fin
|
||||
let eocd = -1
|
||||
for (let i = bytes.length - 22; i >= Math.max(0, bytes.length - 22 - 0xffff); i--) {
|
||||
if (view.getUint32(i, true) === 0x06054b50) {
|
||||
eocd = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (eocd < 0) throw new ImportFileError('badZip')
|
||||
const count = view.getUint16(eocd + 10, true)
|
||||
let p = view.getUint32(eocd + 16, true)
|
||||
const out: TextFile[] = []
|
||||
let unpacked = 0
|
||||
for (let n = 0; n < count && n < 5000; n++) {
|
||||
if (p + 46 > bytes.length || view.getUint32(p, true) !== 0x02014b50) throw new ImportFileError('badZip')
|
||||
const method = view.getUint16(p + 10, true)
|
||||
const flags = view.getUint16(p + 8, true)
|
||||
const compSize = view.getUint32(p + 20, true)
|
||||
const size = view.getUint32(p + 24, true)
|
||||
const nameLen = view.getUint16(p + 28, true)
|
||||
const extraLen = view.getUint16(p + 30, true)
|
||||
const commentLen = view.getUint16(p + 32, true)
|
||||
const local = view.getUint32(p + 42, true)
|
||||
const rawName = bytes.subarray(p + 46, p + 46 + nameLen)
|
||||
const name = (flags & 0x800 ? decoder().decode(rawName) : String.fromCharCode(...rawName)).replace(/\\/g, '/').toLowerCase()
|
||||
p += 46 + nameLen + extraLen + commentLen
|
||||
|
||||
if (name.endsWith('/') || !keep(name)) continue
|
||||
if (flags & 0x1) throw new ImportFileError('encrypted')
|
||||
if (local + 30 > bytes.length || view.getUint32(local, true) !== 0x04034b50) throw new ImportFileError('badZip')
|
||||
const start = local + 30 + view.getUint16(local + 26, true) + view.getUint16(local + 28, true)
|
||||
const data = bytes.subarray(start, start + compSize)
|
||||
if (data.length < compSize) throw new ImportFileError('badZip')
|
||||
const budget = MAX_UNPACKED - unpacked
|
||||
let content: Uint8Array
|
||||
if (method === 0) content = data
|
||||
else if (method === 8) content = await inflate(data, 'deflate-raw', Math.min(budget, Math.max(size, 1) + 1024))
|
||||
else throw new ImportFileError('badZip')
|
||||
unpacked += content.byteLength
|
||||
if (unpacked > MAX_UNPACKED) throw new ImportFileError('tooBig')
|
||||
out.push({ path: name, text: decoder().decode(content) })
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
export async function gunzipText(bytes: Uint8Array): Promise<string> {
|
||||
return decoder().decode(await inflate(bytes, 'gzip', MAX_UNPACKED))
|
||||
}
|
||||
|
||||
/** Normalise un nom de colonne : « Watched Date » → « watched_date ». */
|
||||
export const columnKey = (s: string) =>
|
||||
s
|
||||
.replace(/^/, '')
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/g, '_')
|
||||
.replace(/^_|_$/g, '')
|
||||
|
||||
export type CsvRow = Record<string, string>
|
||||
|
||||
/** Lit un CSV (virgule, point-virgule ou tabulation) en lignes indexées par nom de colonne normalisé. */
|
||||
export function parseCsv(input: string): { columns: string[]; rows: CsvRow[] } {
|
||||
const text = input.replace(/^/, '')
|
||||
const nl = text.indexOf('\n')
|
||||
const firstLine = nl < 0 ? text : text.slice(0, nl)
|
||||
const counts = [',', ';', '\t'].map((d) => [d, firstLine.split(d).length] as const)
|
||||
const sep = counts.sort((a, b) => b[1] - a[1])[0][0]
|
||||
|
||||
const records: string[][] = []
|
||||
let field = ''
|
||||
let row: string[] = []
|
||||
let quoted = false
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const c = text[i]
|
||||
if (quoted) {
|
||||
if (c === '"') {
|
||||
if (text[i + 1] === '"') {
|
||||
field += '"'
|
||||
i++
|
||||
} else quoted = false
|
||||
} else field += c
|
||||
} else if (c === '"' && field === '') quoted = true
|
||||
else if (c === sep) {
|
||||
row.push(field)
|
||||
field = ''
|
||||
} else if (c === '\n' || c === '\r') {
|
||||
if (c === '\r' && text[i + 1] === '\n') i++
|
||||
row.push(field)
|
||||
field = ''
|
||||
if (row.length > 1 || row[0] !== '') records.push(row)
|
||||
row = []
|
||||
if (records.length > MAX_ROWS) break
|
||||
} else field += c
|
||||
}
|
||||
if (field !== '' || row.length) {
|
||||
row.push(field)
|
||||
if (row.length > 1 || row[0] !== '') records.push(row)
|
||||
}
|
||||
const header = records.shift() ?? []
|
||||
const columns = header.map(columnKey)
|
||||
const rows = records.map((r) => {
|
||||
const o: CsvRow = Object.create(null)
|
||||
columns.forEach((k, j) => {
|
||||
if (k && !(k in o)) o[k] = (r[j] ?? '').trim()
|
||||
})
|
||||
return o
|
||||
})
|
||||
return { columns, rows }
|
||||
}
|
||||
|
||||
/** Première valeur non vide parmi plusieurs noms de colonne possibles. */
|
||||
export function pick(row: CsvRow, names: string[]): string | undefined {
|
||||
for (const n of names) {
|
||||
const v = row[n]
|
||||
if (v != null && v !== '') return v
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
/** Lit un fichier choisi par l'utilisateur (zip, gz ou texte) en liste de fichiers texte. */
|
||||
export async function readImportFile(file: File, keep: (path: string) => boolean, maxBytes: number): Promise<TextFile[]> {
|
||||
if (file.size > maxBytes) throw new ImportFileError('tooBig')
|
||||
const bytes = new Uint8Array(await file.arrayBuffer())
|
||||
const name = file.name.toLowerCase()
|
||||
if (isZip(bytes)) return unzipText(bytes, keep)
|
||||
if (isGzip(bytes)) return [{ path: name.replace(/\.gz$/, ''), text: await gunzipText(bytes) }]
|
||||
return [{ path: name, text: decoder().decode(bytes) }]
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
import type { MediaInput, MediaItem, MediaType, WatchStatus } from '../../types'
|
||||
import { normalizeItem } from '../backup'
|
||||
import { TYPE_BY_VALUE } from '../constants'
|
||||
import { episodeCap, findFranchiseItem, franchiseKey, seasonPosition } from '../franchise'
|
||||
import { cleanText, LIMITS } from '../security'
|
||||
import { uid } from '../utils'
|
||||
import type { Match } from './resolve'
|
||||
import { titleKey, type ImportEntry } from './sources'
|
||||
|
||||
/**
|
||||
* Transforme les entrées trouvées en fiches AzuuCine et les fusionne avec la bibliothèque :
|
||||
* - pas de doublon (même référence TMDB / AniList, même film, ou autre saison de la même série) ;
|
||||
* - une fiche existante n'est jamais écrasée : on complète ce qui manque, et le statut / la progression
|
||||
* n'avancent que si l'activité importée est plus récente que la dernière modification de la fiche.
|
||||
*/
|
||||
|
||||
export interface ImportPlan {
|
||||
/** Nouvelles fiches */
|
||||
added: MediaItem[]
|
||||
/** Fiches existantes complétées */
|
||||
updated: MediaItem[]
|
||||
/** Titres déjà dans la bibliothèque, sans rien de nouveau */
|
||||
unchanged: number
|
||||
/** Entrées sans correspondance */
|
||||
notFound: ImportEntry[]
|
||||
}
|
||||
|
||||
const RANK: Record<WatchStatus, number> = { a_voir: 0, pause: 1, abandonne: 1, en_cours: 2, termine: 3 }
|
||||
const episodic = (type: MediaType) => TYPE_BY_VALUE[type]?.episodic ?? false
|
||||
const typeOfKind = (e: ImportEntry): MediaType => (e.kind === 'movie' ? 'film' : e.kind === 'anime' ? (e.format === 'MOVIE' ? 'film' : 'anime') : 'serie')
|
||||
|
||||
interface Candidate {
|
||||
/** Fiche à créer (sans id définitif) */
|
||||
item: MediaItem
|
||||
/** Toutes les références externes couvertes (saisons AniList regroupées) */
|
||||
externalIds: string[]
|
||||
titles: string[]
|
||||
/** L'activité importée a une date connue */
|
||||
dated: boolean
|
||||
entries: ImportEntry[]
|
||||
}
|
||||
|
||||
/** Fiche à partir d'une entrée (et de sa correspondance, si trouvée). */
|
||||
function entryToItem(e: ImportEntry, match: Match | undefined, now: string): MediaItem {
|
||||
const meta: Partial<MediaInput> = match?.meta ?? { title: e.title, year: e.year, type: typeOfKind(e), genres: [] }
|
||||
const type = meta.type ?? typeOfKind(e)
|
||||
const isFilm = !episodic(type)
|
||||
const seasons = meta.seasons
|
||||
const cap = episodeCap({ episodesTotal: meta.episodesTotal, seasons })
|
||||
|
||||
let status = e.status
|
||||
let episodesWatched = 0
|
||||
let season: number | undefined
|
||||
let { startDate, endDate } = e
|
||||
if (!isFilm) {
|
||||
if (e.seen) {
|
||||
// TV Time : épisodes cochés un par un
|
||||
episodesWatched = cap ? Math.min(cap, e.seen.size) : e.seen.size
|
||||
if (episodesWatched === 0) status = e.archived ? 'abandonne' : 'a_voir'
|
||||
else if (cap && episodesWatched >= cap) status = 'termine'
|
||||
else status = e.archived ? 'abandonne' : 'en_cours'
|
||||
if (status !== 'termine') endDate = undefined
|
||||
if (!seasons || seasons.length < 2) {
|
||||
const last = Math.max(0, ...[...e.seen].map((k) => Number(k.split(':')[0])))
|
||||
if (last > 0) season = last
|
||||
}
|
||||
} else {
|
||||
episodesWatched = e.episodesWatched ?? 0
|
||||
if (status === 'termine' && cap && episodesWatched < cap) episodesWatched = cap
|
||||
if (cap) episodesWatched = Math.min(cap, episodesWatched)
|
||||
}
|
||||
season = seasonPosition({ episodesWatched, seasons, season: undefined })?.season ?? season
|
||||
}
|
||||
if (status !== 'termine' && !isFilm) endDate = undefined
|
||||
if (status === 'a_voir') startDate = undefined
|
||||
|
||||
return {
|
||||
...meta,
|
||||
id: uid(),
|
||||
title: meta.title ?? e.title,
|
||||
type,
|
||||
genres: meta.genres ?? [],
|
||||
criteria: {},
|
||||
status,
|
||||
rating: status === 'a_voir' ? undefined : e.rating,
|
||||
favorite: e.favorite || undefined,
|
||||
episodesWatched,
|
||||
season,
|
||||
startDate,
|
||||
endDate: status === 'termine' || isFilm ? endDate : undefined,
|
||||
rewatchDates: e.rewatchDates,
|
||||
notes: e.notes,
|
||||
createdAt: e.firstSeen ?? now,
|
||||
updatedAt: e.activity ?? now,
|
||||
}
|
||||
}
|
||||
|
||||
/** Saisons AniList d'une même série (« … Season 2 ») regroupées en une fiche, comme dans l'appli. */
|
||||
function groupAnimeSeasons(cands: Candidate[]): Candidate[] {
|
||||
const out: Candidate[] = []
|
||||
const groups = new Map<string, Candidate[]>()
|
||||
for (const c of cands) {
|
||||
const e = c.entries[0]
|
||||
const isAniSeries = (e.media || e.malId) && c.item.type === 'anime' && c.externalIds[0]?.startsWith('anilist:')
|
||||
if (!isAniSeries) {
|
||||
out.push(c)
|
||||
continue
|
||||
}
|
||||
const romaji = e.media?.title?.romaji ?? c.item.originalTitle ?? c.item.title
|
||||
const k = franchiseKey(romaji)
|
||||
groups.set(k, [...(groups.get(k) ?? []), c])
|
||||
}
|
||||
for (const list of groups.values()) {
|
||||
if (list.length === 1) {
|
||||
out.push(list[0])
|
||||
continue
|
||||
}
|
||||
list.sort((a, b) => (a.item.year ?? 9999) - (b.item.year ?? 9999) || Number(a.externalIds[0].split(':')[1]) - Number(b.externalIds[0].split(':')[1]))
|
||||
const first = list[0].item
|
||||
const sizes = list.map((c) => c.item.episodesTotal)
|
||||
const allKnown = sizes.every((n): n is number => !!n)
|
||||
const statuses = list.map((c) => c.item.status)
|
||||
const status: WatchStatus = statuses.every((s) => s === 'termine')
|
||||
? 'termine'
|
||||
: statuses.every((s) => s === 'a_voir')
|
||||
? 'a_voir'
|
||||
: statuses.includes('en_cours') || (statuses.includes('termine') && statuses.includes('a_voir'))
|
||||
? 'en_cours'
|
||||
: statuses.includes('pause')
|
||||
? 'pause'
|
||||
: statuses.includes('abandonne')
|
||||
? 'abandonne'
|
||||
: 'en_cours'
|
||||
const seasons = allKnown ? (sizes as number[]) : undefined
|
||||
const watched = list.reduce((sum, c) => sum + c.item.episodesWatched, 0)
|
||||
const rated = [...list].reverse().find((c) => c.item.rating != null)
|
||||
const days = (pickDay: (i: MediaItem) => string | undefined) => list.map((c) => pickDay(c.item)).filter((d): d is string => !!d).sort()
|
||||
const item: MediaItem = {
|
||||
...first,
|
||||
status,
|
||||
seasons,
|
||||
episodesTotal: allKnown ? (sizes as number[]).reduce((a, b) => a + b, 0) : first.episodesTotal,
|
||||
episodesWatched: watched,
|
||||
season: seasonPosition({ episodesWatched: watched, seasons, season: undefined })?.season,
|
||||
rating: status === 'a_voir' ? undefined : rated?.item.rating,
|
||||
favorite: list.some((c) => c.item.favorite) || undefined,
|
||||
startDate: status === 'a_voir' ? undefined : days((i) => i.startDate)[0],
|
||||
endDate: status === 'termine' ? days((i) => i.endDate).pop() : undefined,
|
||||
notes: cleanText(list.map((c) => c.item.notes).filter(Boolean).join('\n\n'), LIMITS.notes),
|
||||
createdAt: list.map((c) => c.item.createdAt).sort()[0],
|
||||
updatedAt: list.map((c) => c.item.updatedAt).sort().pop()!,
|
||||
}
|
||||
out.push({
|
||||
item,
|
||||
externalIds: list.flatMap((c) => c.externalIds),
|
||||
titles: list.flatMap((c) => c.titles),
|
||||
dated: list.some((c) => c.dated),
|
||||
entries: list.flatMap((c) => c.entries),
|
||||
})
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
/** Même film déjà dans la bibliothèque, ou même série (n'importe quelle saison). */
|
||||
function findExisting(library: MediaItem[], c: Candidate): MediaItem | undefined {
|
||||
const byRef = library.find((i) => i.externalId && c.externalIds.includes(i.externalId))
|
||||
if (byRef) return byRef
|
||||
const keys = new Set(c.titles.map(titleKey).filter(Boolean))
|
||||
if (!episodic(c.item.type)) {
|
||||
return library.find(
|
||||
(i) =>
|
||||
!episodic(i.type) &&
|
||||
[i.title, i.originalTitle].some((x) => x && keys.has(titleKey(x))) &&
|
||||
(!i.year || !c.item.year || Math.abs(i.year - c.item.year) <= 1),
|
||||
)
|
||||
}
|
||||
return findFranchiseItem(library, c.titles, { type: c.item.type })
|
||||
}
|
||||
|
||||
/** Complète une fiche existante sans jamais écraser ce que l'utilisateur a saisi. Renvoie null si rien ne change. */
|
||||
function mergeInto(existing: MediaItem, c: Candidate, now: string): MediaItem | null {
|
||||
const inc = c.item
|
||||
const next: MediaItem = { ...existing }
|
||||
let changed = false
|
||||
const set = <K extends keyof MediaItem>(k: K, v: MediaItem[K]) => {
|
||||
next[k] = v
|
||||
changed = true
|
||||
}
|
||||
// L'activité importée est-elle plus récente que la dernière modification de ma fiche ?
|
||||
const newer = c.dated && inc.updatedAt > existing.updatedAt
|
||||
const canAdvance = existing.status === 'a_voir' || newer
|
||||
|
||||
if (RANK[inc.status] > RANK[existing.status] && canAdvance) set('status', inc.status)
|
||||
if (episodic(existing.type) && inc.episodesWatched > existing.episodesWatched && canAdvance && (!existing.externalId || existing.externalId === inc.externalId)) {
|
||||
const cap = episodeCap(existing)
|
||||
set('episodesWatched', cap ? Math.min(cap, inc.episodesWatched) : inc.episodesWatched)
|
||||
const pos = seasonPosition({ episodesWatched: next.episodesWatched, seasons: existing.seasons, season: undefined })
|
||||
if (pos) next.season = pos.season
|
||||
}
|
||||
if (existing.rating == null && inc.rating != null) set('rating', inc.rating)
|
||||
if (!existing.favorite && inc.favorite) set('favorite', true)
|
||||
if (!existing.notes && inc.notes) set('notes', inc.notes)
|
||||
if (!existing.startDate && inc.startDate && next.status !== 'a_voir') set('startDate', inc.startDate)
|
||||
if (!existing.endDate && inc.endDate && next.status === 'termine') set('endDate', inc.endDate)
|
||||
if (inc.rewatchDates?.length) {
|
||||
const all = [...new Set([...(existing.rewatchDates ?? []), ...inc.rewatchDates])].filter((d) => d !== next.endDate).sort()
|
||||
if (all.length !== (existing.rewatchDates?.length ?? 0)) set('rewatchDates', all.slice(-200))
|
||||
}
|
||||
// Métadonnées manquantes (fiche saisie à la main) : on les complète
|
||||
if (!existing.externalId && inc.externalId && !refInUse(inc.externalId)) set('externalId', inc.externalId)
|
||||
if (!existing.poster && inc.poster) set('poster', inc.poster)
|
||||
if (!existing.overview && inc.overview) set('overview', inc.overview)
|
||||
if (!existing.year && inc.year) set('year', inc.year)
|
||||
if (!existing.genres.length && inc.genres.length) set('genres', inc.genres)
|
||||
if (!changed) return null
|
||||
next.updatedAt = now
|
||||
return normalizeItem(next)
|
||||
}
|
||||
|
||||
// Références déjà utilisées par une autre fiche (évite deux fiches avec la même référence)
|
||||
let usedRefs = new Set<string>()
|
||||
const refInUse = (ref: string) => usedRefs.has(ref)
|
||||
|
||||
/** Prépare l'import (sans rien écrire). */
|
||||
export function buildImportPlan(entries: ImportEntry[], matches: Map<string, Match>, library: MediaItem[], opts: { includeUnmatched: boolean }): ImportPlan {
|
||||
const now = new Date().toISOString()
|
||||
usedRefs = new Set(library.map((i) => i.externalId).filter((x): x is string => !!x))
|
||||
const notFound: ImportEntry[] = []
|
||||
const byRef = new Map<string, Candidate>()
|
||||
const loose: Candidate[] = []
|
||||
|
||||
for (const e of entries) {
|
||||
const match = matches.get(e.key)
|
||||
if (!match && !opts.includeUnmatched) {
|
||||
notFound.push(e)
|
||||
continue
|
||||
}
|
||||
if (!match) notFound.push(e)
|
||||
const item = entryToItem(e, match, now)
|
||||
const ref = match?.result.externalId
|
||||
const cand: Candidate = {
|
||||
item,
|
||||
externalIds: ref ? [ref] : [],
|
||||
titles: [item.title, item.originalTitle, e.title, ...(match?.result.altTitles ?? [])].filter((x): x is string => !!x),
|
||||
dated: !!e.activity,
|
||||
entries: [e],
|
||||
}
|
||||
if (!ref) {
|
||||
loose.push(cand)
|
||||
continue
|
||||
}
|
||||
// Deux lignes du même titre (ex. deux années saisies différemment) : une seule fiche
|
||||
const prev = byRef.get(ref)
|
||||
if (prev) {
|
||||
const merged = mergeInto(prev.item, cand, prev.item.updatedAt)
|
||||
if (merged) prev.item = { ...merged, updatedAt: [prev.item.updatedAt, cand.item.updatedAt].sort().pop()! }
|
||||
prev.entries.push(e)
|
||||
} else byRef.set(ref, cand)
|
||||
}
|
||||
|
||||
const cands = groupAnimeSeasons([...byRef.values()]).concat(loose)
|
||||
const added: MediaItem[] = []
|
||||
const updated = new Map<string, MediaItem>()
|
||||
let unchanged = 0
|
||||
const pool = [...library]
|
||||
for (const c of cands) {
|
||||
const existing = findExisting(pool, c)
|
||||
if (existing) {
|
||||
const base = updated.get(existing.id) ?? existing
|
||||
const merged = mergeInto(base, c, now)
|
||||
if (merged) {
|
||||
updated.set(existing.id, merged)
|
||||
const k = pool.indexOf(existing)
|
||||
if (k >= 0) pool[k] = merged
|
||||
if (merged.externalId) usedRefs.add(merged.externalId)
|
||||
} else if (!updated.has(existing.id)) unchanged++
|
||||
continue
|
||||
}
|
||||
const item = normalizeItem(c.item)
|
||||
if (!item) continue
|
||||
added.push(item)
|
||||
pool.push(item)
|
||||
if (item.externalId) usedRefs.add(item.externalId)
|
||||
}
|
||||
return { added, updated: [...updated.values()], unchanged, notFound }
|
||||
}
|
||||
|
||||
/** Nombre de fiches par grande catégorie (aperçu). */
|
||||
export function countByKind(items: MediaItem[]): { films: number; series: number; anime: number } {
|
||||
let films = 0
|
||||
let series = 0
|
||||
let anime = 0
|
||||
for (const i of items) {
|
||||
if (i.type === 'film') films++
|
||||
else if (i.type === 'anime') anime++
|
||||
else series++
|
||||
}
|
||||
return { films, series, anime }
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
import { t } from '../../i18n'
|
||||
import { ANILIST, ANILIST_FIELDS, aniToResult, CLOUD_TMDB, getTmdbDetails, tmdbFindExternal, tmdbImportSearch, type AniMedia, type SearchResult } from '../catalogApi'
|
||||
import type { MediaInput } from '../../types'
|
||||
import { anilistEntries, titleKey, type AniListEntry, type ImportEntry } from './sources'
|
||||
|
||||
/**
|
||||
* Recherche des fiches correspondantes (TMDB pour les films et séries, AniList pour les animes).
|
||||
* - petites rafales : 4 requêtes en parallèle au plus ;
|
||||
* - avec un compte, TMDB passe par le serveur (600 requêtes / 10 min) : on étale les requêtes ;
|
||||
* - AniList (90 requêtes / min) : les identifiants sont demandés par lots de 50 ;
|
||||
* - les correspondances trouvées sont gardées en cache (un nouvel essai ne refait pas tout).
|
||||
*/
|
||||
|
||||
export interface Match {
|
||||
result: SearchResult
|
||||
/** Métadonnées prêtes pour la fiche (titre, type, affiche, saisons…) */
|
||||
meta: Partial<MediaInput>
|
||||
}
|
||||
|
||||
export interface Progress {
|
||||
done: number
|
||||
total: number
|
||||
/** Pause imposée par la limite de débit : reprise à cette heure (ms) */
|
||||
waitUntil?: number
|
||||
}
|
||||
|
||||
export interface CancelToken {
|
||||
cancelled: boolean
|
||||
}
|
||||
|
||||
export class CancelledError extends Error {}
|
||||
|
||||
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms))
|
||||
|
||||
// ─── Cache des correspondances (données publiques uniquement) ───
|
||||
|
||||
const CACHE_KEY = 'azuucine:import-match'
|
||||
const CACHE_MAX = 4000
|
||||
let cache: Record<string, SearchResult> | null = null
|
||||
|
||||
function loadCache(): Record<string, SearchResult> {
|
||||
if (cache) return cache
|
||||
cache = Object.create(null) as Record<string, SearchResult>
|
||||
try {
|
||||
const raw = JSON.parse(localStorage.getItem(CACHE_KEY) ?? '{}') as unknown
|
||||
if (raw && typeof raw === 'object' && !Array.isArray(raw)) {
|
||||
for (const [k, v] of Object.entries(raw as Record<string, unknown>)) {
|
||||
if (v && typeof v === 'object' && typeof (v as SearchResult).externalId === 'string') cache[k] = v as SearchResult
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
/* cache illisible : on repart de zéro */
|
||||
}
|
||||
return cache
|
||||
}
|
||||
|
||||
function saveCache() {
|
||||
if (!cache) return
|
||||
try {
|
||||
const keys = Object.keys(cache)
|
||||
if (keys.length > CACHE_MAX) for (const k of keys.slice(0, keys.length - CACHE_MAX)) delete cache[k]
|
||||
localStorage.setItem(CACHE_KEY, JSON.stringify(cache))
|
||||
} catch {
|
||||
/* stockage plein ou bloqué : tant pis pour le cache */
|
||||
}
|
||||
}
|
||||
|
||||
// ─── Limite de débit ───
|
||||
|
||||
/** Seau à jetons : `burst` requêtes d'un coup, puis une toutes les `everyMs`. */
|
||||
function limiter(burst: number, everyMs: number) {
|
||||
let tokens = burst
|
||||
let last = Date.now()
|
||||
return async (token: CancelToken) => {
|
||||
for (;;) {
|
||||
if (token.cancelled) throw new CancelledError()
|
||||
const now = Date.now()
|
||||
tokens = Math.min(burst, tokens + (now - last) / everyMs)
|
||||
last = now
|
||||
if (tokens >= 1) {
|
||||
tokens -= 1
|
||||
return
|
||||
}
|
||||
await sleep(Math.min(1000, (1 - tokens) * everyMs))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const isRateError = (e: unknown) => {
|
||||
const msg = (e as Error)?.message ?? ''
|
||||
return msg === t('err.searchRate') || msg === t('err.anilistRate') || msg === t('err.tmdbStatus', { status: 429 }) || msg === 'rate'
|
||||
}
|
||||
|
||||
/** Exécute les tâches avec au plus `size` en parallèle. */
|
||||
async function pool<T>(list: T[], size: number, token: CancelToken, fn: (x: T) => Promise<void>) {
|
||||
let i = 0
|
||||
const worker = async () => {
|
||||
while (i < list.length) {
|
||||
if (token.cancelled) throw new CancelledError()
|
||||
await fn(list[i++])
|
||||
}
|
||||
}
|
||||
await Promise.all(Array.from({ length: Math.min(size, list.length) }, worker))
|
||||
}
|
||||
|
||||
// ─── TMDB ───
|
||||
|
||||
/** Meilleur candidat : bon type, même année (± 1), titre identique en priorité. */
|
||||
export function bestTmdbMatch(results: SearchResult[], entry: Pick<ImportEntry, 'kind' | 'title' | 'year'>): SearchResult | undefined {
|
||||
const prefix = entry.kind === 'movie' ? 'tmdb:movie:' : 'tmdb:tv:'
|
||||
const cands = results.filter((r) => r.externalId.startsWith(prefix))
|
||||
const want = titleKey(entry.title)
|
||||
const same = (r: SearchResult) => [r.title, r.originalTitle].some((x) => x && titleKey(x) === want)
|
||||
if (entry.year) {
|
||||
const y = entry.year
|
||||
const exact = cands.filter((r) => r.year === y)
|
||||
const close = cands.filter((r) => r.year != null && Math.abs(r.year - y) <= 1)
|
||||
return exact.find(same) ?? close.find(same) ?? exact[0] ?? close[0]
|
||||
}
|
||||
return cands.find(same) ?? cands[0]
|
||||
}
|
||||
|
||||
/** Requête TMDB avec reprise automatique quand la limite de débit est atteinte. */
|
||||
async function withRetry<T>(fn: () => Promise<T>, token: CancelToken, onWait: (until?: number) => void): Promise<T> {
|
||||
let delay = 15_000
|
||||
for (let attempt = 0; ; attempt++) {
|
||||
if (token.cancelled) throw new CancelledError()
|
||||
try {
|
||||
return await fn()
|
||||
} catch (e) {
|
||||
if (!isRateError(e) || attempt >= 30) throw e
|
||||
const until = Date.now() + delay
|
||||
onWait(until)
|
||||
while (Date.now() < until) {
|
||||
if (token.cancelled) throw new CancelledError()
|
||||
await sleep(500)
|
||||
}
|
||||
onWait(undefined)
|
||||
delay = Math.min(60_000, delay * 1.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ─── AniList ───
|
||||
|
||||
async function anilistPost<T>(query: string, variables: Record<string, unknown>): Promise<T> {
|
||||
const res = await fetch(ANILIST, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
||||
referrerPolicy: 'no-referrer',
|
||||
credentials: 'omit',
|
||||
body: JSON.stringify({ query, variables }),
|
||||
})
|
||||
if (res.status === 429) throw new Error('rate')
|
||||
const json = (await res.json().catch(() => ({}))) as { data?: T; errors?: { message?: string; status?: number }[] }
|
||||
if (!res.ok || !json.data) {
|
||||
const msg = json.errors?.[0]?.message ?? ''
|
||||
if (res.status === 404 || /not found|private/i.test(msg)) throw new Error('anilist-user')
|
||||
throw new Error(t('err.anilistStatus', { status: res.status }))
|
||||
}
|
||||
return json.data
|
||||
}
|
||||
|
||||
/** Nom d'utilisateur AniList valide (lettres et chiffres, 2 à 20 caractères). */
|
||||
export const isAniListUserName = (v: string) => /^[A-Za-z0-9_-]{2,20}$/.test(v.trim())
|
||||
|
||||
/** Liste d'animes publique d'un membre AniList (sans connexion). */
|
||||
export async function fetchAniListUser(userName: string): Promise<{ entries: ImportEntry[]; adult: number }> {
|
||||
const name = userName.trim()
|
||||
if (!isAniListUserName(name)) throw new Error('anilist-user')
|
||||
const query = `query ($name: String) {
|
||||
MediaListCollection(userName: $name, type: ANIME, forceSingleCompletedList: true) {
|
||||
lists { isCustomList entries {
|
||||
status score(format: POINT_100) progress repeat notes updatedAt
|
||||
startedAt { year month day } completedAt { year month day }
|
||||
media { isAdult ${ANILIST_FIELDS} }
|
||||
} }
|
||||
}
|
||||
}`
|
||||
const data = await anilistPost<{ MediaListCollection?: { lists?: { isCustomList?: boolean; entries?: (AniListEntry & { media?: AniMedia & { isAdult?: boolean } })[] }[] } }>(query, {
|
||||
name,
|
||||
})
|
||||
const lists = Array.isArray(data.MediaListCollection?.lists) ? data.MediaListCollection!.lists! : []
|
||||
const all = lists.filter((l) => !l.isCustomList).flatMap((l) => (Array.isArray(l.entries) ? l.entries : []))
|
||||
const adult = all.filter((e) => e.media?.isAdult).length
|
||||
return { entries: anilistEntries(all.filter((e) => !e.media?.isAdult)), adult }
|
||||
}
|
||||
|
||||
/** Fiches AniList à partir d'identifiants MyAnimeList, par lots de 50. */
|
||||
async function aniListByMal(ids: number[], token: CancelToken, onBatch: (found: Map<number, AniMedia>, count: number) => void, onWait: (until?: number) => void) {
|
||||
const query = `query ($ids: [Int]) { Page(perPage: 50) { media(idMal_in: $ids, type: ANIME) { idMal isAdult ${ANILIST_FIELDS} } } }`
|
||||
const rate = limiter(2, 900) // ~66 requêtes / min, sous la limite d'AniList
|
||||
for (let i = 0; i < ids.length; i += 50) {
|
||||
await rate(token)
|
||||
const chunk = ids.slice(i, i + 50)
|
||||
const data = await withRetry(() => anilistPost<{ Page?: { media?: (AniMedia & { idMal?: number; isAdult?: boolean })[] } }>(query, { ids: chunk }), token, onWait)
|
||||
const found = new Map<number, AniMedia>()
|
||||
for (const m of Array.isArray(data.Page?.media) ? data.Page!.media! : []) {
|
||||
if (m && Number.isInteger(m.idMal) && !m.isAdult) found.set(m.idMal!, m)
|
||||
}
|
||||
onBatch(found, chunk.length)
|
||||
}
|
||||
}
|
||||
|
||||
// ─── Résolution ───
|
||||
|
||||
export interface ResolveOptions {
|
||||
/** Clé TMDB (ou CLOUD_TMDB avec un compte) ; sans elle, films et séries ne sont pas cherchés */
|
||||
tmdbKey?: string
|
||||
token: CancelToken
|
||||
onProgress: (p: Progress) => void
|
||||
}
|
||||
|
||||
/** Cherche la fiche de chaque entrée. Renvoie les correspondances par clé d'entrée. */
|
||||
export async function resolveEntries(entries: ImportEntry[], opts: ResolveOptions): Promise<Map<string, Match>> {
|
||||
const { token } = opts
|
||||
const found = new Map<string, Match>()
|
||||
const progress: Progress = { done: 0, total: entries.length }
|
||||
const emit = () => opts.onProgress({ ...progress })
|
||||
const step = (n = 1) => {
|
||||
progress.done += n
|
||||
emit()
|
||||
}
|
||||
const onWait = (until?: number) => {
|
||||
progress.waitUntil = until
|
||||
emit()
|
||||
}
|
||||
emit()
|
||||
|
||||
// 1. Animes déjà fournis par AniList
|
||||
const viaMal: ImportEntry[] = []
|
||||
const viaTmdb: ImportEntry[] = []
|
||||
let alreadyDone = 0
|
||||
for (const e of entries) {
|
||||
if (e.media) {
|
||||
const result = aniToResult(e.media)
|
||||
if (result) found.set(e.key, { result, meta: { ...result.prefill, poster: result.posterUrl } })
|
||||
alreadyDone++
|
||||
} else if (e.malId) viaMal.push(e)
|
||||
else if (e.kind !== 'anime') viaTmdb.push(e)
|
||||
else alreadyDone++
|
||||
}
|
||||
step(alreadyDone)
|
||||
|
||||
// 2. MyAnimeList → AniList par lots d'identifiants
|
||||
if (viaMal.length) {
|
||||
const byMal = new Map(viaMal.map((e) => [e.malId!, e]))
|
||||
await aniListByMal([...byMal.keys()], token, (media, count) => {
|
||||
for (const [malId, m] of media) {
|
||||
const e = byMal.get(malId)
|
||||
const result = e && aniToResult(m)
|
||||
if (e && result) found.set(e.key, { result, meta: { ...result.prefill, poster: result.posterUrl } })
|
||||
}
|
||||
step(count)
|
||||
}, onWait)
|
||||
}
|
||||
|
||||
// 3. Films et séries → TMDB
|
||||
const key = opts.tmdbKey?.trim()
|
||||
if (!key) {
|
||||
step(viaTmdb.length)
|
||||
return found
|
||||
}
|
||||
const cloud = key === CLOUD_TMDB
|
||||
// Avec un compte, le serveur accepte 600 requêtes / 10 min : rafale de 150 puis ~1 par seconde
|
||||
const rate = cloud ? limiter(150, 1050) : limiter(20, 60)
|
||||
const c = loadCache()
|
||||
let sinceSave = 0
|
||||
const lang = document.documentElement.lang || 'x'
|
||||
|
||||
await pool(viaTmdb, 4, token, async (e) => {
|
||||
try {
|
||||
const cacheKey = e.tvdbId ? `tvdb:${e.tvdbId}:${lang}` : e.imdbId ? `imdb:${e.imdbId}:${lang}` : `${e.kind}:${titleKey(e.title)}|${e.year ?? ''}:${lang}`
|
||||
let result: SearchResult | undefined = c[cacheKey]
|
||||
if (!result && (e.tvdbId || e.imdbId)) {
|
||||
await rate(token)
|
||||
result = await withRetry(() => tmdbFindExternal(e.tvdbId ?? e.imdbId!, e.tvdbId ? 'tvdb_id' : 'imdb_id', key), token, onWait).catch((err) => {
|
||||
if (err instanceof CancelledError) throw err
|
||||
return undefined // ancien serveur sans /find, ou identifiant inconnu : recherche par titre
|
||||
})
|
||||
}
|
||||
if (!result && !e.title.startsWith('#')) {
|
||||
await rate(token)
|
||||
const list = await withRetry(() => tmdbImportSearch(e.title, key), token, onWait)
|
||||
result = bestTmdbMatch(list, e)
|
||||
}
|
||||
if (!result) return
|
||||
if (!c[cacheKey]) {
|
||||
c[cacheKey] = result
|
||||
if (++sinceSave >= 25) {
|
||||
sinceSave = 0
|
||||
saveCache()
|
||||
}
|
||||
}
|
||||
let meta: Partial<MediaInput> = { ...result.prefill, poster: result.posterUrl }
|
||||
// Séries : saisons et nombre d'épisodes, pour reprendre la progression
|
||||
if (result.externalId.startsWith('tmdb:tv:')) {
|
||||
await rate(token)
|
||||
const details = await withRetry(() => getTmdbDetails(result!, key), token, onWait).catch((err) => {
|
||||
if (err instanceof CancelledError) throw err
|
||||
return undefined
|
||||
})
|
||||
if (details) meta = { ...meta, ...details, poster: result.posterUrl ?? meta.poster }
|
||||
}
|
||||
found.set(e.key, { result, meta })
|
||||
} catch (err) {
|
||||
if (err instanceof CancelledError) throw err
|
||||
if (!navigator.onLine) throw new Error(t('search.offline'))
|
||||
// Erreur ponctuelle sur un titre : il sera compté comme « non trouvé »
|
||||
} finally {
|
||||
step()
|
||||
}
|
||||
}).finally(saveCache)
|
||||
return found
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
import type { WatchStatus } from '../../types'
|
||||
import type { AniMedia } from '../catalogApi'
|
||||
import { cleanText, LIMITS, safeDay, safeIso } from '../security'
|
||||
import { parseCsv, pick, type CsvRow, type TextFile } from './files'
|
||||
|
||||
/**
|
||||
* Lecture des exports d'autres applis (Letterboxd, TV Time, MyAnimeList, AniList)
|
||||
* vers un format commun, avant la recherche des fiches correspondantes.
|
||||
*/
|
||||
|
||||
export type ImportSource = 'letterboxd' | 'tvtime' | 'mal' | 'anilist'
|
||||
export type EntryKind = 'movie' | 'tv' | 'anime'
|
||||
|
||||
export interface ImportEntry {
|
||||
/** Identifiant unique dans l'import */
|
||||
key: string
|
||||
kind: EntryKind
|
||||
title: string
|
||||
year?: number
|
||||
/** Identifiants externes connus */
|
||||
tvdbId?: string
|
||||
imdbId?: string
|
||||
anilistId?: number
|
||||
malId?: number
|
||||
/** Fiche AniList déjà fournie (import AniList) */
|
||||
media?: AniMedia
|
||||
/** Format AniList / MAL (« MOVIE », « TV »…) */
|
||||
format?: string
|
||||
status: WatchStatus
|
||||
/** Note sur 10 (pas de 0,5) */
|
||||
rating?: number
|
||||
favorite?: boolean
|
||||
/** Nombre d'épisodes vus (MAL / AniList) */
|
||||
episodesWatched?: number
|
||||
/** Épisodes vus « saison:épisode » (TV Time) */
|
||||
seen?: Set<string>
|
||||
/** Série mise de côté dans TV Time */
|
||||
archived?: boolean
|
||||
startDate?: string
|
||||
endDate?: string
|
||||
rewatchDates?: string[]
|
||||
notes?: string
|
||||
/** Date de la dernière activité connue (ISO) — sert à ne jamais écraser une donnée plus récente */
|
||||
activity?: string
|
||||
/** Date de la première activité connue (ISO) */
|
||||
firstSeen?: string
|
||||
}
|
||||
|
||||
/** Clé de comparaison d'un titre : sans accents, casse ni ponctuation. */
|
||||
export const titleKey = (s: string) =>
|
||||
s
|
||||
.normalize('NFD')
|
||||
.replace(/[̀-ͯ]/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/&/g, 'and')
|
||||
.replace(/[^\p{L}\p{N}]+/gu, '')
|
||||
|
||||
const yearOf = (v?: string) => {
|
||||
const n = v && /^\d{4}$/.test(v.trim()) ? Number(v) : NaN
|
||||
return n >= 1870 && n <= 2200 ? n : undefined
|
||||
}
|
||||
|
||||
/** « 2024-03-05 », « 2024-03-05 18:22:01 », « 2024-03-05T18:22:01Z » → AAAA-MM-JJ */
|
||||
export const toDay = (v?: string) => (v ? safeDay(v.trim().slice(0, 10)) : undefined)
|
||||
/** Date → ISO (pour comparer avec la date de modification des fiches) */
|
||||
export const toIso = (v?: string) => {
|
||||
if (!v) return undefined
|
||||
const s = v.trim()
|
||||
if (/^\d{4}-\d{2}-\d{2}$/.test(s)) return safeIso(s + 'T12:00:00Z')
|
||||
return safeIso(s.includes('T') ? s : s.replace(' ', 'T') + (/[zZ]|[+-]\d{2}:?\d{2}$/.test(s) ? '' : 'Z'))
|
||||
}
|
||||
|
||||
/** Garde la date la plus ancienne / la plus récente vue pour une entrée. */
|
||||
function touch(e: ImportEntry, raw?: string) {
|
||||
const iso = toIso(raw)
|
||||
if (!iso) return
|
||||
if (!e.activity || iso > e.activity) e.activity = iso
|
||||
if (!e.firstSeen || iso < e.firstSeen) e.firstSeen = iso
|
||||
}
|
||||
|
||||
const appendNote = (prev: string | undefined, add?: string) => cleanText([prev, add].filter(Boolean).join('\n\n'), LIMITS.notes)
|
||||
|
||||
// ─────────────────────────── Letterboxd ───────────────────────────
|
||||
|
||||
const basename = (p: string) => p.split('/').pop() ?? p
|
||||
|
||||
/** Fichiers Letterboxd reconnus (on ignore les dossiers « deleted », « orphaned » et les listes). */
|
||||
export function letterboxdRole(path: string): 'watched' | 'ratings' | 'diary' | 'reviews' | 'watchlist' | 'likes' | undefined {
|
||||
if (/(^|\/)(deleted|orphaned|lists)\//.test(path)) return undefined
|
||||
if (/(^|\/)likes\/films\.csv$/.test(path)) return 'likes'
|
||||
const b = basename(path)
|
||||
// Fichier déposé seul (hors archive) : likes/films.csv arrive sous le nom « films.csv »
|
||||
if (b === path && b === 'films.csv') return 'likes'
|
||||
if (b === 'watched.csv') return 'watched'
|
||||
if (b === 'ratings.csv') return 'ratings'
|
||||
if (b === 'diary.csv') return 'diary'
|
||||
if (b === 'reviews.csv') return 'reviews'
|
||||
if (b === 'watchlist.csv') return 'watchlist'
|
||||
return undefined
|
||||
}
|
||||
|
||||
export function parseLetterboxd(files: TextFile[]): ImportEntry[] {
|
||||
const order = ['watched', 'ratings', 'diary', 'reviews', 'watchlist', 'likes'] as const
|
||||
const byRole = new Map<string, CsvRow[]>()
|
||||
for (const f of files) {
|
||||
const role = letterboxdRole(f.path)
|
||||
if (role) byRole.set(role, [...(byRole.get(role) ?? []), ...parseCsv(f.text).rows])
|
||||
}
|
||||
const films = new Map<string, ImportEntry>()
|
||||
const views = new Map<string, { day: string; rewatch: boolean }[]>()
|
||||
const get = (row: CsvRow) => {
|
||||
const title = cleanText(row.name, LIMITS.title)
|
||||
if (!title) return undefined
|
||||
const year = yearOf(row.year)
|
||||
const key = `lb:${titleKey(title)}|${year ?? ''}`
|
||||
let e = films.get(key)
|
||||
if (!e) {
|
||||
if (films.size >= LIMITS.items) return undefined
|
||||
e = { key, kind: 'movie', title, year, status: 'a_voir' }
|
||||
films.set(key, e)
|
||||
}
|
||||
touch(e, row.date)
|
||||
return e
|
||||
}
|
||||
const ratingOf = (v?: string) => {
|
||||
const n = Number(v)
|
||||
return v && Number.isFinite(n) && n > 0 && n <= 5 ? Math.min(10, Math.round(n * 2 * 2) / 2) : undefined
|
||||
}
|
||||
for (const role of order) {
|
||||
for (const row of byRole.get(role) ?? []) {
|
||||
const e = get(row)
|
||||
if (!e) continue
|
||||
if (role === 'watched') e.status = 'termine'
|
||||
else if (role === 'ratings') {
|
||||
e.rating = ratingOf(row.rating) ?? e.rating
|
||||
e.status = 'termine'
|
||||
} else if (role === 'diary' || role === 'reviews') {
|
||||
e.status = 'termine'
|
||||
if (e.rating == null) e.rating = ratingOf(row.rating)
|
||||
const day = toDay(row.watched_date) ?? (role === 'diary' ? toDay(row.date) : undefined)
|
||||
touch(e, row.watched_date)
|
||||
if (day) views.set(e.key, [...(views.get(e.key) ?? []), { day, rewatch: /^(yes|true|1)$/i.test(row.rewatch ?? '') }])
|
||||
if (role === 'reviews') e.notes = appendNote(e.notes, cleanText(row.review, LIMITS.notes))
|
||||
} else if (role === 'likes') e.favorite = true
|
||||
// watchlist : « à voir » par défaut, sauf si déjà vu
|
||||
}
|
||||
}
|
||||
// Premier visionnage = date de fin, les suivants = revisionnages
|
||||
for (const [key, list] of views) {
|
||||
const e = films.get(key)!
|
||||
const sorted = [...new Map(list.sort((a, b) => a.day.localeCompare(b.day)).map((v) => [v.day, v])).values()]
|
||||
const first = sorted.find((v) => !v.rewatch)
|
||||
if (first && first === sorted[0]) e.endDate = first.day
|
||||
const rewatches = sorted.filter((v) => v.day !== e.endDate).map((v) => v.day)
|
||||
if (rewatches.length) e.rewatchDates = rewatches.slice(-200)
|
||||
}
|
||||
return [...films.values()]
|
||||
}
|
||||
|
||||
// ─────────────────────────── TV Time ───────────────────────────
|
||||
|
||||
const SHOW_NAME = ['tv_show_name', 'series_name', 'show_name', 'serie_name', 'series_title', 'show_title', 'tv_show_title']
|
||||
const SHOW_ID = ['tv_show_id', 'tvdb_show_id', 'series_id', 'serie_id', 'show_id', 'tvdb_id', 's_id', 'tvdb']
|
||||
const MOVIE_NAME = ['movie_name', 'movie_title', 'film_name']
|
||||
const SEASON = ['episode_season_number', 'season_number', 'season_num', 'season']
|
||||
const EPISODE = ['episode_number', 'episode_num', 'number', 'episode']
|
||||
const DATE = ['watched_at', 'seen_at', 'watch_date', 'created_at', 'updated_at', 'date']
|
||||
const KIND = ['entity_type', 'media_type', 'object_type', 'item_type', 'type']
|
||||
|
||||
export function parseTvTime(files: TextFile[]): ImportEntry[] {
|
||||
type Row = { row: CsvRow; path: string; generic: boolean }
|
||||
const rows: Row[] = []
|
||||
for (const f of files) {
|
||||
if (!/\.(csv|txt)$/.test(f.path)) continue
|
||||
const { columns, rows: list } = parseCsv(f.text)
|
||||
const specific = columns.some((c) => SHOW_NAME.includes(c) || SHOW_ID.includes(c) || MOVIE_NAME.includes(c))
|
||||
// Colonne « name » / « title » générique : seulement dans un fichier qui parle de séries ou de films
|
||||
const generic = !specific && (columns.includes('name') || columns.includes('title')) && /(show|serie|series|tv|movie|film)/.test(basename(f.path))
|
||||
if (!specific && !generic) continue
|
||||
for (const row of list) rows.push({ row, path: basename(f.path), generic })
|
||||
}
|
||||
|
||||
// Les fichiers n'ont pas tous l'identifiant : on relie les noms aux identifiants TVDB connus
|
||||
const nameToId = new Map<string, string>()
|
||||
const showName = (r: Row) => cleanText(pick(r.row, r.generic ? [...SHOW_NAME, 'name', 'title'] : SHOW_NAME), LIMITS.title)
|
||||
const showId = (r: Row) => {
|
||||
const v = pick(r.row, SHOW_ID)
|
||||
return v && /^\d{1,10}$/.test(v) && v !== '0' ? v : undefined
|
||||
}
|
||||
for (const r of rows) {
|
||||
const name = showName(r)
|
||||
const id = showId(r)
|
||||
if (name && id && !nameToId.has(titleKey(name))) nameToId.set(titleKey(name), id)
|
||||
}
|
||||
|
||||
const out = new Map<string, ImportEntry>()
|
||||
for (const r of rows) {
|
||||
const kindRaw = (pick(r.row, KIND) ?? '').toLowerCase()
|
||||
const movieName = cleanText(pick(r.row, MOVIE_NAME), LIMITS.title)
|
||||
const date = pick(r.row, DATE)
|
||||
const isMovie = !!movieName || /movie|film/.test(kindRaw) || /movie|film/.test(r.path)
|
||||
if (isMovie) {
|
||||
const title = movieName ?? showName(r)
|
||||
if (!title) continue
|
||||
const imdb = pick(r.row, ['imdb_id', 'imdb'])
|
||||
const key = `tvt:m:${titleKey(title)}`
|
||||
const e = out.get(key) ?? { key, kind: 'movie' as const, title, status: 'a_voir' as WatchStatus }
|
||||
if (imdb && /^tt\d{1,10}$/.test(imdb)) e.imdbId = imdb
|
||||
e.year ??= yearOf(pick(r.row, ['year', 'release_year', 'movie_year']))
|
||||
if (/watch|seen|view/.test(kindRaw + ' ' + r.path + ' ' + (pick(r.row, ['type', 'action', 'status']) ?? '').toLowerCase())) {
|
||||
e.status = 'termine'
|
||||
const day = toDay(date)
|
||||
if (day && (!e.endDate || day < e.endDate)) e.endDate = day
|
||||
}
|
||||
touch(e, date)
|
||||
if (out.size < LIMITS.items) out.set(key, e)
|
||||
continue
|
||||
}
|
||||
const name = showName(r)
|
||||
const id = showId(r) ?? (name ? nameToId.get(titleKey(name)) : undefined)
|
||||
if (!name && !id) continue
|
||||
const key = id ? `tvt:${id}` : `tvt:n:${titleKey(name!)}`
|
||||
let e = out.get(key)
|
||||
if (!e) {
|
||||
if (out.size >= LIMITS.items) continue
|
||||
e = { key, kind: 'tv', title: name ?? `#${id}`, tvdbId: id, status: 'a_voir', seen: new Set() }
|
||||
out.set(key, e)
|
||||
} else if (name && e.title.startsWith('#')) e.title = name
|
||||
const season = Number(pick(r.row, SEASON))
|
||||
const episode = Number(pick(r.row, EPISODE))
|
||||
if (Number.isInteger(season) && Number.isInteger(episode) && season >= 1 && season < 1000 && episode >= 1 && episode < 10000) {
|
||||
if (e.seen!.size < 20000) e.seen!.add(`${season}:${episode}`)
|
||||
const day = toDay(date)
|
||||
if (day && (!e.startDate || day < e.startDate)) e.startDate = day
|
||||
if (day && (!e.endDate || day > e.endDate)) e.endDate = day
|
||||
}
|
||||
if (/^(1|true|yes)$/i.test(pick(r.row, ['is_archived', 'archived']) ?? '')) e.archived = true
|
||||
touch(e, date)
|
||||
}
|
||||
return [...out.values()]
|
||||
}
|
||||
|
||||
// ─────────────────────────── MyAnimeList ───────────────────────────
|
||||
|
||||
const MAL_STATUS: Record<string, WatchStatus> = {
|
||||
watching: 'en_cours',
|
||||
'1': 'en_cours',
|
||||
completed: 'termine',
|
||||
'2': 'termine',
|
||||
'on-hold': 'pause',
|
||||
onhold: 'pause',
|
||||
'3': 'pause',
|
||||
dropped: 'abandonne',
|
||||
'4': 'abandonne',
|
||||
'plan to watch': 'a_voir',
|
||||
plantowatch: 'a_voir',
|
||||
'6': 'a_voir',
|
||||
}
|
||||
|
||||
export function parseMal(xml: string): ImportEntry[] {
|
||||
const doc = new DOMParser().parseFromString(xml, 'application/xml')
|
||||
if (doc.getElementsByTagName('parsererror').length) throw new Error('xml')
|
||||
const out: ImportEntry[] = []
|
||||
const nodes = Array.from(doc.getElementsByTagName('anime')).slice(0, LIMITS.items)
|
||||
for (const n of nodes) {
|
||||
const get = (tag: string) => n.getElementsByTagName(tag)[0]?.textContent?.trim() ?? ''
|
||||
const malId = Number(get('series_animedb_id'))
|
||||
const title = cleanText(get('series_title'), LIMITS.title)
|
||||
if (!title || !Number.isInteger(malId) || malId <= 0) continue
|
||||
const score = Number(get('my_score'))
|
||||
const watched = Number(get('my_watched_episodes'))
|
||||
const updated = Number(get('my_last_updated'))
|
||||
const e: ImportEntry = {
|
||||
key: `mal:${malId}`,
|
||||
kind: 'anime',
|
||||
title,
|
||||
malId,
|
||||
format: get('series_type').toUpperCase() || undefined,
|
||||
status: MAL_STATUS[get('my_status').toLowerCase()] ?? 'a_voir',
|
||||
rating: Number.isFinite(score) && score > 0 && score <= 10 ? score : undefined,
|
||||
episodesWatched: Number.isInteger(watched) && watched > 0 ? Math.min(watched, 100000) : undefined,
|
||||
startDate: toDay(get('my_start_date')),
|
||||
endDate: toDay(get('my_finish_date')),
|
||||
notes: cleanText(get('my_comments'), LIMITS.notes),
|
||||
}
|
||||
if (Number.isFinite(updated) && updated > 0) touch(e, new Date(updated * 1000).toISOString())
|
||||
touch(e, e.startDate)
|
||||
touch(e, e.endDate)
|
||||
out.push(e)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// ─────────────────────────── AniList (réponse déjà téléchargée) ───────────────────────────
|
||||
|
||||
export interface AniListEntry {
|
||||
status?: string | null
|
||||
score?: number | null
|
||||
progress?: number | null
|
||||
repeat?: number | null
|
||||
notes?: string | null
|
||||
updatedAt?: number | null
|
||||
startedAt?: { year?: number | null; month?: number | null; day?: number | null } | null
|
||||
completedAt?: { year?: number | null; month?: number | null; day?: number | null } | null
|
||||
media?: AniMedia | null
|
||||
}
|
||||
|
||||
const ANILIST_STATUS: Record<string, WatchStatus> = {
|
||||
CURRENT: 'en_cours',
|
||||
REPEATING: 'en_cours',
|
||||
COMPLETED: 'termine',
|
||||
PAUSED: 'pause',
|
||||
DROPPED: 'abandonne',
|
||||
PLANNING: 'a_voir',
|
||||
}
|
||||
|
||||
const fuzzyDay = (d?: AniListEntry['startedAt']) => {
|
||||
if (!d?.year || !d.month || !d.day) return undefined
|
||||
return safeDay(`${d.year}-${String(d.month).padStart(2, '0')}-${String(d.day).padStart(2, '0')}`)
|
||||
}
|
||||
|
||||
/** Entrées d'une liste AniList (score demandé en POINT_100). */
|
||||
export function anilistEntries(list: AniListEntry[]): ImportEntry[] {
|
||||
const out = new Map<string, ImportEntry>()
|
||||
for (const x of list.slice(0, LIMITS.items)) {
|
||||
const m = x?.media
|
||||
if (!m || !Number.isInteger(m.id) || m.id <= 0) continue
|
||||
const title = cleanText(m.title?.english || m.title?.romaji || m.title?.native, LIMITS.title)
|
||||
if (!title) continue
|
||||
const score = typeof x.score === 'number' && x.score > 0 ? Math.min(10, Math.round(x.score / 10 * 2) / 2) : undefined
|
||||
const e: ImportEntry = {
|
||||
key: `al:${m.id}`,
|
||||
kind: 'anime',
|
||||
title,
|
||||
year: m.seasonYear ?? m.startDate?.year ?? undefined,
|
||||
anilistId: m.id,
|
||||
media: m,
|
||||
format: m.format ?? undefined,
|
||||
status: ANILIST_STATUS[x.status ?? ''] ?? 'a_voir',
|
||||
rating: score || undefined,
|
||||
episodesWatched: typeof x.progress === 'number' && x.progress > 0 ? Math.min(100000, Math.round(x.progress)) : undefined,
|
||||
startDate: fuzzyDay(x.startedAt),
|
||||
endDate: fuzzyDay(x.completedAt),
|
||||
notes: cleanText(x.notes, LIMITS.notes),
|
||||
}
|
||||
if (typeof x.updatedAt === 'number' && x.updatedAt > 0) touch(e, new Date(x.updatedAt * 1000).toISOString())
|
||||
touch(e, e.startDate)
|
||||
touch(e, e.endDate)
|
||||
out.set(e.key, e)
|
||||
}
|
||||
return [...out.values()]
|
||||
}
|
||||
@@ -167,7 +167,8 @@ export function convertLegacyBackup(data: LegacyFile): { items: MediaItem[]; ski
|
||||
|
||||
const genres = splitGenres(rawGenres, isFilm)
|
||||
if (isFilm && type === 'film' && countries.includes('JP') && rawGenres.includes('Animation')) genres.unshift('Anime')
|
||||
for (const t of itemTags.get(r.id) ?? []) if (!genres.includes(t) && genres.length < LIMITS.genres) genres.push(t)
|
||||
// Tags perso de l'ancienne appli → tags personnels (privés), plus mélangés aux genres
|
||||
const tags = [...new Set((itemTags.get(r.id) ?? []).map((t) => t.slice(0, LIMITS.tagLength)))].slice(0, LIMITS.tags)
|
||||
|
||||
const note = typeof r.note === 'number' && Number.isFinite(r.note) && r.note > 0 ? Math.min(10, Math.round(r.note * 2 * 2) / 2) : undefined
|
||||
const created = toISO(r.date_added) ?? now
|
||||
@@ -192,6 +193,7 @@ export function convertLegacyBackup(data: LegacyFile): { items: MediaItem[]; ski
|
||||
startDate,
|
||||
endDate,
|
||||
genres,
|
||||
tags: tags.length ? tags : undefined,
|
||||
notes: cleanText(
|
||||
[cleanText(r.comment, LIMITS.notes), cleanText(r.director, LIMITS.shortText) ? `Réalisation : ${cleanText(r.director, LIMITS.shortText)}` : '']
|
||||
.filter(Boolean)
|
||||
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
import { getLang } from '../i18n'
|
||||
import { cloudFetch } from './cloud/api'
|
||||
import { cloudEnabled } from './cloud/config'
|
||||
import { detectPlatform } from './pwa'
|
||||
import { scopedKey } from './scope'
|
||||
import { isPlainObject, storageGet, storageSet } from './security'
|
||||
|
||||
/**
|
||||
* Notifications push (Web Push) sur cet appareil :
|
||||
* - la permission n'est demandée qu'au clic sur l'interrupteur (jamais au chargement) ;
|
||||
* - l'abonnement du navigateur est enregistré sur le serveur (register_push_subscription) ;
|
||||
* - le serveur envoie ensuite les notifications de la cloche, même app fermée.
|
||||
*/
|
||||
|
||||
export type PushSupport = 'ok' | 'unsupported' | 'needs-install'
|
||||
export type PushState = 'unsupported' | 'needs-install' | 'denied' | 'off' | 'on'
|
||||
|
||||
export class PushError extends Error {
|
||||
constructor(public code: 'denied' | 'not-ready' | 'failed') {
|
||||
super(code)
|
||||
}
|
||||
}
|
||||
|
||||
/** Dernier enregistrement réussi (par compte) */
|
||||
const storeKey = () => scopedKey('push')
|
||||
const REFRESH_MS = 7 * 24 * 3600 * 1000
|
||||
|
||||
function isStandalone(): boolean {
|
||||
return window.matchMedia?.('(display-mode: standalone)').matches || (navigator as { standalone?: boolean }).standalone === true
|
||||
}
|
||||
|
||||
/** Ce navigateur sait-il recevoir des notifications push ? (iPhone : seulement l'app installée, iOS 16.4+) */
|
||||
export function pushSupport(): PushSupport {
|
||||
if (!cloudEnabled || typeof window === 'undefined') return 'unsupported'
|
||||
const api = 'serviceWorker' in navigator && 'PushManager' in window && 'Notification' in window
|
||||
if (detectPlatform() === 'ios' && (!isStandalone() || !api)) return 'needs-install'
|
||||
return api ? 'ok' : 'unsupported'
|
||||
}
|
||||
|
||||
function withTimeout<T>(p: Promise<T>, ms: number): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const timer = setTimeout(() => reject(new PushError('failed')), ms)
|
||||
p.then(
|
||||
(v) => {
|
||||
clearTimeout(timer)
|
||||
resolve(v)
|
||||
},
|
||||
(e) => {
|
||||
clearTimeout(timer)
|
||||
reject(e)
|
||||
},
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/** Service worker actif (absent en mode développement : on n'attend pas indéfiniment). */
|
||||
const registration = () => withTimeout(navigator.serviceWorker.ready, 8000)
|
||||
|
||||
async function currentSubscription(): Promise<PushSubscription | null> {
|
||||
const reg = await navigator.serviceWorker.getRegistration()
|
||||
return (await reg?.pushManager.getSubscription()) ?? null
|
||||
}
|
||||
|
||||
export async function getPushState(): Promise<PushState> {
|
||||
const support = pushSupport()
|
||||
if (support !== 'ok') return support
|
||||
if (Notification.permission === 'denied') return 'denied'
|
||||
if (Notification.permission !== 'granted') return 'off'
|
||||
try {
|
||||
return (await currentSubscription()) ? 'on' : 'off'
|
||||
} catch {
|
||||
return 'off'
|
||||
}
|
||||
}
|
||||
|
||||
function b64urlToBytes(s: string): Uint8Array<ArrayBuffer> {
|
||||
const b64 = s.replace(/-/g, '+').replace(/_/g, '/')
|
||||
const bin = atob(b64 + '='.repeat((4 - (b64.length % 4)) % 4))
|
||||
const out = new Uint8Array(new ArrayBuffer(bin.length))
|
||||
for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i)
|
||||
return out
|
||||
}
|
||||
|
||||
function bytesToB64url(buf: ArrayBuffer | null): string {
|
||||
if (!buf) return ''
|
||||
let s = ''
|
||||
for (const b of new Uint8Array(buf)) s += String.fromCharCode(b)
|
||||
return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '')
|
||||
}
|
||||
|
||||
/** Clé publique VAPID du serveur (la clé privée ne quitte jamais Supabase). */
|
||||
async function serverKey(): Promise<string> {
|
||||
let res: Response
|
||||
try {
|
||||
res = await cloudFetch('/functions/v1/send-push')
|
||||
} catch {
|
||||
throw new PushError('failed')
|
||||
}
|
||||
if (res.status === 404 || res.status === 503) throw new PushError('not-ready')
|
||||
if (!res.ok) throw new PushError('failed')
|
||||
const body = (await res.json().catch(() => null)) as unknown
|
||||
const key = isPlainObject(body) && typeof body.publicKey === 'string' ? body.publicKey : ''
|
||||
if (!/^B[A-Za-z0-9_-]{86}$/.test(key)) throw new PushError('not-ready')
|
||||
return key
|
||||
}
|
||||
|
||||
/** Petit libellé de l'appareil (« Chrome · Android ») pour s'y retrouver côté serveur. */
|
||||
function deviceLabel(): string {
|
||||
const ua = navigator.userAgent
|
||||
const browser = /Edg\//.test(ua) ? 'Edge' : /Firefox\//.test(ua) ? 'Firefox' : /Chrome\//.test(ua) ? 'Chrome' : /Safari\//.test(ua) ? 'Safari' : 'Web'
|
||||
const p = detectPlatform()
|
||||
const os = p === 'ios' ? 'iOS' : p === 'android' ? 'Android' : /Windows/.test(ua) ? 'Windows' : /Mac/.test(ua) ? 'macOS' : /Linux|CrOS/.test(ua) ? 'Linux' : ''
|
||||
return os ? `${browser} · ${os}` : browser
|
||||
}
|
||||
|
||||
async function register(sub: PushSubscription): Promise<void> {
|
||||
const lang = getLang()
|
||||
const res = await cloudFetch('/rest/v1/rpc/register_push_subscription', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
p_endpoint: sub.endpoint,
|
||||
p_p256dh: bytesToB64url(sub.getKey('p256dh')),
|
||||
p_auth: bytesToB64url(sub.getKey('auth')),
|
||||
p_lang: lang,
|
||||
p_ua: deviceLabel(),
|
||||
}),
|
||||
})
|
||||
if (res.status === 404) throw new PushError('not-ready')
|
||||
if (!res.ok) throw new PushError('failed')
|
||||
storageSet(storeKey(), JSON.stringify({ endpoint: sub.endpoint, lang, at: Date.now() }))
|
||||
}
|
||||
|
||||
/** Active les notifications push sur cet appareil. À appeler uniquement depuis un clic. */
|
||||
export async function enablePush(): Promise<PushState> {
|
||||
const support = pushSupport()
|
||||
if (support !== 'ok') return support
|
||||
const permission = await Notification.requestPermission()
|
||||
if (permission === 'denied') throw new PushError('denied')
|
||||
if (permission !== 'granted') return 'off'
|
||||
|
||||
const key = await serverKey()
|
||||
const reg = await registration()
|
||||
let sub = await reg.pushManager.getSubscription()
|
||||
// Abonnement créé avec une autre clé serveur (clés VAPID changées) : on le refait
|
||||
if (sub && sub.options.applicationServerKey && bytesToB64url(sub.options.applicationServerKey) !== key) {
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
sub = null
|
||||
}
|
||||
if (!sub) {
|
||||
try {
|
||||
sub = await reg.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: b64urlToBytes(key) })
|
||||
} catch {
|
||||
throw new PushError(Notification.permission === 'denied' ? 'denied' : 'failed')
|
||||
}
|
||||
}
|
||||
try {
|
||||
await register(sub)
|
||||
} catch (e) {
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
throw e instanceof PushError ? e : new PushError('failed')
|
||||
}
|
||||
return 'on'
|
||||
}
|
||||
|
||||
/** Coupe les notifications push sur cet appareil (et retire l'appareil du serveur). */
|
||||
export async function disablePush(): Promise<void> {
|
||||
if (pushSupport() !== 'ok') return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
storageSet(storeKey(), null)
|
||||
if (!sub) return
|
||||
try {
|
||||
await cloudFetch('/rest/v1/rpc/unregister_push_subscription', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ p_endpoint: sub.endpoint }),
|
||||
})
|
||||
} catch {
|
||||
/* hors-ligne : le serveur oubliera l'abonnement au premier envoi refusé (410) */
|
||||
}
|
||||
await sub.unsubscribe().catch(() => false)
|
||||
}
|
||||
|
||||
/** Désabonne seulement le navigateur (compte supprimé : le serveur a déjà tout effacé). */
|
||||
export async function forgetPushLocally(): Promise<void> {
|
||||
storageSet(storeKey(), null)
|
||||
if (pushSupport() !== 'ok') return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
await sub?.unsubscribe().catch(() => false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Au lancement : réenregistre l'abonnement si le navigateur l'a renouvelé, si la langue a changé,
|
||||
* ou une fois par semaine (le serveur garde ainsi les appareils réellement utilisés).
|
||||
*/
|
||||
export async function keepPushFresh(): Promise<void> {
|
||||
if (pushSupport() !== 'ok' || Notification.permission !== 'granted' || !navigator.onLine) return
|
||||
const sub = await currentSubscription().catch(() => null)
|
||||
if (!sub) return
|
||||
let saved: unknown = null
|
||||
try {
|
||||
saved = JSON.parse(storageGet(storeKey()) ?? 'null')
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
// Pas d'enregistrement connu : l'abonnement n'a pas été créé par ce compte, on n'y touche pas
|
||||
if (!isPlainObject(saved)) return
|
||||
const fresh = saved.endpoint === sub.endpoint && saved.lang === getLang() && typeof saved.at === 'number' && Date.now() - saved.at < REFRESH_MS
|
||||
if (!fresh) await register(sub).catch(() => {})
|
||||
}
|
||||
@@ -26,6 +26,8 @@ export const LIMITS = {
|
||||
notes: 20000,
|
||||
overview: 10000,
|
||||
genres: 40,
|
||||
tags: 30,
|
||||
tagLength: 40,
|
||||
posterDataUrl: 3 * 1024 * 1024, // ~3 Mo par affiche en data URL
|
||||
searchQuery: 200,
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
const TMDB_SIZED = /^(https:\/\/image\.tmdb\.org\/t\/p\/)(w\d{2,4}|original)(\/[A-Za-z0-9_-]{1,100}\.(?:jpg|jpeg|png|webp))$/i
|
||||
|
||||
/** Même image TMDB dans une autre largeur (autres images : inchangées). */
|
||||
export function tmdbSized(url: string | undefined, size: 'w300' | 'w780' | 'w1280' | 'original'): string | undefined {
|
||||
export function tmdbSized(url: string | undefined, size: 'w92' | 'w154' | 'w300' | 'w780' | 'w1280' | 'original'): string | undefined {
|
||||
const m = url && TMDB_SIZED.exec(url)
|
||||
return m ? `${m[1]}${size}${m[3]}` : url
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
import { useSyncExternalStore } from 'react'
|
||||
import { locale, region } from '../i18n'
|
||||
import { cleanText, isHexColor, isPlainObject, isSafeTmdbPath, remoteImage, storageGet, storageSet } from './security'
|
||||
|
||||
/**
|
||||
* « Où regarder » : plateformes de streaming d'un titre.
|
||||
* - TMDB fournit, pour chaque pays, les offres d'abonnement / location / achat / gratuites (données JustWatch).
|
||||
* - AniList fournit des liens directs vers les plateformes (Crunchyroll, Netflix, ADN…).
|
||||
* Les réponses des API ne sont pas fiables : chaque champ est vérifié et borné.
|
||||
*/
|
||||
|
||||
export interface WatchProvider {
|
||||
id: number
|
||||
name: string
|
||||
/** Logo carré (image.tmdb.org) */
|
||||
logo?: string
|
||||
}
|
||||
|
||||
export type OfferKind = 'flatrate' | 'free' | 'rent' | 'buy'
|
||||
export const OFFER_KINDS: OfferKind[] = ['flatrate', 'free', 'rent', 'buy']
|
||||
|
||||
export interface WatchRegion {
|
||||
/** Page « Où regarder » de TMDB pour ce pays (liens JustWatch vers chaque plateforme) */
|
||||
link?: string
|
||||
flatrate: WatchProvider[]
|
||||
free: WatchProvider[]
|
||||
rent: WatchProvider[]
|
||||
buy: WatchProvider[]
|
||||
}
|
||||
|
||||
/** Lien direct vers une plateforme (AniList). */
|
||||
export interface StreamLink {
|
||||
site: string
|
||||
url: string
|
||||
icon?: string
|
||||
color?: string
|
||||
language?: string
|
||||
}
|
||||
|
||||
const TMDB_IMG = 'https://image.tmdb.org/t/p'
|
||||
const MAX_PER_KIND = 24
|
||||
const MAX_REGIONS = 250
|
||||
|
||||
/** Lien HTTPS « propre » (sans identifiants ni port exotique), d'un site autorisé si une liste est donnée. */
|
||||
export function safeLink(value: unknown, hosts?: string[]): string | undefined {
|
||||
if (typeof value !== 'string' || value.length > 400) return undefined
|
||||
try {
|
||||
const u = new URL(value.trim())
|
||||
if (u.protocol !== 'https:' || u.username || u.password || u.port) return undefined
|
||||
if (hosts && !hosts.includes(u.hostname)) return undefined
|
||||
return u.toString()
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
function providers(list: unknown): WatchProvider[] {
|
||||
if (!Array.isArray(list)) return []
|
||||
const out: (WatchProvider & { order: number })[] = []
|
||||
for (const p of list.slice(0, 60)) {
|
||||
if (!isPlainObject(p)) continue
|
||||
const id = p.provider_id
|
||||
const name = cleanText(p.provider_name, 60)
|
||||
if (typeof id !== 'number' || !Number.isInteger(id) || id <= 0 || !name || out.some((x) => x.id === id)) continue
|
||||
const logo = isSafeTmdbPath(p.logo_path) ? `${TMDB_IMG}/w92${p.logo_path}` : undefined
|
||||
out.push({ id, name, logo, order: typeof p.display_priority === 'number' ? p.display_priority : 999 })
|
||||
}
|
||||
// Ordre de TMDB (les plateformes les plus courantes du pays d'abord)
|
||||
return out
|
||||
.sort((a, b) => a.order - b.order)
|
||||
.slice(0, MAX_PER_KIND)
|
||||
.map(({ id, name, logo }) => ({ id, name, logo }))
|
||||
}
|
||||
|
||||
/** Réponse TMDB `watch/providers` → offres par pays (codes ISO à 2 lettres). */
|
||||
export function parseTmdbProviders(raw: unknown): Record<string, WatchRegion> | undefined {
|
||||
const results = isPlainObject(raw) && isPlainObject(raw.results) ? raw.results : undefined
|
||||
if (!results) return undefined
|
||||
const out: Record<string, WatchRegion> = {}
|
||||
let n = 0
|
||||
for (const [code, r] of Object.entries(results)) {
|
||||
if (n >= MAX_REGIONS) break
|
||||
if (!/^[A-Z]{2}$/.test(code) || !isPlainObject(r)) continue
|
||||
const free = providers([...(Array.isArray(r.free) ? r.free : []), ...(Array.isArray(r.ads) ? r.ads : [])])
|
||||
const region: WatchRegion = {
|
||||
link: safeLink(r.link, ['www.themoviedb.org', 'themoviedb.org']),
|
||||
flatrate: providers(r.flatrate),
|
||||
free,
|
||||
rent: providers(r.rent),
|
||||
buy: providers(r.buy),
|
||||
}
|
||||
if (OFFER_KINDS.some((k) => region[k].length)) {
|
||||
out[code] = region
|
||||
n++
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
/** `externalLinks` d'AniList → liens de streaming (dédoublonnés par site). */
|
||||
export function parseAniListLinks(raw: unknown): StreamLink[] {
|
||||
if (!Array.isArray(raw)) return []
|
||||
const out: StreamLink[] = []
|
||||
for (const l of raw.slice(0, 40)) {
|
||||
if (!isPlainObject(l) || l.type !== 'STREAMING') continue
|
||||
const site = cleanText(l.site, 40)
|
||||
const url = safeLink(l.url)
|
||||
if (!site || !url) continue
|
||||
const language = cleanText(l.language, 30)
|
||||
// Même plateforme dans plusieurs langues : une seule pastille (la première donnée par AniList)
|
||||
if (out.some((x) => x.site === site)) continue
|
||||
out.push({ site, url, icon: remoteImage(l.icon), color: isHexColor(l.color) ? l.color : undefined, language })
|
||||
if (out.length >= 16) break
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// ─────────────────────────── Pays choisi ───────────────────────────
|
||||
|
||||
const STORAGE_KEY = 'azuucine:watchRegion'
|
||||
const listeners = new Set<() => void>()
|
||||
|
||||
/** Pays par défaut : celui de la langue du navigateur (« fr-BE » → BE), sinon celui de l'app, sinon la France. */
|
||||
export function defaultWatchRegion(): string {
|
||||
try {
|
||||
for (const tag of navigator.languages?.length ? navigator.languages : [navigator.language]) {
|
||||
const m = /^[a-z]{2,3}[-_]([A-Z]{2})\b/i.exec(tag ?? '')
|
||||
if (m) return m[1].toUpperCase()
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
const r = region()
|
||||
return r && /^[A-Z]{2}$/.test(r) ? r : 'FR'
|
||||
}
|
||||
|
||||
/** Pays choisi à la main (ou undefined = automatique). */
|
||||
function chosenRegion(): string | undefined {
|
||||
const v = storageGet(STORAGE_KEY)
|
||||
return v && /^[A-Z]{2}$/.test(v) ? v : undefined
|
||||
}
|
||||
|
||||
export const getWatchRegion = () => chosenRegion() ?? defaultWatchRegion()
|
||||
|
||||
/** Change le pays (null = revenir au pays automatique). */
|
||||
export function setWatchRegion(code: string | null) {
|
||||
storageSet(STORAGE_KEY, code && /^[A-Z]{2}$/.test(code) ? code : null)
|
||||
listeners.forEach((f) => f())
|
||||
}
|
||||
|
||||
/** Pays utilisé pour « Où regarder », mis à jour quand on le change. */
|
||||
export function useWatchRegion(): string {
|
||||
return useSyncExternalStore(
|
||||
(f) => {
|
||||
listeners.add(f)
|
||||
return () => listeners.delete(f)
|
||||
},
|
||||
getWatchRegion,
|
||||
getWatchRegion,
|
||||
)
|
||||
}
|
||||
|
||||
/** Nom du pays dans la langue de l'app (« FR » → « France »). */
|
||||
export function countryName(code: string): string {
|
||||
try {
|
||||
return new Intl.DisplayNames([locale()], { type: 'region' }).of(code) ?? code
|
||||
} catch {
|
||||
return code
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -6,6 +6,8 @@ import { initialLang, loadLang } from './i18n'
|
||||
import { LangProvider } from './i18n/react'
|
||||
import Root from './Root'
|
||||
import { applySavedTheme } from './lib/theme'
|
||||
import ErrorBoundary from './components/ErrorBoundary'
|
||||
import { installErrorReporting } from './lib/errorReporter'
|
||||
// Polices embarquées dans l'app (jeu « latin », suffisant pour le français) : aucun appel à Google Fonts, fonctionne hors-ligne
|
||||
import '@fontsource/inter/latin-400.css'
|
||||
import '@fontsource/inter/latin-500.css'
|
||||
@@ -16,6 +18,9 @@ import './index.css'
|
||||
// Thème choisi (couleur + clair/sombre/étoilé) appliqué tout de suite, sans attendre le chargement de l'app
|
||||
applySavedTheme()
|
||||
|
||||
// Remontée des erreurs (sans donnée perso) : à brancher avant tout le reste
|
||||
installErrorReporting()
|
||||
|
||||
// Service worker : cache l'app pour un fonctionnement hors-ligne et la met à jour automatiquement.
|
||||
registerSW({ immediate: true })
|
||||
|
||||
@@ -29,7 +34,9 @@ loadLang(initialLang())
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<LangProvider>
|
||||
<Root />
|
||||
<ErrorBoundary>
|
||||
<Root />
|
||||
</ErrorBoundary>
|
||||
</LangProvider>
|
||||
</StrictMode>,
|
||||
)
|
||||
|
||||
+27
-6
@@ -1,5 +1,5 @@
|
||||
import { ArrowLeft, Ban, Loader2, MessageSquareOff, RotateCcw, Search, Star } from 'lucide-react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import ConfirmDialog from '../components/ConfirmDialog'
|
||||
import { EmptyState, PageHeader, SectionTitle, StatTile } from '../components/ui'
|
||||
import { fmtNumber, t } from '../i18n'
|
||||
@@ -15,8 +15,10 @@ import {
|
||||
type AdminUser,
|
||||
} from '../lib/cloud/admin'
|
||||
import { cx, formatDate } from '../lib/utils'
|
||||
import { useAdminAlerts } from '../components/moderation/useAdminAlerts'
|
||||
import { BugsTab, ErrorsTab, ReportsTab, SuspendedTab } from './admin/ModerationTabs'
|
||||
|
||||
type Tab = 'overview' | 'users' | 'reviews'
|
||||
type Tab = 'overview' | 'reports' | 'users' | 'suspended' | 'reviews' | 'bugs' | 'errors'
|
||||
|
||||
const USERS_PAGE = 50
|
||||
const REVIEWS_PAGE = 30
|
||||
@@ -368,15 +370,23 @@ function ReviewsTab() {
|
||||
|
||||
/* ------------------------------------------------------------------ Page */
|
||||
|
||||
const TABS: { id: Tab; label: () => string }[] = [
|
||||
const TABS: { id: Tab; label: () => string; alert?: 'reports' | 'bugs' | 'errors' | 'suspended' }[] = [
|
||||
{ id: 'overview', label: () => t('admin.tabOverview') },
|
||||
{ id: 'reports', label: () => t('adminMod.tabReports'), alert: 'reports' },
|
||||
{ id: 'users', label: () => t('admin.tabUsers') },
|
||||
{ id: 'suspended', label: () => t('adminMod.tabSuspended'), alert: 'suspended' },
|
||||
{ id: 'reviews', label: () => t('admin.tabReviews') },
|
||||
{ id: 'bugs', label: () => t('adminMod.tabBugs'), alert: 'bugs' },
|
||||
{ id: 'errors', label: () => t('adminMod.tabErrors'), alert: 'errors' },
|
||||
]
|
||||
|
||||
export default function AdminPage({ onBack }: { onBack: () => void }) {
|
||||
const [allowed, setAllowed] = useState<boolean | null>(null)
|
||||
const [tab, setTab] = useState<Tab>('overview')
|
||||
// Compteurs « à traiter » (signalements ouverts, nouveaux bugs, nouvelles erreurs), relus après chaque action
|
||||
const [alertsKey, setAlertsKey] = useState(0)
|
||||
const alerts = useAdminAlerts(allowed === true, alertsKey)
|
||||
const refreshAlerts = useCallback(() => setAlertsKey((k) => k + 1), [])
|
||||
|
||||
useEffect(() => {
|
||||
let alive = true
|
||||
@@ -403,18 +413,25 @@ export default function AdminPage({ onBack }: { onBack: () => void }) {
|
||||
<EmptyState title={t('admin.title')} text={t('admin.loadError')} />
|
||||
) : (
|
||||
<>
|
||||
<div className="grid grid-cols-3 gap-1 rounded-full border border-line p-1">
|
||||
<div role="tablist" className="no-scrollbar -mx-4 flex gap-2 overflow-x-auto px-4 pb-1">
|
||||
{TABS.map((tb) => {
|
||||
const on = tab === tb.id
|
||||
const n = tb.alert && alerts ? alerts[tb.alert] : 0
|
||||
return (
|
||||
<button
|
||||
key={tb.id}
|
||||
type="button"
|
||||
aria-pressed={on}
|
||||
role="tab"
|
||||
aria-selected={on}
|
||||
onClick={() => setTab(tb.id)}
|
||||
className={cx('rounded-full py-2 text-sm font-medium transition-colors', on ? 'bg-ink text-bg' : 'text-ink-3')}
|
||||
className={cx('chip shrink-0', on && 'chip-on')}
|
||||
>
|
||||
{tb.label()}
|
||||
{n > 0 && (
|
||||
<span className={cx('min-w-5 rounded-full px-1.5 text-center text-[11px] font-semibold tabular-nums', tb.alert === 'suspended' ? (on ? 'bg-bg/20' : 'bg-surface-2 text-ink-2') : 'bg-accent-fill text-on-accent')}>
|
||||
{fmtNumber(n)}
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
@@ -423,6 +440,10 @@ export default function AdminPage({ onBack }: { onBack: () => void }) {
|
||||
{tab === 'overview' && <OverviewTab />}
|
||||
{tab === 'users' && <UsersTab />}
|
||||
{tab === 'reviews' && <ReviewsTab />}
|
||||
{tab === 'reports' && <ReportsTab onChange={refreshAlerts} />}
|
||||
{tab === 'suspended' && <SuspendedTab onChange={refreshAlerts} />}
|
||||
{tab === 'bugs' && <BugsTab onChange={refreshAlerts} />}
|
||||
{tab === 'errors' && <ErrorsTab onChange={refreshAlerts} />}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { genreLabel, subtypeLabel } from '../lib/genres'
|
||||
import { locale, t } from '../i18n'
|
||||
import { Heart, Search, SlidersHorizontal, X } from 'lucide-react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { CheckSquare, Hash, Heart, Search, SlidersHorizontal, X } from 'lucide-react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { StatusDot } from '../components/Badges'
|
||||
import JournalView from '../components/JournalView'
|
||||
import ListsView from '../components/ListsView'
|
||||
@@ -10,6 +10,11 @@ import { EmptyState, PageHeader } from '../components/ui'
|
||||
import { MEDIA_TYPES, STATUSES } from '../lib/constants'
|
||||
import { cx, normalizeText } from '../lib/utils'
|
||||
import { useMedia } from '../store'
|
||||
import SelectableCard from '../components/library/SelectableCard'
|
||||
import SelectionBar from '../components/library/SelectionBar'
|
||||
import { allTags, hasTag } from '../lib/bulk'
|
||||
import { useBackToClose } from '../lib/backNav'
|
||||
import { useEscape } from '../lib/escape'
|
||||
import type { MediaItem, MediaType, WatchStatus } from '../types'
|
||||
|
||||
type SortKey = 'recent' | 'rating' | 'title' | 'watched'
|
||||
@@ -37,6 +42,27 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
const [favOnly, setFavOnly] = useState(false)
|
||||
const [sort, setSort] = useState<SortKey>('recent')
|
||||
const [showFilters, setShowFilters] = useState(false)
|
||||
const [tag, setTag] = useState('')
|
||||
// Sélection multiple (actions groupées) : null = mode normal
|
||||
const [selection, setSelection] = useState<Set<string> | null>(null)
|
||||
const selecting = selection !== null
|
||||
const exitSelection = () => setSelection(null)
|
||||
useEscape(exitSelection, selecting)
|
||||
useBackToClose(exitSelection, selecting)
|
||||
const toggleSelected = (id: string) =>
|
||||
setSelection((prev) => {
|
||||
const next = new Set(prev ?? [])
|
||||
if (next.has(id)) next.delete(id)
|
||||
else next.add(id)
|
||||
return next
|
||||
})
|
||||
const startSelection = (id: string) => setSelection((prev) => new Set([...(prev ?? []), id]))
|
||||
// On quitte la sélection en changeant d'onglet (journal, listes)
|
||||
useEffect(() => {
|
||||
if (view !== 'titles') setSelection(null)
|
||||
}, [view])
|
||||
|
||||
const tags = useMemo(() => allTags(items), [items])
|
||||
|
||||
const allGenres = useMemo(
|
||||
() => [...new Set(items.flatMap((i) => i.genres))].sort((a, b) => a.localeCompare(b, locale())),
|
||||
@@ -59,8 +85,9 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
if (genre && !i.genres.includes(genre)) return false
|
||||
if (minRating && (i.rating ?? 0) < minRating) return false
|
||||
if (favOnly && !i.favorite) return false
|
||||
if (tag && !hasTag(i, tag)) return false
|
||||
if (q) {
|
||||
const haystack = normalizeText([i.title, i.originalTitle, i.subtype, i.subtype && subtypeLabel(i.subtype), i.platform, ...i.genres, ...i.genres.map(genreLabel)].filter(Boolean).join(' '))
|
||||
const haystack = normalizeText([i.title, i.originalTitle, i.subtype, i.subtype && subtypeLabel(i.subtype), i.platform, ...i.genres, ...i.genres.map(genreLabel), ...(i.tags ?? [])].filter(Boolean).join(' '))
|
||||
if (!haystack.includes(q)) return false
|
||||
}
|
||||
return true
|
||||
@@ -71,9 +98,9 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
else if (sort === 'watched')
|
||||
sorted.sort((a, b) => (b.endDate ?? b.startDate ?? '').localeCompare(a.endDate ?? a.startDate ?? ''))
|
||||
return sorted
|
||||
}, [items, query, types, status, genre, minRating, favOnly, sort])
|
||||
}, [items, query, types, status, genre, minRating, favOnly, tag, sort])
|
||||
|
||||
const activeAdvanced = (genre ? 1 : 0) + (minRating ? 1 : 0) + (favOnly ? 1 : 0)
|
||||
const activeAdvanced = (genre ? 1 : 0) + (minRating ? 1 : 0) + (favOnly ? 1 : 0) + (tag ? 1 : 0)
|
||||
const anyFilter = query || types.size || status || activeAdvanced
|
||||
const resetAll = () => {
|
||||
setQuery('')
|
||||
@@ -82,8 +109,13 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
setGenre('')
|
||||
setMinRating(0)
|
||||
setFavOnly(false)
|
||||
setTag('')
|
||||
}
|
||||
|
||||
// Fiches sélectionnées encore présentes (une fiche a pu être supprimée entre-temps)
|
||||
const selected = useMemo(() => (selection ? items.filter((i) => selection.has(i.id)) : []), [items, selection])
|
||||
const allShownSelected = selecting && results.length > 0 && results.every((i) => selection.has(i.id))
|
||||
|
||||
// Options de note minimale selon l'échelle affichée (valeurs internes sur 10)
|
||||
const ratingOptions = settings.ratingScale === '5' ? [2, 4, 6, 8, 9, 10] : [5, 6, 7, 8, 9, 10]
|
||||
|
||||
@@ -123,6 +155,23 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
|
||||
{/* Recherche + filtres (collants en haut) */}
|
||||
<div className="sticky top-0 z-20 -mx-4 space-y-3 bg-bg/90 px-4 pb-3 pt-[max(0.5rem,env(safe-area-inset-top))] backdrop-blur-xl">
|
||||
{selecting && (
|
||||
<div className="flex items-center gap-2 rounded-xl border border-accent bg-surface py-1.5 ps-1.5 pe-2">
|
||||
<button onClick={exitSelection} className="grid size-9 place-items-center rounded-full text-ink-2" aria-label={t('select.exit')}>
|
||||
<X size={19} />
|
||||
</button>
|
||||
<p className="min-w-0 flex-1 truncate text-sm font-semibold" aria-live="polite">
|
||||
{t('select.count', { count: selected.length })}
|
||||
</p>
|
||||
<button
|
||||
onClick={() => setSelection(allShownSelected ? new Set() : new Set([...selection, ...results.map((i) => i.id)]))}
|
||||
className="chip py-1 text-xs"
|
||||
disabled={!results.length}
|
||||
>
|
||||
{allShownSelected ? t('select.none') : t('select.all')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex gap-2">
|
||||
<div className="relative flex-1">
|
||||
<Search size={18} className="pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-ink-3" />
|
||||
@@ -146,6 +195,17 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
<span className="absolute -end-1.5 -top-1.5 grid size-5 place-items-center rounded-full bg-accent-fill text-[10px] text-on-accent">{activeAdvanced}</span>
|
||||
)}
|
||||
</button>
|
||||
{results.length > 0 && (
|
||||
<button
|
||||
onClick={() => (selecting ? exitSelection() : setSelection(new Set()))}
|
||||
className={cx('grid w-12 place-items-center rounded-xl border border-line bg-surface transition-colors', selecting && 'border-ink text-ink')}
|
||||
aria-label={selecting ? t('select.exit') : t('select.start')}
|
||||
aria-pressed={selecting}
|
||||
title={t('select.start')}
|
||||
>
|
||||
<CheckSquare size={18} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="no-scrollbar -mx-4 flex gap-2 overflow-x-auto px-4">
|
||||
@@ -202,6 +262,19 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
{tags.length > 0 && (
|
||||
<div className="col-span-2">
|
||||
<span className="label">{t('tags.filter')}</span>
|
||||
<div className="no-scrollbar -mx-3 flex gap-1.5 overflow-x-auto px-3">
|
||||
{tags.map((tg) => (
|
||||
<button key={tg} onClick={() => setTag(tag === tg ? '' : tg)} className={cx('chip py-1 text-xs', tag === tg && 'chip-on')} aria-pressed={tag === tg}>
|
||||
<Hash size={12} />
|
||||
{tg}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<button onClick={() => setFavOnly((v) => !v)} className={cx('chip justify-center', favOnly && 'chip-on')}>
|
||||
<Heart size={14} className={favOnly ? 'fill-accent-fill text-accent-fill' : ''} /> {t('catalog.favorites')}
|
||||
</button>
|
||||
@@ -227,10 +300,20 @@ export default function CatalogPage({ onOpen, onAdd }: Props) {
|
||||
) : (
|
||||
<div className="mt-3 grid grid-cols-2 gap-x-3.5 gap-y-6 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8">
|
||||
{results.map((item) => (
|
||||
<MediaCard key={item.id} item={item} onOpen={onOpen} />
|
||||
<SelectableCard
|
||||
key={item.id}
|
||||
title={item.title}
|
||||
selecting={selecting}
|
||||
selected={!!selection?.has(item.id)}
|
||||
onToggle={() => toggleSelected(item.id)}
|
||||
onStartSelect={() => startSelection(item.id)}
|
||||
>
|
||||
<MediaCard item={item} onOpen={onOpen} />
|
||||
</SelectableCard>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{selecting && <SelectionBar selected={selected} onDone={exitSelection} />}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -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
|
||||
</>
|
||||
)}
|
||||
|
||||
<ChallengesCard onOpen={onOpen} />
|
||||
|
||||
{toWatch.length > 0 && (
|
||||
<>
|
||||
<SectionTitle action={seeAll}>{t('status.a_voir')}</SectionTitle>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { t } from '../i18n'
|
||||
|
||||
/** Route inconnue (#/…) : on le dit, plutôt que d'afficher l'accueil sans explication. */
|
||||
export default function NotFoundPage({ onHome }: { onHome: () => void }) {
|
||||
return (
|
||||
<div className="grid min-h-[70dvh] place-items-center text-center">
|
||||
<div className="max-w-md px-2">
|
||||
<p aria-hidden="true" className="text-8xl font-extrabold tracking-tighter text-line-strong lg:text-9xl">
|
||||
4<span className="text-accent">0</span>4
|
||||
</p>
|
||||
<h1 className="mt-5 text-2xl font-bold">{t('notFound.title')}</h1>
|
||||
<p className="mt-2 text-sm text-ink-2">{t('notFound.text')}</p>
|
||||
<button onClick={onHome} className="btn btn-primary mt-7 px-6 py-3">
|
||||
{t('notFound.back')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
import { t } from '../i18n'
|
||||
import { LanguageSelect } from '../i18n/react'
|
||||
import { Check, Download, ExternalLink, Eye, EyeOff, HardDrive, ShieldCheck, Smartphone, Trash2, Upload, UserX } from 'lucide-react'
|
||||
import { Check, Download, ExternalLink, Eye, EyeOff, HardDrive, Import, ShieldCheck, Smartphone, Trash2, Upload, UserX } from 'lucide-react'
|
||||
import { useEffect, useRef, useState, type ReactNode } from 'react'
|
||||
import AccountSection from '../components/AccountSection'
|
||||
import PushToggle from '../components/PushToggle'
|
||||
import ConfirmDialog from '../components/ConfirmDialog'
|
||||
import ImportWizard from '../components/ImportWizard'
|
||||
import { PageHeader, SectionTitle } from '../components/ui'
|
||||
import { exportBackup, parseBackupFile, type ParsedBackup } from '../lib/backup'
|
||||
import { testTmdbKey } from '../lib/catalogApi'
|
||||
@@ -17,6 +19,9 @@ import { cx } from '../lib/utils'
|
||||
import { useEscape } from '../lib/escape'
|
||||
import { useBackToClose } from '../lib/backNav'
|
||||
import { useMedia } from '../store'
|
||||
import { mergeImportedSettings } from '../lib/challenges'
|
||||
import { BugReportRow } from '../components/moderation/BugReport'
|
||||
import { alertsSummary, useAdminAlerts } from '../components/moderation/useAdminAlerts'
|
||||
|
||||
type Message = { kind: 'ok' | 'error'; text: string }
|
||||
|
||||
@@ -25,6 +30,8 @@ const NOTIF_PREFS: { key: keyof NotifPrefs; readonly label: () => string }[] = [
|
||||
{ key: 'follows', label: () => t('settings.notifFollows') },
|
||||
{ key: 'accepted', label: () => t('settings.notifAccepted') },
|
||||
{ key: 'reactions', label: () => t('settings.notifReactions') },
|
||||
{ key: 'comments', label: () => t('settings.notifComments') },
|
||||
{ key: 'lists', label: () => t('settings.notifLists') },
|
||||
]
|
||||
|
||||
function Row({ icon, title, hint, onClick, danger }: { icon: ReactNode; title: string; hint?: string; onClick: () => void; danger?: boolean }) {
|
||||
@@ -50,6 +57,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
if (signedIn) void isAdmin().then(setAdmin)
|
||||
else setAdmin(false)
|
||||
}, [signedIn])
|
||||
const adminHint = alertsSummary(useAdminAlerts(admin))
|
||||
const fileRef = useRef<HTMLInputElement>(null)
|
||||
const [pending, setPending] = useState<ParsedBackup>()
|
||||
const [message, setMessage] = useState<Message>()
|
||||
@@ -124,7 +132,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',
|
||||
@@ -151,6 +159,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
setMessage({ kind: 'ok', text: t('settings.cleared') })
|
||||
}
|
||||
|
||||
const [showImport, setShowImport] = useState(false)
|
||||
const [showInstall, setShowInstall] = useState(false)
|
||||
useEscape(() => setShowInstall(false), showInstall)
|
||||
useBackToClose(() => setShowInstall(false), showInstall)
|
||||
@@ -184,7 +193,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
<>
|
||||
<SectionTitle>{t('settings.admin')}</SectionTitle>
|
||||
<div className="card overflow-hidden">
|
||||
<Row icon={<ShieldCheck size={19} />} title={t('admin.title')} onClick={onOpenAdmin} />
|
||||
<Row icon={<ShieldCheck size={19} />} title={t('admin.title')} hint={adminHint} onClick={onOpenAdmin} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
@@ -308,6 +317,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
<>
|
||||
<SectionTitle>{t('settings.notifs')}</SectionTitle>
|
||||
<p className="mb-3 text-xs text-ink-3">{t('settings.notifsHint')}</p>
|
||||
<PushToggle />
|
||||
<div className="card divide-y divide-line overflow-hidden">
|
||||
{NOTIF_PREFS.map(({ key, label }) => {
|
||||
const on = settings.notifPrefs?.[key] !== false
|
||||
@@ -443,7 +453,9 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
<Row icon={<Download size={19} />} title={t('settings.export')} hint={t('settings.exportHint', { count: items.length })} onClick={onExport} />
|
||||
<Row icon={<Upload size={19} />} title={t('settings.import')} hint={t('settings.importHint')} onClick={() => fileRef.current?.click()} />
|
||||
<input ref={fileRef} type="file" accept="application/json,.json" hidden onChange={(e) => onFile(e.target.files?.[0])} />
|
||||
<Row icon={<Import size={19} />} title={t('import.row')} hint={t('import.rowHint')} onClick={() => setShowImport(true)} />
|
||||
</div>
|
||||
{showImport && <ImportWizard onClose={() => setShowImport(false)} />}
|
||||
|
||||
{pending && (
|
||||
<div className="card mt-3 space-y-3 border-ink p-4">
|
||||
@@ -498,6 +510,7 @@ export default function SettingsPage({ onOpenAdmin }: { onOpenAdmin: () => void
|
||||
|
||||
<SectionTitle>{t('settings.about')}</SectionTitle>
|
||||
<div className="card divide-y divide-line overflow-hidden">
|
||||
<BugReportRow />
|
||||
{(
|
||||
[
|
||||
['/privacy.html', t('legal.privacy')],
|
||||
|
||||
@@ -0,0 +1,566 @@
|
||||
import { Ban, Check, CheckCheck, Loader2, RotateCcw, Star, Trash2, X } from 'lucide-react'
|
||||
import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react'
|
||||
import ConfirmDialog from '../../components/ConfirmDialog'
|
||||
import { reasonLabel } from '../../components/moderation/ReportDialog'
|
||||
import Avatar from '../../components/social/Avatar'
|
||||
import { EmptyState } from '../../components/ui'
|
||||
import { fmtNumber, t, type TKey } from '../../i18n'
|
||||
import { adminSetSuspended } from '../../lib/cloud/admin'
|
||||
import {
|
||||
adminBugReports,
|
||||
adminClientErrors,
|
||||
adminReportAction,
|
||||
adminReports,
|
||||
adminSetBugStatus,
|
||||
adminSetErrorStatus,
|
||||
adminSuspendedUsers,
|
||||
BUG_STATUSES,
|
||||
REPORTS_PAGE,
|
||||
type AdminCard,
|
||||
type BugReport,
|
||||
type BugStatus,
|
||||
type ClientError,
|
||||
type ReportAction,
|
||||
type ReportedContent,
|
||||
type ReportGroup,
|
||||
type SuspendedUser,
|
||||
} from '../../lib/cloud/adminModeration'
|
||||
import type { ReportReason } from '../../lib/cloud/moderation'
|
||||
import { timeAgo } from '../../lib/timeAgo'
|
||||
import { cx, formatDate } from '../../lib/utils'
|
||||
|
||||
/**
|
||||
* Onglets de modération de l'administration : signalements, comptes suspendus, bugs, erreurs.
|
||||
* Chaque action appelle une fonction SQL qui vérifie is_admin() côté serveur.
|
||||
*/
|
||||
|
||||
function Spinner() {
|
||||
return (
|
||||
<div className="flex justify-center py-16">
|
||||
<Loader2 className="size-6 animate-spin text-ink-3" aria-hidden />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function Badge({ children, tone = 'neutral' }: { children: ReactNode; tone?: 'neutral' | 'accent' | 'strong' }) {
|
||||
return (
|
||||
<span
|
||||
className={cx(
|
||||
'inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium',
|
||||
tone === 'accent' ? 'border-accent text-accent' : tone === 'strong' ? 'border-ink bg-ink text-bg' : 'border-line text-ink-2',
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
function Segmented<T extends string>({ value, options, onChange }: { value: T; options: { id: T; label: string }[]; onChange: (v: T) => void }) {
|
||||
return (
|
||||
<div className="no-scrollbar -mx-4 flex gap-2 overflow-x-auto px-4">
|
||||
{options.map((o) => (
|
||||
<button key={o.id} type="button" aria-pressed={value === o.id} onClick={() => onChange(o.id)} className={cx('chip shrink-0 py-1! text-[13px]', value === o.id && 'chip-on')}>
|
||||
{o.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function ActionButton({ icon, label, onClick, busy, danger }: { icon: ReactNode; label: string; onClick: () => void; busy?: boolean; danger?: boolean }) {
|
||||
return (
|
||||
<button type="button" onClick={onClick} disabled={busy} className={cx('btn px-3 py-1.5 text-xs', danger ? 'border border-accent text-accent' : 'btn-ghost')}>
|
||||
{icon}
|
||||
{label}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
function Person({ card, size = 32 }: { card: AdminCard | null; size?: number }) {
|
||||
if (!card) return <span className="text-sm text-ink-3">{t('admin.anon')}</span>
|
||||
return (
|
||||
<span className="flex min-w-0 items-center gap-2.5">
|
||||
<Avatar url={card.avatarUrl} name={card.displayName} size={size} />
|
||||
<span className="min-w-0">
|
||||
<span className="flex items-center gap-1.5">
|
||||
<span className="truncate text-sm font-semibold">{card.displayName}</span>
|
||||
{card.suspended && <Badge tone="accent">{t('admin.suspendedBadge')}</Badge>}
|
||||
{card.isAdmin && <Badge>{t('adminMod.adminBadge')}</Badge>}
|
||||
</span>
|
||||
{card.username && <span className="block truncate text-xs text-ink-3">@{card.username}</span>}
|
||||
</span>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
function LoadMore({ onClick, busy }: { onClick: () => void; busy: boolean }) {
|
||||
return (
|
||||
<div className="mt-4 flex justify-center">
|
||||
<button type="button" onClick={onClick} disabled={busy} className="btn btn-ghost">
|
||||
{busy && <Loader2 className="size-4 animate-spin" aria-hidden />}
|
||||
{t('social.loadMore')}
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** Liste paginée générique (chargement initial, « charger plus », réponse obsolète ignorée). */
|
||||
function usePaged<T>(load: (offset: number) => Promise<T[]>, pageSize: number, deps: unknown[]) {
|
||||
const [rows, setRows] = useState<T[]>([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [error, setError] = useState(false)
|
||||
const [more, setMore] = useState(false)
|
||||
const [loadingMore, setLoadingMore] = useState(false)
|
||||
const req = useRef(0)
|
||||
useEffect(() => {
|
||||
const id = ++req.current
|
||||
setLoading(true)
|
||||
setError(false)
|
||||
load(0)
|
||||
.then((r) => {
|
||||
if (req.current !== id) return
|
||||
setRows(r)
|
||||
setMore(r.length === pageSize)
|
||||
})
|
||||
.catch(() => req.current === id && (setRows([]), setError(true)))
|
||||
.finally(() => req.current === id && setLoading(false))
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, deps)
|
||||
const loadMore = async () => {
|
||||
const id = req.current
|
||||
setLoadingMore(true)
|
||||
try {
|
||||
const r = await load(rows.length)
|
||||
if (req.current !== id) return
|
||||
setRows((p) => [...p, ...r])
|
||||
setMore(r.length === pageSize)
|
||||
} catch {
|
||||
/* on garde la liste */
|
||||
} finally {
|
||||
setLoadingMore(false)
|
||||
}
|
||||
}
|
||||
return { rows, setRows, loading, error, more, loadingMore, loadMore }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Signalements */
|
||||
|
||||
const TYPE_LABEL: Record<ReportGroup['targetType'], TKey> = {
|
||||
review: 'adminMod.typeReview',
|
||||
profile: 'adminMod.typeProfile',
|
||||
comment: 'adminMod.typeComment',
|
||||
list: 'adminMod.typeList',
|
||||
}
|
||||
|
||||
function ContentPreview({ c, type }: { c: ReportedContent; type: ReportGroup['targetType'] }) {
|
||||
if (type === 'profile') {
|
||||
return (
|
||||
<div className="flex items-start gap-3">
|
||||
<Avatar url={c.avatarUrl} name={c.displayName ?? c.username ?? '?'} size={36} />
|
||||
<div className="min-w-0">
|
||||
<p className="text-sm font-semibold">{c.displayName}</p>
|
||||
{c.username && <p className="text-xs text-ink-3">@{c.username}</p>}
|
||||
{c.bio && <p className="mt-1.5 whitespace-pre-line text-sm leading-relaxed text-ink-2">{c.bio}</p>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
{(c.title || c.rating != null) && (
|
||||
<p className="flex flex-wrap items-center gap-2 text-sm font-semibold">
|
||||
{c.title}
|
||||
{c.rating != null && (
|
||||
<span className="inline-flex items-center gap-1 text-xs font-normal text-ink-2">
|
||||
<Star className="size-3.5 fill-accent text-accent" aria-hidden />
|
||||
{fmtNumber(c.rating)}
|
||||
</span>
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
{c.notes && <p className="mt-1.5 line-clamp-[12] whitespace-pre-line text-sm leading-relaxed text-ink-2">{c.notes}</p>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function ReportCard({ g, onAction, busy }: { g: ReportGroup; onAction: (g: ReportGroup, a: ReportAction) => void; busy: boolean }) {
|
||||
const deleted = g.current === null
|
||||
const shown = g.current ?? g.snapshot
|
||||
const edited = !!g.current && !!g.snapshot && (g.current.notes !== g.snapshot.notes || g.current.bio !== g.snapshot.bio || g.current.displayName !== g.snapshot.displayName)
|
||||
const canDelete = (g.targetType === 'review' || g.targetType === 'profile') && !deleted
|
||||
const open = g.status === 'open'
|
||||
return (
|
||||
<li className="card p-4">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Badge tone="strong">{t(TYPE_LABEL[g.targetType])}</Badge>
|
||||
<Badge tone={g.total > 1 ? 'accent' : 'neutral'}>{t('adminMod.reportCount', { count: g.total })}</Badge>
|
||||
{!open && <Badge>{g.status === 'dismissed' ? t('adminMod.statusDismissed') : t('adminMod.statusResolved')}</Badge>}
|
||||
<span className="ms-auto text-xs text-ink-3">{timeAgo(g.lastAt)}</span>
|
||||
</div>
|
||||
|
||||
<div className="mt-3 flex items-center justify-between gap-3">
|
||||
<Person card={g.targetUser} />
|
||||
{g.userReportedTargets > 1 && <span className="shrink-0 text-xs text-accent">{t('adminMod.repeat', { count: g.userReportedTargets })}</span>}
|
||||
</div>
|
||||
|
||||
<div className="mt-3 flex flex-wrap gap-1.5">
|
||||
{(Object.entries(g.reasons) as [ReportReason, number][]).map(([r, n]) => (
|
||||
<Badge key={r}>
|
||||
{reasonLabel(r)}
|
||||
{n > 1 && <span className="text-ink-3">×{n}</span>}
|
||||
</Badge>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="mt-3 rounded-xl border border-line bg-bg p-3">
|
||||
{deleted && <p className="mb-2 text-xs font-medium text-accent">{t('adminMod.contentGone')}</p>}
|
||||
{shown ? <ContentPreview c={shown} type={g.targetType} /> : <p className="text-sm text-ink-3">{t('adminMod.noPreview', { id: g.targetId })}</p>}
|
||||
{edited && g.snapshot && (
|
||||
<details className="mt-3 border-t border-line pt-2">
|
||||
<summary className="cursor-pointer text-xs text-ink-3">{t('adminMod.editedSince')}</summary>
|
||||
<div className="mt-2">
|
||||
<ContentPreview c={g.snapshot} type={g.targetType} />
|
||||
</div>
|
||||
</details>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<details className="mt-3">
|
||||
<summary className="cursor-pointer text-xs font-medium text-ink-2">{t('adminMod.reportsDetail', { count: g.reports.length })}</summary>
|
||||
<ul className="mt-2 space-y-2">
|
||||
{g.reports.map((r, k) => (
|
||||
<li key={k} className="border-s-2 border-line ps-3 text-xs">
|
||||
<p className="text-ink-3">
|
||||
<span className="font-medium text-ink-2">{r.reporter ? `@${r.reporter.username}` : t('admin.anon')}</span>
|
||||
{' · '}
|
||||
{reasonLabel(r.reason)}
|
||||
{' · '}
|
||||
{formatDate(r.createdAt)}
|
||||
</p>
|
||||
{r.details && <p className="mt-0.5 whitespace-pre-line text-sm text-ink-2">{r.details}</p>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
{open && canDelete && (
|
||||
<ActionButton
|
||||
icon={<Trash2 className="size-4" aria-hidden />}
|
||||
label={g.targetType === 'profile' ? t('adminMod.resetProfile') : t('adminMod.deleteContent')}
|
||||
onClick={() => onAction(g, 'delete')}
|
||||
busy={busy}
|
||||
danger
|
||||
/>
|
||||
)}
|
||||
{g.targetUser && !g.targetUser.isAdmin && (
|
||||
<ActionButton
|
||||
icon={g.targetUser.suspended ? <RotateCcw className="size-4" aria-hidden /> : <Ban className="size-4" aria-hidden />}
|
||||
label={g.targetUser.suspended ? t('admin.unsuspend') : t('admin.suspend')}
|
||||
onClick={() => onAction(g, g.targetUser!.suspended ? 'unsuspend' : 'suspend')}
|
||||
busy={busy}
|
||||
danger={!g.targetUser.suspended}
|
||||
/>
|
||||
)}
|
||||
{open && <ActionButton icon={<Check className="size-4" aria-hidden />} label={t('adminMod.resolve')} onClick={() => onAction(g, 'resolve')} busy={busy} />}
|
||||
{open && <ActionButton icon={<X className="size-4" aria-hidden />} label={t('adminMod.dismiss')} onClick={() => onAction(g, 'dismiss')} busy={busy} />}
|
||||
{busy && <Loader2 className="size-4 animate-spin self-center text-ink-3" aria-hidden />}
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
||||
export function ReportsTab({ onChange }: { onChange: () => void }) {
|
||||
const [status, setStatus] = useState<'open' | 'closed'>('open')
|
||||
const { rows, setRows, loading, error, more, loadingMore, loadMore } = usePaged((o) => adminReports(status, o), REPORTS_PAGE, [status])
|
||||
const [busyKey, setBusyKey] = useState<string>()
|
||||
const [confirm, setConfirm] = useState<{ g: ReportGroup; a: ReportAction }>()
|
||||
const [failed, setFailed] = useState<string>()
|
||||
|
||||
const run = useCallback(
|
||||
async (g: ReportGroup, a: ReportAction) => {
|
||||
setConfirm(undefined)
|
||||
setBusyKey(g.key)
|
||||
setFailed(undefined)
|
||||
try {
|
||||
await adminReportAction(g, a)
|
||||
const suspended = a === 'suspend' ? true : a === 'unsuspend' ? false : undefined
|
||||
setRows((prev) =>
|
||||
prev
|
||||
// Les autres cibles du même compte suivent la suspension
|
||||
.map((x) => (suspended !== undefined && x.targetUser?.id === g.targetUser?.id ? { ...x, targetUser: { ...x.targetUser!, suspended } } : x))
|
||||
// Dans la file ouverte, une cible traitée disparaît
|
||||
.filter((x) => !(status === 'open' && x.key === g.key && a !== 'unsuspend')),
|
||||
)
|
||||
onChange()
|
||||
} catch (e) {
|
||||
setFailed((e as Error).message)
|
||||
} finally {
|
||||
setBusyKey(undefined)
|
||||
}
|
||||
},
|
||||
[onChange, setRows, status],
|
||||
)
|
||||
|
||||
const ask = (g: ReportGroup, a: ReportAction) => (a === 'delete' || a === 'suspend' ? setConfirm({ g, a }) : void run(g, a))
|
||||
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<Segmented
|
||||
value={status}
|
||||
onChange={setStatus}
|
||||
options={[
|
||||
{ id: 'open', label: t('adminMod.open') },
|
||||
{ id: 'closed', label: t('adminMod.closed') },
|
||||
]}
|
||||
/>
|
||||
{failed && <p className="mt-3 rounded-xl border border-accent px-3 py-2 text-sm">{t('adminMod.actionFailed', { error: failed })}</p>}
|
||||
{loading ? (
|
||||
<Spinner />
|
||||
) : error ? (
|
||||
<EmptyState title={t('admin.loadError')} text={t('adminMod.migrationHint')} />
|
||||
) : rows.length === 0 ? (
|
||||
<EmptyState title={status === 'open' ? t('adminMod.noOpen') : t('adminMod.noClosed')} />
|
||||
) : (
|
||||
<ul className="mt-4 grid gap-3 lg:grid-cols-2">
|
||||
{rows.map((g) => (
|
||||
<ReportCard key={g.key} g={g} onAction={ask} busy={busyKey === g.key} />
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{more && !loading && <LoadMore onClick={loadMore} busy={loadingMore} />}
|
||||
<ConfirmDialog
|
||||
open={!!confirm}
|
||||
title={confirm?.a === 'suspend' ? t('admin.confirmSuspendTitle') : confirm?.g.targetType === 'profile' ? t('adminMod.confirmResetTitle') : t('admin.confirmClearTitle')}
|
||||
message={confirm?.a === 'suspend' ? t('admin.confirmSuspendMsg') : confirm?.g.targetType === 'profile' ? t('adminMod.confirmResetMsg') : t('admin.confirmClearMsg')}
|
||||
confirmLabel={confirm?.a === 'suspend' ? t('admin.suspend') : t('adminMod.confirm')}
|
||||
onConfirm={() => confirm && void run(confirm.g, confirm.a)}
|
||||
onCancel={() => setConfirm(undefined)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Comptes suspendus */
|
||||
|
||||
export function SuspendedTab({ onChange }: { onChange: () => void }) {
|
||||
const { rows, setRows, loading, error, more, loadingMore, loadMore } = usePaged<SuspendedUser>((o) => adminSuspendedUsers(o), 50, [])
|
||||
const [busyId, setBusyId] = useState<string>()
|
||||
const [confirm, setConfirm] = useState<SuspendedUser>()
|
||||
|
||||
const unsuspend = async (u: SuspendedUser) => {
|
||||
setConfirm(undefined)
|
||||
setBusyId(u.id)
|
||||
try {
|
||||
await adminSetSuspended(u.id, false)
|
||||
setRows((p) => p.filter((x) => x.id !== u.id))
|
||||
onChange()
|
||||
} catch {
|
||||
/* la ligne reste */
|
||||
} finally {
|
||||
setBusyId(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
if (loading) return <Spinner />
|
||||
if (error) return <EmptyState title={t('admin.loadError')} text={t('adminMod.migrationHint')} />
|
||||
if (rows.length === 0) return <EmptyState title={t('adminMod.noSuspended')} />
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<ul className="grid gap-2 lg:grid-cols-2">
|
||||
{rows.map((u) => (
|
||||
<li key={u.id} className="card flex items-center gap-3 p-4">
|
||||
<div className="min-w-0 flex-1">
|
||||
<Person card={u} size={36} />
|
||||
<p className="mt-2 text-xs text-ink-3">
|
||||
{u.suspendedAt ? t('adminMod.suspendedOn', { date: formatDate(u.suspendedAt) }) : t('adminMod.suspendedUnknown')}
|
||||
{u.suspendedBy ? ` · @${u.suspendedBy}` : ''}
|
||||
{u.reports > 0 ? ` · ${t('adminMod.reportCount', { count: u.reports })}` : ''}
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" onClick={() => setConfirm(u)} disabled={busyId === u.id} className="btn btn-ghost shrink-0 px-3 py-1.5 text-xs">
|
||||
{busyId === u.id ? <Loader2 className="size-4 animate-spin" aria-hidden /> : <RotateCcw className="size-4" aria-hidden />}
|
||||
{t('admin.unsuspend')}
|
||||
</button>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{more && <LoadMore onClick={loadMore} busy={loadingMore} />}
|
||||
<ConfirmDialog
|
||||
open={!!confirm}
|
||||
title={t('admin.confirmUnsuspendTitle')}
|
||||
message={t('admin.confirmUnsuspendMsg')}
|
||||
confirmLabel={t('admin.unsuspend')}
|
||||
onConfirm={() => confirm && void unsuspend(confirm)}
|
||||
onCancel={() => setConfirm(undefined)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Bugs */
|
||||
|
||||
const BUG_LABEL: Record<BugStatus, TKey> = {
|
||||
new: 'adminMod.bugNew',
|
||||
in_progress: 'adminMod.bugInProgress',
|
||||
fixed: 'adminMod.bugFixed',
|
||||
}
|
||||
|
||||
export function BugsTab({ onChange }: { onChange: () => void }) {
|
||||
const [filter, setFilter] = useState<BugStatus | 'all'>('all')
|
||||
const { rows, setRows, loading, error, more, loadingMore, loadMore } = usePaged<BugReport>((o) => adminBugReports(filter === 'all' ? null : filter, o), 30, [filter])
|
||||
const [busyId, setBusyId] = useState<number>()
|
||||
|
||||
const setStatus = async (b: BugReport, s: BugStatus) => {
|
||||
if (b.status === s) return
|
||||
setBusyId(b.id)
|
||||
try {
|
||||
await adminSetBugStatus(b.id, s)
|
||||
setRows((p) => p.map((x) => (x.id === b.id ? { ...x, status: s } : x)))
|
||||
onChange()
|
||||
} catch {
|
||||
/* inchangé */
|
||||
} finally {
|
||||
setBusyId(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<Segmented value={filter} onChange={setFilter} options={[{ id: 'all' as const, label: t('adminMod.all') }, ...BUG_STATUSES.map((s) => ({ id: s, label: t(BUG_LABEL[s]) }))]} />
|
||||
{loading ? (
|
||||
<Spinner />
|
||||
) : error ? (
|
||||
<EmptyState title={t('admin.loadError')} text={t('adminMod.migrationHint')} />
|
||||
) : rows.length === 0 ? (
|
||||
<EmptyState title={t('adminMod.noBugs')} />
|
||||
) : (
|
||||
<ul className="mt-4 grid gap-3 lg:grid-cols-2">
|
||||
{rows.map((b) => (
|
||||
<li key={b.id} className="card p-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<Person card={b.reporter} size={28} />
|
||||
<span className="shrink-0 text-xs text-ink-3">{timeAgo(b.createdAt)}</span>
|
||||
</div>
|
||||
<p className="mt-3 whitespace-pre-line text-sm leading-relaxed">{b.description}</p>
|
||||
{Object.keys(b.context).length > 0 && (
|
||||
<dl className="mt-3 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 rounded-xl border border-line bg-bg p-3 text-[11px]">
|
||||
{Object.entries(b.context).map(([k, v]) => (
|
||||
<div key={k} className="contents">
|
||||
<dt className="text-ink-3">{k}</dt>
|
||||
<dd className="min-w-0 break-words text-ink-2" dir="ltr">
|
||||
{v}
|
||||
</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
)}
|
||||
<div className="mt-3 grid grid-cols-3 gap-1 rounded-full border border-line p-1">
|
||||
{BUG_STATUSES.map((s) => (
|
||||
<button
|
||||
key={s}
|
||||
type="button"
|
||||
aria-pressed={b.status === s}
|
||||
disabled={busyId === b.id}
|
||||
onClick={() => void setStatus(b, s)}
|
||||
className={cx('rounded-full py-1.5 text-xs font-medium transition-colors', b.status === s ? 'bg-ink text-bg' : 'text-ink-3')}
|
||||
>
|
||||
{t(BUG_LABEL[s])}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{more && !loading && <LoadMore onClick={loadMore} busy={loadingMore} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ Erreurs */
|
||||
|
||||
const SOURCE_LABEL: Record<ClientError['source'], TKey> = {
|
||||
error: 'adminMod.srcError',
|
||||
rejection: 'adminMod.srcRejection',
|
||||
render: 'adminMod.srcRender',
|
||||
}
|
||||
|
||||
export function ErrorsTab({ onChange }: { onChange: () => void }) {
|
||||
const { rows, setRows, loading, error, more, loadingMore, loadMore } = usePaged<ClientError>((o) => adminClientErrors(o), 50, [])
|
||||
const [busy, setBusy] = useState<string>()
|
||||
const marked = useRef(false)
|
||||
|
||||
// À l'ouverture : les nouvelles erreurs sont « vues » (le badge disparaît) — elles restent signalées « Nouveau » ici
|
||||
useEffect(() => {
|
||||
if (loading || error || marked.current || !rows.some((r) => r.status === 'new')) return
|
||||
marked.current = true
|
||||
adminSetErrorStatus(null, 'seen')
|
||||
.then(onChange)
|
||||
.catch(() => {})
|
||||
}, [loading, error, rows, onChange])
|
||||
|
||||
const act = async (e: ClientError, s: 'fixed' | 'delete') => {
|
||||
setBusy(e.fingerprint)
|
||||
try {
|
||||
await adminSetErrorStatus(e.fingerprint, s)
|
||||
setRows((p) => (s === 'delete' ? p.filter((x) => x.fingerprint !== e.fingerprint) : p.map((x) => (x.fingerprint === e.fingerprint ? { ...x, status: 'fixed' } : x))))
|
||||
onChange()
|
||||
} catch {
|
||||
/* inchangé */
|
||||
} finally {
|
||||
setBusy(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
if (loading) return <Spinner />
|
||||
if (error) return <EmptyState title={t('admin.loadError')} text={t('adminMod.migrationHint')} />
|
||||
if (rows.length === 0) return <EmptyState title={t('adminMod.noErrors')} text={t('adminMod.noErrorsHint')} />
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<ul className="space-y-2">
|
||||
{rows.map((e) => (
|
||||
<li key={e.fingerprint} className="card p-4">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{e.status === 'new' && <Badge tone="accent">{t('adminMod.errNew')}</Badge>}
|
||||
{e.status === 'fixed' && <Badge>{t('adminMod.errFixed')}</Badge>}
|
||||
<Badge>{t(SOURCE_LABEL[e.source])}</Badge>
|
||||
<Badge tone="strong">×{fmtNumber(e.count)}</Badge>
|
||||
<span className="ms-auto text-xs text-ink-3">{timeAgo(e.lastSeen)}</span>
|
||||
</div>
|
||||
<p className="mt-2 break-words font-mono text-[13px] leading-snug" dir="ltr">
|
||||
{e.message}
|
||||
</p>
|
||||
<p className="mt-1.5 text-xs text-ink-3">
|
||||
{t('adminMod.firstSeen', { date: formatDate(e.firstSeen) })}
|
||||
{e.appVersion ? ` · v${e.appVersion}` : ''}
|
||||
{e.url ? ` · ${e.url}` : ''}
|
||||
</p>
|
||||
{(e.stack || e.userAgent) && (
|
||||
<details className="mt-2">
|
||||
<summary className="cursor-pointer text-xs font-medium text-ink-2">{t('adminMod.stack')}</summary>
|
||||
{e.userAgent && (
|
||||
<p className="mt-2 break-words text-[11px] text-ink-3" dir="ltr">
|
||||
{e.userAgent}
|
||||
</p>
|
||||
)}
|
||||
{e.stack && (
|
||||
<pre className="mt-2 max-h-72 overflow-auto rounded-xl border border-line bg-bg p-3 text-[11px] leading-relaxed text-ink-2" dir="ltr">
|
||||
{e.stack}
|
||||
</pre>
|
||||
)}
|
||||
</details>
|
||||
)}
|
||||
<div className="mt-3 flex flex-wrap gap-2">
|
||||
{e.status !== 'fixed' && (
|
||||
<ActionButton icon={<CheckCheck className="size-4" aria-hidden />} label={t('adminMod.markFixed')} onClick={() => void act(e, 'fixed')} busy={busy === e.fingerprint} />
|
||||
)}
|
||||
<ActionButton icon={<Trash2 className="size-4" aria-hidden />} label={t('adminMod.forget')} onClick={() => void act(e, 'delete')} busy={busy === e.fingerprint} />
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{more && <LoadMore onClick={loadMore} busy={loadingMore} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
+75
-6
@@ -9,6 +9,7 @@ import { createSync, type SyncEngine, type SyncStatus } from './lib/cloud/sync'
|
||||
import { deleteDatabase, readOtherDatabase } from './lib/db'
|
||||
import { cloudFetch } from './lib/cloud/api'
|
||||
import { signOut } from './lib/cloud/auth'
|
||||
import { disablePush, forgetPushLocally } from './lib/push'
|
||||
import { dbNameFor, scopedKey } from './lib/scope'
|
||||
import { isPlainObject, LIMITS, readStorage, storageGet, storageSet } from './lib/security'
|
||||
import { mediaDB, requestPersistentStorage } from './lib/db'
|
||||
@@ -16,6 +17,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')
|
||||
@@ -58,6 +60,16 @@ interface MediaStore {
|
||||
clearAll: () => Promise<void>
|
||||
/** Met à jour plusieurs fiches d'un coup (sans changer leur date de modification). */
|
||||
patchMany: (patches: { id: string; patch: Partial<MediaInput> }[]) => Promise<void>
|
||||
/** Modification groupée par l'utilisateur (la date de modification avance, comme update). */
|
||||
updateMany: (patches: { id: string; patch: Partial<MediaInput> }[]) => Promise<void>
|
||||
/** Suppression groupée. */
|
||||
removeMany: (ids: string[]) => Promise<void>
|
||||
/**
|
||||
* « Annuler » : remet ces fiches exactement comme elles étaient (dates, épisodes, listes…),
|
||||
* avec une date de modification plus récente que la suppression / le changement, pour que
|
||||
* la synchro (la plus récente gagne) recrée bien la fiche côté serveur.
|
||||
*/
|
||||
restore: (snapshots: MediaItem[]) => Promise<void>
|
||||
|
||||
// Listes perso
|
||||
lists: CustomList[]
|
||||
@@ -169,8 +181,8 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
getLists: () => listsRef.current,
|
||||
applyLists: (next) => setLists(() => next, true),
|
||||
getSettings: () => {
|
||||
const { ratingScale, topCategories, accentColor, themeMode, notifPrefs } = settingsRef.current
|
||||
return { ratingScale, topCategories, accentColor, themeMode, notifPrefs }
|
||||
const { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges } = settingsRef.current
|
||||
return { ratingScale, topCategories, accentColor, themeMode, notifPrefs, challenges }
|
||||
},
|
||||
applySettings: (patch) => updateSettingsRef.current(patch, true),
|
||||
itemsChanged: () => void reloadItems(),
|
||||
@@ -211,7 +223,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
}, [settings.themeMode])
|
||||
|
||||
const updateSettings = useCallback((patch: Partial<Settings>, silent = false) => {
|
||||
if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'notifPrefs' in patch)) syncRef.current.markSettings()
|
||||
if (!silent && syncRef.current && ('ratingScale' in patch || 'topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'notifPrefs' in patch || 'challenges' in patch)) syncRef.current.markSettings()
|
||||
setSettings((prev) => {
|
||||
const next = { ...prev, ...patch }
|
||||
try {
|
||||
@@ -248,16 +260,70 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
async (id: string, patch: Partial<MediaInput>) => {
|
||||
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],
|
||||
)
|
||||
|
||||
// Dernière suppression locale de chaque fiche (une restauration doit être strictement plus récente)
|
||||
const removedAtRef = useRef(new Map<string, number>())
|
||||
|
||||
const remove = useCallback(async (id: string) => {
|
||||
await mediaDB.remove(id)
|
||||
removedAtRef.current.set(id, Date.now())
|
||||
setItems((prev) => prev.filter((i) => i.id !== id))
|
||||
}, [])
|
||||
|
||||
const removeMany = useCallback(async (ids: string[]) => {
|
||||
if (!ids.length) return
|
||||
await mediaDB.removeMany(ids)
|
||||
const now = Date.now()
|
||||
for (const id of ids) removedAtRef.current.set(id, now)
|
||||
const gone = new Set(ids)
|
||||
setItems((prev) => prev.filter((i) => !gone.has(i.id)))
|
||||
}, [])
|
||||
|
||||
const updateMany = useCallback(
|
||||
async (patches: { id: string; patch: Partial<MediaInput> }[]) => {
|
||||
const now = new Date().toISOString()
|
||||
const byId = new Map(itemsRef.current.map((i) => [i.id, i]))
|
||||
const changed = patches.flatMap(({ id, patch }) => {
|
||||
const cur = byId.get(id)
|
||||
const next = cur ? normalizeItem({ ...cur, ...patch, updatedAt: now }) : null
|
||||
return next ? [next] : []
|
||||
})
|
||||
if (!changed.length) return
|
||||
await mediaDB.putMany(changed)
|
||||
const map = new Map(changed.map((c) => [c.id, c]))
|
||||
setItems((prev) => prev.map((i) => map.get(i.id) ?? i).sort(byUpdatedDesc))
|
||||
},
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const restore = useCallback(
|
||||
async (snapshots: MediaItem[]) => {
|
||||
// Horodatage plus récent que la suppression (ou la modification) qu'on annule : la synchro
|
||||
// envoie alors une version qui gagne sur la « pierre tombale » déjà partie au serveur.
|
||||
const current = new Map(itemsRef.current.map((i) => [i.id, i.updatedAt]))
|
||||
let latest = Date.now()
|
||||
for (const snap of snapshots) {
|
||||
latest = Math.max(latest, (removedAtRef.current.get(snap.id) ?? 0) + 1, (Date.parse(current.get(snap.id) ?? '') || 0) + 1)
|
||||
}
|
||||
const at = new Date(latest).toISOString()
|
||||
const restored = snapshots.map((s) => normalizeItem({ ...s, updatedAt: at })).filter((i): i is MediaItem => i !== null)
|
||||
if (!restored.length) return
|
||||
await mediaDB.putMany(restored)
|
||||
for (const r of restored) removedAtRef.current.delete(r.id)
|
||||
const map = new Map(restored.map((r) => [r.id, r]))
|
||||
setItems((prev) => [...restored, ...prev.filter((i) => !map.has(i.id))].sort(byUpdatedDesc))
|
||||
},
|
||||
[setItems],
|
||||
)
|
||||
|
||||
const incrementEpisode = useCallback(
|
||||
async (id: string, delta = 1) => {
|
||||
const item = itemsRef.current.find((i) => i.id === id)
|
||||
@@ -396,6 +462,8 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
if (engine && navigator.onLine) await engine.syncNow()
|
||||
if (!force && engine && engine.status().pending > 0) return 'pending'
|
||||
engine?.stop()
|
||||
// Cet appareil ne doit plus recevoir les notifications push de ce compte
|
||||
await disablePush().catch(() => {})
|
||||
await wipeAccountFromDevice(userId)
|
||||
await signOut()
|
||||
return 'done'
|
||||
@@ -408,6 +476,7 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
})
|
||||
if (!res.ok) throw new Error(res.status === 429 ? t('account.err.deleteRate') : t('account.err.delete'))
|
||||
syncRef.current?.stop()
|
||||
await forgetPushLocally().catch(() => {})
|
||||
await wipeAccountFromDevice(userId)
|
||||
await signOut()
|
||||
},
|
||||
@@ -442,11 +511,11 @@ export function MediaProvider({ children, cloudUser }: { children: ReactNode; cl
|
||||
const value = useMemo<MediaStore>(
|
||||
() => ({
|
||||
items, loading, error, settings: exposedSettings, updateSettings, add, update, remove, incrementEpisode, importItems, setTopList, clearAll,
|
||||
patchMany, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
patchMany, updateMany, removeMany, restore, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
}),
|
||||
[
|
||||
items, loading, error, exposedSettings, updateSettings, add, update, remove, incrementEpisode, importItems, setTopList, clearAll,
|
||||
patchMany, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
patchMany, updateMany, removeMany, restore, lists, createList, renameList, deleteList, toggleInList, mergeLists, account,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ export interface MediaItem {
|
||||
platform?: string
|
||||
/** Mon avis (visible sur mon profil, comme ma note) */
|
||||
notes?: string
|
||||
/** Mon avis contient des spoilers : masqué chez les autres jusqu'au tap */
|
||||
notesSpoiler?: boolean
|
||||
/** URL d'image ou image compressée en data URL (reste locale). */
|
||||
poster?: string
|
||||
/** Grande image horizontale (TMDB), pour l'en-tête de la fiche et l'accueil. */
|
||||
@@ -49,12 +51,16 @@ export interface MediaItem {
|
||||
top?: TopEntry
|
||||
/** Listes perso auxquelles appartient la fiche. */
|
||||
listIds?: string[]
|
||||
/** Tags personnels libres (« comfort », « halloween »…). Privés : jamais affichés sur le profil public. */
|
||||
tags?: string[]
|
||||
/** Pays d'origine (codes ISO, ex. ['KR']). */
|
||||
countries?: string[]
|
||||
/** Dates de revisionnage (AAAA-MM-JJ), en plus du premier visionnage. */
|
||||
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<string, number>
|
||||
|
||||
createdAt: string // ISO
|
||||
updatedAt: string // ISO
|
||||
@@ -88,6 +94,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). */
|
||||
@@ -100,6 +124,10 @@ export interface NotifPrefs {
|
||||
accepted?: boolean
|
||||
/** Réactions reçues sur mes avis */
|
||||
reactions?: boolean
|
||||
/** Commentaires reçus sous mes avis */
|
||||
comments?: boolean
|
||||
/** Invitations à des listes partagées */
|
||||
lists?: boolean
|
||||
}
|
||||
|
||||
export interface CustomList {
|
||||
|
||||
Vendored
+5
@@ -5,8 +5,13 @@ interface ImportMetaEnv {
|
||||
readonly VITE_SUPABASE_URL?: string
|
||||
/** Clé publique « anon » / « publishable » de Supabase (publique par nature, protégée par les règles RLS) */
|
||||
readonly VITE_SUPABASE_ANON_KEY?: string
|
||||
/** « 1 » : remonter aussi les erreurs en mode dev (tests) */
|
||||
readonly VITE_REPORT_ERRORS?: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
/** Version de l'app (package.json), injectée par vite.config.ts */
|
||||
declare const __APP_VERSION__: string
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,111 @@
|
||||
# Notifications push (Web Push) — mise en service
|
||||
|
||||
Les notifications de la cloche (nouveaux abonnés, demandes acceptées, réactions, nouveaux épisodes…)
|
||||
peuvent aussi arriver **sur le téléphone / l'ordinateur, même app fermée**.
|
||||
|
||||
```
|
||||
nouvelle ligne dans public.notifications
|
||||
└─ déclencheur notifications_push (SQL) ── pg_net ──► fonction « send-push » (en-tête x-push-secret)
|
||||
├─ push_claim() : notifications non envoyées + appareils
|
||||
├─ préférences (notifPrefs) appliquées, textes traduits, regroupés
|
||||
├─ chiffrement aes128gcm + jeton VAPID ──► FCM / Mozilla / Apple / Windows
|
||||
└─ push_done() : appareils expirés (404/410) supprimés
|
||||
```
|
||||
|
||||
Rien ne casse tant que ce n'est pas configuré : sans secrets ni Vault, le déclencheur ne fait rien,
|
||||
la cloche fonctionne comme avant et l'interrupteur des Réglages affiche « pas encore disponible ».
|
||||
|
||||
---
|
||||
|
||||
## 1. Base de données (SQL Editor)
|
||||
|
||||
Prérequis déjà appliqués : `20261007120000_social_notifications.sql` et `20261008140000_episode_notifications_fix.sql`.
|
||||
|
||||
1. Supabase → **SQL Editor** → coller `supabase/A_COLLER_2026-10-09.sql` (contient `20261009150000_web_push.sql` et l'adresse `azuu_push_url` dans Vault) → **Run**.
|
||||
- Elle active l'extension **pg_net** (`create extension if not exists pg_net`). Si l'éditeur refuse,
|
||||
l'activer à la main : **Database → Extensions → pg_net → Enable**, puis relancer le fichier.
|
||||
- Le fichier est idempotent : on peut le relancer sans risque.
|
||||
|
||||
## 2. Clés VAPID et secret partagé (sur ton PC)
|
||||
|
||||
```bash
|
||||
node scripts/gen-vapid.mjs
|
||||
```
|
||||
|
||||
Le script affiche les commandes à copier. **Ne jamais committer ces valeurs** (ni dans `.env`, ni en `VITE_…`).
|
||||
La clé publique n'est pas secrète (l'app la lit via la fonction), la clé privée et le secret du webhook le sont.
|
||||
|
||||
## 3. Secrets des fonctions
|
||||
|
||||
Supabase → **Edge Functions → Secrets** (ou `supabase secrets set …`) :
|
||||
|
||||
| Nom | Valeur |
|
||||
| --- | --- |
|
||||
| `VAPID_PUBLIC_KEY` | clé publique affichée par le script (87 caractères, commence par `B`) |
|
||||
| `VAPID_PRIVATE_KEY` | clé privée affichée par le script (43 caractères) |
|
||||
| `VAPID_SUBJECT` | `mailto:ton-adresse@…` (contact pour les services push) |
|
||||
| `PUSH_WEBHOOK_SECRET` | secret aléatoire affiché par le script (≥ 32 caractères) |
|
||||
|
||||
`SUPABASE_URL` et `SUPABASE_SERVICE_ROLE_KEY` sont fournis automatiquement. `ALLOWED_ORIGINS`
|
||||
(déjà en place pour `tmdb`) sert aussi ici pour la lecture de la clé publique depuis le site.
|
||||
|
||||
## 4. Déployer la fonction
|
||||
|
||||
> ✅ Déjà fait le 9 oct. 2026 (version 1 déployée par Claude). À refaire seulement si `functions/send-push` change.
|
||||
|
||||
```bash
|
||||
supabase functions deploy send-push --project-ref qfgnxonqwldcfdjqhhjz
|
||||
```
|
||||
|
||||
`supabase/config.toml` contient `verify_jwt = false` pour `send-push` : la base l'appelle sans jeton
|
||||
utilisateur, l'accès est protégé par l'en-tête `x-push-secret` (comparé en temps constant).
|
||||
Vérification : ouvrir `https://qfgnxonqwldcfdjqhhjz.supabase.co/functions/v1/send-push` → `{"publicKey":"B…"}`.
|
||||
|
||||
## 5. Adresse et secret dans Supabase Vault (SQL Editor)
|
||||
|
||||
Le déclencheur lit ces deux valeurs dans Vault (elles ne sont jamais écrites dans une migration) :
|
||||
|
||||
```sql
|
||||
select vault.create_secret('https://qfgnxonqwldcfdjqhhjz.supabase.co/functions/v1/send-push', 'azuu_push_url');
|
||||
select vault.create_secret('<la même valeur que PUSH_WEBHOOK_SECRET>', 'azuu_push_secret');
|
||||
```
|
||||
|
||||
Pour changer une valeur plus tard :
|
||||
|
||||
```sql
|
||||
select vault.update_secret((select id from vault.secrets where name = 'azuu_push_secret'), '<nouvelle valeur>');
|
||||
```
|
||||
|
||||
(et mettre la même dans le secret `PUSH_WEBHOOK_SECRET` de la fonction).
|
||||
|
||||
## 6. Publier l'app
|
||||
|
||||
`git push` (Gitea Actions construit et publie). Le service worker se met à jour tout seul ;
|
||||
il charge `push-sw.js` (servi en `Cache-Control: no-cache`, en-tête généré depuis `vite.config.ts`).
|
||||
|
||||
## 7. Tester
|
||||
|
||||
1. Sur l'app : **Réglages → Notifications → Notifications sur cet appareil** (la permission n'est demandée qu'à ce moment-là).
|
||||
- iPhone / iPad : uniquement depuis l'app **installée sur l'écran d'accueil**, iOS 16.4 ou plus récent.
|
||||
2. Depuis un autre compte, s'abonner à ce compte → une notification doit arriver (même app fermée).
|
||||
3. En cas de souci :
|
||||
```sql
|
||||
select count(*) from public.push_subscriptions; -- l'appareil est-il inscrit ?
|
||||
select id, status_code, content, created from net._http_response order by created desc limit 10; -- appels de la base
|
||||
```
|
||||
et **Edge Functions → send-push → Logs**. Un `401` = `PUSH_WEBHOOK_SECRET` et `azuu_push_secret` différents ;
|
||||
un `503 not-configured` = secrets VAPID manquants ou mal copiés.
|
||||
|
||||
## Sécurité (résumé)
|
||||
|
||||
- `push_subscriptions` : RLS activé et forcé ; chacun ne voit / supprime que ses appareils ; ajout uniquement via
|
||||
`register_push_subscription` (security definer) qui n'accepte que des adresses **https** vers les services push
|
||||
connus (`fcm.googleapis.com`, `updates.push.services.mozilla.com`, `*.push.apple.com`, `web.push.apple.com`,
|
||||
`*.notify.windows.com`) : pas de SSRF possible. La fonction d'envoi revérifie la liste.
|
||||
- 10 appareils max par compte (les plus anciens sont retirés), 10 nouvelles inscriptions max par 10 minutes.
|
||||
- Un abonnement déjà lié à un autre compte n'est repris que si l'on fournit les mêmes clés (même navigateur).
|
||||
- À la déconnexion, l'appareil est désinscrit ; à la suppression du compte, tout part en cascade.
|
||||
- `push_claim` / `push_done` : réservées au rôle `service_role`. Les préférences `notifPrefs` sont appliquées
|
||||
à la création **et** à l'envoi.
|
||||
- Changer les clés VAPID invalide les abonnements existants : après une rotation, vider la table
|
||||
(`delete from public.push_subscriptions;`) ; chacun réactive l'interrupteur.
|
||||
@@ -9,3 +9,6 @@ verify_jwt = false
|
||||
|
||||
[functions.delete-account]
|
||||
verify_jwt = false
|
||||
|
||||
[functions.send-push]
|
||||
verify_jwt = false
|
||||
@@ -0,0 +1,201 @@
|
||||
// Web Push sans dépendance : chiffrement « aes128gcm » (RFC 8188 + RFC 8291) et
|
||||
// authentification VAPID (RFC 8292, jeton JWT ES256), uniquement avec WebCrypto.
|
||||
// Aucune API propre à Deno ici : le module est aussi testé avec Node (vecteurs de la RFC 8291).
|
||||
|
||||
const enc = new TextEncoder()
|
||||
/** Octets adossés à un ArrayBuffer (exigé par les types WebCrypto / fetch récents) */
|
||||
export type Bytes = Uint8Array<ArrayBuffer>
|
||||
|
||||
export function b64urlEncode(bytes: Bytes): string {
|
||||
let s = ''
|
||||
for (const b of bytes) s += String.fromCharCode(b)
|
||||
return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '')
|
||||
}
|
||||
|
||||
export function b64urlDecode(str: string): Bytes {
|
||||
if (!/^[A-Za-z0-9_-]*={0,2}$/.test(str)) throw new Error('base64url invalide')
|
||||
const b64 = str.replace(/=+$/, '').replace(/-/g, '+').replace(/_/g, '/')
|
||||
const bin = atob(b64 + '='.repeat((4 - (b64.length % 4)) % 4))
|
||||
const out = new Uint8Array(bin.length)
|
||||
for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i)
|
||||
return out
|
||||
}
|
||||
|
||||
function concat(...parts: Uint8Array[]): Bytes {
|
||||
const out = new Uint8Array(parts.reduce((n, p) => n + p.length, 0))
|
||||
let o = 0
|
||||
for (const p of parts) {
|
||||
out.set(p, o)
|
||||
o += p.length
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
async function hmac(key: Bytes, data: Bytes): Promise<Bytes> {
|
||||
const k = await crypto.subtle.importKey('raw', key, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'])
|
||||
return new Uint8Array(await crypto.subtle.sign('HMAC', k, data))
|
||||
}
|
||||
|
||||
/** Clé publique P-256 brute (65 octets, 0x04 || X || Y) → JWK. */
|
||||
function rawToJwk(raw: Bytes, d?: Bytes): JsonWebKey {
|
||||
if (raw.length !== 65 || raw[0] !== 4) throw new Error('clé publique P-256 invalide')
|
||||
return {
|
||||
kty: 'EC',
|
||||
crv: 'P-256',
|
||||
x: b64urlEncode(raw.slice(1, 33)),
|
||||
y: b64urlEncode(raw.slice(33, 65)),
|
||||
...(d ? { d: b64urlEncode(d) } : {}),
|
||||
ext: true,
|
||||
}
|
||||
}
|
||||
|
||||
export interface EncryptOptions {
|
||||
/** Pour les tests uniquement : paire éphémère et sel imposés (vecteurs RFC 8291). */
|
||||
asPrivate?: Bytes
|
||||
asPublic?: Bytes
|
||||
salt?: Bytes
|
||||
/** Taille d'enregistrement annoncée (4096 par défaut) */
|
||||
rs?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Chiffre un message pour un abonnement push (Content-Encoding: aes128gcm).
|
||||
* @param uaPublic clé « p256dh » de l'abonnement (65 octets)
|
||||
* @param authSecret clé « auth » de l'abonnement (16 octets)
|
||||
*/
|
||||
export async function encryptPayload(
|
||||
plaintext: Bytes,
|
||||
uaPublic: Bytes,
|
||||
authSecret: Bytes,
|
||||
opts: EncryptOptions = {},
|
||||
): Promise<Bytes> {
|
||||
if (uaPublic.length !== 65 || uaPublic[0] !== 4) throw new Error('p256dh invalide')
|
||||
if (authSecret.length < 16) throw new Error('auth invalide')
|
||||
const rs = opts.rs ?? 4096
|
||||
// Un seul enregistrement : le message (+ 1 octet de délimitation + 16 octets de tag) doit tenir dedans
|
||||
if (plaintext.length + 1 + 16 > rs) throw new Error('message trop long')
|
||||
|
||||
// Paire de clés éphémère du serveur d'application
|
||||
let asPriv: CryptoKey
|
||||
let asPublic: Bytes
|
||||
if (opts.asPrivate && opts.asPublic) {
|
||||
asPriv = await crypto.subtle.importKey('jwk', rawToJwk(opts.asPublic, opts.asPrivate), { name: 'ECDH', namedCurve: 'P-256' }, false, ['deriveBits'])
|
||||
asPublic = opts.asPublic
|
||||
} else {
|
||||
const pair = (await crypto.subtle.generateKey({ name: 'ECDH', namedCurve: 'P-256' }, true, ['deriveBits'])) as CryptoKeyPair
|
||||
asPriv = pair.privateKey
|
||||
asPublic = new Uint8Array(await crypto.subtle.exportKey('raw', pair.publicKey))
|
||||
}
|
||||
const uaKey = await crypto.subtle.importKey('raw', uaPublic, { name: 'ECDH', namedCurve: 'P-256' }, false, [])
|
||||
const ecdhSecret = new Uint8Array(await crypto.subtle.deriveBits({ name: 'ECDH', public: uaKey }, asPriv, 256))
|
||||
|
||||
// RFC 8291 §3.3-3.4 (HKDF écrit avec HMAC, une seule itération suffit pour ≤ 32 octets)
|
||||
const prkKey = await hmac(authSecret, ecdhSecret)
|
||||
const keyInfo = concat(enc.encode('WebPush: info\0'), uaPublic, asPublic)
|
||||
const ikm = await hmac(prkKey, concat(keyInfo, new Uint8Array([1])))
|
||||
|
||||
const salt = opts.salt ?? crypto.getRandomValues(new Uint8Array(16))
|
||||
if (salt.length !== 16) throw new Error('sel invalide')
|
||||
const prk = await hmac(salt, ikm)
|
||||
const cek = (await hmac(prk, enc.encode('Content-Encoding: aes128gcm\0\x01'))).slice(0, 16)
|
||||
const nonce = (await hmac(prk, enc.encode('Content-Encoding: nonce\0\x01'))).slice(0, 12)
|
||||
|
||||
// Dernier (et seul) enregistrement : délimiteur 0x02, sans remplissage
|
||||
const record = concat(plaintext, new Uint8Array([2]))
|
||||
const aes = await crypto.subtle.importKey('raw', cek, { name: 'AES-GCM' }, false, ['encrypt'])
|
||||
const cipher = new Uint8Array(await crypto.subtle.encrypt({ name: 'AES-GCM', iv: nonce, tagLength: 128 }, aes, record))
|
||||
|
||||
// En-tête RFC 8188 : sel (16) || rs (4, gros-boutiste) || idlen (1) || keyid (clé publique éphémère)
|
||||
const header = new Uint8Array(16 + 4 + 1 + asPublic.length)
|
||||
header.set(salt, 0)
|
||||
new DataView(header.buffer).setUint32(16, rs, false)
|
||||
header[20] = asPublic.length
|
||||
header.set(asPublic, 21)
|
||||
return concat(header, cipher)
|
||||
}
|
||||
|
||||
export interface VapidKeys {
|
||||
/** Clé publique brute en base64url (65 octets) */
|
||||
publicKey: string
|
||||
/** Clé privée (scalaire « d », 32 octets) en base64url */
|
||||
privateKey: string
|
||||
/** « mailto:… » ou « https://… » */
|
||||
subject: string
|
||||
}
|
||||
|
||||
const signingKeys = new Map<string, Promise<CryptoKey>>()
|
||||
|
||||
function vapidSigningKey(v: VapidKeys): Promise<CryptoKey> {
|
||||
const cacheKey = v.publicKey
|
||||
let p = signingKeys.get(cacheKey)
|
||||
if (!p) {
|
||||
p = crypto.subtle.importKey('jwk', rawToJwk(b64urlDecode(v.publicKey), b64urlDecode(v.privateKey)), { name: 'ECDSA', namedCurve: 'P-256' }, false, ['sign'])
|
||||
signingKeys.set(cacheKey, p)
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
/** En-tête Authorization VAPID pour un point d'envoi donné (jeton valable 12 h). */
|
||||
export async function vapidAuthorization(endpoint: string, v: VapidKeys, nowSec = Math.floor(Date.now() / 1000)): Promise<string> {
|
||||
const aud = new URL(endpoint).origin
|
||||
const header = b64urlEncode(enc.encode(JSON.stringify({ typ: 'JWT', alg: 'ES256' })))
|
||||
const claims = b64urlEncode(enc.encode(JSON.stringify({ aud, exp: nowSec + 12 * 3600, sub: v.subject })))
|
||||
const unsigned = `${header}.${claims}`
|
||||
// WebCrypto renvoie la signature au format r || s (64 octets), celui attendu par JWS
|
||||
const sig = new Uint8Array(await crypto.subtle.sign({ name: 'ECDSA', hash: 'SHA-256' }, await vapidSigningKey(v), enc.encode(unsigned)))
|
||||
return `vapid t=${unsigned}.${b64urlEncode(sig)}, k=${v.publicKey}`
|
||||
}
|
||||
|
||||
export interface PushTarget {
|
||||
endpoint: string
|
||||
p256dh: string
|
||||
auth: string
|
||||
}
|
||||
|
||||
export type PushResult = 'ok' | 'gone' | 'error'
|
||||
|
||||
/** Envoie un message chiffré à un abonnement. « gone » = abonnement expiré (à supprimer). */
|
||||
export async function sendWebPush(target: PushTarget, payload: string, v: VapidKeys, ttl = 24 * 3600, topic?: string): Promise<PushResult> {
|
||||
const body = await encryptPayload(enc.encode(payload), b64urlDecode(target.p256dh), b64urlDecode(target.auth))
|
||||
const headers: Record<string, string> = {
|
||||
Authorization: await vapidAuthorization(target.endpoint, v),
|
||||
'Content-Encoding': 'aes128gcm',
|
||||
'Content-Type': 'application/octet-stream',
|
||||
TTL: String(ttl),
|
||||
Urgency: 'normal',
|
||||
}
|
||||
// « Topic » : un message plus récent du même sujet remplace celui encore en attente
|
||||
if (topic && /^[A-Za-z0-9_-]{1,32}$/.test(topic)) headers.Topic = topic
|
||||
const ctrl = new AbortController()
|
||||
const timer = setTimeout(() => ctrl.abort(), 10_000)
|
||||
try {
|
||||
const res = await fetch(target.endpoint, { method: 'POST', headers, body, signal: ctrl.signal, redirect: 'error' })
|
||||
await res.body?.cancel()
|
||||
if (res.status === 404 || res.status === 410) return 'gone'
|
||||
return res.ok ? 'ok' : 'error'
|
||||
} catch {
|
||||
return 'error'
|
||||
} finally {
|
||||
clearTimeout(timer)
|
||||
}
|
||||
}
|
||||
|
||||
/** Mêmes hôtes que la vérification côté base (anti-SSRF, double contrôle). */
|
||||
export function isAllowedPushEndpoint(endpoint: string): boolean {
|
||||
if (endpoint.length > 1024) return false
|
||||
let u: URL
|
||||
try {
|
||||
u = new URL(endpoint)
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
if (u.protocol !== 'https:' || u.username || u.password || (u.port && u.port !== '443')) return false
|
||||
const h = u.hostname.toLowerCase()
|
||||
return (
|
||||
h === 'fcm.googleapis.com' ||
|
||||
h === 'updates.push.services.mozilla.com' ||
|
||||
h === 'web.push.apple.com' ||
|
||||
/^[a-z0-9-]{1,63}(\.[a-z0-9-]{1,63})*\.push\.apple\.com$/.test(h) ||
|
||||
/^[a-z0-9-]{1,63}(\.[a-z0-9-]{1,63})*\.notify\.windows\.com$/.test(h)
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Transforme les notifications d'un compte en messages push courts (regroupés si besoin).
|
||||
// Module sans API Deno : testé aussi avec Node.
|
||||
|
||||
import { fill, MESSAGES } from './messages.ts'
|
||||
|
||||
export interface ClaimedItem {
|
||||
id: number
|
||||
kind: string
|
||||
emoji: string | null
|
||||
item_id: string | null
|
||||
episode: number | null
|
||||
ep_count: number | null
|
||||
actor: { username: string; display_name: string } | null
|
||||
title: string | null
|
||||
}
|
||||
|
||||
export interface PushMessage {
|
||||
title: string
|
||||
body: string
|
||||
/** Écran à ouvrir au clic (paramètre « open » de l'app) */
|
||||
open: string
|
||||
/** Une notification du même « tag » remplace la précédente sur l'appareil */
|
||||
tag: string
|
||||
}
|
||||
|
||||
const EMOJIS = new Set(['👍', '❤️', '🔥', '😂', '😮', '😢'])
|
||||
|
||||
/** Texte venu de la base : sans caractères de contrôle ni de direction, longueur bornée. */
|
||||
export function clean(v: unknown, max: number): string {
|
||||
if (typeof v !== 'string') return ''
|
||||
const s = v.replace(/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u202a-\u202e\u2066-\u2069]/g, '').replace(/\s+/g, ' ').trim()
|
||||
return s.length > max ? s.slice(0, max - 1).trimEnd() + '…' : s
|
||||
}
|
||||
|
||||
const SAFE_ID = /^[A-Za-z0-9_-]{1,64}$/
|
||||
const SAFE_USER = /^[a-z0-9_]{3,20}$/
|
||||
|
||||
export function compose(items: ClaimedItem[], lang: string): PushMessage[] {
|
||||
const tx = MESSAGES[lang] ?? MESSAGES.fr
|
||||
const out: PushMessage[] = []
|
||||
const eps = items.filter((i) => i.kind === 'new_episode' || i.kind === 'new_season')
|
||||
const social = items.filter((i) => i.kind !== 'new_episode' && i.kind !== 'new_season')
|
||||
|
||||
// Épisodes : un message par série, ou un seul résumé s'il y en a plusieurs
|
||||
if (eps.length === 1) {
|
||||
const e = eps[0]
|
||||
const n = Number.isInteger(e.episode) && (e.episode as number) > 0 ? (e.episode as number) : null
|
||||
out.push({
|
||||
title: clean(e.title, 80) || 'AzuuCine',
|
||||
body: e.kind === 'new_season' || n === null ? tx.season : fill(tx.episode, { n }),
|
||||
open: e.item_id && SAFE_ID.test(e.item_id) ? `item:${e.item_id}` : 'notifications',
|
||||
tag: e.item_id && SAFE_ID.test(e.item_id) ? `ep-${e.item_id}`.slice(0, 64) : 'episodes',
|
||||
})
|
||||
} else if (eps.length > 1) {
|
||||
const titles = [...new Set(eps.map((e) => clean(e.title, 40)).filter(Boolean))]
|
||||
out.push({
|
||||
title: `${tx.episodesTitle} (${eps.length})`,
|
||||
body: clean(titles.join(' · '), 160) || fill(tx.many, { count: eps.length }),
|
||||
open: 'notifications',
|
||||
tag: 'episodes',
|
||||
})
|
||||
}
|
||||
|
||||
// Abonnements / réactions : un message chacun (3 au plus), sinon un résumé
|
||||
if (social.length > 3) {
|
||||
out.push({ title: 'AzuuCine', body: fill(tx.many, { count: social.length }), open: 'notifications', tag: 'social' })
|
||||
} else {
|
||||
for (const s of social) {
|
||||
const name = clean(s.actor?.display_name, 40) || clean(s.actor?.username, 20) || 'AzuuCine'
|
||||
const user = s.actor && SAFE_USER.test(s.actor.username) ? s.actor.username : null
|
||||
let body: string
|
||||
let open = 'notifications'
|
||||
let title = 'AzuuCine'
|
||||
switch (s.kind) {
|
||||
case 'follow_request':
|
||||
body = fill(tx.followRequest, { name })
|
||||
break
|
||||
case 'new_follower':
|
||||
body = fill(tx.newFollower, { name })
|
||||
if (user) open = `u:${user}`
|
||||
break
|
||||
case 'follow_accepted':
|
||||
body = fill(tx.followAccepted, { name })
|
||||
if (user) open = `u:${user}`
|
||||
break
|
||||
case 'reaction':
|
||||
body = fill(tx.reaction, { name, emoji: s.emoji && EMOJIS.has(s.emoji) ? s.emoji : '' }).replace(/\s+/g, ' ')
|
||||
title = clean(s.title, 80) || 'AzuuCine'
|
||||
break
|
||||
case 'review_comment':
|
||||
body = fill(tx.comment, { name })
|
||||
title = clean(s.title, 80) || 'AzuuCine'
|
||||
break
|
||||
case 'shared_list_invite':
|
||||
body = fill(tx.listInvite, { name, list: clean(s.title, 60) })
|
||||
break
|
||||
default:
|
||||
continue
|
||||
}
|
||||
out.push({ title, body, open, tag: `n-${s.id}` })
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
Loaded 100 of 111 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user