Skip to content

Commit

Permalink
Merge branch 'mealie-next' into chore/remove-ocr-support
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-genson authored Dec 13, 2023
2 parents 9295854 + 0703701 commit 0490e52
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 220 deletions.
12 changes: 6 additions & 6 deletions frontend/lang/messages/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,24 +290,24 @@
"type-any": "أي",
"day-any": "أي",
"editor": "Editor",
"meal-recipe": "Meal Recipe",
"meal-title": "Meal Title",
"meal-note": "Meal Note",
"note-only": "Note Only",
"meal-recipe": "وصفة الوجبة",
"meal-title": "عنوان الوجبة",
"meal-note": "ملاحظة الوجبة",
"note-only": "ملاحظة فقط",
"random-meal": "وجبة عشوائية",
"random-dinner": "عشاء عشوائي",
"random-side": "Random Side",
"this-rule-will-apply": "This rule will apply {dayCriteria} {mealTypeCriteria}.",
"to-all-days": "إلى جميع الأيام",
"on-days": "on {0}s",
"for-all-meal-types": "for all meal types",
"for-all-meal-types": "لجميع أنواع الوجبات",
"for-type-meal-types": "for {0} meal types",
"meal-plan-rules": "Meal Plan Rules",
"new-rule": "قاعدة جديدة",
"meal-plan-rules-description": "You can create rules for auto selecting recipes for your meal plans. These rules are used by the server to determine the random pool of recipes to select from when creating meal plans. Note that if rules have the same day/type constraints then the categories of the rules will be merged. In practice, it's unnecessary to create duplicate rules, but it's possible to do so.",
"new-rule-description": "When creating a new rule for a meal plan you can restrict the rule to be applicable for a specific day of the week and/or a specific type of meal. To apply a rule to all days or all meal types you can set the rule to \"Any\" which will apply it to all the possible values for the day and/or meal type.",
"recipe-rules": "قواعد الوصفات",
"applies-to-all-days": "Applies to all days",
"applies-to-all-days": "ينطبق على جميع الأيام",
"applies-on-days": "Applies on {0}s",
"meal-plan-settings": "Meal Plan Settings"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/lang/messages/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
"how-did-it-turn-out": "How did it turn out?",
"user-made-this": "{user} made this",
"last-made-date": "Last Made {date}",
"api-extras-description": "Recipes extras are a key feature of the Mealie API. They allow you to create custom json key/value pairs within a recipe to reference from 3rd part applications. You can use these keys to contain information to trigger automation or custom messages to relay to your desired device.",
"api-extras-description": "Recipes extras are a key feature of the Mealie API. They allow you to create custom JSON key/value pairs within a recipe, to reference from 3rd party applications. You can use these keys to provide information, for example to trigger automations or custom messages to relay to your desired device.",
"message-key": "Message Key",
"parse": "Parse",
"attach-images-hint": "Attach images by dragging & dropping them into the editor",
Expand Down
232 changes: 116 additions & 116 deletions frontend/lang/messages/no-NO.json

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions frontend/lang/messages/sv-SE.json

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions frontend/lang/messages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"production": "正式版",
"support": "支持",
"version": "版本",
"unknown-version": "unknown",
"sponsor": "Sponsor"
"unknown-version": "未知",
"sponsor": "贊助者"
},
"asset": {
"assets": "資源",
Expand All @@ -33,10 +33,10 @@
"pdf": "PDF",
"recipe": "食譜",
"show-assets": "顯示資源",
"error-submitting-form": "Error Submitting Form"
"error-submitting-form": "提交表格時發生錯誤"
},
"category": {
"categories": "Categories",
"categories": "目錄",
"category-created": "類別已新增",
"category-creation-failed": "新增類別失敗",
"category-deleted": "類別已刪除",
Expand All @@ -45,17 +45,17 @@
"category-update-failed": "類別更新失敗",
"category-updated": "類別已更新",
"uncategorized-count": "未分類 {count}",
"create-a-category": "Create a Category",
"category-name": "Category Name",
"create-a-category": "創建類別",
"category-name": "類別名稱",
"category": "Category"
},
"events": {
"apprise-url": "Apprise連結",
"database": "資料庫",
"delete-event": "删除事件",
"event-delete-confirmation": "Are you sure you want to delete this event?",
"event-deleted": "Event Deleted",
"event-updated": "Event Updated",
"event-delete-confirmation": "您是否確定要刪除本活動?",
"event-deleted": "活動已刪除",
"event-updated": "活動已更新",
"new-notification-form-description": "Mealie使用Apprise來產生通知。他們提供多種選項給服務來使用通知。請參考他們wiki上關於如何為你的服務新建一個連結的詳細指引。若選擇通知的種類,可能會包含額外的功能。",
"new-version": "有可用的新版本!",
"notification": "通知",
Expand All @@ -64,15 +64,15 @@
"something-went-wrong": "出了點問題...",
"subscribed-events": "關注的事件",
"test-message-sent": "測試訊息已發送",
"new-notification": "New Notification",
"new-notification": "新通知",
"event-notifiers": "Event Notifiers",
"apprise-url-skipped-if-blank": "Apprise URL (skipped if blank)",
"enable-notifier": "Enable Notifier",
"what-events": "What events should this notifier subscribe to?",
"user-events": "User Events",
"mealplan-events": "Mealplan Events",
"when-a-user-in-your-group-creates-a-new-mealplan": "When a user in your group creates a new mealplan",
"shopping-list-events": "Shopping List Events",
"shopping-list-events": "購物清單",
"cookbook-events": "Cookbook Events",
"tag-events": "Tag Events",
"category-events": "Category Events",
Expand All @@ -85,15 +85,15 @@
"close": "關閉",
"confirm": "確定",
"confirm-delete-generic": "您確定要刪除這個嗎?",
"copied_message": "Copied!",
"copied_message": "已複製!",
"create": "創建",
"created": "已建立",
"custom": "自訂",
"dashboard": "控制面板",
"delete": "删除",
"disabled": "已停用",
"download": "下载",
"duplicate": "Duplicate",
"duplicate": "複製",
"edit": "编辑",
"enabled": "已啟用",
"exception": "錯誤",
Expand All @@ -114,23 +114,23 @@
"json": "JSON",
"keyword": "關鍵字",
"link-copied": "已複製連結",
"loading": "Loading",
"loading-events": "Loading Events",
"loading-recipe": "Loading recipe...",
"loading-ocr-data": "Loading OCR data...",
"loading": "正在載入",
"loading-events": "載入行程中",
"loading-recipe": "載入食譜中...",
"loading-ocr-data": "載入 OCR 資料...",
"loading-recipes": "載入食譜中",
"message": "Message",
"message": "信息",
"monday": "星期一",
"name": "名稱",
"new": "新增",
"never": "Never",
"never": "決不",
"no": "",
"no-recipe-found": "找不到食譜",
"ok": "好的",
"options": "選項:",
"plural-name": "Plural Name",
"plural-name": "複數",
"print": "列印",
"print-preferences": "Print Preferences",
"print-preferences": "列印設定",
"random": "隨機",
"rating": "評價",
"recent": "最近",
Expand All @@ -146,7 +146,7 @@
"sort": "排序",
"sort-alphabetically": "按字母順序",
"status": "狀態",
"subject": "Subject",
"subject": "標題",
"submit": "提交",
"success-count": "成功: {count}",
"sunday": "星期日",
Expand All @@ -164,19 +164,19 @@
"view": "檢視",
"wednesday": "星期三",
"yes": "",
"foods": "Foods",
"units": "Units",
"back": "Back",
"next": "Next",
"toggle-view": "Toggle View",
"date": "Date",
"id": "Id",
"owner": "Owner",
"date-added": "Date Added",
"none": "None",
"run": "Run",
"menu": "Menu",
"a-name-is-required": "A Name is Required",
"foods": "糧食",
"units": "單位",
"back": "返回",
"next": "下一步",
"toggle-view": "切換檢視方式",
"date": "日期",
"id": "ID",
"owner": "擁有者",
"date-added": "新增日期",
"none": "",
"run": "運行",
"menu": "選單",
"a-name-is-required": "名稱必填",
"delete-with-name": "Delete {name}",
"confirm-delete-generic-with-name": "Are you sure you want to delete this {name}?",
"confirm-delete-own-admin-account": "Please note that you are trying to delete your own admin account! This action cannot be undone and will permanently delete your account?",
Expand Down Expand Up @@ -238,7 +238,7 @@
"allow-users-outside-of-your-group-to-see-your-recipes-description": "When enabled you can use a public share link to share specific recipes without authorizing the user. When disabled, you can only share recipes with users who are in your group or with a pre-generated private link",
"show-nutrition-information": "Show nutrition information",
"show-nutrition-information-description": "When enabled the nutrition information will be shown on the recipe if available. If there is no nutrition information available, the nutrition information will not be shown",
"show-recipe-assets": "Show recipe assets",
"show-recipe-assets": "顯示食譜附件",
"show-recipe-assets-description": "When enabled the recipe assets will be shown on the recipe if available",
"default-to-landscape-view": "Default to landscape view",
"default-to-landscape-view-description": "When enabled the recipe header section will be shown in landscape view",
Expand Down Expand Up @@ -285,8 +285,8 @@
"rule-day": "Rule Day",
"meal-type": "Meal Type",
"breakfast": "Breakfast",
"lunch": "Lunch",
"dinner": "Dinner",
"lunch": "午餐",
"dinner": "晚餐",
"type-any": "Any",
"day-any": "Any",
"editor": "Editor",
Expand All @@ -300,7 +300,7 @@
"this-rule-will-apply": "This rule will apply {dayCriteria} {mealTypeCriteria}.",
"to-all-days": "to all days",
"on-days": "on {0}s",
"for-all-meal-types": "for all meal types",
"for-all-meal-types": "適用於所有餐點類型",
"for-type-meal-types": "for {0} meal types",
"meal-plan-rules": "Meal Plan Rules",
"new-rule": "New Rule",
Expand Down
2 changes: 1 addition & 1 deletion mealie/repos/seed/resources/labels/locales/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"name": "الأطعمة المجمدة"
},
{
"name": "Health Foods"
"name": "الأغذية الصحية"
},
{
"name": "Household"
Expand Down
6 changes: 5 additions & 1 deletion mealie/services/migrations/_migration_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ def rewrite_alias(self, recipe_dict: dict) -> dict:
continue

if alias.func:
prop_value = alias.func(prop_value)
try:
prop_value = alias.func(prop_value)
except Exception as e:
self.logger.exception(e)
continue

recipe_dict[alias.key] = prop_value

Expand Down
4 changes: 2 additions & 2 deletions mealie/services/migrations/paprika.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, **kwargs):
re_num_list = re.compile(r"^\d+\.\s")

self.key_aliases = [
MigrationAlias(key="recipeIngredient", alias="ingredients", func=lambda x: x.split("\n")),
MigrationAlias(key="recipeIngredient", alias="ingredients", func=lambda x: x.split("\n") if x else ""),
MigrationAlias(key="orgURL", alias="source_url", func=None),
MigrationAlias(key="totalTime", alias="total_time", func=None),
MigrationAlias(key="prepTime", alias="prep_time", func=None),
Expand All @@ -62,7 +62,7 @@ def __init__(self, **kwargs):
MigrationAlias(
key="recipeInstructions",
alias="directions",
func=lambda x: [{"text": re.sub(re_num_list, "", s)} for s in x.split("\n\n")],
func=lambda x: [{"text": re.sub(re_num_list, "", s)} for s in x.split("\n\n")] if x else [],
),
]

Expand Down

0 comments on commit 0490e52

Please sign in to comment.