Localize custom pages and search page (#299)

* Localize custom pages and search page

* Fix FR translation for step
This commit is contained in:
sephrat 2021-04-14 18:06:54 +02:00 committed by GitHub
parent 2e339ee996
commit 4b09497c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 23 deletions

View File

@ -17,7 +17,7 @@
<v-text-field
autofocus
v-model="page.name"
label="Page Name"
:label="$t('settings.page-name')"
></v-text-field>
<CategoryTagSelector
v-model="page.categories"

View File

@ -3,10 +3,10 @@
<CreatePageDialog ref="createDialog" @refresh-page="getPages" />
<v-card-text>
<h2 class="mt-1 mb-1 ">
Custom Pages
{{$t('settings.custom-pages')}}
<span>
<v-btn color="success" @click="newPage" small class="ml-3">
Create
{{$t('general.create')}}
</v-btn>
</span>
</h2>
@ -41,11 +41,11 @@
<v-card-actions>
<v-btn text small color="error" @click="deletePage(item.id)">
Delete
{{$t('general.delete')}}
</v-btn>
<v-spacer> </v-spacer>
<v-btn small text color="success" @click="editPage(index)">
Edit
{{$t('general.edit')}}
</v-btn>
</v-card-actions>
</v-card>
@ -55,7 +55,7 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="success" @click="savePages">
Save
{{$t('general.save')}}
</v-btn>
</v-card-actions>
</v-card>
@ -76,8 +76,8 @@ export default {
customPages: [],
newPageData: {
create: true,
title: "New Page",
buttonText: "Create",
title: this.$t('settings.new-page'),
buttonText: this.$t('general.create'),
data: {
name: "",
categories: [],
@ -86,8 +86,8 @@ export default {
},
editPageData: {
create: false,
title: "Edit Page",
buttonText: "Update",
title: this.$t('settings.edit-page'),
buttonText: this.$t('general.update'),
data: {},
},
};

View File

@ -90,7 +90,7 @@ export default {
computed: {
inputLabel() {
if (!this.showLabel) return null;
return this.tagSelector ? "Tags" : "Categories";
return this.tagSelector ? this.$t('recipe.tags') : this.$t('recipe.categories');
},
activeItems() {
let ItemObjects = [];

View File

@ -147,6 +147,14 @@
},
"search": {
"search-mealie": "Search Mealie",
"search-placeholder": "Search...",
"max-results": "Max Results",
"category-filter": "Category Filter",
"tag-filter": "Tag Filter",
"include": "Include",
"exclude": "Exclude",
"and": "And",
"or": "Or",
"search": "Search"
},
"settings": {
@ -217,7 +225,11 @@
"site-settings": "Site Settings",
"manage-users": "Manage Users",
"migrations": "Migrations",
"profile": "Profile"
"profile": "Profile",
"custom-pages": "Custom Pages",
"new-page": "New Page",
"edit-page": "Edit Page",
"page-name": "Page Name"
},
"migration": {
"recipe-migration": "Recipe Migration",

View File

@ -47,6 +47,8 @@
"field-required": "Champ obligatoire",
"apply": "Appliquer",
"current-parenthesis": "(Actuel)",
"groups": "Groupes",
"users": "Utilisateurs",
"about": "À propos"
},
"page": {
@ -121,7 +123,7 @@
"categories": "Catégories",
"tags": "Tags",
"instructions": "Instructions",
"step-index": "Etape: {step}",
"step-index": "Étape : {step}",
"recipe-name": "Nom de la recette",
"servings": "Portions",
"ingredient": "Ingrédient",
@ -145,6 +147,14 @@
},
"search": {
"search-mealie": "Rechercher dans Mealie",
"search-placeholder": "Rechercher...",
"and": "Et",
"category-filter": "Filtre par catégories",
"exclude": "Exclure",
"include": "Inclure",
"max-results": "Résultats max",
"or": "Ou",
"tag-filter": "Filtre par tags",
"search": "Rechercher"
},
"settings": {
@ -187,7 +197,7 @@
},
"webhooks": {
"meal-planner-webhooks": "Webhooks du planificateur de repas",
"the-urls-listed-below-will-recieve-webhooks-containing-the-recipe-data-for-the-meal-plan-on-its-scheduled-day-currently-webhooks-will-execute-at": "Les liens dans cette liste recevront les webhooks contenant les recettes pour le plan de menu du jour défini. Actuellement, les webhooks s'executeront à <strong>{ time }</strong>",
"the-urls-listed-below-will-recieve-webhooks-containing-the-recipe-data-for-the-meal-plan-on-its-scheduled-day-currently-webhooks-will-execute-at": "Les liens dans cette liste recevront les webhooks contenant les recettes pour le plan de menu du jour défini. Actuellement, les webhooks s'exécuteront à",
"test-webhooks": "Tester les webhooks",
"webhook-url": "Lien du webhook"
},
@ -215,7 +225,11 @@
"manage-users": "Utilisateurs",
"migrations": "Migrations",
"profile": "Profil",
"site-settings": "Paramètres site"
"site-settings": "Paramètres site",
"custom-pages": "Pages personnalisées",
"edit-page": "Modifier la page",
"new-page": "Nouvelle page",
"page-name": "Nom de la page"
},
"migration": {
"recipe-migration": "Migrer les recettes",

View File

@ -10,11 +10,11 @@
mandatory
>
<v-btn :value="false">
Include
{{$t('search.include')}}
</v-btn>
<v-btn :value="true">
Exclude
{{$t('search.exclude')}}
</v-btn>
</v-btn-toggle>
<v-spacer></v-spacer>
@ -28,10 +28,10 @@
mandatory
>
<v-btn :value="false">
And
{{$t('search.and')}}
</v-btn>
<v-btn :value="true">
Or
{{$t('search.or')}}
</v-btn>
</v-btn-toggle>
</v-toolbar>

View File

@ -8,7 +8,7 @@
v-model="searchString"
outlined
color="primary accent-3"
placeholder="Placeholder"
:placeholder="$t('search.search-placeholder')"
append-icon="mdi-magnify"
>
</v-text-field>
@ -16,7 +16,7 @@
<v-col cols="12" md="2" sm="12">
<v-text-field
class="mt-0 pt-0"
label="Max Results"
:label="$t('search.max-results')"
v-model="maxResults"
type="number"
outlined
@ -26,7 +26,7 @@
<v-row dense class="mt-0 flex-row align-center justify-space-around">
<v-col>
<h3 class="pl-2 text-center headline">Category Filter</h3>
<h3 class="pl-2 text-center headline">{{$t('search.category-filter')}}</h3>
<FilterSelector class="mb-1" @update="updateCatParams" />
<CategoryTagSelector
:solo="true"
@ -36,7 +36,7 @@
/>
</v-col>
<v-col>
<h3 class="pl-2 text-center headline">Tag Filter</h3>
<h3 class="pl-2 text-center headline">{{$t('search.tag-filter')}}</h3>
<FilterSelector class="mb-1" @update="updateTagParams" />
<CategoryTagSelector