Replace entire repo content with code from /root/shahikitchen-google/

This commit is contained in:
root
2026-07-03 02:51:15 +00:00
parent c8b7dc95e4
commit 8ccf033329
79 changed files with 7611 additions and 439 deletions
+18
View File
@@ -70,7 +70,25 @@ const LOCALIZED: Partial<Record<Language, Record<string, string>>> = {
}
};
const INCLUSION_CATEGORIES = new Set(['meat', 'chicken', 'vegetarian']);
const DISH_INCLUSION_NOTE_EN = '1x Naan or Rice included';
const DISH_INCLUSION_NOTE_LOCALIZED: Partial<Record<Language, string>> = {
sv: '1x Naan eller ris ingår',
ar: '1x نان أو أرز مشمول',
tr: '1x Naan veya pilav dahil',
hi: '1x नान या चावल शामिल',
ur: '1x نان یا چاول شامل',
};
export function getCategoryName(lang: Language, categoryId: string, fallback: string): string {
if (lang === 'en') return EN[categoryId] ?? fallback;
return LOCALIZED[lang]?.[categoryId] ?? EN[categoryId] ?? fallback;
}
export function getMenuItemInclusionNote(lang: Language, categoryId: string): string | undefined {
if (!INCLUSION_CATEGORIES.has(categoryId)) return undefined;
if (lang === 'en') return DISH_INCLUSION_NOTE_EN;
return DISH_INCLUSION_NOTE_LOCALIZED[lang] ?? DISH_INCLUSION_NOTE_EN;
}