From 76eba1e3e976576a288c09d8a70059e765ac9071 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 18 Jan 2024 11:13:38 -0700 Subject: [PATCH] Localize pageNotFound --- lib/l10n/app_en.arb | 4 +++- lib/l10n/app_zh.arb | 4 +++- lib/ui/screens/page_not_found/page_not_found.dart | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index fad02fb3..e8be0a2e 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -427,5 +427,7 @@ "timelineEvent1969ce": "Apollo 11 mission lands on the moon", "privacyPolicy": "Privacy Policy", "privacyStatement": "As explained in our {privacyUrl} we do not collect any personal information.", - "@privacyStatement": {"placeholders": {"privacyUrl": {}}} + "@privacyStatement": {"placeholders": {"privacyUrl": {}}}, + "pageNotFoundBackButton": "Back to civilization", + "pageNotFoundMessage": "The page you are looking for does not exist." } \ No newline at end of file diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 9f33749c..e970ed12 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -405,5 +405,7 @@ "timelineEvent1957ce": "苏联发射斯普特尼克1号", "timelineEvent1969ce": "阿波罗11号在月球着陆", "privacyPolicy": "隐私政策", - "privacyStatement": "gskinner 非常重视对用户隐私的保护,正如{privacyUrl}里所诉,gskinner 不会收集您的个人信息。" + "privacyStatement": "gskinner 非常重视对用户隐私的保护,正如{privacyUrl}里所诉,gskinner 不会收集您的个人信息。", + "pageNotFoundBackButton": "回到文明", + "pageNotFoundMessage": "您正在寻找的页面不存在" } \ No newline at end of file diff --git a/lib/ui/screens/page_not_found/page_not_found.dart b/lib/ui/screens/page_not_found/page_not_found.dart index 801d125d..29a1ec90 100644 --- a/lib/ui/screens/page_not_found/page_not_found.dart +++ b/lib/ui/screens/page_not_found/page_not_found.dart @@ -27,7 +27,7 @@ class PageNotFound extends StatelessWidget { ), Gap(70), Text( - 'The page you are looking for does not exist.', + $strings.pageNotFoundMessage, style: $styles.text.body.copyWith(color: $styles.colors.offWhite), ), if (PlatformInfo.isDesktop) ...{ @@ -41,7 +41,7 @@ class PageNotFound extends StatelessWidget { semanticLabel: 'Back', child: DarkText( child: Text( - 'Back to civilization', + $strings.pageNotFoundBackButton, style: $styles.text.btn.copyWith(fontSize: 12), ), ),