Merge branch 'develop' into beta

This commit is contained in:
vabene1111
2023-01-27 15:52:54 +01:00
7 changed files with 12111 additions and 16661 deletions

View File

@@ -235,6 +235,10 @@ class IngredientParser:
# leading spaces before commas result in extra tokens, clean them out
ingredient = ingredient.replace(' ,', ',')
# handle "(from) - (to)" amounts by using the minimum amount and adding the range to the description
# "10.5 - 200 g XYZ" => "100 g XYZ (10.5 - 200)"
ingredient = re.sub("^(\d+|\d+[\\.,]\d+) - (\d+|\d+[\\.,]\d+) (.*)", "\\1 \\3 (\\1 - \\2)", ingredient)
# if amount and unit are connected add space in between
if re.match('([0-9])+([A-z])+\s', ingredient):
ingredient = re.sub(r'(?<=([a-z])|\d)(?=(?(1)\d|[a-z]))', ' ', ingredient)

View File

@@ -49,7 +49,7 @@ If removed, the nginx webserver needs to be replaced by something else that serv
`GUNICORN_MEDIA` needs to be enabled to allow media serving by the application container itself.
## Why does the Text/Markdown preview look different than the final recipe ?
## Why does the Text/Markdown preview look different than the final recipe?
Tandoor has always rendered the recipe instructions markdown on the server. This also allows tandoor to implement things like ingredient templating and scaling in text.
To make editing easier a markdown editor was added to the frontend with integrated preview as a temporary solution. Since the markdown editor uses a different
@@ -66,7 +66,7 @@ To create a new user click on your name (top right corner) and select 'space set
It is not possible to create users through the admin because users must be assigned a default group and space.
To change a users space you need to go to the admin and select User Infos.
To change a user's space you need to go to the admin and select User Infos.
If you use an external auth provider or proxy authentication make sure to specify a default group and space in the
environment configuration.
@@ -78,7 +78,7 @@ In technical terms it is a multi tenant system.
You can compare a space to something like google drive or dropbox.
There is only one installation of the Dropbox system, but it handles multiple users without them noticing each other.
For Tandoor that means all people that work together on one recipe collection can be in one space.
If you want to host the collection of your friends family or your neighbor you can create a separate space for them (through the admin interface).
If you want to host the collection of your friends, family, or neighbor you can create a separate space for them (through the admin interface).
Sharing between spaces is currently not possible but is planned for future releases.

View File

@@ -38,7 +38,7 @@
"vue-multiselect": "^2.1.6",
"vue-property-decorator": "^9.1.2",
"vue-sanitize": "^0.2.2",
"vue-simple-calendar": "^5.0.0",
"vue-simple-calendar": "TandoorRecipes/vue-simple-calendar#lastvue2",
"vue-template-compiler": "2.6.14",
"vue2-touch-events": "^3.2.2",
"vuedraggable": "^2.24.3",

View File

@@ -1205,7 +1205,7 @@ export default {
let api = new ApiApiFactory()
if (field) {
// assume if field is changing it should no longer be inherited
food.inherit_fields = food.inherit_fields.filter((x) => x.field !== field)
food.inherit_fields = food.inherit_fields?.filter((x) => x.field !== field)
}
return api

View File

@@ -10,12 +10,11 @@
</b-card-header>
<b-collapse id="accordion-0" class="p-2" visible accordion="my-accordion" role="tabpanel">
<div v-for="i in steps.flatMap(s => s.ingredients)" v-bind:key="i.id">
<div>
<table class="table table-sm mb-0">
<ingredient-component
<ingredient-component v-for="i in steps.flatMap(s => s.ingredients)" v-bind:key="i.id"
:use_plural="true"
:key="i.id"
:detailed="true"
:ingredient="i"
:ingredient_factor="ingredient_factor"

View File

@@ -460,11 +460,22 @@
"substitute_siblings": "代替品",
"book_filter_help": "除手动选择的食谱外,还包括筛选中的食谱。",
"Internal": "内部",
"Plural": "",
"plural_short": "",
"Use_Plural_Unit_Always": "",
"Use_Plural_Unit_Simple": "",
"Use_Plural_Food_Always": "",
"Use_Plural_Food_Simple": "",
"plural_usage_info": ""
"Plural": "复数",
"plural_short": "复数",
"Use_Plural_Unit_Always": "单位总是使用复数形式",
"Use_Plural_Unit_Simple": "动态使用单位的复数形式",
"Use_Plural_Food_Always": "始终对食物使用复数形式",
"Use_Plural_Food_Simple": "食物动态使用复数形式",
"plural_usage_info": "在此空间内使用复数形式表示单位和食物。",
"Amount": "数量",
"Original_Text": "原文",
"Description_Replace": "替换描述",
"Instruction_Replace": "替换指令",
"Split_All_Steps": "将所有行拆分为单独的步骤。",
"Combine_All_Steps": "将所有步骤合并到一个字段中。",
"PinnedConfirmation": "{recipe} 已固定。",
"UnpinnedConfirmation": "{recipe} 已取消固定。",
"Unpin": "取消固定",
"Auto_Sort": "自动分类",
"Auto_Sort_Help": "将所有食材移动到最恰当的步骤。"
}

File diff suppressed because it is too large Load Diff