diff --git a/app.vue b/app.vue index 4d46a85..6557af5 100644 --- a/app.vue +++ b/app.vue @@ -5,14 +5,10 @@ useHead({ titleTemplate: (titleChunk) => { return titleChunk ? `${titleChunk} — TTTools` : "TTTools"; }, - htmlAttrs: { - lang: "fr" - }, meta: [ { name: "charset", content: "UTF-8" }, { name: "viewport", content: "width=device-width, initial-scale=1.0" }, { name: "author", content: "Alexis Pelé" }, - { name: "description", content: "Tools destined to players and game master, helping them visualize their worlds better." }, { name: "generator", content: "Nuxt" }, { name: "msapplication-TileColor", content: "00aba9" }, { name: "theme-color", content: "00aba9" }, diff --git a/components/calendar/CalendarEventDetails.vue b/components/calendar/CalendarEventDetails.vue index c09d045..eac1413 100644 --- a/components/calendar/CalendarEventDetails.vue +++ b/components/calendar/CalendarEventDetails.vue @@ -29,10 +29,8 @@ const eventDetails = ref() const emit = defineEmits(["query:close-popover"]) -const dateDifference: string = getRelativeString(defaultDate, props.event.startDate) -const dateDuration: string | null = props.event.endDate - ? getRelativeString(props.event.startDate, props.event.endDate, "compact") - : null +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) { jumpToDate(date) @@ -87,8 +85,14 @@ function deployDeleteModal() { @@ -105,7 +109,8 @@ function deployDeleteModal() {

@@ -146,8 +151,8 @@ function deployDeleteModal() { - Modifier - Supprimer + {{ $t('ui.action.edit') }} + {{ $t('ui.action.delete') }} @@ -162,7 +167,7 @@ function deployDeleteModal() { title="Naviguer au début" @click="handleJumpToDate(event.startDate!)" > - Début + {{ $t('entity.calendar.event.isStart') }} @@ -171,7 +176,7 @@ function deployDeleteModal() { title="Naviguer à la fin" @click="handleJumpToDate(event.endDate!)" > - Fin + {{ $t('entity.calendar.event.isEnd') }} @@ -180,11 +185,13 @@ function deployDeleteModal() { - Évènement privé + {{ $t('entity.calendar.event.isHidden') }} -

Cet évènement est uniquement visible pour vous

+

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

diff --git a/components/calendar/CalendarMenu.vue b/components/calendar/CalendarMenu.vue index a606a76..ce2b3da 100644 --- a/components/calendar/CalendarMenu.vue +++ b/components/calendar/CalendarMenu.vue @@ -25,7 +25,7 @@ const { revealAdvancedSearch } = useCalendar()
  • - Recherche avancée + {{ $t('entity.advancedSearch.title') }}
  • diff --git a/components/calendar/CalendarMenuNav.vue b/components/calendar/CalendarMenuNav.vue index 45a8ac9..5e969e4 100644 --- a/components/calendar/CalendarMenuNav.vue +++ b/components/calendar/CalendarMenuNav.vue @@ -9,6 +9,8 @@ import { PhCaretRight } from "@phosphor-icons/vue" +const { t } = useI18n() + interface DirectionLabels { pastFar: string pastNear: string @@ -23,35 +25,35 @@ const activeDirectionLabels: ComputedRef = computed(() => { switch (currentConfig.viewType) { case "month": return { - pastFar: "Année précédente", - pastNear: "Mois précédent", - futureNear: "Mois suivant", - futureFar: "Année suivante" + pastFar: t("entity.calendar.years.prevSingular"), + pastNear: t("entity.calendar.months.prevSingular"), + futureNear: t("entity.calendar.months.nextSingular"), + futureFar: t("entity.calendar.years.nextSingular") } case "year": return { - pastFar: "Décennie précédente", - pastNear: "Année précédente", - futureNear: "Année suivante", - futureFar: "Décennie suivante" + pastFar: t("entity.calendar.decades.prevSingular"), + pastNear: t("entity.calendar.years.prevSingular"), + futureNear: t("entity.calendar.years.nextSingular"), + futureFar: t("entity.calendar.decades.nextSingular") } case "decade": return { - pastFar: "Siècle précédent", - pastNear: "Décennie précédente", - futureNear: "Décennie suivante", - futureFar: "Siècle suivant" + pastFar: t("entity.calendar.centuries.prevSingular"), + pastNear: t("entity.calendar.decades.prevSingular"), + futureNear: t("entity.calendar.decades.nextSingular"), + futureFar: t("entity.calendar.centuries.nextSingular") } case "century": default: return { - pastFar: "Millénaire précédent", - pastNear: "Siècle précédent", - futureNear: "Siècle suivant", - futureFar: "Millénaire suivant" + pastFar: t("entity.calendar.millenias.prevSingular"), + pastNear: t("entity.calendar.centuries.prevSingular"), + futureNear: t("entity.calendar.centuries.nextSingular"), + futureFar: t("entity.calendar.millenias.nextSingular") } } }) 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/CalendarMenuToday.vue b/components/calendar/CalendarMenuToday.vue index 855ef3b..b5a5d87 100644 --- a/components/calendar/CalendarMenuToday.vue +++ b/components/calendar/CalendarMenuToday.vue @@ -14,17 +14,9 @@ const isDefaultDate: ComputedRef = computed(() => areDatesIden - - - Aujourd'hui - - - - + + {{ $t('entity.calendar.date.today') }} +

    {{ defaultDateFormatted }}

    diff --git a/components/calendar/CalendarSwitch.vue b/components/calendar/CalendarSwitch.vue index 164153c..4937c81 100644 --- a/components/calendar/CalendarSwitch.vue +++ b/components/calendar/CalendarSwitch.vue @@ -18,7 +18,9 @@ const viewTypeTitle = computed(() => getViewTypeTitle(currentConfig.viewType)) - Mode d'affichage + + {{ $t('ui.displayMode') }} + {{ calendarSkeletonName }} - Nouveau calendrier + + {{ $t('entity.calendar.createDialog.title') }} + diff --git a/components/calendar/dialog/Delete.vue b/components/calendar/dialog/Delete.vue index 5d396d1..b964236 100644 --- a/components/calendar/dialog/Delete.vue +++ b/components/calendar/dialog/Delete.vue @@ -53,10 +53,12 @@ function handleClosing() { @interact-outside="handleClosing" @pointer-down-outside="handleClosing" > - Êtes-vous sûr de supprimer ce calendrier ? + + {{ $t('entity.calendar.deleteDialog.title') }} + - Les évènements ne seront plus accessibles et vous ne pourrez plus récupérer les données ! + {{ $t('entity.calendar.deleteDialog.subtitle') }}
    @@ -70,13 +72,13 @@ function handleClosing() {
    - Retour + {{ $t('ui.action.back') }}
    - Annuler + {{ $t('ui.action.cancel') }} @@ -85,7 +87,7 @@ function handleClosing() { - Supprimer "{{ calendar?.name }}" + {{ $t('entity.deleteOne', { entity: calendar?.name }) }}
    diff --git a/components/calendar/form/Create.vue b/components/calendar/form/Create.vue index f9fbb7d..f92b1d3 100644 --- a/components/calendar/form/Create.vue +++ b/components/calendar/form/Create.vue @@ -78,19 +78,22 @@ function handleFormCancel() {
    - Général + + {{ $t('entity.calendar.createDialog.tabs.general.title') }}
    - Mois de l'année + + {{ $t('entity.calendar.createDialog.tabs.months.title') }}
    - Aujourd'hui + + {{ $t('entity.calendar.createDialog.tabs.today.title') }}
    @@ -116,7 +119,7 @@ function handleFormCancel() {
    - Annuler + {{ $t('ui.action.cancel') }} @@ -124,7 +127,7 @@ function handleFormCancel() { - Créer + {{ $t('ui.action.save') }}
    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 732e9e9..a814efd 100644 --- a/components/calendar/form/UpdateEvent.vue +++ b/components/calendar/form/UpdateEvent.vue @@ -70,10 +70,12 @@ function handleCancel() { @pointer-down-outside="(e) => e.preventDefault()" >
    - Modifier l'évènement + + {{ $t('entity.calendar.event.editDialog.title') }} + - Mettre à jour les données de l'évènement + {{ $t('entity.calendar.event.editDialog.subtitle') }}
    @@ -89,7 +91,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" > @@ -100,7 +102,7 @@ function handleCancel() { id="new-event-description" v-model="eventSkeleton.description" name="new-event-description" - placeholder="Ajouter une description" + :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" /> @@ -111,7 +113,7 @@ function handleCancel() { @@ -120,7 +122,7 @@ function handleCancel() { @@ -141,7 +143,7 @@ function handleCancel() {
    - +
    --> @@ -155,7 +157,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"> @@ -169,10 +171,10 @@ function handleCancel() { @@ -189,7 +191,7 @@ function handleCancel() {
    - Annuler + {{ $t('ui.action.cancel') }} @@ -198,7 +200,7 @@ function handleCancel() { - Enregistrer + {{ $t('ui.action.save') }}
    diff --git a/components/calendar/input/EventCategories.vue b/components/calendar/input/EventCategories.vue index 60792e4..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" > - - Aucune catégorie trouvée. + + {{ $t('entity.category.notFoundAny') }} class="w-fit h-[33vh] p-0" > - - Aucune catégorie trouvée. + + {{ $t('entity.category.notFoundAny') }}
    - +
    - +
    @@ -78,7 +96,10 @@ useSortable(monthSortableList, model.value, { animation: 150, handle: ".handle"
    -
    +
    +