Skip to content

Commit

Permalink
[timetable] i18n of palette generator
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 24, 2024
1 parent 1a34272 commit fa2aec8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 11 deletions.
7 changes: 6 additions & 1 deletion assets/l10n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion assets/l10n/zh-Hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ timetable:
authorPlaceholder: 你的姓名,电子邮箱,或 url
color: 颜色
details: 详情
fab: 创作
newPaletteName: 新的配色方案
deleteRequest: 确定删除?
deleteRequestDesc: 推荐先保存二维码备份再删除
addColor: 添加一种配色
appSettings: 应用设置
generate: 生成
create: 创作
builtin:
classic:
name: 经典
Expand Down Expand Up @@ -272,6 +273,10 @@ timetable:
antialias:
title: 抗锯齿
desc: 如果图像像素较低,请关闭此功能
immersive:
title: 沉浸式
desc: 将图像向全屏展开
generatePalette: 生成配色方案
livePreview:
0:
name: 上过的
Expand Down
7 changes: 6 additions & 1 deletion assets/l10n/zh-Hant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,13 @@ timetable:
authorPlaceholder: 你的姓名,電郵,或 url
color: 顏色
details: 詳細資料
fab: 創作
newPaletteName: 新的調色盤
deleteRequest: 確認刪除?
deleteRequestDesc: 除非儲存了 QR 碼備份,否則調色板將被永久刪除
addColor: 增加一對顏色
appSettings: 應用程式設定
generate: 生成
create: 創作
builtin:
classic:
name: 經典
Expand Down Expand Up @@ -254,6 +255,10 @@ timetable:
antialias:
title: 反鋸齒
desc: 如果影像像素較低,請關閉此功能
immersive:
title: 沉浸效果
desc: 將影像擴展至全螢幕
generatePalette: 生成調色盤
livePreview:
0:
name: 上過的
Expand Down
12 changes: 10 additions & 2 deletions lib/timetable/i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions lib/timetable/p13n/page/background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class _TimetableBackgroundEditorState extends ConsumerState<TimetableBackgroundE
if (renderImageFile != null)
FilledButton.tonalIcon(
icon: const Icon(Icons.generating_tokens_outlined),
label: "Generate palette".text(),
label: i18n.p13n.background.generatePalette.text(),
onPressed: () async {
await addPaletteFromImageByGenerator(
context,
Expand Down Expand Up @@ -366,8 +366,8 @@ class _TimetableBackgroundEditorState extends ConsumerState<TimetableBackgroundE
final immersiveWallpaper = ref.watch(Settings.timetable.$immersiveWallpaper);
return SwitchListTile.adaptive(
secondary: const Icon(Icons.vrpano_outlined),
title: "Immersive".text(),
subtitle: "Expanding the image to full screen".text(),
title: i18n.p13n.background.immersive.text(),
subtitle: i18n.p13n.background.immersiveDesc.text(),
value: immersiveWallpaper,
onChanged: (v) {
ref.read(Settings.timetable.$immersiveWallpaper.notifier).set(v);
Expand Down
4 changes: 2 additions & 2 deletions lib/timetable/p13n/page/palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ class _TimetableP13nPageState extends ConsumerState<TimetablePaletteListPage> 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,
Expand Down
2 changes: 1 addition & 1 deletion lib/timetable/page/timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class _TimetableBoardPageState extends ConsumerState<TimetableBoardPage> {
},
),
PullDownItem(
icon: Icons.color_lens,
icon: Icons.color_lens_outlined,
title: i18n.p13n.palette.title,
onTap: () async {
await context.push("/timetable/palettes");
Expand Down

0 comments on commit fa2aec8

Please sign in to comment.