From bd739d13cf2278fe3cd828fd1067cd83780e49e3 Mon Sep 17 00:00:00 2001 From: neckfire Date: Sun, 19 Jul 2026 04:48:26 +0200 Subject: [PATCH] =?UTF-8?q?i18n=20complet=20des=20pages=20+=20routine=20bu?= =?UTF-8?q?ilder=20avanc=C3=A9=20(config=20par=20exo,=20r=C3=A9ordonner,?= =?UTF-8?q?=20dupliquer)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- app/pages/history.vue | 4 +- app/pages/index.vue | 4 +- app/pages/profile.vue | 10 +- app/pages/routines/[id].vue | 208 +++++++++++++++++++++++++++++++++++ app/pages/routines/index.vue | 16 +-- app/pages/routines/new.vue | 13 ++- app/pages/session/[id].vue | 20 ++-- app/pages/session/new.vue | 5 +- i18n/locales/en.json | 57 +++++++++- i18n/locales/fr.json | 57 +++++++++- i18n/locales/pt-BR.json | 57 +++++++++- 11 files changed, 398 insertions(+), 53 deletions(-) create mode 100644 app/pages/routines/[id].vue diff --git a/app/pages/history.vue b/app/pages/history.vue index 997d47b..e189762 100644 --- a/app/pages/history.vue +++ b/app/pages/history.vue @@ -16,8 +16,8 @@ const { data, pending } = await useAsyncData('history', () => api<{ data: Sess[]
-

{{ s.title || 'Séance' }}

-

{{ new Date(s.started_at).toLocaleString() }} · {{ s.set_count }} sets

+

{{ s.title || t('dashboard.session') }}

+

{{ new Date(s.started_at).toLocaleString() }} · {{ s.set_count }} {{ t('dashboard.sets') }}

{{ Math.round(s.total_volume) }} kg
diff --git a/app/pages/index.vue b/app/pages/index.vue index abbe3ef..ad0f2e7 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -115,8 +115,8 @@ const flameScale = computed(() => 1 + Math.min(data.value?.streak.flame_level ??
-

{{ s.title || 'Séance' }}

-

{{ new Date(s.started_at).toLocaleDateString() }} · {{ s.set_count }} sets

+

{{ s.title || t('dashboard.session') }}

+

{{ new Date(s.started_at).toLocaleDateString() }} · {{ s.set_count }} {{ t('dashboard.sets') }}

{{ Math.round(s.total_volume) }} kg
diff --git a/app/pages/profile.vue b/app/pages/profile.vue index b6ab12f..1d9237b 100644 --- a/app/pages/profile.vue +++ b/app/pages/profile.vue @@ -14,7 +14,7 @@ async function togglePush(val: boolean) { if (val) { await enable(auth.push.vapid_public_key || '') pushOn.value = true - toast.add({ title: 'Rappels activés 🔥', color: 'primary' }) + toast.add({ title: t('profile.remindersOn'), color: 'primary' }) } else { await disable() pushOn.value = false @@ -54,7 +54,7 @@ async function doLogout() {
-

Langue

+

{{ t('profile.language') }}

-

Rappels de série 🔥

-

Un rappel le soir si tu risques de perdre ta flamme.

+

{{ t('profile.reminders') }}

+

{{ t('profile.remindersDesc') }}

- + diff --git a/app/pages/routines/[id].vue b/app/pages/routines/[id].vue new file mode 100644 index 0000000..302e6ca --- /dev/null +++ b/app/pages/routines/[id].vue @@ -0,0 +1,208 @@ + + + diff --git a/app/pages/routines/index.vue b/app/pages/routines/index.vue index 19bbfa5..79e41d0 100644 --- a/app/pages/routines/index.vue +++ b/app/pages/routines/index.vue @@ -11,18 +11,18 @@ const { data, pending } = await useAsyncData('routines', () => api<{ data: Routi

{{ t('nav.routines') }}

- +
-

Aucune routine. Crée ta première !

+

{{ t('routines.none') }}

- -
-
-

{{ r.name }}

-

{{ (r.exercises?.length ?? 0) }} exercices · ~{{ r.estimated_minutes }} min

+ +
+
+

{{ r.name }}

+

{{ (r.exercises?.length ?? 0) }} {{ t('routines.exercises') }} · ~{{ r.estimated_minutes }} min

- +
diff --git a/app/pages/routines/new.vue b/app/pages/routines/new.vue index c20f1f3..055a635 100644 --- a/app/pages/routines/new.vue +++ b/app/pages/routines/new.vue @@ -10,8 +10,9 @@ const saving = ref(false) async function save() { saving.value = true try { - await api('/api/routines', { method: 'POST', body: { name: form.name, description: form.description } }) - await navigateTo('/routines') + const res = await api<{ data: { id: number } }>('/api/routines', { method: 'POST', body: { name: form.name, description: form.description } }) + // Redirige vers le builder pour ajouter les exercices. + await navigateTo(`/routines/${res.data.id}`) } catch { toast.add({ title: t('common.error'), color: 'error' }) saving.value = false @@ -22,16 +23,16 @@ async function save() { diff --git a/app/pages/session/[id].vue b/app/pages/session/[id].vue index 7e08b27..255308b 100644 --- a/app/pages/session/[id].vue +++ b/app/pages/session/[id].vue @@ -72,7 +72,7 @@ async function finish() { if (unlocked.length) { toast.add({ title: `🏅 ${unlocked.map(u => u.label).join(', ')}`, color: 'primary' }) } - toast.add({ title: `🔥 Série : ${res.streak?.current ?? ''} jours`, color: 'primary' }) + toast.add({ title: `🔥 ${t('session.streakToast', { n: res.streak?.current ?? 0 })}`, color: 'primary' }) await navigateTo('/') } catch { toast.add({ title: t('common.error'), color: 'error' }) @@ -84,8 +84,8 @@ async function finish() {