This commit is contained in:
kjs
2025-11-06 14:46:15 +09:00
parent 832e80cd7f
commit 786576bb76
4 changed files with 172 additions and 80 deletions

View File

@@ -7,7 +7,7 @@ import { Badge } from "@/components/ui/badge";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { toast } from "sonner";
import { MENU_MANAGEMENT_KEYS } from "@/lib/utils/multilang";
import { MENU_MANAGEMENT_KEYS, getMenuTextSync } from "@/lib/utils/multilang";
interface MenuTableProps {
menus: MenuItem[];
@@ -39,7 +39,8 @@ export const MenuTable: React.FC<MenuTableProps> = ({
}) => {
// 다국어 텍스트 가져오기 함수
const getText = (key: string, fallback?: string): string => {
return uiTexts[key] || fallback || key;
// uiTexts에서 먼저 찾고, 없으면 기본 한글 텍스트를 가져옴
return uiTexts[key] || getMenuTextSync(key, "KR") || fallback || key;
};
// 다국어 텍스트 표시 함수 (기본값 처리)