Merge branch 'develop' into feature/unpin-pins

This commit is contained in:
vabene1111
2022-11-22 20:21:36 +01:00
committed by GitHub
51 changed files with 549 additions and 108 deletions

View File

@@ -204,7 +204,7 @@
v-if="!import_multiple">
<recipe-card :recipe="recipe_json" :detailed="false"
:show_context_menu="false"
:show_context_menu="false" :use_plural="use_plural"
></recipe-card>
</b-col>
<b-col>
@@ -461,6 +461,7 @@ export default {
recent_urls: [],
source_data: '',
recipe_json: undefined,
use_plural: false,
// recipe_html: undefined,
// recipe_tree: undefined,
recipe_images: [],
@@ -490,6 +491,10 @@ export default {
this.INTEGRATIONS.forEach((int) => {
int.icon = this.getRandomFoodIcon()
})
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
methods: {
/**

View File

@@ -23,8 +23,7 @@
<span v-if="apiName !== 'Step' && apiName !== 'CustomFilter'">
<b-button variant="link" @click="startAction({ action: 'new' })">
<i class="fas fa-plus-circle fa-2x"></i>
</b-button> </span
>
</b-button> </span >
<!-- TODO add proper field to model config to determine if create should be available or not -->
</h3>
</div>
@@ -42,6 +41,7 @@
<!-- model isn't paginated and loads in one API call -->
<div v-if="!paginated">
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
:use_plural="use_plural"
:model="this_model" @item-action="startAction($event, 'left')"
@finish-action="finishAction"/>
</div>
@@ -51,6 +51,7 @@
<template v-slot:cards>
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
:model="this_model"
:use_plural="use_plural"
@item-action="startAction($event, 'left')"
@finish-action="finishAction"/>
</template>
@@ -62,6 +63,7 @@
<template v-slot:cards>
<generic-horizontal-card v-for="i in items_right" v-bind:key="i.id" :item="i"
:model="this_model"
:use_plural="use_plural"
@item-action="startAction($event, 'right')"
@finish-action="finishAction"/>
</template>
@@ -120,6 +122,7 @@ export default {
show_split: false,
paginated: false,
header_component_name: undefined,
use_plural: false,
}
},
computed: {
@@ -145,6 +148,17 @@ export default {
}
})
this.$i18n.locale = window.CUSTOM_LOCALE
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
if (!this.use_plural && this.this_model !== null && this.this_model.create.params[0] !== null && this.this_model.create.params[0].includes('plural_name')) {
let index = this.this_model.create.params[0].indexOf('plural_name')
if (index > -1){
this.this_model.create.params[0].splice(index, 1)
}
delete this.this_model.create.form.plural_name
}
})
},
methods: {
// this.genericAPI inherited from ApiMixin

View File

@@ -571,6 +571,37 @@
<i class="fas fa-balance-scale-right fa-fw"></i>
{{ $t("Enable_Amount") }}
</button>
<template v-if="use_plural">
<button type="button" class="dropdown-item"
v-if="!ingredient.always_use_plural_unit"
@click="ingredient.always_use_plural_unit = true">
<i class="fas fa-filter fa-fw"></i>
{{ $t("Use_Plural_Unit_Always") }}
</button>
<button type="button" class="dropdown-item"
v-if="ingredient.always_use_plural_unit"
@click="ingredient.always_use_plural_unit = false">
<i class="fas fa-filter fa-fw"></i>
{{ $t("Use_Plural_Unit_Simple") }}
</button>
<button type="button" class="dropdown-item"
v-if="!ingredient.always_use_plural_food"
@click="ingredient.always_use_plural_food = true">
<i class="fas fa-filter fa-fw"></i>
{{ $t("Use_Plural_Food_Always") }}
</button>
<button type="button" class="dropdown-item"
v-if="ingredient.always_use_plural_food"
@click="ingredient.always_use_plural_food = false">
<i class="fas fa-filter fa-fw"></i>
{{ $t("Use_Plural_Food_Simple") }}
</button>
</template>
<button type="button" class="dropdown-item"
@click="copyTemplateReference(index, ingredient)">
<i class="fas fa-code"></i>
@@ -793,6 +824,7 @@ export default {
paste_step: undefined,
show_file_create: false,
step_for_file_create: undefined,
use_plural: false,
additional_visible: false,
create_food: undefined,
md_editor_toolbars: {
@@ -840,6 +872,10 @@ export default {
this.searchRecipes("")
this.$i18n.locale = window.CUSTOM_LOCALE
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
created() {
window.addEventListener("keydown", this.keyboardListener)
@@ -1037,6 +1073,8 @@ export default {
order: 0,
is_header: false,
no_amount: false,
always_use_plural_unit: false,
always_use_plural_food: false,
original_text: null,
})
this.sortIngredients(step)

View File

@@ -839,13 +839,16 @@
v-for="m in meal_plans"
:recipe="m.recipe"
:meal_plan="m"
:use_plural="use_plural"
:footer_text="m.meal_type_name"
footer_icon="far fa-calendar-alt"
></recipe-card>
</template>
<recipe-card v-for="r in recipes" v-bind:key="r.id" :recipe="r"
:footer_text="isRecentOrNew(r)[0]"
:footer_icon="isRecentOrNew(r)[1]"></recipe-card>
:footer_icon="isRecentOrNew(r)[1]"
:use_plural="use_plural">
</recipe-card>
</div>
</div>
</div>
@@ -913,6 +916,7 @@ import LoadingSpinner from "@/components/LoadingSpinner" // TODO: is this deprec
import RecipeCard from "@/components/RecipeCard"
import GenericMultiselect from "@/components/GenericMultiselect"
import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
import { ApiApiFactory } from "@/utils/openapi/api"
Vue.use(VueCookies)
Vue.use(BootstrapVue)
@@ -933,7 +937,7 @@ export default {
meal_plans: [],
last_viewed_recipes: [],
sortMenu: false,
use_plural: false,
search: {
advanced_search_visible: false,
explain_visible: false,
@@ -1160,6 +1164,10 @@ export default {
this.loadMealPlan()
this.refreshData(false)
})
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
this.$i18n.locale = window.CUSTOM_LOCALE
this.debug = localStorage.getItem("DEBUG") == "True" || false
},

View File

@@ -90,6 +90,7 @@
:ingredient_factor="ingredient_factor"
:servings="servings"
:header="true"
:use_plural="use_plural"
id="ingredient_container"
@checked-state-changed="updateIngredientCheckedState"
@change-servings="servings = $event"
@@ -123,6 +124,7 @@
:step="s"
:ingredient_factor="ingredient_factor"
:index="index"
:use_plural="use_plural"
:start_time="start_time"
@update-start-time="updateStartTime"
@checked-state-changed="updateIngredientCheckedState"
@@ -179,6 +181,7 @@ import KeywordsComponent from "@/components/KeywordsComponent"
import NutritionComponent from "@/components/NutritionComponent"
import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
import CustomInputSpinButton from "@/components/CustomInputSpinButton"
import {ApiApiFactory} from "@/utils/openapi/api";
Vue.prototype.moment = moment
@@ -218,6 +221,7 @@ export default {
},
data() {
return {
use_plural: false,
loading: true,
recipe: undefined,
rootrecipe: undefined,
@@ -226,7 +230,7 @@ export default {
start_time: "",
share_uid: window.SHARE_UID,
wake_lock: null,
ingredient_height: '250'
ingredient_height: '250',
}
},
watch: {
@@ -239,6 +243,11 @@ export default {
this.$i18n.locale = window.CUSTOM_LOCALE
this.requestWakeLock()
window.addEventListener('resize', this.handleResize);
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
beforeUnmount() {
this.destroyWakeLock()

View File

@@ -151,6 +151,9 @@
<b-form-checkbox v-model="space.show_facet_count"> Facet Count</b-form-checkbox>
<span class="text-muted small">{{ $t('facet_count_info') }}</span><br/>
<b-form-checkbox v-model="space.use_plural">Use Plural form</b-form-checkbox>
<span class="text-muted small">{{ $t('plural_usage_info') }}</span><br/>
<label>{{ $t('FoodInherit') }}</label>
<generic-multiselect :initial_selection="space.food_inherit"
:model="Models.FOOD_INHERIT_FIELDS"
@@ -204,7 +207,7 @@ Vue.use(VueClipboard)
Vue.use(BootstrapVue)
export default {
name: "SupermarketView",
name: "SpaceManageView",
mixins: [ResolveUrlMixin, ToastMixin, ApiMixin],
components: {GenericMultiselect, GenericModalForm},
data() {
@@ -225,7 +228,7 @@ export default {
this.$i18n.locale = window.CUSTOM_LOCALE
let apiFactory = new ApiApiFactory()
apiFactory.retrieveSpace(this.ACTIVE_SPACE_ID).then(r => {
apiFactory.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.space = r.data
})
apiFactory.listUserSpaces().then(r => {
@@ -249,7 +252,7 @@ export default {
},
updateSpace: function () {
let apiFactory = new ApiApiFactory()
apiFactory.partialUpdateSpace(this.ACTIVE_SPACE_ID, this.space).then(r => {
apiFactory.partialUpdateSpace(window.ACTIVE_SPACE_ID, this.space).then(r => {
StandardToasts.makeStandardToast(this, StandardToasts.SUCCESS_UPDATE)
}).catch(err => {
StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)

View File

@@ -12,7 +12,7 @@
<cookbook-edit-card :book="book" v-if="current_page === 1" v-on:editing="cookbook_editing = $event" v-on:refresh="$emit('refresh')" @reload="$emit('reload')"></cookbook-edit-card>
</transition>
<transition name="flip" mode="out-in">
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe"></recipe-card>
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe" :use_plural="use_plural"></recipe-card>
</transition>
</div>
<div class="col-md-5">
@@ -20,7 +20,7 @@
<cookbook-toc :recipes="recipes" v-if="current_page === 1" v-on:switchRecipe="switchRecipe($event)"></cookbook-toc>
</transition>
<transition name="flip" mode="out-in">
<recipe-card :recipe="display_recipes[1].recipe_content" v-if="current_page > 1 && display_recipes.length === 2" :key="display_recipes[1].recipe"></recipe-card>
<recipe-card :recipe="display_recipes[1].recipe_content" v-if="current_page > 1 && display_recipes.length === 2" :key="display_recipes[1].recipe" :use_plural="use_plural"></recipe-card>
</transition>
</div>
<div class="col-md-1" @click="swipeLeft" style="cursor: pointer"></div>
@@ -34,7 +34,7 @@ import CookbookEditCard from "./CookbookEditCard"
import CookbookToc from "./CookbookToc"
import Vue2TouchEvents from "vue2-touch-events"
import Vue from "vue"
import { ApiApiFactory } from "../utils/openapi/api"
import { ApiApiFactory } from "@/utils/openapi/api"
Vue.use(Vue2TouchEvents)
@@ -56,6 +56,12 @@ export default {
return this.recipes.slice((this.current_page - 1 - 1) * 2, (this.current_page - 1) * 2)
}
},
mounted(){
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
data() {
return {
current_page: 1,
@@ -63,6 +69,7 @@ export default {
bounce_left: false,
bounce_right: false,
cookbook_editing: false,
use_plural: false,
}
},
methods: {

View File

@@ -23,6 +23,9 @@
<b-card-body class="m-0 py-0">
<b-card-text class="h-100 my-0 d-flex flex-column" style="text-overflow: ellipsis">
<h5 class="m-0 mt-1 text-truncate">{{ item[title] }}</h5>
<template v-if="use_plural">
<div v-if="item[plural] !== '' && item[plural] !== null" class="m-0 text-truncate">({{ $t("plural_short") }}: {{ item[plural] }})</div>
</template>
<div class="m-0 text-truncate">{{ item[subtitle] }}</div>
<div class="m-0 text-truncate small text-muted" v-if="getFullname">{{ getFullname }}</div>
@@ -71,7 +74,11 @@
<!-- recursively add child cards -->
<div class="row" v-if="item.show_children">
<div class="col-md-10 offset-md-2">
<generic-horizontal-card v-for="child in item[children]" v-bind:key="child.id" :item="child" :model="model" @item-action="$emit('item-action', $event)"> </generic-horizontal-card>
<generic-horizontal-card v-for="child in item[children]"
v-bind:key="child.id"
:item="child" :model="model"
:use_plural="use_plural"
@item-action="$emit('item-action', $event)"></generic-horizontal-card>
</div>
</div>
<!-- conditionally view recipes -->
@@ -146,12 +153,14 @@ export default {
item: { type: Object },
model: { type: Object },
title: { type: String, default: "name" }, // this and the following props need to be moved to model.js and made computed values
plural: { type: String, default: "plural_name" },
subtitle: { type: String, default: "description" },
child_count: { type: String, default: "numchild" },
children: { type: String, default: "children" },
recipe_count: { type: String, default: "numrecipe" },
recipes: { type: String, default: "recipes" },
show_context_menu: { type: Boolean, default: true },
use_plural: { type: Boolean, default: false},
},
data() {
return {

View File

@@ -16,14 +16,43 @@
v-html="calculateAmount(ingredient.amount)"></span>
</td>
<td @click="done">
<span v-if="ingredient.unit !== null && !ingredient.no_amount">{{ ingredient.unit.name }}</span>
<template v-if="ingredient.unit !== null && !ingredient.no_amount">
<template v-if="!use_plural">
<span>{{ ingredient.unit.name }}</span>
</template>
<template v-else>
<template v-if="ingredient.unit.plural_name === '' || ingredient.unit.plural_name === null">
<span>{{ ingredient.unit.name }}</span>
</template>
<template v-else>
<span v-if="ingredient.always_use_plural_unit">{{ ingredient.unit.plural_name}}</span>
<span v-else-if="(ingredient.amount * this.ingredient_factor) > 1">{{ ingredient.unit.plural_name }}</span>
<span v-else>{{ ingredient.unit.name }}</span>
</template>
</template>
</template>
</td>
<td @click="done">
<template v-if="ingredient.food !== null">
<a :href="resolveDjangoUrl('view_recipe', ingredient.food.recipe.id)"
v-if="ingredient.food.recipe !== null" target="_blank"
rel="noopener noreferrer">{{ ingredient.food.name }}</a>
<span v-if="ingredient.food.recipe === null">{{ ingredient.food.name }}</span>
v-if="ingredient.food.recipe !== null" target="_blank"
rel="noopener noreferrer">{{ ingredient.food.name }}</a>
<template v-if="ingredient.food.recipe === null">
<template v-if="!use_plural">
<span>{{ ingredient.food.name }}</span>
</template>
<template v-else>
<template v-if="ingredient.food.plural_name === '' || ingredient.food.plural_name === null">
<span>{{ ingredient.food.name }}</span>
</template>
<template v-else>
<span v-if="ingredient.always_use_plural_food">{{ ingredient.food.plural_name }}</span>
<span v-else-if="ingredient.no_amount">{{ ingredient.food.name }}</span>
<span v-else-if="(ingredient.amount * this.ingredient_factor) > 1">{{ ingredient.food.plural_name }}</span>
<span v-else>{{ ingredient.food.name }}</span>
</template>
</template>
</template>
</template>
</td>
<td v-if="detailed">
@@ -55,6 +84,7 @@ export default {
props: {
ingredient: Object,
ingredient_factor: {type: Number, default: 1},
use_plural:{type: Boolean, default: false},
detailed: {type: Boolean, default: true},
},
mixins: [ResolveUrlMixin],

View File

@@ -24,6 +24,7 @@
<ingredient-component
:ingredient="i"
:ingredient_factor="ingredient_factor"
:use_plural="use_plural"
:key="i.id"
:detailed="detailed"
@checked-state-changed="$emit('checked-state-changed', $event)"
@@ -63,6 +64,7 @@ export default {
recipe: {type: Number},
ingredient_factor: {type: Number, default: 1},
servings: {type: Number, default: 1},
use_plural: {type: Boolean, default: false},
detailed: {type: Boolean, default: true},
header: {type: Boolean, default: false},
recipe_list: {type: Number, default: undefined},

View File

@@ -84,7 +84,7 @@
</b-input-group>
</div>
<div class="col-lg-6 d-none d-lg-block d-xl-block">
<recipe-card v-if="entryEditing.recipe" :recipe="entryEditing.recipe" :detailed="false"></recipe-card>
<recipe-card v-if="entryEditing.recipe" :recipe="entryEditing.recipe" :detailed="false" :use_plural="use_plural"></recipe-card>
</div>
</div>
<div class="row mt-3 mb-3">
@@ -144,6 +144,7 @@ export default {
addshopping: false,
reviewshopping: false,
},
use_plural: false,
}
},
watch: {
@@ -171,7 +172,12 @@ export default {
this.entryEditing.servings = newVal
},
},
mounted: function () {},
mounted: function () {
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
computed: {
autoMealPlan: function () {
return getUserPreference("mealplan_autoadd_shopping")

View File

@@ -75,11 +75,15 @@
<h6 class="card-title"><i class="fas fa-pepper-hot"></i> {{ $t("Ingredients") }}
</h6>
<ingredients-card :steps="recipe.steps" :header="false" :detailed="false"
:servings="recipe.servings"/>
</div>
</div>
</transition>
<ingredients-card
:steps="recipe.steps"
:header="false"
:detailed="false"
:servings="recipe.servings"
:use_plural="use_plural" />
</div>
</div>
</transition>
<b-badge pill variant="info" v-if="!recipe.internal">{{ $t("External") }}</b-badge>
</template>
@@ -121,6 +125,7 @@ export default {
props: {
recipe: Object,
meal_plan: Object,
use_plural: { type: Boolean, default: false},
footer_text: String,
footer_icon: String,
detailed: {type: Boolean, default: true},

View File

@@ -35,7 +35,7 @@
<div class="col col-md-4"
v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
<table class="table table-sm">
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor"
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor" :use_plural="use_plural"
@checked-state-changed="$emit('checked-state-changed', $event)"/>
</table>
</div>
@@ -90,6 +90,7 @@
:index="index"
:start_time="start_time"
:force_ingredients="true"
:use_plural="use_plural"
></step-component>
</div>
</div>
@@ -149,6 +150,10 @@ export default {
type: Boolean,
default: false,
},
use_plural: {
type: Boolean,
default: false,
},
},
computed: {
step_time: function() {

View File

@@ -425,5 +425,12 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"Are_You_Sure": "",
"Valid Until": ""
"Valid Until": "",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -410,5 +410,12 @@
"Warning_Delete_Supermarket_Category": "Изтриването на категория супермаркет ще изтрие и всички връзки с храни. Сигурен ли си?",
"New_Supermarket": "Създайте нов супермаркет",
"New_Supermarket_Category": "Създаване на нова категория супермаркет",
"Are_You_Sure": "Сигурен ли си?"
"Are_You_Sure": "Сигурен ли си?",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -458,5 +458,12 @@
"Days": "Dage",
"Message": "Besked",
"Sticky_Nav": "Fastlåst navigation",
"reset_food_inheritance": "Nulstil nedarvning"
"reset_food_inheritance": "Nulstil nedarvning",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -460,5 +460,12 @@
"Comments_setting": "Kommentare anzeigen",
"reset_food_inheritance": "Vererbung zurücksetzen",
"food_inherit_info": "Datenfelder des Lebensmittels, die standardmäßig vererbt werden sollen.",
"Are_You_Sure": "Bist du dir sicher?"
"Are_You_Sure": "Bist du dir sicher?",
"Plural": "Plural",
"plural_short": "pl.",
"Use_Plural_Unit_Always": "Pluralform der Maßeinheit immer verwenden",
"Use_Plural_Unit_Simple": "Pluralform der Maßeinheit dynamisch anpassen",
"Use_Plural_Food_Always": "Pluralform des Essens immer verwenden",
"Use_Plural_Food_Simple": "Pluralform des Essens dynamisch anpassen",
"plural_usage_info": "Pluralform für Einheiten und Essen in diesem Space verwenden."
}

View File

@@ -464,5 +464,12 @@
"Are_You_Sure": "Are you sure?",
"Valid Until": "Valid Until",
"Split_All_Steps": "Split all rows into seperate steps.",
"Combine_All_Steps": "Combine all steps into a single field."
"Combine_All_Steps": "Combine all steps into a single field.",
"Plural": "Plural",
"plural_short": "plural",
"Use_Plural_Unit_Always": "Use plural form for unit always",
"Use_Plural_Unit_Simple": "Use plural form for unit dynamically",
"Use_Plural_Food_Always": "Use plural form for food always",
"Use_Plural_Food_Simple": "Use plural form for food dynamically",
"plural_usage_info": "Use the plural form for units and food inside this space."
}

View File

@@ -436,5 +436,12 @@
"Default_Unit": "Unidad Predeterminada",
"Language": "Lenguaje",
"Hour": "Hora",
"Username": "Nombre de Usuario"
"Username": "Nombre de Usuario",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -212,5 +212,12 @@
"success_moving_resource": "Resurssin siirto onnistui!",
"success_merging_resource": "Resurssin yhdistäminen onnistui!",
"Search Settings": "Hakuasetukset",
"Shopping_Categories": "Ostoskategoriat"
"Shopping_Categories": "Ostoskategoriat",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -402,5 +402,12 @@
"Comments_setting": "Montrer les commentaires",
"import_duplicates": "Pour éviter les doublons, les recettes de même nom seront ignorées. Cocher la case pour tout importer.",
"Account": "Compte",
"Change_Password": "Modifier le mot de passe"
"Change_Password": "Modifier le mot de passe",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -412,5 +412,12 @@
"Warning_Delete_Supermarket_Category": "",
"New_Supermarket": "",
"New_Supermarket_Category": "",
"Are_You_Sure": ""
"Are_You_Sure": "",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -122,5 +122,12 @@
"Save_and_View": "Պահպանել և Դիտել",
"Select_File": "Ընտրել Ֆայլ",
"Edit_Keyword": "Խմբագրել բանալի բառը",
"Hide_Recipes": "Թաքցնել բաղադրատոմսերը"
"Hide_Recipes": "Թաքցնել բաղադրատոմսերը",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -346,5 +346,12 @@
"csv_delim_help": "Delimitatore usato per le esportazioni CSV.",
"csv_prefix_label": "Prefisso lista",
"not": "not",
"Keyword": "Parola chiave"
"Keyword": "Parola chiave",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -466,5 +466,12 @@
"food_inherit_info": "Voedselvelden die standaard geërfd worden.",
"facet_count_info": "Geef receptenaantal bij zoekfilters weer.",
"Split_All_Steps": "Splits alle rijen in apparte stappen.",
"Combine_All_Steps": "Voeg alle stappen samen tot een veld."
"Combine_All_Steps": "Voeg alle stappen samen tot een veld.",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -460,5 +460,12 @@
"First_name": "Imię",
"Last_name": "Nazwisko",
"Disabled": "Wyłączone",
"Disable": "Wyłączyć"
"Disable": "Wyłączyć",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -382,5 +382,12 @@
"err_deleting_protected_resource": "O objeto que você está tentando deletar ainda está sendo utilizado, portanto não pode ser deletado.",
"food_inherit_info": "Campos no alimento que devem ser herdados por padrão.",
"warning_space_delete": "Você pode deletar seu espaço, inclusive todas as receitas, listas de mercado, planos de comida e tudo mais que você criou. Esta ação não poderá ser desfeita! Você tem certeza que quer fazer isto?",
"facet_count_info": "Mostrar quantidade de receitas nos filtros de busca."
"facet_count_info": "Mostrar quantidade de receitas nos filtros de busca.",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -387,5 +387,12 @@
"Copy Token": "Copiar Token",
"warning_space_delete": "Você pode deletar seu espaço, inclusive todas as receitas, listas de mercado, planos de comida e tudo mais que você criou. Esta ação não poderá ser desfeita! Você tem certeza que quer fazer isto?",
"food_inherit_info": "Campos no alimento que devem ser herdados por padrão.",
"facet_count_info": "Mostrar quantidade de receitas nos filtros de busca."
"facet_count_info": "Mostrar quantidade de receitas nos filtros de busca.",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -206,5 +206,12 @@
"Auto_Planner": "",
"New_Cookbook": "",
"Hide_Keyword": "",
"Clear": ""
"Clear": "",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -342,5 +342,12 @@
"IgnoreThis": "Никогда не добавлять {food} в список покупок автоматически",
"DelayFor": "Отложить на {hours} часов",
"New_Entry": "Новая запись",
"GroupBy": "Сгруппировать по"
"GroupBy": "Сгруппировать по",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -284,5 +284,12 @@
"sql_debug": "SQL razhroščevanje",
"remember_search": "Zapomni si iskanje",
"remember_hours": "Ure, ki si jih zapomni",
"tree_select": "Uporabi drevesno označbo"
"tree_select": "Uporabi drevesno označbo",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -380,5 +380,12 @@
"create_food_desc": "Skapa ett livsmedel och länka det till det här receptet.",
"additional_options": "Ytterligare alternativ",
"remember_hours": "Timmar att komma ihåg",
"tree_select": "Använd trädval"
"tree_select": "Använd trädval",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -412,5 +412,12 @@
"Warning_Delete_Supermarket_Category": "",
"New_Supermarket": "",
"New_Supermarket_Category": "",
"Are_You_Sure": ""
"Are_You_Sure": "",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -459,5 +459,12 @@
"reset_children_help": "用继承字段中的值覆盖所有子项。 继承的子字段将设置为继承,除非它们已设置为继承。",
"substitute_siblings": "代替品",
"book_filter_help": "除手动选择的食谱外,还包括筛选中的食谱。",
"Internal": "内部"
"Internal": "内部",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -77,5 +77,12 @@
"and": "",
"Information": "",
"Download": "",
"Create": ""
"Create": "",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
}

View File

@@ -78,6 +78,7 @@ export class Models {
params: [
[
"name",
"plural_name",
"description",
"recipe",
"food_onhand",
@@ -103,6 +104,13 @@ export class Models {
placeholder: "", // form.placeholder always translated
subtitle_field: "full_name",
},
plural_name: {
form_field: true,
type: "text",
field: "plural_name",
label: "Plural",
placeholder: "",
},
description: {
form_field: true,
type: "text",
@@ -261,7 +269,7 @@ export class Models {
apiName: "Unit",
paginated: true,
create: {
params: [["name", "description"]],
params: [["name", "plural_name", "description",]],
form: {
name: {
form_field: true,
@@ -270,6 +278,13 @@ export class Models {
label: "Name",
placeholder: "",
},
plural_name: {
form_field: true,
type: "text",
field: "plural_name",
label: "Plural name",
placeholder: "",
},
description: {
form_field: true,
type: "text",