From e5bd155c5781cea7090a0c70001e8d5992fcd6e0 Mon Sep 17 00:00:00 2001 From: Liplum Date: Mon, 2 Sep 2024 08:03:35 +0800 Subject: [PATCH] [timetable] [palette] i18n --- assets/l10n/en.yaml | 1 + assets/l10n/zh-Hans.yaml | 1 + assets/l10n/zh-Hant.yaml | 1 + lib/design/entity/dual_color.dart | 2 +- lib/timetable/i18n.dart | 2 ++ lib/timetable/p13n/builtin.dart | 2 +- lib/timetable/p13n/page/palette.dart | 2 +- lib/timetable/p13n/page/palette_editor.dart | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/l10n/en.yaml b/assets/l10n/en.yaml index 784533a2..fab2a7f4 100644 --- a/assets/l10n/en.yaml +++ b/assets/l10n/en.yaml @@ -184,6 +184,7 @@ timetable: deleteRequest: Conform to delete? deleteRequestDesc: The palette will be deleted permanently without unless a QR code backup is saved addColor: Add a color + appSettings: App settings builtin: classic: name: Classic diff --git a/assets/l10n/zh-Hans.yaml b/assets/l10n/zh-Hans.yaml index 87af25c4..84e64570 100644 --- a/assets/l10n/zh-Hans.yaml +++ b/assets/l10n/zh-Hans.yaml @@ -181,6 +181,7 @@ timetable: deleteRequest: 确定删除? deleteRequestDesc: 推荐先保存二维码备份再删除 addColor: 添加一种配色 + appSettings: 应用设置 builtin: classic: name: 经典 diff --git a/assets/l10n/zh-Hant.yaml b/assets/l10n/zh-Hant.yaml index 53bea380..3717e9b2 100644 --- a/assets/l10n/zh-Hant.yaml +++ b/assets/l10n/zh-Hant.yaml @@ -167,6 +167,7 @@ timetable: deleteRequest: 確認刪除? deleteRequestDesc: 除非儲存了 QR 碼備份,否則調色板將被永久刪除 addColor: 增加一對顏色 + appSettings: 應用程式設定 builtin: classic: name: 經典 diff --git a/lib/design/entity/dual_color.dart b/lib/design/entity/dual_color.dart index 63b2a888..814081c9 100644 --- a/lib/design/entity/dual_color.dart +++ b/lib/design/entity/dual_color.dart @@ -86,7 +86,7 @@ class DualColor { @override String toString() { - return "DualColor(dark:$dark,light:$light)"; + return "DualColor(light:$light,dark:$dark)"; } } diff --git a/lib/timetable/i18n.dart b/lib/timetable/i18n.dart index ae0d9ffb..a16eb6a8 100644 --- a/lib/timetable/i18n.dart +++ b/lib/timetable/i18n.dart @@ -140,6 +140,8 @@ class _Palette { String get color => "$ns.color".tr(); String get details => "$ns.details".tr(); + + String get appSettings => "$ns.appSettings".tr(); } class _Background { diff --git a/lib/timetable/p13n/builtin.dart b/lib/timetable/p13n/builtin.dart index 700b713c..cf65c559 100644 --- a/lib/timetable/p13n/builtin.dart +++ b/lib/timetable/p13n/builtin.dart @@ -96,7 +96,7 @@ class BuiltinTimetablePalettes { colors: [ DualColor(dark: ColorEntry(Color(0xFF7C8787)), light: ColorEntry(Color(0xFFC3DEDE))), DualColor(dark: ColorEntry(Color(0xFF7E7F6D)), light: ColorEntry(Color(0xFFE5E6C4))), - DualColor(dark: ColorEntry(Color(0xFF4D6067)), light: ColorEntry.inverse(Color(0xFF90B2C0))), + DualColor(dark: ColorEntry(Color(0xFF4D6067)), light: ColorEntry(Color(0xFF90B2C0))), DualColor(dark: ColorEntry(Color(0xFF4E6F6D)), light: ColorEntry(Color(0xFF8FCDCA))), DualColor(dark: ColorEntry(Color(0xFF5E6D5E)), light: ColorEntry(Color(0xFFABC8AD))), DualColor(dark: ColorEntry(Color(0xFF4C5253)), light: ColorEntry(Color(0xFFB9C6C9))), diff --git a/lib/timetable/p13n/page/palette.dart b/lib/timetable/p13n/page/palette.dart index 3450dcde..d8ff4db4 100644 --- a/lib/timetable/p13n/page/palette.dart +++ b/lib/timetable/p13n/page/palette.dart @@ -73,7 +73,7 @@ class _TimetableP13nPageState extends ConsumerState wi final palettes = ref.watch(TimetableInit.storage.palette.$rows); return Scaffold( floatingActionButton: FloatingActionButton.extended( - label: i18n.cancel.text(), + label: i18n.add.text(), icon: Icon(context.icons.add), onPressed: addPalette, ), diff --git a/lib/timetable/p13n/page/palette_editor.dart b/lib/timetable/p13n/page/palette_editor.dart index c588f580..f9ab5d8b 100644 --- a/lib/timetable/p13n/page/palette_editor.dart +++ b/lib/timetable/p13n/page/palette_editor.dart @@ -112,7 +112,7 @@ class _TimetablePaletteEditorPageState extends ConsumerState