From 47723673d0c88d6e22a6ec3802959c6df547757f Mon Sep 17 00:00:00 2001 From: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Mon, 28 Feb 2022 20:28:41 +0100 Subject: [PATCH] Multiselect controls are now fully localized in RecipeEditView --- .../apps/RecipeEditView/RecipeEditView.vue | 40 +++++++++++++------ vue/src/locales/de.json | 11 ++++- vue/src/locales/en.json | 11 ++++- 3 files changed, 48 insertions(+), 14 deletions(-) diff --git a/vue/src/apps/RecipeEditView/RecipeEditView.vue b/vue/src/apps/RecipeEditView/RecipeEditView.vue index e1dca9e59..3c5c0f310 100644 --- a/vue/src/apps/RecipeEditView/RecipeEditView.vue +++ b/vue/src/apps/RecipeEditView/RecipeEditView.vue @@ -65,8 +65,11 @@ :preserve-search="true" :internal-search="false" :limit="options_limit" - placeholder="Select Keyword" - tag-placeholder="Add Keyword" + :placeholder="$t('select_keyword')" + :tag-placeholder="$t('add_keyword')" + :select-label="$t('Select')" + :selected-label="$t('Selected')" + :deselect-label="$t('remove_selection')" :taggable="true" @tag="addKeyword" label="label" @@ -76,6 +79,7 @@ :loading="keywords_loading" @search-change="searchKeywords" > + @@ -244,8 +248,10 @@ :clear-on-select="true" :allow-empty="true" :preserve-search="true" - placeholder="Select File" - select-label="Select" + :placeholder="$t('select_file')" + :select-label="$t('Select')" + :selected-label="$t('Selected')" + :deselect-label="$t('remove_selection')" :id="'id_step_' + step.id + '_file'" label="name" track-by="name" @@ -254,6 +260,7 @@ style="flex-grow: 1; flex-shrink: 1; flex-basis: 0" @search-change="searchFiles" > + + @@ -338,9 +348,11 @@ :preserve-search="true" :internal-search="false" :limit="options_limit" - placeholder="Select Unit" - tag-placeholder="Create" - select-label="Select" + :placeholder="$t('select_unit')" + :tag-placeholder="$t('Create')" + :select-label="$t('Select')" + :selected-label="$t('Selected')" + :deselect-label="$t('remove_selection')" :taggable="true" @tag="addUnitType" :id="`unit_${step_index}_${index}`" @@ -350,6 +362,7 @@ :loading="units_loading" @search-change="searchUnits" > +
@@ -365,9 +378,11 @@ :preserve-search="true" :internal-search="false" :limit="options_limit" - placeholder="Select Food" - tag-placeholder="Create" - select-label="Select" + :placeholder="$t('select_food')" + :tag-placeholder="$t('Create')" + :select-label="$t('Select')" + :selected-label="$t('Selected')" + :deselect-label="$t('remove_selection')" :taggable="true" @tag="addFoodType" :id="`ingredient_${step_index}_${index}`" @@ -377,6 +392,7 @@ :loading="foods_loading" @search-change="searchFoods" > +
diff --git a/vue/src/locales/de.json b/vue/src/locales/de.json index 5f27dab5d..12f8cf8c1 100644 --- a/vue/src/locales/de.json +++ b/vue/src/locales/de.json @@ -335,5 +335,14 @@ "sort_by": "Sortiere nach", "Random Recipes": "Zufällige Rezepte", "recipe_filter": "Rezept-Filter", - "parameter_count": "Parameter {count}" + "parameter_count": "Parameter {count}", + "select_keyword": "Stichwort auswählen", + "add_keyword": "Stichwort hinzufügen", + "select_file": "Datei auswählen", + "select_recipe": "Rezept auswählen", + "select_unit": "Einheit wählen", + "select_food": "Zutat auswählen", + "remove_selection": "Abwählen", + "empty_list": "Liste ist leer.", + "Select": "Auswählen" } diff --git a/vue/src/locales/en.json b/vue/src/locales/en.json index e622f0a9d..41f51305c 100644 --- a/vue/src/locales/en.json +++ b/vue/src/locales/en.json @@ -361,5 +361,14 @@ "Internal": "Internal", "Units": "Units", "Random Recipes": "Random Recipes", - "parameter_count": "Parameter {count}" + "parameter_count": "Parameter {count}", + "select_keyword": "Select Keyword", + "add_keyword": "Add Keyword", + "select_file": "Select File", + "select_recipe": "Select Recipe", + "select_unit": "Select Unit", + "select_food": "Select Food", + "remove_selection": "Deselect", + "empty_list": "List is empty.", + "Select": "Select" }