mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-24 16:53:12 -05:00
fix fluid ounce -> fluid_ounce
This commit is contained in:
@@ -60,7 +60,7 @@ export interface QueryFilterJSONPart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type StandardizedUnitType
|
export type StandardizedUnitType
|
||||||
= | "fluid ounce"
|
= | "fluid_ounce"
|
||||||
| "cup"
|
| "cup"
|
||||||
| "ounce"
|
| "ounce"
|
||||||
| "pound"
|
| "pound"
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ export default defineNuxtComponent({
|
|||||||
const standardUnitItems = computed<StandardUnitItem[]>(() => [
|
const standardUnitItems = computed<StandardUnitItem[]>(() => [
|
||||||
{
|
{
|
||||||
title: i18n.t("data-pages.units.standard-unit-labels.fluid-ounce"),
|
title: i18n.t("data-pages.units.standard-unit-labels.fluid-ounce"),
|
||||||
value: "fluid ounce",
|
value: "fluid_ounce",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18n.t("data-pages.units.standard-unit-labels.cup"),
|
title: i18n.t("data-pages.units.standard-unit-labels.cup"),
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class StandardizedUnitType(StrEnum):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Imperial
|
# Imperial
|
||||||
FLUID_OUNCE = "fluid ounce"
|
FLUID_OUNCE = "fluid_ounce"
|
||||||
CUP = "cup"
|
CUP = "cup"
|
||||||
|
|
||||||
OUNCE = "ounce"
|
OUNCE = "ounce"
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ def merge_quantity_and_unit[T: CreateIngredientUnit](
|
|||||||
|
|
||||||
uc = UnitConverter()
|
uc = UnitConverter()
|
||||||
|
|
||||||
# pre-process units to account for ounce -> fluid ounce conversion
|
# pre-process units to account for ounce -> fluid_ounce conversion
|
||||||
unit_1_standard = uc.parse(unit_1.standard_unit, strict=True)
|
unit_1_standard = uc.parse(unit_1.standard_unit, strict=True)
|
||||||
unit_2_standard = uc.parse(unit_2.standard_unit, strict=True)
|
unit_2_standard = uc.parse(unit_2.standard_unit, strict=True)
|
||||||
unit_1_standard, unit_2_standard = uc._resolve_ounce(unit_1_standard, unit_2_standard)
|
unit_1_standard, unit_2_standard = uc._resolve_ounce(unit_1_standard, unit_2_standard)
|
||||||
|
|||||||
Reference in New Issue
Block a user