Просмотр исходного кода

Fix web app i18n issue in account preferences

binwiederhier 2 лет назад
Родитель
Сommit
f998d4d2ad
3 измененных файлов с 4 добавлено и 3 удалено
  1. 2 1
      docs/releases.md
  2. 1 1
      web/src/components/Account.js
  3. 1 1
      web/src/components/Preferences.js

+ 2 - 1
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)
 

+ 1 - 1
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"]
                         })
                     })}

+ 1 - 1
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.