diff --git a/mealie/repos/seed/resources/units/locales/en-US.json b/mealie/repos/seed/resources/units/locales/en-US.json index 336525a5aa5..cdec105db7d 100644 --- a/mealie/repos/seed/resources/units/locales/en-US.json +++ b/mealie/repos/seed/resources/units/locales/en-US.json @@ -1,102 +1,141 @@ { "teaspoon": { "name": "teaspoon", + "plural_name": "teaspoons", "description": "", "abbreviation": "tsp" }, "tablespoon": { "name": "tablespoon", + "plural_name": "tablespoons", "description": "", "abbreviation": "tbsp" }, "cup": { "name": "cup", + "plural_name": "cups", "description": "", - "abbreviation": "cup" + "abbreviation": "c" }, "fluid-ounce": { "name": "fluid ounce", + "plural_name": "fluid ounces", "description": "", "abbreviation": "fl oz" }, "pint": { "name": "pint", + "plural_name": "pints", "description": "", "abbreviation": "pt" }, "quart": { "name": "quart", + "plural_name": "quarts", "description": "", "abbreviation": "qt" }, "gallon": { "name": "gallon", + "plural_name": "gallons", "description": "", "abbreviation": "gal" }, "milliliter": { "name": "milliliter", + "plural_name": "milliliters", "description": "", "abbreviation": "ml" }, "liter": { "name": "liter", + "plural_name": "liters", "description": "", "abbreviation": "l" }, "pound": { "name": "pound", + "plural_name": "pounds", "description": "", - "abbreviation": "lb" + "abbreviation": "lb", + "plural_abbreviation": "lbs" }, "ounce": { "name": "ounce", + "plural_name": "ounces", "description": "", "abbreviation": "oz" }, "gram": { "name": "gram", + "plural_name": "grams", "description": "", "abbreviation": "g" }, "kilogram": { "name": "kilogram", + "plural_name": "kilograms", "description": "", "abbreviation": "kg" }, "milligram": { "name": "milligram", + "plural_name": "milligrams", "description": "", "abbreviation": "mg" }, "splash": { "name": "splash", + "plural_name": "splashes", "description": "", "abbreviation": "" }, "dash": { "name": "dash", + "plural_name": "dashes", "description": "", "abbreviation": "" }, "serving": { "name": "serving", + "plural_name": "servings", "description": "", "abbreviation": "" }, "head": { "name": "head", + "plural_name": "heads", "description": "", "abbreviation": "" }, "clove": { "name": "clove", + "plural_name": "cloves", "description": "", "abbreviation": "" }, "can": { "name": "can", + "plural_name": "cans", + "description": "", + "abbreviation": "" + }, + "bunch": { + "name": "bunch", + "plural_name": "bunches", + "description": "", + "abbreviation": "" + }, + "pack": { + "name": "pack", + "plural_name": "packs", + "description": "", + "abbreviation": "" + }, + "pinch": { + "name": "pinch", + "plural_name": "pinches", "description": "", "abbreviation": "" } -} +} \ No newline at end of file diff --git a/mealie/repos/seed/seeders.py b/mealie/repos/seed/seeders.py index 0582faa1363..438c4a6ac74 100644 --- a/mealie/repos/seed/seeders.py +++ b/mealie/repos/seed/seeders.py @@ -60,8 +60,10 @@ def load_data(self, locale: str | None = None) -> Generator[SaveIngredientUnit, yield SaveIngredientUnit( group_id=self.group_id, name=unit["name"], + plural_name=unit.get("plural_name"), description=unit["description"], abbreviation=unit["abbreviation"], + plural_abbreviation=unit.get("plural_abbreviation"), ) def seed(self, locale: str | None = None) -> None: diff --git a/tests/integration_tests/user_group_tests/test_group_seeder.py b/tests/integration_tests/user_group_tests/test_group_seeder.py index d900895a117..de0c57e850f 100644 --- a/tests/integration_tests/user_group_tests/test_group_seeder.py +++ b/tests/integration_tests/user_group_tests/test_group_seeder.py @@ -27,7 +27,7 @@ def test_seed_foods(api_client: TestClient, unique_user: TestUser, database: All def test_seed_units(api_client: TestClient, unique_user: TestUser, database: AllRepositories): - CREATED_UNITS = 20 + CREATED_UNITS = 23 # Check that the foods was created units = database.ingredient_units.by_group(unique_user.group_id).get_all()