Implémentation complète du multilingue FR/EN

- Installation vue-i18n v11 et création des fichiers de traduction (fr.json, en.json)
- Création store locale avec détection hiérarchique (URL > localStorage > navigator)
- Modification des routes avec préfixe /:locale? optionnel
- Toggle FR/EN dans Menu.vue avec synchronisation immédiate
- Traduction de ~200 textes dans 27 composants Vue
- Suppression des labels hardcodés en français côté backend
- Ajout route Kirby catch-all en/(:all?) pour /en/ URLs
- Helper addLocalePrefix() pour préserver locale dans liens dialogs
- Traduction pseudo-élément CSS via data attribute

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-02 18:21:11 +01:00
parent 3af95b1d20
commit 82eb8d88cc
49 changed files with 1079 additions and 295 deletions

View file

@ -1,7 +1,7 @@
<template>
<main v-if="page.inspirations" class="flex flex-col">
<header class="flex">
<h2 id="tabslist" class="sr-only">Inspirations</h2>
<h2 id="tabslist" class="sr-only">{{ t('inspirations.title') }}</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<Selector
v-if="page.inspirations.length > 1"
@ -36,6 +36,9 @@ import { useUserStore } from "../stores/user";
import { ref, computed } from "vue";
import { usePageStore } from "../stores/page";
import { storeToRefs } from "pinia";
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
// Stores
const { page } = storeToRefs(usePageStore());
@ -60,14 +63,14 @@ const favoriteImages = computed(() =>
const tabs = computed(() => [
{
label: "Les Inspirations",
label: t('inspirations.title'),
id: "all",
icon: null,
count: currentInspiration.value.media.length,
isActive: currentTab.value === "all",
},
{
label: "Mes Favoris",
label: t('inspirations.favorites'),
id: "favorites",
icon: "favorite",
count: favoriteImages.value.length,