From 63c1cef77eb470f76879ba72512fab18aeec1bee Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Sun, 8 Sep 2024 15:30:10 +0200 Subject: [PATCH] Added last translations for event forms / data --- components/calendar/CalendarEventDetails.vue | 2 +- components/calendar/CalendarMenuSubnav.vue | 8 ++++-- components/calendar/form/CreateEvent.vue | 23 ++++++++------- components/calendar/form/DeleteEvent.vue | 10 +++---- components/calendar/form/UpdateEvent.vue | 2 +- components/calendar/input/EventCategories.vue | 4 +-- components/calendar/input/EventCategory.vue | 4 +-- components/calendar/search/CalendarSearch.vue | 2 +- i18n.config.ts | 28 +++++++++++++------ 9 files changed, 49 insertions(+), 34 deletions(-) diff --git a/components/calendar/CalendarEventDetails.vue b/components/calendar/CalendarEventDetails.vue index 910068b..eac1413 100644 --- a/components/calendar/CalendarEventDetails.vue +++ b/components/calendar/CalendarEventDetails.vue @@ -29,7 +29,7 @@ const eventDetails = ref() const emit = defineEmits(["query:close-popover"]) -const dateDifference: string = getRelativeString(defaultDate, props.event.startDate) +const dateDifference = computed(() => getRelativeString(defaultDate, props.event.startDate)) const dateDuration = computed(() => props.event.endDate ? getRelativeString(props.event.startDate, props.event.endDate, "compact") : null) function handleJumpToDate(date: RPGDate) { diff --git a/components/calendar/CalendarMenuSubnav.vue b/components/calendar/CalendarMenuSubnav.vue index 37137f6..172de20 100644 --- a/components/calendar/CalendarMenuSubnav.vue +++ b/components/calendar/CalendarMenuSubnav.vue @@ -87,7 +87,9 @@ function handleGotoPreviousEventPage(position: "next" | "prev" = "next") { -

Précédente page à évènements

+

+ {{ $t('entity.calendar.event.prevPage') }} +

@@ -106,7 +108,9 @@ function handleGotoPreviousEventPage(position: "next" | "prev" = "next") { -

Prochaine page à évènements

+

+ {{ $t('entity.calendar.event.nextPage') }} +

diff --git a/components/calendar/form/CreateEvent.vue b/components/calendar/form/CreateEvent.vue index 8bd3f67..3a63e4f 100644 --- a/components/calendar/form/CreateEvent.vue +++ b/components/calendar/form/CreateEvent.vue @@ -103,7 +103,7 @@ function handleCancel() { type="text" name="new-event-title" required - placeholder="Titre de l'évènement" + :placeholder="$t('entity.calendar.event.title')" class="w-full -my-1 py-1 -mx-1 px-1 text-lg border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600" > @@ -113,8 +113,7 @@ function handleCancel() { id="new-event-description" v-model="eventSkeleton.description" name="new-event-description" - placeholder="Ajouter une description" - class="w-full -my-1 py-1 -mx-1 px-1 min-h-24 max-h-36 text-sm border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600" + :placeholder="$t('entity.addDescription')" class="w-full -my-1 py-1 -mx-1 px-1 min-h-24 max-h-36 text-sm border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600" /> @@ -124,7 +123,7 @@ function handleCancel() { @@ -133,7 +132,7 @@ function handleCancel() { @@ -143,7 +142,7 @@ function handleCancel() {
- +
@@ -151,7 +150,7 @@ function handleCancel() {
- +
--> @@ -164,7 +163,7 @@ function handleCancel() { v-model="eventSkeleton.location" type="text" name="new-event-location" - placeholder="Ajouter un endroit" + :placeholder="$t('entity.calendar.event.addLocation')" class="w-full -my-1 py-2 px-2 text-sm border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600"> @@ -178,10 +177,10 @@ function handleCancel() { @@ -197,7 +196,7 @@ function handleCancel() {
- Annuler + {{ $t('ui.action.cancel') }} @@ -206,7 +205,7 @@ function handleCancel() { - Sauvegarder + {{ $t('ui.action.save') }}
diff --git a/components/calendar/form/DeleteEvent.vue b/components/calendar/form/DeleteEvent.vue index 22fb55c..d513708 100644 --- a/components/calendar/form/DeleteEvent.vue +++ b/components/calendar/form/DeleteEvent.vue @@ -69,10 +69,10 @@ function handleCancel(): void { @interact-outside="handleClosing" @pointer-down-outside="handleClosing" > - Supprimer l'évènement + {{ $t('entity.calendar.event.deleteDialog.title') }} - Les données associés à cet évènement seront supprimées et vous ne pourrez plus les récupérer ! + {{ $t('entity.calendar.event.deleteDialog.subtitle') }}
@@ -86,13 +86,13 @@ function handleCancel(): void {
- Retour + {{ $t('ui.action.back') }}
- Annuler + {{ $t('ui.action.cancel') }} @@ -101,7 +101,7 @@ function handleCancel(): void { - Supprimer + {{ $t('ui.action.delete') }}
diff --git a/components/calendar/form/UpdateEvent.vue b/components/calendar/form/UpdateEvent.vue index 3e99007..a814efd 100644 --- a/components/calendar/form/UpdateEvent.vue +++ b/components/calendar/form/UpdateEvent.vue @@ -143,7 +143,7 @@ function handleCancel() {
- +
--> diff --git a/components/calendar/input/EventCategories.vue b/components/calendar/input/EventCategories.vue index 32cee2d..275c49a 100644 --- a/components/calendar/input/EventCategories.vue +++ b/components/calendar/input/EventCategories.vue @@ -60,8 +60,8 @@ const filteredCategories = computed(() => class="w-fit h-[33vh] p-0" > - - {{ $t('entity.noCategoriesFound') }} + + {{ $t('entity.category.notFoundAny') }} class="w-fit h-[33vh] p-0" > - - {{ $t('entity.noCategoriesFound') }} + + {{ $t('entity.category.notFoundAny') }} - + ({ title: "Title" }, entity: { - categoriesNameSingular: "Category", - categoriesNamePlural: "Categories", - searchCategories: "Search categories", - noCategoriesFound: "No categories found.", + category: { + nameSingular: "Category", + namePlural: "Categories", + search: "Search categories", + notFoundAny: "No categories found.", + addPrimary: "Add a primary category", + addSecondaries: "Add secondary categories" + }, addDescription: "Add a description", deleteOne: "Delete \"{entity}\"", advancedSearch: { @@ -93,6 +97,8 @@ export default defineI18nConfig(() => ({ isPublic: "Public event", hiddenTooltip: "This event is visible only to game masters.", addLocation: "Add a place", + prevPage: "Previous page with events", + nextPage: "Next page with events", editDialog: { title: "Edit event", subtitle: "Update event data", @@ -193,10 +199,14 @@ export default defineI18nConfig(() => ({ title: "Titre" }, entity: { - categoriesNameSingular: "Catégorie", - categoriesNamePlural: "Catégories", - searchCategories: "Rechercher les catégories", - noCategoriesFound: "Aucune catégorie trouvée.", + category: { + nameSingular: "Catégorie", + namePlural: "Catégories", + search: "Rechercher les catégories", + notFoundAny: "Aucune catégorie trouvée.", + addPrimary: "Ajouter une catégorie principale", + addSecondaries: "Ajouter des catégories secondaires" + }, addDescription: "Ajouter une description", deleteOne: "Supprimer \"{entity}\"", advancedSearch: { @@ -253,6 +263,8 @@ export default defineI18nConfig(() => ({ isPublic: "Évènement public", hiddenTooltip: "Cet évènement est uniquement visible pour les maîtres du jeu.", addLocation: "Ajouter un endroit", + prevPage: "Précédente page à évènements", + nextPage: "Prochaine page à évènements", editDialog: { title: "Modifier l'évènement", subtitle: "Mettre à jour les données de l'évènement",