From ecbc3205da46376b1a7c1cafdb57ed413352d1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=8A=B9=ED=98=B8?= Date: Thu, 3 Aug 2023 01:27:18 +0900 Subject: [PATCH] fix: timetable translate 2 --- assets/translations/en.json | 4 ++-- assets/translations/ko.json | 2 +- lib/pages/timetable_page.dart | 12 +++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index 10a4ea67..2855c921 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -54,8 +54,8 @@ "remained_datetime": "D-{} days {} hours {} minutes" }, "timetable": { - "ask_delete_lecture": "Are you delete class '{}'?", - "ask_delete_tab": "Do you really want to delete {}?", + "ask_delete_lecture": "Do you want to delete class '{}'?", + "ask_delete_tab": "Do you really want to delete '{}'?", "my_tab": "My Table", "tab": "Table {}", "dialog": { diff --git a/assets/translations/ko.json b/assets/translations/ko.json index 76787269..0b1bde2a 100644 --- a/assets/translations/ko.json +++ b/assets/translations/ko.json @@ -55,7 +55,7 @@ }, "timetable": { "ask_delete_lecture": "'{}' 수업을 삭제하시겠습니까?", - "ask_delete_tab": "{}을(를) 정말 삭제하시겠습니까?", + "ask_delete_tab": "'{}'을(를) 정말 삭제하시겠습니까?", "my_tab": "내 시간표", "tab": "시간표 {}", "dialog": { diff --git a/lib/pages/timetable_page.dart b/lib/pages/timetable_page.dart index a529ebfc..9c702d82 100644 --- a/lib/pages/timetable_page.dart +++ b/lib/pages/timetable_page.dart @@ -150,9 +150,13 @@ class _TimetablePageState extends State { } Timetable _buildTimetable( - BuildContext context, List lectures, bool isExamTime) { + BuildContext context, + List lectures, + bool isExamTime, + ) { bool isFirst = true; final lectureSearchModel = context.watch(); + final isEn = EasyLocalization.of(context)?.currentLocale == Locale('en'); return Timetable( lectures: (lectureSearchModel.selectedLecture == null) @@ -189,7 +193,7 @@ class _TimetablePageState extends State { builder: (context) => AlertDialog( title: Text("common.delete".tr()), content: Text("timetable.ask_delete_lecture").tr( - args: [lecture.title], + args: [isEn ? lecture.titleEn : lecture.title], ), actions: [ IconTextButton( @@ -283,7 +287,9 @@ class _TimetablePageState extends State { color: Colors.white, child: Text( 'timetable.ask_delete_tab'.tr(args: [ - 'timetable.tab'.tr(args: [i.toString()]) + 'timetable.tab'.tr( + args: [i.toString()], + ) ]), style: TextStyle( fontSize: 12,