Skip to content

Commit

Permalink
fix: timetable translate 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hoosong0235 authored and sboh1214 committed Aug 17, 2023
1 parent 07fd967 commit f7facad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,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": {
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"timetable": {
"ask_delete_lecture": "'{}' 수업을 삭제하시겠습니까?",
"ask_delete_tab": "{}을(를) 정말 삭제하시겠습니까?",
"ask_delete_tab": "'{}'을(를) 정말 삭제하시겠습니까?",
"my_tab": "내 시간표",
"tab": "시간표 {}",
"dialog": {
Expand Down
8 changes: 6 additions & 2 deletions lib/pages/timetable_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,13 @@ class _TimetablePageState extends State<TimetablePage> {
}

Timetable _buildTimetable(
BuildContext context, List<Lecture> lectures, bool isExamTime) {
BuildContext context,
List<Lecture> lectures,
bool isExamTime,
) {
bool isFirst = true;
final lectureSearchModel = context.watch<LectureSearchModel>();
final isEn = EasyLocalization.of(context)?.currentLocale == Locale('en');

return Timetable(
lectures: (lectureSearchModel.selectedLecture == null)
Expand Down Expand Up @@ -190,7 +194,7 @@ class _TimetablePageState extends State<TimetablePage> {
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(
Expand Down

0 comments on commit f7facad

Please sign in to comment.