Skip to content

Commit

Permalink
l10n of p13n tile in timetable settings
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Oct 18, 2023
1 parent a6b9e0d commit 5a48e4b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions assets/l10n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ settings:
autoUseImported:
title: Auto-use imported
desc: Use the timetable just imported
p13n:
title: Personalization
desc: Personalize timetable style
school:
title: School
class2nd:
Expand Down
3 changes: 3 additions & 0 deletions assets/l10n/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ settings:
autoUseImported:
title: 自动使用新课程表
desc: 自动使用新导入的课程表
p13n:
title: 个性化
desc: 个性化课程表风格
school:
title: 学校
class2nd:
Expand Down
5 changes: 4 additions & 1 deletion assets/l10n/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ timetable:
deleteRequest: 確認刪除?
deleteRequestDesc: 除非儲存了 QR 碼備份,否則調色板將被永久刪除
addFromQrCode: 已從 QR 碼加載調色盤
addColor: 增加一种顏色
addColor: 增加一種顏色
cellStyle:
title: 單元樣式
entrance:
Expand Down Expand Up @@ -412,6 +412,9 @@ settings:
autoUseImported:
title: 自動使用匯入的
desc: 使用新匯入的課程表
p13n:
title: 個人化
desc: 個人化課程表樣式
school:
title: 學校
class2nd:
Expand Down
4 changes: 4 additions & 0 deletions lib/settings/i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ class _Timetable {
String get autoUseImportedTitle => "$ns.autoUseImported.title".tr();

String get autoUseImportedDesc => "$ns.autoUseImported.desc".tr();

String get p13nTitle => "$ns.p13n.title".tr();

String get p13nDesc => "$ns.p13n.desc".tr();
}

class _School {
Expand Down
4 changes: 2 additions & 2 deletions lib/settings/page/timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class _TimetableSettingsPageState extends State<TimetableSettingsPage> {
Widget buildP13n() {
return ListTile(
leading: const Icon(Icons.color_lens_outlined),
title: "Personalization".text(),
subtitle: "How timetable looks like".text(),
title: i18n.timetable.p13nTitle.text(),
subtitle: i18n.timetable.p13nDesc.text(),
trailing: const Icon(Icons.open_in_new),
onTap: () async {
await context.push("/timetable/p13n");
Expand Down
2 changes: 1 addition & 1 deletion lib/timetable/page/palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _TimetablePaletteEditorState extends State<TimetablePaletteEditor> {
),
ButtonSegment<Brightness>(
value: Brightness.dark,
label: Brightness.light.l10n().text(),
label: Brightness.dark.l10n().text(),
icon: const Icon(Icons.dark_mode),
),
],
Expand Down

0 comments on commit 5a48e4b

Please sign in to comment.