From 95fafb122cfb7dcb89b68c39cd5b4b0cc30002d5 Mon Sep 17 00:00:00 2001 From: kevinmj12 Date: Sun, 12 May 2024 23:05:42 +0900 Subject: [PATCH] =?UTF-8?q?feature:#194/=ED=95=99=EC=8B=9D=20=EC=98=81?= =?UTF-8?q?=EC=96=B4=EB=A1=9C=20=EB=B0=9B=EC=95=84=EC=98=A4=EA=B8=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/translations/en-US.json | 9 + .../assets/translations/ko-KR.json | 16 +- front/capstone_front/lib/main.dart | 2 +- .../lib/models/cafeteria_menu_model.dart | 183 ++++++++++++++++++ .../lib/models/cafeteria_menu_model_en.dart | 107 ---------- .../lib/models/cafeteria_menu_model_ko.dart | 105 ---------- .../cafeteriaMenu/cafeteriaMenuScreen.dart | 16 +- .../lib/screens/home/home_screen.dart | 20 +- .../lib/services/cafeteria_menu_service.dart | 4 +- front/capstone_front/pubspec.yaml | 4 - 10 files changed, 228 insertions(+), 238 deletions(-) create mode 100644 front/capstone_front/lib/models/cafeteria_menu_model.dart delete mode 100644 front/capstone_front/lib/models/cafeteria_menu_model_en.dart delete mode 100644 front/capstone_front/lib/models/cafeteria_menu_model_ko.dart diff --git a/front/capstone_front/assets/translations/en-US.json b/front/capstone_front/assets/translations/en-US.json index fb2a43e349..5334cb8adf 100644 --- a/front/capstone_front/assets/translations/en-US.json +++ b/front/capstone_front/assets/translations/en-US.json @@ -29,5 +29,14 @@ "chatbotScreen": { "chatbot": "Chat Bot", "textfield_hint": "Please enter your questions" + }, + "weekday": { + "mon": "MON", + "tue": "TUE", + "wed": "WED", + "thu": "THU", + "fri": "FRI", + "sat": "SAT", + "sun": "SUN" } } diff --git a/front/capstone_front/assets/translations/ko-KR.json b/front/capstone_front/assets/translations/ko-KR.json index a06ff4ba43..fc9e0f26c3 100644 --- a/front/capstone_front/assets/translations/ko-KR.json +++ b/front/capstone_front/assets/translations/ko-KR.json @@ -43,6 +43,10 @@ "notice": "공지사항", "cafeteria": "학식정보", "school_info": "학교정보", + "other_info": "기타정보", + "shcool_map": "학교지도", + "facility_info": "시설정보", + "shuttle_info": "셔틀정보", "qna": "질문과 답변", "faq": "자주 묻는 질문", "community": "커뮤니티", @@ -55,11 +59,21 @@ "no": "아니요", "account_setting": "계정 설정", "logout": "로그아웃", - "no_data": "데이터가 없습니다" + "no_data": "데이터가 없습니다", + "use_chatbot": "챗봇 사용하기" }, "cafeteria": { "no_data": "미운영중입니다" }, + "weekday": { + "mon": "월", + "tue": "화", + "wed": "수", + "thu": "목", + "fri": "금", + "sat": "토", + "sun": "일" + }, "speech": { "speech_practice": "발음 연습", "example_sentence": "예문", diff --git a/front/capstone_front/lib/main.dart b/front/capstone_front/lib/main.dart index 2fbdbb6e1e..d6629f80a4 100644 --- a/front/capstone_front/lib/main.dart +++ b/front/capstone_front/lib/main.dart @@ -1,6 +1,6 @@ import 'package:capstone_front/firebase_options.dart'; import 'package:capstone_front/models/chat_init_model.dart'; -import 'package:capstone_front/models/cafeteria_menu_model_ko.dart'; +import 'package:capstone_front/models/cafeteria_menu_model.dart'; import 'package:capstone_front/models/helper_article_preview_model.dart'; import 'package:capstone_front/models/notice_model.dart'; import 'package:capstone_front/models/qna_post_model.dart'; diff --git a/front/capstone_front/lib/models/cafeteria_menu_model.dart b/front/capstone_front/lib/models/cafeteria_menu_model.dart new file mode 100644 index 0000000000..83cd7680f5 --- /dev/null +++ b/front/capstone_front/lib/models/cafeteria_menu_model.dart @@ -0,0 +1,183 @@ +class CafeteriaMenuModel { + List>> cafeteriaMenus = []; + List cafeteriaKo = [ + "한울식당(법학관 지하1층)", + "학생식당(복지관 1층)", + "교직원식당(복지관 1층)", + "청향 한식당(법학관 5층)", + "청향 양식당(법학관 5층)", + "생활관식당 일반식(생활관 A동 1층)", + "생활관식당 정기식(생활관 A동 1층)", + ]; + List cafeteriaEn = [ + "Hanwool Restaurant (B1F, Law Building)", + "Student Center (Welfare Center 1F)", + "Faculty and Staff Cafeteria (Welfare Center, 1st floor)", + "Cheonghyang Korean Restaurant (5th floor, Law Building)", + "Cheonghyang Form Hall (5th floor of the Law Building)", + "Dormitory Cafeteria (Dormitory A, 1st floor)", + "Dormitory Cafeteria (Dormitory Building A, 1st floor)", + ]; + + void addFunc( + var data, List> targetList, String type, String addName) { + if (data != null && data[type] != null) { + String tmpMenu = data[type]["메뉴"]; + // menu + tmpMenu = tmpMenu.replaceAll('\r\n', ' '); + // ※가 2번 나오면 줄바꿈 + int tmp1 = 0; + // []가 2번 이상 나오면 줄바꿈 + int tmp2 = 0; + for (int i = 0; i < tmpMenu.length; i++) { + if (tmpMenu[i] == '※') { + tmp1 += 1; + if (tmp1 == 1) { + tmpMenu = + '${tmpMenu.substring(0, i + 1)} ${tmpMenu.substring(i + 1)}'; + } + } else if (tmpMenu[i] == '[') { + tmp2 += 1; + if (tmp2 >= 2) { + tmpMenu = '${tmpMenu.substring(0, i)}\n${tmpMenu.substring(i)}'; + i += 2; + } + } else if (tmpMenu[i] == 'ï') { + tmpMenu = '${tmpMenu.substring(0, i)}${tmpMenu.substring(i + 3)}'; + i += 2; + } + if (tmp1 == 2) { + tmp1 = 0; + tmpMenu = + '${tmpMenu.substring(0, i + 1)}\n${tmpMenu.substring(i + 2)}'; + } + } + targetList.add([addName, tmpMenu, data[type]["가격"]]); + } + } + + void addDataKo(int cafeteriaIndex, var data) { + List> tmpList = []; + if (cafeteriaIndex == 0) { + addFunc(data, tmpList, "1코너
SNACK1", "1코너 SNACK1"); + addFunc(data, tmpList, "1코너
SNACK2", "1코너 SNACK2"); + addFunc(data, tmpList, "2코너
NOODLE", "2코너 NOODLE"); + addFunc(data, tmpList, "3코너
CUTLET", "3코너 CUTLET"); + addFunc(data, tmpList, "4코너
RICE.Oven", "4코너 RICE.Oven"); + addFunc(data, tmpList, "5코너
GUKBAP.Chef", "5코너 GUKBAP.Chef"); + } else if (cafeteriaIndex == 1) { + addFunc(data, tmpList, "착한아침", "착한아침"); + addFunc(data, tmpList, "천원의 아침밥", "천원의 아침밥"); + addFunc(data, tmpList, "가마
중식", "가마 중식"); + addFunc(data, tmpList, "데일리밥
중식", "데일리밥 중식"); + addFunc(data, tmpList, "채식
중식", "채식 중식"); + addFunc(data, tmpList, "인터쉐프
중식", "인터쉐프 중식"); + addFunc(data, tmpList, "누들송
중식", "누들송 중식"); + addFunc(data, tmpList, "석식Ⅰ", "석식Ⅰ"); + addFunc(data, tmpList, "석식Ⅱ", "석식Ⅱ"); + } else if (cafeteriaIndex == 2) { + addFunc(data, tmpList, "키친1", "키친1"); + addFunc(data, tmpList, "키친2", "키친2"); + addFunc(data, tmpList, "오늘의
샐러드", "오늘의 샐러드"); + addFunc(data, tmpList, "석식", "석식"); + } else if (cafeteriaIndex == 3) { + addFunc(data, tmpList, "메뉴1", "메뉴1"); + addFunc(data, tmpList, "메뉴2", "메뉴2"); + addFunc(data, tmpList, "메뉴3", "메뉴3"); + addFunc(data, tmpList, "메뉴4", "메뉴4"); + } else if (cafeteriaIndex == 4) { + addFunc(data, tmpList, "파스타", "PASTA"); + addFunc(data, tmpList, "리조또", "RISOTTO"); + addFunc(data, tmpList, "STEAK", "STEAK"); + } else if (cafeteriaIndex == 5) { + addFunc(data, tmpList, "중식", "중식"); + } else if (cafeteriaIndex == 6) { + if (data != null && data["석식"] != null) { + tmpList.add(["석식", data["석식"]["메뉴"], "정기식 신청자 한정"]); + } + } + cafeteriaMenus.add(tmpList); + } + + void addDataEn(int cafeteriaIndex, var data) { + List> tmpList = []; + if (cafeteriaIndex == 0) { + addFunc(data, tmpList, "1Corner\u003Cbr\u003ESNACK1", "Corner1 SNACK1"); + addFunc(data, tmpList, "1Corner\u003Cbr\u003ESNACK2", "Corner1 SNACK2"); + addFunc(data, tmpList, "2Corner\u003CBR\u003ENOODLE", "Corner2 NOODLE"); + addFunc(data, tmpList, "3Corner\u003Cbr\u003ECUTLET", "Corner3 CUTLET"); + addFunc( + data, tmpList, "4Corner\u003Cbr\u003ERICE.Oven", "Corner4 RICE.Oven"); + addFunc(data, tmpList, "5Corner\u003Cbr\u003EGUKBAP.Chef", + "Corner5 GUKBAP.Chef"); + } else if (cafeteriaIndex == 1) { + addFunc(data, tmpList, "Good Morning", "Good Morning"); + addFunc(data, tmpList, "Breakfast for a Thousand", + "Breakfast for a Thousand"); + addFunc(data, tmpList, "Kiln\u003Cbr\u003ELunch", "Kama lunch"); + addFunc( + data, tmpList, "Daily Meals\u003Cbr\u003ELunch", "DailyBop Lunch"); + addFunc( + data, tmpList, "Vegetarian\u003Cbr\u003EMedium", "Vegiterian Lunch"); + addFunc(data, tmpList, "InterChef\u003Cbr\u003ELunch", "InterChef Lunch"); + addFunc( + data, tmpList, "Noodlesong\u003Cbr\u003ELunch", "NoodleSong Lunch"); + addFunc(data, tmpList, "Dinner I", "Dinner Ⅰ"); + addFunc(data, tmpList, "Dinner II", "Dinner Ⅱ"); + } else if (cafeteriaIndex == 2) { + addFunc(data, tmpList, "Kitchen1", "Kitchen1"); + addFunc(data, tmpList, "Kitchen2", "Kitchen2"); + addFunc(data, tmpList, "Today's\u003Cbr\u003ESalad", "Today's Salad"); + addFunc(data, tmpList, "Dinner", "Dinner"); + } else if (cafeteriaIndex == 3) { + addFunc(data, tmpList, "Menu1", "Menu1"); + addFunc(data, tmpList, "Menu2", "Menu2"); + addFunc(data, tmpList, "Menu3", "Menu3"); + addFunc(data, tmpList, "Menu4", "Menu4"); + } else if (cafeteriaIndex == 4) { + addFunc(data, tmpList, "PASTA", "PASTA"); + addFunc(data, tmpList, "RICE", "RISOTTO"); + addFunc(data, tmpList, "STEAK", "STEAK"); + } else if (cafeteriaIndex == 5) { + addFunc(data, tmpList, "Lunch", "Lunch"); + } else if (cafeteriaIndex == 6) { + if (data != null && data["Dinner"] != null) { + tmpList.add(["Dinner", data["Dinner"]["메뉴"], "Applicants only"]); + } + } + cafeteriaMenus.add(tmpList); + } + + CafeteriaMenuModel.fromJson( + List json, String date, String language) { + if (language == 'KO') { + for (int i = 0; i < cafeteriaKo.length; i++) { + bool dataAdded = false; + for (int j = 0; j < json.length; j++) { + if (json[j][cafeteriaKo[i]] != null) { + addDataKo(i, json[j][cafeteriaKo[i]][date]); + dataAdded = true; + break; + } + } + if (!dataAdded) { + cafeteriaMenus.add([]); + } + } + } else if (language == 'EN-US') { + for (int i = 0; i < cafeteriaEn.length; i++) { + bool dataAdded = false; + for (int j = 0; j < json.length; j++) { + if (json[j][cafeteriaEn[i]] != null) { + addDataEn(i, json[j][cafeteriaEn[i]][date]); + dataAdded = true; + break; + } + } + if (!dataAdded) { + cafeteriaMenus.add([]); + } + } + } + } +} diff --git a/front/capstone_front/lib/models/cafeteria_menu_model_en.dart b/front/capstone_front/lib/models/cafeteria_menu_model_en.dart deleted file mode 100644 index aa05a19679..0000000000 --- a/front/capstone_front/lib/models/cafeteria_menu_model_en.dart +++ /dev/null @@ -1,107 +0,0 @@ -class CafeteriaMenuModelEn { - List cafeteria = [ - "Hanwool Restaurant (B1F, Law Building)", - "Student Center (Welfare Center 1F)", - "Faculty and Staff Cafeteria (Welfare Center, 1st floor)", - "Cheonghyang Korean Restaurant (5th floor, Law Building)", - "Cheonghyang Form Hall (5th floor of the Law Building)", - "Dormitory Cafeteria (Dormitory A, 1st floor)", - "Dormitory Cafeteria (Dormitory Building A, 1st floor)", - ]; - List>> cafeteriaMenus = []; - - void addFunc( - var data, List> targetList, String type, String addName) { - if (data != null && data[type] != null) { - String tmpMenu = data[type]["메뉴"]; - // menu - tmpMenu = tmpMenu.replaceAll('\r\n', ' '); - // ※가 2번 나오면 줄바꿈 - int tmp1 = 0; - // []가 2번 이상 나오면 줄바꿈 - int tmp2 = 0; - for (int i = 0; i < tmpMenu.length; i++) { - if (tmpMenu[i] == '※') { - tmp1 += 1; - if (tmp1 == 1) { - tmpMenu = - '${tmpMenu.substring(0, i + 1)} ${tmpMenu.substring(i + 1)}'; - } - } else if (tmpMenu[i] == '[') { - tmp2 += 1; - if (tmp2 >= 2) { - tmpMenu = '${tmpMenu.substring(0, i)}\n${tmpMenu.substring(i)}'; - i += 2; - } - } - if (tmp1 == 2) { - tmp1 = 0; - tmpMenu = - '${tmpMenu.substring(0, i + 1)}\n${tmpMenu.substring(i + 2)}'; - } - } - targetList.add([addName, tmpMenu, data[type]["가격"]]); - } - } - - void addData(int cafeteriaIndex, var data) { - List> tmpList = []; - if (cafeteriaIndex == 0) { - addFunc(data, tmpList, "1Corner\u003Cbr\u003ESNACK1", "1Corner SNACK1"); - addFunc(data, tmpList, "1Corner\u003Cbr\u003ESNACK2", "1Corner SNACK2"); - addFunc(data, tmpList, "2Corner\u003CBR\u003ENOODLE", "2Corner NOODLE"); - addFunc(data, tmpList, "3Corner\u003Cbr\u003ECUTLET", "3Corner CUTLET"); - addFunc( - data, tmpList, "4Corner\u003Cbr\u003ERICE.Oven", "4Corner RICE.Oven"); - addFunc(data, tmpList, "5Corner\u003Cbr\u003EGUKBAP.Chef", - "5Corner GUKBAP.Chef"); - } else if (cafeteriaIndex == 1) { - addFunc(data, tmpList, "착한아침", "착한아침"); - addFunc(data, tmpList, "천원의 아침밥", "천원의 아침밥"); - addFunc(data, tmpList, "가마
중식", "가마 중식"); - addFunc(data, tmpList, "데일리밥
중식", "데일리밥 중식"); - addFunc(data, tmpList, "채식
중식", "채식 중식"); - addFunc(data, tmpList, "인터쉐프
중식", "인터쉐프 중식"); - addFunc(data, tmpList, "누들송
중식", "누들송 중식"); - addFunc(data, tmpList, "석식Ⅰ", "석식Ⅰ"); - addFunc(data, tmpList, "석식Ⅱ", "석식Ⅱ"); - } else if (cafeteriaIndex == 2) { - addFunc(data, tmpList, "키친1", "키친1"); - addFunc(data, tmpList, "키친2", "키친2"); - addFunc(data, tmpList, "오늘의
샐러드", "오늘의 샐러드"); - addFunc(data, tmpList, "석식", "석식"); - } else if (cafeteriaIndex == 3) { - addFunc(data, tmpList, "메뉴1", "메뉴1"); - addFunc(data, tmpList, "메뉴2", "메뉴2"); - addFunc(data, tmpList, "메뉴3", "메뉴3"); - addFunc(data, tmpList, "메뉴4", "메뉴4"); - } else if (cafeteriaIndex == 4) { - addFunc(data, tmpList, "파스타", "PASTA"); - addFunc(data, tmpList, "리조또", "RISOTTO"); - addFunc(data, tmpList, "STEAK", "STEAK"); - } else if (cafeteriaIndex == 5) { - addFunc(data, tmpList, "중식", "중식"); - } else if (cafeteriaIndex == 6) { - if (data != null && data["석식"] != null) { - tmpList.add(["생활관식당 정기식", data["석식"]["메뉴"], "정기식 신청자 한정"]); - } - } - cafeteriaMenus.add(tmpList); - } - - CafeteriaMenuModelEn.fromJson(List json, String date) { - for (int i = 0; i < cafeteria.length; i++) { - bool dataAdded = false; - for (int j = 0; j < json.length; j++) { - if (json[j][cafeteria[i]] != null) { - addData(i, json[j][cafeteria[i]][date]); - dataAdded = true; - break; - } - } - if (!dataAdded) { - cafeteriaMenus.add([]); - } - } - } -} diff --git a/front/capstone_front/lib/models/cafeteria_menu_model_ko.dart b/front/capstone_front/lib/models/cafeteria_menu_model_ko.dart deleted file mode 100644 index ec0884b1cb..0000000000 --- a/front/capstone_front/lib/models/cafeteria_menu_model_ko.dart +++ /dev/null @@ -1,105 +0,0 @@ -class CafeteriaMenuModel { - List cafeteria = [ - "한울식당(법학관 지하1층)", - "학생식당(복지관 1층)", - "교직원식당(복지관 1층)", - "청향 한식당(법학관 5층)", - "청향 양식당(법학관 5층)", - "생활관식당 일반식(생활관 A동 1층)", - "생활관식당 정기식(생활관 A동 1층)", - ]; - List>> cafeteriaMenus = []; - - void addFunc( - var data, List> targetList, String type, String addName) { - if (data != null && data[type] != null) { - String tmpMenu = data[type]["메뉴"]; - // menu - tmpMenu = tmpMenu.replaceAll('\r\n', ' '); - // ※가 2번 나오면 줄바꿈 - int tmp1 = 0; - // []가 2번 이상 나오면 줄바꿈 - int tmp2 = 0; - for (int i = 0; i < tmpMenu.length; i++) { - if (tmpMenu[i] == '※') { - tmp1 += 1; - if (tmp1 == 1) { - tmpMenu = - '${tmpMenu.substring(0, i + 1)} ${tmpMenu.substring(i + 1)}'; - } - } else if (tmpMenu[i] == '[') { - tmp2 += 1; - if (tmp2 >= 2) { - tmpMenu = '${tmpMenu.substring(0, i)}\n${tmpMenu.substring(i)}'; - i += 2; - } - } - if (tmp1 == 2) { - tmp1 = 0; - tmpMenu = - '${tmpMenu.substring(0, i + 1)}\n${tmpMenu.substring(i + 2)}'; - } - } - targetList.add([addName, tmpMenu, data[type]["가격"]]); - } - } - - void addData(int cafeteriaIndex, var data) { - List> tmpList = []; - if (cafeteriaIndex == 0) { - addFunc(data, tmpList, "1코너
SNACK1", "1코너 SNACK1"); - addFunc(data, tmpList, "1코너
SNACK2", "1코너 SNACK2"); - addFunc(data, tmpList, "2코너
NOODLE", "2코너 NOODLE"); - addFunc(data, tmpList, "3코너
CUTLET", "3코너 CUTLET"); - addFunc(data, tmpList, "4코너
RICE.Oven", "4코너 RICE.Oven"); - addFunc(data, tmpList, "5코너
GUKBAP.Chef", "5코너 GUKBAP.Chef"); - } else if (cafeteriaIndex == 1) { - addFunc(data, tmpList, "착한아침", "착한아침"); - addFunc(data, tmpList, "천원의 아침밥", "천원의 아침밥"); - addFunc(data, tmpList, "가마
중식", "가마 중식"); - addFunc(data, tmpList, "데일리밥
중식", "데일리밥 중식"); - addFunc(data, tmpList, "채식
중식", "채식 중식"); - addFunc(data, tmpList, "인터쉐프
중식", "인터쉐프 중식"); - addFunc(data, tmpList, "누들송
중식", "누들송 중식"); - addFunc(data, tmpList, "석식Ⅰ", "석식Ⅰ"); - addFunc(data, tmpList, "석식Ⅱ", "석식Ⅱ"); - } else if (cafeteriaIndex == 2) { - addFunc(data, tmpList, "키친1", "키친1"); - addFunc(data, tmpList, "키친2", "키친2"); - addFunc(data, tmpList, "오늘의
샐러드", "오늘의 샐러드"); - addFunc(data, tmpList, "석식", "석식"); - } else if (cafeteriaIndex == 3) { - addFunc(data, tmpList, "메뉴1", "메뉴1"); - addFunc(data, tmpList, "메뉴2", "메뉴2"); - addFunc(data, tmpList, "메뉴3", "메뉴3"); - addFunc(data, tmpList, "메뉴4", "메뉴4"); - } else if (cafeteriaIndex == 4) { - addFunc(data, tmpList, "파스타", "PASTA"); - addFunc(data, tmpList, "리조또", "RISOTTO"); - addFunc(data, tmpList, "STEAK", "STEAK"); - } else if (cafeteriaIndex == 5) { - addFunc(data, tmpList, "중식", "중식"); - } else if (cafeteriaIndex == 6) { - if (data != null && data["석식"] != null) { - tmpList.add(["생활관식당 정기식", data["석식"]["메뉴"], "정기식 신청자 한정"]); - } - } - cafeteriaMenus.add(tmpList); - } - - CafeteriaMenuModel.fromJson(List json, String date) { - for (int i = 0; i < cafeteria.length; i++) { - bool dataAdded = false; - for (int j = 0; j < json.length; j++) { - if (json[j][cafeteria[i]] != null) { - addData(i, json[j][cafeteria[i]][date]); - dataAdded = true; - break; - } - } - if (!dataAdded) { - cafeteriaMenus.add([]); - } - } - } -} diff --git a/front/capstone_front/lib/screens/cafeteriaMenu/cafeteriaMenuScreen.dart b/front/capstone_front/lib/screens/cafeteriaMenu/cafeteriaMenuScreen.dart index a9cac05510..af13c1ddd9 100644 --- a/front/capstone_front/lib/screens/cafeteriaMenu/cafeteriaMenuScreen.dart +++ b/front/capstone_front/lib/screens/cafeteriaMenu/cafeteriaMenuScreen.dart @@ -1,5 +1,5 @@ import 'package:capstone_front/main.dart'; -import 'package:capstone_front/models/cafeteria_menu_model_ko.dart'; +import 'package:capstone_front/models/cafeteria_menu_model.dart'; import 'package:capstone_front/screens/cafeteriaMenu/menuCard.dart'; import 'package:capstone_front/screens/main_screen.dart'; import 'package:capstone_front/services/cafeteria_menu_service.dart'; @@ -168,19 +168,19 @@ class _CafeteriaMenuScreenState extends State String _getWeekDayName(int weekday) { switch (weekday) { case 1: - return '월'; + return tr('weekday.mon'); case 2: - return '화'; + return tr('weekday.tue'); case 3: - return '수'; + return tr('weekday.wed'); case 4: - return '목'; + return tr('weekday.thu'); case 5: - return '금'; + return tr('weekday.fri'); case 6: - return '토'; + return tr('weekday.sat'); case 7: - return '일'; + return tr('weekday.sun'); default: return ''; } diff --git a/front/capstone_front/lib/screens/home/home_screen.dart b/front/capstone_front/lib/screens/home/home_screen.dart index 894f1c1693..0fa3d41fb2 100644 --- a/front/capstone_front/lib/screens/home/home_screen.dart +++ b/front/capstone_front/lib/screens/home/home_screen.dart @@ -250,9 +250,9 @@ class _HomeScreenState extends State content: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( - "기타정보", - style: TextStyle( + Text( + tr('mainScreen.other_info'), + style: const TextStyle( fontSize: 24, fontWeight: FontWeight.w700, ), @@ -263,7 +263,7 @@ class _HomeScreenState extends State // MainAxisAlignment.spaceBetween, children: [ MenuButton( - title: "학교지도", + title: tr('mainScreen.shcool_map'), icon: Icons.map_outlined, routeCallbackFun: () { Navigator.push( @@ -278,7 +278,7 @@ class _HomeScreenState extends State width: 15, ), MenuButton( - title: "시설정보", + title: tr('mainScreen.facility_info'), icon: Icons.business, routeCallbackFun: () { Navigator.push( @@ -293,7 +293,7 @@ class _HomeScreenState extends State width: 15, ), MenuButton( - title: "셔틀정보", + title: tr('mainScreen.shuttle_info'), icon: Icons.directions_bus, routeCallbackFun: () { Navigator.push( @@ -347,11 +347,11 @@ class _HomeScreenState extends State duration: const Duration(milliseconds: 500), child: CustomPaint( painter: BubblePainter2(), - child: const Padding( - padding: EdgeInsets.all(10.0), + child: Padding( + padding: const EdgeInsets.all(10.0), child: Text( - "챗봇 사용하기", - style: TextStyle(fontWeight: FontWeight.w500), + tr("mainScreen.use_chatbot"), + style: const TextStyle(fontWeight: FontWeight.w500), ), ), ), diff --git a/front/capstone_front/lib/services/cafeteria_menu_service.dart b/front/capstone_front/lib/services/cafeteria_menu_service.dart index 201dfc7b27..1267d3a732 100644 --- a/front/capstone_front/lib/services/cafeteria_menu_service.dart +++ b/front/capstone_front/lib/services/cafeteria_menu_service.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:capstone_front/models/api_fail_response.dart'; -import 'package:capstone_front/models/cafeteria_menu_model_ko.dart'; +import 'package:capstone_front/models/cafeteria_menu_model.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:http/http.dart' as http; @@ -20,7 +20,7 @@ Future getCafeteriaMenu(String date) async { if (response.statusCode == 200) { // print(json['response']); - return CafeteriaMenuModel.fromJson(json['response'], date); + return CafeteriaMenuModel.fromJson(json['response'], date, language!); } else { var apiFailResponse = ApiFailResponse.fromJson(json); print('Request failed with status: ${response.statusCode}.'); diff --git a/front/capstone_front/pubspec.yaml b/front/capstone_front/pubspec.yaml index 5c504d2721..7752dfbe98 100644 --- a/front/capstone_front/pubspec.yaml +++ b/front/capstone_front/pubspec.yaml @@ -59,11 +59,7 @@ dependencies: record: ^5.0.5 change_app_package_name: ^1.1.0 photo_view: ^0.15.0 -<<<<<<< HEAD flutter_native_splash: ^2.4.0 -======= - http_parser: ^4.0.2 ->>>>>>> ef5ca42a7f78539f2a487c0053055c0da497b831 dev_dependencies: flutter_test: