From 329fd33b69392069d3e2e4e673c3bf6f1f36fd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:36:00 +0800 Subject: [PATCH] fix: lang switch (#553) --- lib/app.dart | 1 + lib/intro.dart | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index e07aa7cf7..42503d815 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -74,6 +74,7 @@ class MyApp extends StatelessWidget { final locale = Stores.setting.locale.fetch().toLocale; return MaterialApp( + key: ValueKey(locale), locale: locale, localizationsDelegates: const [ LibLocalizations.delegate, diff --git a/lib/intro.dart b/lib/intro.dart index 4b08ff2e7..7b8c9778d 100644 --- a/lib/intro.dart +++ b/lib/intro.dart @@ -70,14 +70,9 @@ final class _IntroPage extends StatelessWidget { ).cardx, ListTile( leading: const Icon(MingCute.chart_line_line, size: _kIconSize), - title: TipText(l10n.stat, l10n.parseContainerStatsTip), + title: TipText('Docker ${l10n.stat}', l10n.parseContainerStatsTip), trailing: StoreSwitch(prop: _setting.containerParseStat), ).cardx, - ListTile( - leading: const Icon(OctIcons.cpu), - title: TipText(l10n.noLineChartForCpu, l10n.cpuViewAsProgressTip), - trailing: StoreSwitch(prop: _setting.cpuViewAsProgress), - ).cardx, ListTile( leading: const Icon(Bootstrap.alphabet), title: TipText(l10n.letterCache, l10n.letterCacheTip),