i18n: traduire les chaînes hardcodées restantes en anglais/français
- DateTime & Project : locale dayjs dynamique selon la langue active - Images : bouton "Ajouter une ou plusieurs images" via t() - ImagesEditPanel : placeholder, legend tags et bouton ajout via t() - DynamicView : clé PHP "Autres pistes" traduite via t() - Nouvelles clés : forms.selectTags, buttons.addSelectedImages, virtualSample.otherTracks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
059fb0e5b0
commit
2d3be6d140
7 changed files with 34 additions and 21 deletions
|
|
@ -15,8 +15,8 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
Dernière mise à jour le
|
{{ t('dates.updatedOn') }}
|
||||||
<time :datetime="project.modified">{{ frenchFormattedModified }}</time>
|
<time :datetime="project.modified">{{ formattedModified }}</time>
|
||||||
</p>
|
</p>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
||||||
|
|
@ -42,17 +42,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import 'dayjs/locale/fr';
|
import 'dayjs/locale/fr';
|
||||||
|
import 'dayjs/locale/en';
|
||||||
|
import { computed } from 'vue';
|
||||||
import { useProjectStore } from '../../stores/project';
|
import { useProjectStore } from '../../stores/project';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
dayjs.locale('fr');
|
|
||||||
|
|
||||||
const { project } = defineProps({ project: Object });
|
const { project } = defineProps({ project: Object });
|
||||||
|
|
||||||
const frenchFormattedModified = dayjs(project.modified).format(
|
|
||||||
'dddd D MMMM YYYY'
|
|
||||||
);
|
|
||||||
|
|
||||||
const { stepsLabels, setStatus, isEmptyBrief } = useProjectStore();
|
const { stepsLabels, setStatus, isEmptyBrief } = useProjectStore();
|
||||||
const { t } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
|
|
||||||
|
const formattedModified = computed(() =>
|
||||||
|
dayjs(project.modified).locale(locale.value).format('dddd D MMMM YYYY')
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
|
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
|
||||||
@click="isAddImagesModalOpen = true"
|
@click="isAddImagesModalOpen = true"
|
||||||
>
|
>
|
||||||
Ajouter une ou plusieurs images
|
{{ t('forms.addImages') }}
|
||||||
</button>
|
</button>
|
||||||
<template v-for="image in page.moodboard" :key="image.uri">
|
<template v-for="image in page.moodboard" :key="image.uri">
|
||||||
<figure
|
<figure
|
||||||
|
|
@ -52,11 +52,13 @@
|
||||||
import Header from "./Header.vue";
|
import Header from "./Header.vue";
|
||||||
import { usePageStore } from "../../../stores/page";
|
import { usePageStore } from "../../../stores/page";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import ImageDetailsModal from "./ImageDetailsModal.vue";
|
import ImageDetailsModal from "./ImageDetailsModal.vue";
|
||||||
import AddImagesModal from "./add-images-modal/AddImagesModal.vue";
|
import AddImagesModal from "./add-images-modal/AddImagesModal.vue";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const { page } = storeToRefs(usePageStore());
|
const { page } = storeToRefs(usePageStore());
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const selectedTags = ref([]);
|
const selectedTags = ref([]);
|
||||||
const imageDetails = ref(null);
|
const imageDetails = ref(null);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<textarea
|
<textarea
|
||||||
name="image-description"
|
name="image-description"
|
||||||
id="image-description"
|
id="image-description"
|
||||||
placeholder="Ajoutez une description à cette image…"
|
:placeholder="t('forms.imageDescriptionPlaceholder')"
|
||||||
rows="3"
|
rows="3"
|
||||||
class="border border-grey-200 | rounded-xl | p-16 | w-full"
|
class="border border-grey-200 | rounded-xl | p-16 | w-full"
|
||||||
v-model="image.description"
|
v-model="image.description"
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<fieldset class="image-details__filters | flex-1">
|
<fieldset class="image-details__filters | flex-1">
|
||||||
<legend class="text-sm text-grey-700 | mb-8">
|
<legend class="text-sm text-grey-700 | mb-8">
|
||||||
Sélectionner un ou plusieurs tags
|
{{ t('forms.selectTags') }}
|
||||||
</legend>
|
</legend>
|
||||||
<div class="flex" style="gap: var(--space-8)">
|
<div class="flex" style="gap: var(--space-8)">
|
||||||
<template v-for="tag in page.tags" :key="tag">
|
<template v-for="tag in page.tags" :key="tag">
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
<button class="btn | w-full | mt-auto" @click="addImagesToBrief()">
|
<button class="btn | w-full | mt-auto" @click="addImagesToBrief()">
|
||||||
Ajouter les images sélectionnées
|
{{ t('buttons.addSelectedImages') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -109,8 +109,10 @@ import StringUtils from "../../../../utils/string";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { useAddImagesModalStore } from "../../../../stores/addImagesModal";
|
import { useAddImagesModalStore } from "../../../../stores/addImagesModal";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
const { page } = storeToRefs(usePageStore());
|
const { page } = storeToRefs(usePageStore());
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const { activeTab } = storeToRefs(useAddImagesModalStore());
|
const { activeTab } = storeToRefs(useAddImagesModalStore());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<time
|
<time
|
||||||
class="card__date | text-grey-700"
|
class="card__date | text-grey-700"
|
||||||
:datetime="dayjs(date).format('YYYY-M-DD')"
|
:datetime="dayjs(date).format('YYYY-M-DD')"
|
||||||
>{{ dayjs(date).format("DD MMMM YYYY") }}</time
|
>{{ dayjs(date).locale(locale).format("DD MMMM YYYY") }}</time
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -11,6 +11,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import "dayjs/locale/fr";
|
import "dayjs/locale/fr";
|
||||||
|
import "dayjs/locale/en";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
const { date } = defineProps({ date: String });
|
const { date } = defineProps({ date: String });
|
||||||
|
const { locale } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ const tracks = computed(() => {
|
||||||
|
|
||||||
for (const key in raw) {
|
for (const key in raw) {
|
||||||
list.push({
|
list.push({
|
||||||
title: key,
|
title: key === 'Autres pistes' ? t('virtualSample.otherTracks') : key,
|
||||||
slug: slugify(key),
|
slug: slugify(key),
|
||||||
variations: raw[key] || [],
|
variations: raw[key] || [],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@
|
||||||
"loopAnimation": "Loop animation",
|
"loopAnimation": "Loop animation",
|
||||||
"stopAnimation": "Stop animation",
|
"stopAnimation": "Stop animation",
|
||||||
"compareTracks": "Compare tracks",
|
"compareTracks": "Compare tracks",
|
||||||
"exitCompare": "Exit compare mode"
|
"exitCompare": "Exit compare mode",
|
||||||
|
"addSelectedImages": "Add selected images"
|
||||||
},
|
},
|
||||||
"forms": {
|
"forms": {
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
|
|
@ -94,7 +95,8 @@
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"selectVariation": "Select a variation",
|
"selectVariation": "Select a variation",
|
||||||
"uploadedFiles": "Uploaded files",
|
"uploadedFiles": "Uploaded files",
|
||||||
"addImages": "Add one or more images"
|
"addImages": "Add one or more images",
|
||||||
|
"selectTags": "Select one or more tags"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
|
|
@ -184,7 +186,8 @@
|
||||||
"dynamicPresentation": "Dynamic presentation",
|
"dynamicPresentation": "Dynamic presentation",
|
||||||
"staticView": "Static view",
|
"staticView": "Static view",
|
||||||
"noContent": "Content not available for this track",
|
"noContent": "Content not available for this track",
|
||||||
"selectToCompare": "Select the track you want to compare"
|
"selectToCompare": "Select the track you want to compare",
|
||||||
|
"otherTracks": "Other tracks"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"saveFailed": "Save failed",
|
"saveFailed": "Save failed",
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@
|
||||||
"loopAnimation": "Animation en boucle",
|
"loopAnimation": "Animation en boucle",
|
||||||
"stopAnimation": "Arrêter l'animation",
|
"stopAnimation": "Arrêter l'animation",
|
||||||
"compareTracks": "Comparer les pistes",
|
"compareTracks": "Comparer les pistes",
|
||||||
"exitCompare": "Quitter le mode comparer"
|
"exitCompare": "Quitter le mode comparer",
|
||||||
|
"addSelectedImages": "Ajouter les images sélectionnées"
|
||||||
},
|
},
|
||||||
"forms": {
|
"forms": {
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
|
|
@ -94,7 +95,8 @@
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"selectVariation": "Sélectionnez une déclinaison",
|
"selectVariation": "Sélectionnez une déclinaison",
|
||||||
"uploadedFiles": "Fichiers importés",
|
"uploadedFiles": "Fichiers importés",
|
||||||
"addImages": "Ajouter une ou plusieurs images"
|
"addImages": "Ajouter une ou plusieurs images",
|
||||||
|
"selectTags": "Sélectionner un ou plusieurs tags"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"login": "Connexion",
|
"login": "Connexion",
|
||||||
|
|
@ -184,7 +186,8 @@
|
||||||
"dynamicPresentation": "Présentation dynamique",
|
"dynamicPresentation": "Présentation dynamique",
|
||||||
"staticView": "Vue statique",
|
"staticView": "Vue statique",
|
||||||
"noContent": "Contenu non disponible pour cette piste",
|
"noContent": "Contenu non disponible pour cette piste",
|
||||||
"selectToCompare": "Sélectionnez sur la piste que vous souhaitez comparer"
|
"selectToCompare": "Sélectionnez sur la piste que vous souhaitez comparer",
|
||||||
|
"otherTracks": "Autres pistes"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"saveFailed": "Erreur lors de la sauvegarde",
|
"saveFailed": "Erreur lors de la sauvegarde",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue