From fa2aec82385dd13cdf34ba303c4859ad6245d023 Mon Sep 17 00:00:00 2001 From: Liplum Date: Tue, 24 Sep 2024 10:20:55 +0800 Subject: [PATCH] [timetable] i18n of palette generator --- assets/l10n/en.yaml | 7 ++++++- assets/l10n/zh-Hans.yaml | 7 ++++++- assets/l10n/zh-Hant.yaml | 7 ++++++- lib/timetable/i18n.dart | 12 ++++++++++-- lib/timetable/p13n/page/background.dart | 6 +++--- lib/timetable/p13n/page/palette.dart | 4 ++-- lib/timetable/page/timetable.dart | 2 +- 7 files changed, 34 insertions(+), 11 deletions(-) diff --git a/assets/l10n/en.yaml b/assets/l10n/en.yaml index b6acf793..5637343d 100644 --- a/assets/l10n/en.yaml +++ b/assets/l10n/en.yaml @@ -229,12 +229,13 @@ timetable: authorPlaceholder: Your name, email, or url color: color details: Details - fab: Create newPaletteName: New palette 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 + generate: Generate + create: Create builtin: classic: name: Classic @@ -280,6 +281,10 @@ timetable: antialias: title: Anti-alias desc: Turn off this if image is low in pixels + immersive: + title: Immersive + desc: Expanding images to the full screen + generatePalette: Generate palette livePreview: 0: name: Taken diff --git a/assets/l10n/zh-Hans.yaml b/assets/l10n/zh-Hans.yaml index c5ef5e87..ff6815bd 100644 --- a/assets/l10n/zh-Hans.yaml +++ b/assets/l10n/zh-Hans.yaml @@ -221,12 +221,13 @@ timetable: authorPlaceholder: 你的姓名,电子邮箱,或 url color: 颜色 details: 详情 - fab: 创作 newPaletteName: 新的配色方案 deleteRequest: 确定删除? deleteRequestDesc: 推荐先保存二维码备份再删除 addColor: 添加一种配色 appSettings: 应用设置 + generate: 生成 + create: 创作 builtin: classic: name: 经典 @@ -272,6 +273,10 @@ timetable: antialias: title: 抗锯齿 desc: 如果图像像素较低,请关闭此功能 + immersive: + title: 沉浸式 + desc: 将图像向全屏展开 + generatePalette: 生成配色方案 livePreview: 0: name: 上过的 diff --git a/assets/l10n/zh-Hant.yaml b/assets/l10n/zh-Hant.yaml index acd9e953..93c96f93 100644 --- a/assets/l10n/zh-Hant.yaml +++ b/assets/l10n/zh-Hant.yaml @@ -203,12 +203,13 @@ timetable: authorPlaceholder: 你的姓名,電郵,或 url color: 顏色 details: 詳細資料 - fab: 創作 newPaletteName: 新的調色盤 deleteRequest: 確認刪除? deleteRequestDesc: 除非儲存了 QR 碼備份,否則調色板將被永久刪除 addColor: 增加一對顏色 appSettings: 應用程式設定 + generate: 生成 + create: 創作 builtin: classic: name: 經典 @@ -254,6 +255,10 @@ timetable: antialias: title: 反鋸齒 desc: 如果影像像素較低,請關閉此功能 + immersive: + title: 沉浸效果 + desc: 將影像擴展至全螢幕 + generatePalette: 生成調色盤 livePreview: 0: name: 上過的 diff --git a/lib/timetable/i18n.dart b/lib/timetable/i18n.dart index 43c4ef93..4067a81f 100644 --- a/lib/timetable/i18n.dart +++ b/lib/timetable/i18n.dart @@ -117,8 +117,6 @@ class _Palette { String get title => "$ns.title".tr(); - String get fab => "$ns.fab".tr(); - String get customTab => "$ns.tab.custom".tr(); String get builtinTab => "$ns.tab.builtin".tr(); @@ -144,6 +142,10 @@ class _Palette { String get details => "$ns.details".tr(); String get appSettings => "$ns.appSettings".tr(); + + String get generate => "$ns.generate".tr(); + + String get create => "$ns.create".tr(); } class _Background { @@ -172,6 +174,12 @@ class _Background { String get antialias => "$ns.antialias.title".tr(); String get antialiasDesc => "$ns.antialias.desc".tr(); + + String get immersive => "$ns.immersive.title".tr(); + + String get immersiveDesc => "$ns.immersive.desc".tr(); + + String get generatePalette => "$ns.generatePalette".tr(); } class _Screenshot { diff --git a/lib/timetable/p13n/page/background.dart b/lib/timetable/p13n/page/background.dart index 9a5472f4..718a05d8 100644 --- a/lib/timetable/p13n/page/background.dart +++ b/lib/timetable/p13n/page/background.dart @@ -137,7 +137,7 @@ class _TimetableBackgroundEditorState extends ConsumerState wi FilledButton.tonalIcon( onPressed: generateFromImage, icon: const Icon(Icons.generating_tokens_outlined), - label: "Generate".text(), + label:i18n.p13n.palette.generate.text(), ), FilledButton.icon( onPressed: addPalette, icon: Icon(context.icons.add), - label: "Create".text(), + label: i18n.p13n.palette.create.text(), ), ], persistentFooterAlignment: AlignmentDirectional.center, diff --git a/lib/timetable/page/timetable.dart b/lib/timetable/page/timetable.dart index 2c1d1608..3d0cd7be 100644 --- a/lib/timetable/page/timetable.dart +++ b/lib/timetable/page/timetable.dart @@ -126,7 +126,7 @@ class _TimetableBoardPageState extends ConsumerState { }, ), PullDownItem( - icon: Icons.color_lens, + icon: Icons.color_lens_outlined, title: i18n.p13n.palette.title, onTap: () async { await context.push("/timetable/palettes");