1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

feat: adding the rest ofthe nutrition properties from schema.org (#4301)

This commit is contained in:
Tom Brennan 2024-10-13 09:04:29 -04:00 committed by GitHub
parent 3aea229f2d
commit 02c0fe993b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 279 additions and 57 deletions

View file

@ -17,6 +17,14 @@ export function useNutritionLabels() {
label: i18n.tc("recipe.calories"),
suffix: i18n.tc("recipe.calories-suffix"),
},
carbohydrateContent: {
label: i18n.tc("recipe.carbohydrate-content"),
suffix: i18n.tc("recipe.grams"),
},
cholesterolContent: {
label: i18n.tc("recipe.cholesterol-content"),
suffix: i18n.tc("recipe.milligrams"),
},
fatContent: {
label: i18n.tc("recipe.fat-content"),
suffix: i18n.tc("recipe.grams"),
@ -29,6 +37,10 @@ export function useNutritionLabels() {
label: i18n.tc("recipe.protein-content"),
suffix: i18n.tc("recipe.grams"),
},
saturatedFatContent: {
label: i18n.tc("recipe.saturated-fat-content"),
suffix: i18n.tc("recipe.grams"),
},
sodiumContent: {
label: i18n.tc("recipe.sodium-content"),
suffix: i18n.tc("recipe.milligrams"),
@ -37,8 +49,12 @@ export function useNutritionLabels() {
label: i18n.tc("recipe.sugar-content"),
suffix: i18n.tc("recipe.grams"),
},
carbohydrateContent: {
label: i18n.tc("recipe.carbohydrate-content"),
transFatContent: {
label: i18n.tc("recipe.trans-fat-content"),
suffix: i18n.tc("recipe.grams"),
},
unsaturatedFatContent: {
label: i18n.tc("recipe.unsaturated-fat-content"),
suffix: i18n.tc("recipe.grams"),
},
};

View file

@ -461,6 +461,7 @@
"calories-suffix": "calories",
"carbohydrate-content": "Carbohydrate",
"categories": "Categories",
"cholesterol-content": "Cholesterol",
"comment-action": "Comment",
"comment": "Comment",
"comments": "Comments",
@ -507,6 +508,7 @@
"recipe-updated": "Recipe updated",
"remove-from-favorites": "Remove from Favorites",
"remove-section": "Remove Section",
"saturated-fat-content": "Saturated fat",
"save-recipe-before-use": "Save recipe before use",
"section-title": "Section Title",
"servings": "Servings",
@ -517,7 +519,9 @@
"sugar-content": "Sugar",
"title": "Title",
"total-time": "Total Time",
"trans-fat-content": "Trans-fat",
"unable-to-delete-recipe": "Unable to Delete Recipe",
"unsaturated-fat-content": "Unsaturated fat",
"no-recipe": "No Recipe",
"locked-by-owner": "Locked by Owner",
"join-the-conversation": "Join the Conversation",

View file

@ -194,12 +194,16 @@ export interface MergeUnit {
}
export interface Nutrition {
calories?: string | null;
fatContent?: string | null;
proteinContent?: string | null;
carbohydrateContent?: string | null;
cholesterolContent?: string | null;
fatContent?: string | null;
fiberContent?: string | null;
proteinContent?: string | null;
saturatedFatContent?: string | null;
sodiumContent?: string | null;
sugarContent?: string | null;
transFatContent?: string | null;
unsaturatedFatContent?: string | null;
}
export interface ParsedIngredient {
input?: string | null;
@ -486,7 +490,7 @@ export interface ScrapeRecipeTest {
url: string;
useOpenAI?: boolean;
}
export interface SlugResponse {}
export interface SlugResponse { }
export interface TagIn {
name: string;
}