From 8a860da17e99da56677af8e8cab3549c5a4365d4 Mon Sep 17 00:00:00 2001 From: Liplum Date: Mon, 2 Sep 2024 07:00:45 +0800 Subject: [PATCH] [timetable] [patch] recommendations --- assets/l10n/en.yaml | 1 + assets/l10n/zh-Hans.yaml | 1 + assets/l10n/zh-Hant.yaml | 1 + lib/l10n/common.dart | 2 ++ lib/timetable/patch/page/patch.dart | 8 ++++---- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/l10n/en.yaml b/assets/l10n/en.yaml index 965a9840..784533a2 100644 --- a/assets/l10n/en.yaml +++ b/assets/l10n/en.yaml @@ -986,3 +986,4 @@ add: Add rename: Rename enter: Enter comingSoon: COMING SOON +recommendation: Recommendation diff --git a/assets/l10n/zh-Hans.yaml b/assets/l10n/zh-Hans.yaml index c2d27657..87af25c4 100644 --- a/assets/l10n/zh-Hans.yaml +++ b/assets/l10n/zh-Hans.yaml @@ -983,3 +983,4 @@ add: 添加 rename: 重命名 enter: 进入 comingSoon: 敬请期待 +recommendation: 推荐 diff --git a/assets/l10n/zh-Hant.yaml b/assets/l10n/zh-Hant.yaml index 07c852b5..53bea380 100644 --- a/assets/l10n/zh-Hant.yaml +++ b/assets/l10n/zh-Hant.yaml @@ -968,3 +968,4 @@ add: 增加 rename: 重新命名 enter: 進入 comingSoon: 即將推出 +recommendation: 推薦 diff --git a/lib/l10n/common.dart b/lib/l10n/common.dart index bdee23b6..67172c61 100644 --- a/lib/l10n/common.dart +++ b/lib/l10n/common.dart @@ -94,6 +94,8 @@ mixin class CommonI18nMixin { String get comingSoon => "comingSoon".tr(); String get create => "create".tr(); + + String get recommendation => "recommendation".tr(); } class CommonI18n with CommonI18nMixin { diff --git a/lib/timetable/patch/page/patch.dart b/lib/timetable/patch/page/patch.dart index 03a42370..8e4118cb 100644 --- a/lib/timetable/patch/page/patch.dart +++ b/lib/timetable/patch/page/patch.dart @@ -355,7 +355,7 @@ class TimetablePatchEntryRecommendationCard extends StatelessWidget { Card.outlined( child: [ ListTile( - title: "Recommendation".text(), + title: i18n.recommendation.text(style: const TextStyle(fontWeight: FontWeight.bold)), trailing: onClose == null ? null : PlatformIconButton( @@ -364,12 +364,12 @@ class TimetablePatchEntryRecommendationCard extends StatelessWidget { ), ), if (patch is TimetablePatch) - buildPatch(context, patch as TimetablePatch) + buildPatch(context, patch as TimetablePatch).padH(8) else if (patch is TimetablePatchSet) - buildPatchSet(context, patch as TimetablePatchSet), + buildPatchSet(context, patch as TimetablePatchSet).padH(8), FilledButton.tonalIcon( icon: Icon(context.icons.add), - label: "Add this".text(), + label: i18n.add.text(), onPressed: onAdded, ).padAll(8), ].column(caa: CrossAxisAlignment.end),