Add en/fr content

This commit is contained in:
PascalMarchesseault
2024-08-22 22:53:09 -04:00
parent 0712693ed6
commit d3f253f9ed
7 changed files with 58 additions and 22 deletions

View File

@@ -1,4 +1,8 @@
{
"general": {
"yes": "yes",
"no": "no"
},
"banner": {
"subscription": "Subscriptions"
},
@@ -32,5 +36,19 @@
"myprofile": "My profile",
"wallet": "Wallet",
"Signout": "Sign out"
},
"message": {
"edit" : "Edit",
"delete": "Delete",
"report": "Report",
"yourcomment": "Your comment..."
},
"contentCard": {
"commenttitle": "comments",
"edit" : "Edit",
"delete" : "delete",
"report" : "report",
"deletecontenttitle": "Delete this content?",
"deeletecontentwarning": "Are you sure you want to delete the content?"
}
}

View File

@@ -1,4 +1,8 @@
{
"general": {
"yes": "oui",
"no": "non"
},
"banner": {
"subscription": "Abonnés"
},
@@ -32,6 +36,19 @@
"myprofile": "Mon profil",
"wallet": "PorteFeuille",
"Signout": "se déconnecter"
},
"message": {
"edit" : "Modifier",
"delete": "Effacer",
"report": "Signaler",
"yourcomment": "Votre commentaire..."
},
"contentCard": {
"commenttitle": "commentaires",
"edit" : "Modifier",
"delete" : "Effacer",
"report" : "signaler",
"deletecontenttitle": " Supprimer ce contenu?",
"deeletecontentwarning": "Êtes-vous sûr de vouloir supprimer le contenu?"
}
}

View File

@@ -114,7 +114,7 @@
}">
<div class="flex items-center justify-between py-4 text-2xl font-bold border-b mb-2">
<div class="flex-1 text-center">
Supprimer ce contenu ?
{{$t('contentCard.deletecontenttitle')}}
</div>
<v-btn icon @click="openDeleteConfirmationModal = false" class="ml-auto mr-2" variant="text">

View File

@@ -26,13 +26,13 @@
</template>
<v-list>
<v-list-item v-if="creatorIsCurrentUser" @click="editContent">
<v-list-item-title>Modifier le contenu</v-list-item-title>
<v-list-item-title>{{$t('contentCard.edit')}}</v-list-item-title>
</v-list-item>
<v-list-item v-if="creatorIsCurrentUser" @click="openDeleteConfirmationDialog">
<v-list-item-title>Effacer le contenu</v-list-item-title>
<v-list-item-title>{{$t('contentCard.delete')}}</v-list-item-title>
</v-list-item>
<v-list-item @click="reportContent">
<v-list-item-title>Reporter le contenu</v-list-item-title>
<v-list-item-title>{{$t('contentCard.report')}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
@@ -89,7 +89,7 @@
</div>
<div :class="{'hidden': !messagesVisible}">
<h2 class="font-sans font-semibold mt-2">Commentaires</h2>
<h2 class="font-sans font-semibold mt-2">{{ $t('contentCard.commenttitle') }}</h2>
<message-list
:subject-id="props.content.id"
:messages="messages"
@@ -114,7 +114,7 @@
}">
<div class="flex items-center justify-between py-4 text-2xl font-bold border-b mb-2">
<div class="flex-1 text-center">
Supprimer ce contenu ?
{{$t('contentCard.deletecontenttitle')}}
</div>
<v-btn icon @click="openDeleteConfirmationModal = false" class="ml-auto mr-2" variant="text">
@@ -124,17 +124,17 @@
</div>
<div class=" mr-2">
Êtes-vous sûr de vouloir supprimer le contenu ?
{{$t('contentCard.deeletecontentwarning')}}
</div>
<div class="py-2 space-x-3">
<v-btn variant="flat"
@click="deleteContent()" class=" mt-5">
Oui
{{$t('general.yes')}}
</v-btn>
<v-btn variant="outlined"
@click="openDeleteConfirmationModal = false" class=" mt-5">
Non
{{$t('general.no')}}
</v-btn>
</div>
</v-card>

View File

@@ -26,13 +26,13 @@
</template>
<v-list>
<v-list-item v-if="creatorIsCurrentUser" @click="editContent">
<v-list-item-title>Modifier le contenu</v-list-item-title>
<v-list-item-title>{{ $t('contentCard.edit') }}</v-list-item-title>
</v-list-item>
<v-list-item v-if="creatorIsCurrentUser" @click="openDeleteConfirmationDialog">
<v-list-item-title>Effacer le contenu</v-list-item-title>
<v-list-item-title>{{ $t('contentCard.delete') }}</v-list-item-title>
</v-list-item>
<v-list-item @click="reportContent">
<v-list-item-title>Reporter le contenu</v-list-item-title>
<v-list-item-title>{{ $t('contentCard.report') }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
@@ -89,7 +89,7 @@
</div>
<div :class="{'hidden': !messagesVisible}">
<h2 class="font-sans font-semibold ">Commentaires</h2>
<h2 class="font-sans font-semibold ">{{ $t('contentCard.commenttitle') }}</h2>
<message-list
:subject-id="props.content.id"
:messages="messages"
@@ -114,7 +114,7 @@
}">
<div class="flex items-center justify-between py-4 text-2xl font-bold border-b mb-2">
<div class="flex-1 text-center">
Supprimer ce contenu ?
{{$t('contentCard.deletecontenttitle')}}
</div>
<v-btn icon @click="openDeleteConfirmationModal = false" class="ml-auto mr-2" variant="text">
@@ -124,17 +124,17 @@
</div>
<div class=" mr-2">
Êtes-vous sûr de vouloir supprimer le contenu ?
{{$t('contentCard.deeletecontentwarning')}}
</div>
<div class="py-2 space-x-3">
<v-btn variant="flat"
@click="deleteContent()" class=" mt-5">
Oui
{{$t('general.yes')}}
</v-btn>
<v-btn variant="outlined"
@click="openDeleteConfirmationModal = false" class=" mt-5">
Non
{{$t('general.no')}}
</v-btn>
</div>
</v-card>

View File

@@ -35,13 +35,13 @@
</template>
<v-list>
<v-list-item @click="editMessage(message)">
<v-list-item-title>Edit</v-list-item-title>
<v-list-item-title>{{ $t('message.edit') }}</v-list-item-title>
</v-list-item>
<v-list-item @click="deleteMessage(message)">
<v-list-item-title>Delete</v-list-item-title>
<v-list-item-title>{{ $t('message.delete') }}</v-list-item-title>
</v-list-item>
<v-list-item @click="reportMessage(message)">
<v-list-item-title>Report</v-list-item-title>
<v-list-item-title>{{ $t('message.report') }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>

View File

@@ -8,7 +8,7 @@
v-model="value"
density="compact"
variant="underlined"
placeholder="Votre commentaire..."
:placeholder="$t('message.yourcomment')"
hide-details
auto-grow
rows="1"
@@ -72,6 +72,7 @@ const props = defineProps({
const emits = defineEmits(['message-posted'])
const loginModal = ref(false);
const client = useClient()
const value = ref("")