Unify shopping category localization and limit meal ingredient categories to food-relevant options

This commit is contained in:
Serhiy Bobrov
2026-04-19 19:14:46 +03:00
parent ccb41a056e
commit 819d9e8b1d
3 changed files with 41 additions and 28 deletions
+20
View File
@@ -0,0 +1,20 @@
import { t } from '/i18n.js';
export const DEFAULT_CATEGORY_NAME = 'Sonstiges';
export const DEFAULT_CATEGORY_I18N = {
'Obst & Gemüse': 'shopping.catFruitVeg',
'Backwaren': 'shopping.catBakery',
'Milchprodukte': 'shopping.catDairy',
'Fleisch & Fisch': 'shopping.catMeatFish',
'Tiefkühl': 'shopping.catFrozen',
'Getränke': 'shopping.catDrinks',
'Haushalt': 'shopping.catHousehold',
'Drogerie': 'shopping.catDrugstore',
'Sonstiges': 'shopping.catMisc',
};
export function categoryLabel(name) {
const key = DEFAULT_CATEGORY_I18N[name];
return key ? t(key) : name;
}