From f998d4d2adc4f582035eb37cf0537eb2d0b1e272 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Mon, 15 May 2023 19:49:34 -0400 Subject: [PATCH] Fix web app i18n issue in account preferences --- docs/releases.md | 3 ++- web/src/components/Account.js | 2 +- web/src/components/Preferences.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/releases.md b/docs/releases.md index 38f7cf25..440b950a 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1190,7 +1190,8 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release * Make emoji lookup for emails more efficient ([#725](https://github.com/binwiederhier/ntfy/pull/725), thanks to [@adamantike](https://github.com/adamantike)) * Fix potential subscriber ID clash ([#712](https://github.com/binwiederhier/ntfy/issues/712), thanks to [@peterbourgon](https://github.com/peterbourgon) for reporting, and [@dropdevrahul](https://github.com/dropdevrahul) for fixing) * Support for `quoted-printable` in incoming emails ([#719](https://github.com/binwiederhier/ntfy/pull/719), thanks to [@Aerion](https://github.com/Aerion)) -* Attachments with filenames that are downloaded using a browser will now download with the proper filename ([#726](https://github.com/binwiederhier/ntfy/issues/726), thanks to [un99known99](https://github.com/un99known99) for reporting, and [@wunter8](https://github.com/wunter8) for fixing) +* Attachments with filenames that are downloaded using a browser will now download with the proper filename ([#726](https://github.com/binwiederhier/ntfy/issues/726), thanks to [@un99known99](https://github.com/un99known99) for reporting, and [@wunter8](https://github.com/wunter8) for fixing) +* Fix web app i18n issue in account preferences ([#730](https://github.com/binwiederhier/ntfy/issues/730), thanks to [@codebude](https://github.com/codebude) for reporting) ### ntfy Android app v1.16.1 (UNRELEASED) diff --git a/web/src/components/Account.js b/web/src/components/Account.js index e5b60077..0e37aa3e 100644 --- a/web/src/components/Account.js +++ b/web/src/components/Account.js @@ -390,7 +390,7 @@ const Stats = () => { description={t("account_usage_attachment_storage_description", { filesize: formatBytes(account.limits.attachment_file_size), expiry: humanizeDuration(account.limits.attachment_expiry_duration * 1000, { - language: i18n.language, + language: i18n.resolvedLanguage, fallbacks: ["en"] }) })} diff --git a/web/src/components/Preferences.js b/web/src/components/Preferences.js index ec1c79da..fc8cb35b 100644 --- a/web/src/components/Preferences.js +++ b/web/src/components/Preferences.js @@ -436,7 +436,7 @@ const Appearance = () => { const Language = () => { const { t, i18n } = useTranslation(); const labelId = "prefLanguage"; - const lang = i18n.language ?? "en"; + const lang = i18n.resolvedLanguage ?? "en"; // Country flags are displayed using emoji. Emoji rendering is handled by platform fonts. // Windows in particular does not yet play nicely with flag emoji so for now, hide flags on Windows.