Added last translations for event forms / data

This commit is contained in:
Alexis
2024-09-08 15:30:10 +02:00
parent 11d900e7f7
commit 63c1cef77e
9 changed files with 49 additions and 34 deletions

View File

@@ -29,7 +29,7 @@ const eventDetails = ref<HTMLElement>()
const emit = defineEmits(["query:close-popover"])
const dateDifference: string = getRelativeString(defaultDate, props.event.startDate)
const dateDifference = computed<string>(() => getRelativeString(defaultDate, props.event.startDate))
const dateDuration = computed<string | null>(() => props.event.endDate ? getRelativeString(props.event.startDate, props.event.endDate, "compact") : null)
function handleJumpToDate(date: RPGDate) {

View File

@@ -87,7 +87,9 @@ function handleGotoPreviousEventPage(position: "next" | "prev" = "next") {
</UiButton>
</UiTooltipTrigger>
<UiTooltipContent>
<p>Précédente page à évènements</p>
<p>
{{ $t('entity.calendar.event.prevPage') }}
</p>
</UiTooltipContent>
</UiTooltip>
</UiTooltipProvider>
@@ -106,7 +108,9 @@ function handleGotoPreviousEventPage(position: "next" | "prev" = "next") {
</UiButton>
</UiTooltipTrigger>
<UiTooltipContent>
<p>Prochaine page à évènements</p>
<p>
{{ $t('entity.calendar.event.nextPage') }}
</p>
</UiTooltipContent>
</UiTooltip>
</UiTooltipProvider>

View File

@@ -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"
>
</div>
@@ -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"
/>
</div>
@@ -124,7 +123,7 @@ function handleCancel() {
<CalendarInputRPGDate
v-model:model-value="eventSkeleton.startDate"
placeholder="Date de début"
:placeholder="$t('entity.calendar.date.start')"
:initial-date="props.date"
:required="true"
/>
@@ -133,7 +132,7 @@ function handleCancel() {
<CalendarInputRPGDate
v-model:model-value="eventSkeleton.endDate"
placeholder="Date de fin"
:placeholder="$t('entity.calendar.date.end')"
:initial-date="props.date"
/>
</div>
@@ -143,7 +142,7 @@ function handleCancel() {
<div class="flex items-center gap-4">
<PhTag size="18" weight="fill" />
<CalendarInputEventCategory v-model="eventSkeleton.category" placeholder="Ajouter une catégorie principale" />
<CalendarInputEventCategory v-model="eventSkeleton.category" :placeholder="$t('entity.category.addPrimary')" />
</div>
</div>
@@ -151,7 +150,7 @@ function handleCancel() {
<div class="flex items-center gap-4">
<PhTag size="18" weight="fill" />
<CalendarInputEventCategories v-model="eventSkeleton.secondaryCategories" placeholder="Ajouter des catégories secondaires" />
<CalendarInputEventCategories v-model="eventSkeleton.secondaryCategories" :placeholder="$t('entity.category.addSecondaries')" />
</div>
</div> -->
@@ -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">
</div>
</div>
@@ -178,10 +177,10 @@ function handleCancel() {
<UiSwitch id="new-event-visibility" v-model:checked="eventSkeleton.hidden" />
<UiLabel for="new-event-visibility">
<template v-if="!eventSkeleton.hidden">
Évènement visible
{{ $t('entity.calendar.event.isPublic') }}
</template>
<template v-else>
Évènement caché
{{ $t('entity.calendar.event.isHidden') }}
</template>
</UiLabel>
</div>
@@ -197,7 +196,7 @@ function handleCancel() {
<div class="flex gap-2 justify-end">
<Transition name="fade-delay">
<UiButton v-if="isLoading" type="button" size="sm" variant="destructive" @click.prevent="handleCancel">
Annuler
{{ $t('ui.action.cancel') }}
</UiButton>
</Transition>
@@ -206,7 +205,7 @@ function handleCancel() {
<PhCircleNotch v-if="isLoading" size="20" class="opacity-50 animate-spin"/>
</Transition>
Sauvegarder
{{ $t('ui.action.save') }}
</UiButton>
</div>
</div>

View File

@@ -69,10 +69,10 @@ function handleCancel(): void {
@interact-outside="handleClosing"
@pointer-down-outside="handleClosing"
>
<UiAlertDialogTitle> Supprimer l'évènement</UiAlertDialogTitle>
<UiAlertDialogTitle>{{ $t('entity.calendar.event.deleteDialog.title') }}</UiAlertDialogTitle>
<UiAlertDialogDescription>
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') }}
</UiAlertDialogDescription>
<form @submit.prevent="handleAction">
@@ -86,13 +86,13 @@ function handleCancel(): void {
<footer class="flex gap-2 justify-between">
<UiButton type="button" size="sm" variant="outline" @click="() => isDeleteEventModalOpen = false">
Retour
{{ $t('ui.action.back') }}
</UiButton>
<div class="flex gap-2 justify-end">
<Transition name="fade-delay">
<UiButton v-if="isLoading" type="button" size="sm" variant="destructive" @click.prevent="handleCancel">
Annuler
{{ $t('ui.action.cancel') }}
</UiButton>
</Transition>
@@ -101,7 +101,7 @@ function handleCancel(): void {
<PhCircleNotch v-if="isLoading" size="20" class="animate-spin"/>
</Transition>
Supprimer
{{ $t('ui.action.delete') }}
</UiButton>
</div>
</footer>

View File

@@ -143,7 +143,7 @@ function handleCancel() {
<PhTag size="18" weight="fill" />
<div class="w-1/2">
<CalendarInputEventCategories v-model="eventSkeleton.secondaryCategories" placeholder="Ajouter des catégories secondaires" />
<CalendarInputEventCategories v-model="eventSkeleton.secondaryCategories" :placeholder="Ajouter des catégories secondaires" />
</div>
</div>
</div> -->

View File

@@ -60,8 +60,8 @@ const filteredCategories = computed(() =>
class="w-fit h-[33vh] p-0"
>
<UiCommand v-model="modelBuffer" v-model:searchTerm="searchTerm" :multiple="true">
<UiCommandInput :placeholder="$t('entity.searchCategories')" />
<UiCommandEmpty>{{ $t('entity.noCategoriesFound') }}</UiCommandEmpty>
<UiCommandInput :placeholder="$t('entity.category.search')" />
<UiCommandEmpty>{{ $t('entity.category.notFoundAny') }}</UiCommandEmpty>
<UiCommandList>
<UiCommandGroup>
<UiCommandItem

View File

@@ -52,8 +52,8 @@ const filteredCategories = computed(() =>
class="w-fit h-[33vh] p-0"
>
<UiCommand v-model="model" v-model:searchTerm="searchTerm">
<UiCommandInput :placeholder="$t('entity.searchCategories')" />
<UiCommandEmpty>{{ $t('entity.noCategoriesFound') }}</UiCommandEmpty>
<UiCommandInput :placeholder="$t('entity.category.search')" />
<UiCommandEmpty>{{ $t('entity.category.notFoundAny') }}</UiCommandEmpty>
<UiCommandList>
<UiCommandGroup>
<UiCommandItem

View File

@@ -298,7 +298,7 @@ function handleCategorySelect(e: (Category)) {
class="w-full"
>
<ComboboxAnchor as-child>
<ComboboxInput :placeholder="$t('entity.categoriesNamePlural')" as-child>
<ComboboxInput :placeholder="$t('entity.category.namePlural')" as-child>
<UiTagsInputInput
class="w-full px-3"
:class="selectedCategories.length > 0 ? 'mt-2' : ''"