Merge pull request #1597 from MaxJa4/improvement/multiselect_localization

Multiselect controls are now fully localized in RecipeEditView
This commit is contained in:
vabene1111 2022-03-01 15:55:35 +01:00 committed by GitHub
commit c5df241ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 12 deletions

View File

@ -65,8 +65,11 @@
:preserve-search="true" :preserve-search="true"
:internal-search="false" :internal-search="false"
:limit="options_limit" :limit="options_limit"
placeholder="Select Keyword" :placeholder="$t('select_keyword')"
tag-placeholder="Add Keyword" :tag-placeholder="$t('add_keyword')"
:select-label="$t('Select')"
:selected-label="$t('Selected')"
:deselect-label="$t('remove_selection')"
:taggable="true" :taggable="true"
@tag="addKeyword" @tag="addKeyword"
label="label" label="label"
@ -76,6 +79,7 @@
:loading="keywords_loading" :loading="keywords_loading"
@search-change="searchKeywords" @search-change="searchKeywords"
> >
<template v-slot:noOptions>{{ $t("empty_list") }}</template>
</multiselect> </multiselect>
</div> </div>
</div> </div>
@ -244,8 +248,10 @@
:clear-on-select="true" :clear-on-select="true"
:allow-empty="true" :allow-empty="true"
:preserve-search="true" :preserve-search="true"
placeholder="Select File" :placeholder="$t('select_file')"
select-label="Select" :select-label="$t('Select')"
:selected-label="$t('Selected')"
:deselect-label="$t('remove_selection')"
:id="'id_step_' + step.id + '_file'" :id="'id_step_' + step.id + '_file'"
label="name" label="name"
track-by="name" track-by="name"
@ -254,6 +260,7 @@
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0" style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
@search-change="searchFiles" @search-change="searchFiles"
> >
<template v-slot:noOptions>{{ $t("empty_list") }}</template>
</multiselect> </multiselect>
<b-input-group-append> <b-input-group-append>
<b-button <b-button
@ -283,14 +290,17 @@
:preserve-search="true" :preserve-search="true"
:internal-search="false" :internal-search="false"
:limit="options_limit" :limit="options_limit"
placeholder="Select Recipe" :placeholder="$t('select_recipe')"
select-label="Select" :select-label="$t('Select')"
:selected-label="$t('Selected')"
:deselect-label="$t('remove_selection')"
:id="'id_step_' + step.id + '_recipe'" :id="'id_step_' + step.id + '_recipe'"
:custom-label="(opt) => recipes.find((x) => x.id === opt).name" :custom-label="(opt) => recipes.find((x) => x.id === opt).name"
:multiple="false" :multiple="false"
:loading="recipes_loading" :loading="recipes_loading"
@search-change="searchRecipes" @search-change="searchRecipes"
> >
<template v-slot:noOptions>{{ $t("empty_list") }}</template>
</multiselect> </multiselect>
</div> </div>
</div> </div>
@ -338,9 +348,11 @@
:preserve-search="true" :preserve-search="true"
:internal-search="false" :internal-search="false"
:limit="options_limit" :limit="options_limit"
placeholder="Select Unit" :placeholder="$t('select_unit')"
tag-placeholder="Create" :tag-placeholder="$t('Create')"
select-label="Select" :select-label="$t('Select')"
:selected-label="$t('Selected')"
:deselect-label="$t('remove_selection')"
:taggable="true" :taggable="true"
@tag="addUnitType" @tag="addUnitType"
:id="`unit_${step_index}_${index}`" :id="`unit_${step_index}_${index}`"
@ -350,6 +362,7 @@
:loading="units_loading" :loading="units_loading"
@search-change="searchUnits" @search-change="searchUnits"
> >
<template v-slot:noOptions>{{ $t("empty_list") }}</template>
</multiselect> </multiselect>
</div> </div>
<div class="col-lg-4 col-md-6 small-padding" v-if="!ingredient.is_header"> <div class="col-lg-4 col-md-6 small-padding" v-if="!ingredient.is_header">
@ -365,9 +378,11 @@
:preserve-search="true" :preserve-search="true"
:internal-search="false" :internal-search="false"
:limit="options_limit" :limit="options_limit"
placeholder="Select Food" :placeholder="$t('select_food')"
tag-placeholder="Create" :tag-placeholder="$t('Create')"
select-label="Select" :select-label="$t('Select')"
:selected-label="$t('Selected')"
:deselect-label="$t('remove_selection')"
:taggable="true" :taggable="true"
@tag="addFoodType" @tag="addFoodType"
:id="`ingredient_${step_index}_${index}`" :id="`ingredient_${step_index}_${index}`"
@ -377,6 +392,7 @@
:loading="foods_loading" :loading="foods_loading"
@search-change="searchFoods" @search-change="searchFoods"
> >
<template v-slot:noOptions>{{ $t("empty_list") }}</template>
</multiselect> </multiselect>
</div> </div>
<div class="small-padding" v-bind:class="{ 'col-lg-4 col-md-6': !ingredient.is_header, 'col-lg-12 col-md-12': ingredient.is_header }"> <div class="small-padding" v-bind:class="{ 'col-lg-4 col-md-6': !ingredient.is_header, 'col-lg-12 col-md-12': ingredient.is_header }">

View File

@ -336,6 +336,15 @@
"Random Recipes": "Zufällige Rezepte", "Random Recipes": "Zufällige Rezepte",
"recipe_filter": "Rezept-Filter", "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",
"Supermarkets": "Supermärkte", "Supermarkets": "Supermärkte",
"User": "Benutzer", "User": "Benutzer",
"Keyword": "Schlüsselwort", "Keyword": "Schlüsselwort",

View File

@ -362,6 +362,15 @@
"Units": "Units", "Units": "Units",
"Random Recipes": "Random Recipes", "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",
"Supermarkets": "Supermarkets", "Supermarkets": "Supermarkets",
"User": "User", "User": "User",
"Keyword": "Keyword", "Keyword": "Keyword",