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>
|
||||
</h3>
|
||||
<p>
|
||||
Dernière mise à jour le
|
||||
<time :datetime="project.modified">{{ frenchFormattedModified }}</time>
|
||||
{{ t('dates.updatedOn') }}
|
||||
<time :datetime="project.modified">{{ formattedModified }}</time>
|
||||
</p>
|
||||
</hgroup>
|
||||
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
||||
|
|
@ -42,17 +42,17 @@
|
|||
<script setup>
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/fr';
|
||||
import 'dayjs/locale/en';
|
||||
import { computed } from 'vue';
|
||||
import { useProjectStore } from '../../stores/project';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
dayjs.locale('fr');
|
||||
|
||||
const { project } = defineProps({ project: Object });
|
||||
|
||||
const frenchFormattedModified = dayjs(project.modified).format(
|
||||
'dddd D MMMM YYYY'
|
||||
);
|
||||
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
|
||||
@click="isAddImagesModalOpen = true"
|
||||
>
|
||||
Ajouter une ou plusieurs images
|
||||
{{ t('forms.addImages') }}
|
||||
</button>
|
||||
<template v-for="image in page.moodboard" :key="image.uri">
|
||||
<figure
|
||||
|
|
@ -52,11 +52,13 @@
|
|||
import Header from "./Header.vue";
|
||||
import { usePageStore } from "../../../stores/page";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ImageDetailsModal from "./ImageDetailsModal.vue";
|
||||
import AddImagesModal from "./add-images-modal/AddImagesModal.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
const { t } = useI18n();
|
||||
|
||||
const selectedTags = ref([]);
|
||||
const imageDetails = ref(null);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<textarea
|
||||
name="image-description"
|
||||
id="image-description"
|
||||
placeholder="Ajoutez une description à cette image…"
|
||||
:placeholder="t('forms.imageDescriptionPlaceholder')"
|
||||
rows="3"
|
||||
class="border border-grey-200 | rounded-xl | p-16 | w-full"
|
||||
v-model="image.description"
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<fieldset class="image-details__filters | flex-1">
|
||||
<legend class="text-sm text-grey-700 | mb-8">
|
||||
Sélectionner un ou plusieurs tags
|
||||
{{ t('forms.selectTags') }}
|
||||
</legend>
|
||||
<div class="flex" style="gap: var(--space-8)">
|
||||
<template v-for="tag in page.tags" :key="tag">
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
</template>
|
||||
</Accordion>
|
||||
<button class="btn | w-full | mt-auto" @click="addImagesToBrief()">
|
||||
Ajouter les images sélectionnées
|
||||
{{ t('buttons.addSelectedImages') }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -109,8 +109,10 @@ import StringUtils from "../../../../utils/string";
|
|||
import { storeToRefs } from "pinia";
|
||||
import { useAddImagesModalStore } from "../../../../stores/addImagesModal";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
const { t } = useI18n();
|
||||
|
||||
const { activeTab } = storeToRefs(useAddImagesModalStore());
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<time
|
||||
class="card__date | text-grey-700"
|
||||
:datetime="dayjs(date).format('YYYY-M-DD')"
|
||||
>{{ dayjs(date).format("DD MMMM YYYY") }}</time
|
||||
>{{ dayjs(date).locale(locale).format("DD MMMM YYYY") }}</time
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -11,6 +11,9 @@
|
|||
<script setup>
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/fr";
|
||||
import "dayjs/locale/en";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { date } = defineProps({ date: String });
|
||||
const { locale } = useI18n();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ const tracks = computed(() => {
|
|||
|
||||
for (const key in raw) {
|
||||
list.push({
|
||||
title: key,
|
||||
title: key === 'Autres pistes' ? t('virtualSample.otherTracks') : key,
|
||||
slug: slugify(key),
|
||||
variations: raw[key] || [],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@
|
|||
"loopAnimation": "Loop animation",
|
||||
"stopAnimation": "Stop animation",
|
||||
"compareTracks": "Compare tracks",
|
||||
"exitCompare": "Exit compare mode"
|
||||
"exitCompare": "Exit compare mode",
|
||||
"addSelectedImages": "Add selected images"
|
||||
},
|
||||
"forms": {
|
||||
"email": "Email",
|
||||
|
|
@ -94,7 +95,8 @@
|
|||
"tags": "Tags",
|
||||
"selectVariation": "Select a variation",
|
||||
"uploadedFiles": "Uploaded files",
|
||||
"addImages": "Add one or more images"
|
||||
"addImages": "Add one or more images",
|
||||
"selectTags": "Select one or more tags"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Login",
|
||||
|
|
@ -184,7 +186,8 @@
|
|||
"dynamicPresentation": "Dynamic presentation",
|
||||
"staticView": "Static view",
|
||||
"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": {
|
||||
"saveFailed": "Save failed",
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@
|
|||
"loopAnimation": "Animation en boucle",
|
||||
"stopAnimation": "Arrêter l'animation",
|
||||
"compareTracks": "Comparer les pistes",
|
||||
"exitCompare": "Quitter le mode comparer"
|
||||
"exitCompare": "Quitter le mode comparer",
|
||||
"addSelectedImages": "Ajouter les images sélectionnées"
|
||||
},
|
||||
"forms": {
|
||||
"email": "Email",
|
||||
|
|
@ -94,7 +95,8 @@
|
|||
"tags": "Tags",
|
||||
"selectVariation": "Sélectionnez une déclinaison",
|
||||
"uploadedFiles": "Fichiers importés",
|
||||
"addImages": "Ajouter une ou plusieurs images"
|
||||
"addImages": "Ajouter une ou plusieurs images",
|
||||
"selectTags": "Sélectionner un ou plusieurs tags"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Connexion",
|
||||
|
|
@ -184,7 +186,8 @@
|
|||
"dynamicPresentation": "Présentation dynamique",
|
||||
"staticView": "Vue statique",
|
||||
"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": {
|
||||
"saveFailed": "Erreur lors de la sauvegarde",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue