Skip to content

Commit

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

0 comments on commit ecbc320

Please sign in to comment.