Is hutopy finally trilangual

This commit is contained in:
2025-04-19 01:56:59 -04:00
parent af71c5e952
commit b1681252cc
140 changed files with 5441 additions and 1085 deletions

View File

@@ -9,7 +9,7 @@
class="primary"
@click="isEditMode ? saveChanges() : toggleEditMode()"
>
{{ isEditMode ? t('save') : t('edit') }}
{{ isEditMode ? t('common.save') : t('common.edit') }}
</button>
<button
@@ -17,14 +17,14 @@
class="secondary"
@click="cancelEdit"
>
{{ t('cancel') }}
{{ t('common.cancel') }}
</button>
</div>
<!-- MainPage -->
<div class="flex flex-col mt-4">
<h1 class="flex justify-start text-2xl font-bold text-center mb-4">{{ t('sections.about.title') }}</h1>
<h1 class="flex justify-start text-2xl font-bold text-center mb-4">{{ t('creator.sections.about.title') }}</h1>
<div>
<!-- Main image Bloc D'information-->
@@ -35,7 +35,7 @@
{{ mainImageText }}
</p>
</div>
<v-textarea v-if="isEditMode" v-model="editableMainImageText" class="w-full p-2 py-6 " :label="t('sections.about.description')"
<v-textarea v-if="isEditMode" v-model="editableMainImageText" class="w-full p-2 py-6 " :label="t('creator.sections.about.description')"
variant="outlined"></v-textarea>
<div class="flex flex-row items-center space-x-4">
@@ -44,26 +44,26 @@
<img
v-if="mainImageUrl"
:src="mainImageUrl"
:alt="t('sections.about.mainImage')"
:alt="t('creator.sections.about.mainImage')"
class="max-w-full h-auto cursor-pointer"/>
</div>
<div v-if="isEditMode" class="relative flex justify-center">
<label>
<input class="hidden" type="file" @change="updateImage('mainImageUrl', $event)"/>
<img :src="mainImageUrl || fallbackImage"
:alt="t('sections.about.mainImage')"
:alt="t('creator.sections.about.mainImage')"
class=" max-w-full h-auto cursor-pointer max-h-96"/>
</label>
<button v-if="isEditMode"
class="absolute top-10 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600"
@click="deleteImage('mainImageUrl')">
{{ t('delete') }}
{{ t('common.delete') }}
</button>
</div>
<div class="w-1/2 flex flex-col justify-center">
<h2 v-if="videoSubtitleMain" class="text-xl font-semibold text-center">
{{ t('sections.support.title') }}
{{ t('creator.sections.support.title') }}
</h2>
<div v-if="!isEditMode">
@@ -76,7 +76,7 @@
<v-textarea
v-model="editableMainVideoText"
class="p-2 rounded-md mt-4"
:label="t('sections.support.description')"
:label="t('creator.sections.support.description')"
rows="10"
variant="outlined"
></v-textarea>
@@ -92,7 +92,7 @@
<v-text-field
v-model="editableVideoSubtitle"
class="w-full p-2"
:label="t('sections.support.subtitle')"
:label="t('creator.sections.support.subtitle')"
variant="outlined"
></v-text-field>
</div>
@@ -100,7 +100,7 @@
<v-textarea v-if="isEditMode"
v-model="editableVideoText"
class="w-full p-2"
:label="t('sections.support.description')"
:label="t('creator.sections.support.description')"
variant="outlined"
></v-textarea>
</div>
@@ -123,7 +123,7 @@
<v-text-field
v-model="editableVideoUrlMain"
class="w-full p-2 rounded-md"
:label="t('fields.videoUrl')"
:label="t('creator.fields.videoUrl')"
type="text"
variant="outlined"
/>
@@ -141,28 +141,28 @@
<!-- Première image -->
<div v-if="image1Url" class="relative w-full sm:flex-1 ">
<img :src="image1Url"
alt="Image 1"
:alt="t('creator.sections.about.image1')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</div>
<!-- Deuxième image -->
<div v-if="image2Url" class="relative w-full sm:flex-1 ">
<img :src="image2Url"
alt="Image 2"
:alt="t('creator.sections.about.image2')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</div>
<!-- Troisième image -->
<div v-if="image3Url" class="relative w-full sm:flex-1 ">
<img :src="image3Url"
alt="Image 3"
:alt="t('creator.sections.about.image3')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</div>
<!-- Quatrième image -->
<div v-if="image4Url" class="relative w-full sm:flex-1 ">
<img :src="image4Url"
alt="Image 4"
:alt="t('creator.sections.about.image4')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</div>
</div>
@@ -173,19 +173,19 @@
<div v-if="isEditMode" class="rounded-2xl">
<!--images-->
<div class=" text-2xl pa-2">Images</div>
<div class=" text-2xl pa-2">{{ t('creator.sections.about.images') }}</div>
<div class="pa-2 grid grid-cols-1 gap-4 md:grid-cols-4">
<!-- Première image -->
<div class="relative">
<label>
<input class="hidden" type="file" @change="updateImage('image1Url', $event)"/>
<img :src="image1Url || fallbackImage"
alt="Image 1"
:alt="t('creator.sections.about.image1')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</label>
<button class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600"
@click="deleteImage('image1Url')">
X
{{ t('common.delete') }}
</button>
</div>
@@ -194,12 +194,12 @@
<label>
<input class="hidden" type="file" @change="updateImage('image2Url', $event)"/>
<img :src="image2Url || fallbackImage"
alt="Image 2"
:alt="t('creator.sections.about.image2')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</label>
<button class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600"
@click="deleteImage('image2Url')">
X
{{ t('common.delete') }}
</button>
</div>
@@ -208,12 +208,12 @@
<label>
<input class="hidden" type="file" @change="updateImage('image3Url', $event)"/>
<img :src="image3Url || fallbackImage"
alt="Image 3"
:alt="t('creator.sections.about.image3')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</label>
<button class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600"
@click="deleteImage('image3Url')">
X
{{ t('common.delete') }}
</button>
</div>
@@ -222,18 +222,18 @@
<label>
<input class="hidden" type="file" @change="updateImage('image4Url', $event)"/>
<img :src="image4Url || fallbackImage"
alt="Image 4"
:alt="t('creator.sections.about.image4')"
class="rounded-md max-w-full h-auto cursor-pointer"/>
</label>
<button class="absolute top-2 right-2 px-2 py-1 bg-red-500 text-white hover:bg-red-600"
@click="deleteImage('image4Url')">
X
{{ t('common.delete') }}
</button>
</div>
</div>
<!-- Description-->
<div class="text-2xl pa-2"> Description</div>
<div class="text-2xl pa-2">{{ t('creator.sections.about.description') }}</div>
</div>
<!--Edit-->
@@ -241,14 +241,14 @@
<v-text-field
v-model="editablePhoneNumber"
class="w-full p-2"
:label="t('fields.phoneNumber')"
:label="t('creator.fields.phoneNumber')"
variant="outlined"
></v-text-field>
<v-text-field
v-model="editableEmail"
class="w-full p-2"
:label="t('fields.email')"
:label="t('creator.fields.email')"
variant="outlined"
></v-text-field>
</div>
@@ -284,12 +284,12 @@ import {useClient} from "@/plugins/api.js";
import {useBrandingStore} from "@/stores/brandingStore.js";
import {useCreatorProfileStore} from "@/stores/creatorProfileStore.js";
import {useAuthStore} from "@/stores/authStore.js";
import {useTranslations} from '@/translations/translations'
import {useI18n} from 'vue-i18n';
const { t } = useI18n();
const authStore = useAuthStore();
const creatorProfileStore = useCreatorProfileStore();
const brandingStore = useBrandingStore();
const authStore = useAuthStore();
const t = useTranslations();
const client = useClient();
const isLoading = ref(true);
@@ -525,4 +525,105 @@ function cancelEdit() {
border: 0;
border-radius: 0.5rem; /* Pour les bords arrondis */
}
</style>
</style>
<i18n>
{
"en": {
"common": {
"save": "Save",
"edit": "Edit",
"cancel": "Cancel",
"delete": "Delete"
},
"creator": {
"sections": {
"about": {
"title": "About",
"description": "Description",
"mainImage": "Main image",
"image1": "Image 1",
"image2": "Image 2",
"image3": "Image 3",
"image4": "Image 4",
"images": "Images"
},
"support": {
"title": "Support",
"description": "Description",
"subtitle": "Subtitle"
}
},
"fields": {
"videoUrl": "Video URL",
"phoneNumber": "Phone Number",
"email": "Email"
}
}
},
"fr": {
"common": {
"save": "Enregistrer",
"edit": "Modifier",
"cancel": "Annuler",
"delete": "Supprimer"
},
"creator": {
"sections": {
"about": {
"title": "À propos",
"description": "Description",
"mainImage": "Image principale",
"image1": "Image 1",
"image2": "Image 2",
"image3": "Image 3",
"image4": "Image 4",
"images": "Images"
},
"support": {
"title": "Support",
"description": "Description",
"subtitle": "Sous-titre"
}
},
"fields": {
"videoUrl": "URL de la vidéo",
"phoneNumber": "Numéro de téléphone",
"email": "Email"
}
}
},
"es": {
"common": {
"save": "Guardar",
"edit": "Editar",
"cancel": "Cancelar",
"delete": "Eliminar"
},
"creator": {
"sections": {
"about": {
"title": "Acerca de",
"description": "Descripción",
"mainImage": "Imagen principal",
"image1": "Imagen 1",
"image2": "Imagen 2",
"image3": "Imagen 3",
"image4": "Imagen 4",
"images": "Imágenes"
},
"support": {
"title": "Soporte",
"description": "Descripción",
"subtitle": "Subtítulo"
}
},
"fields": {
"videoUrl": "URL del video",
"phoneNumber": "Número de teléfono",
"email": "Correo electrónico"
}
}
}
}
</i18n>