From 55366fa66f61c9439a4031cf26f121a2d697a61a Mon Sep 17 00:00:00 2001 From: kermieisinthehouse Date: Fri, 13 May 2022 12:45:05 -0700 Subject: [PATCH] Add Danish and Polish i18n support (#2586) --- README.md | 4 ++-- internal/api/locale.go | 2 ++ .../SettingsInterfacePanel/SettingsInterfacePanel.tsx | 3 +++ ui/v2.5/src/locales/index.ts | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 998498ff4..1dff1bf58 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ Many community-maintained scrapers are available for download at the [Community # Translation [![Translate](https://translate.stashapp.cc/widgets/stash/-/stash-desktop-client/svg-badge.svg)](https://translate.stashapp.cc/engage/stash/) -๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡น๐Ÿ‡ผ ๐Ÿ‡น๐Ÿ‡ท +๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡น๐Ÿ‡ผ ๐Ÿ‡น๐Ÿ‡ท -Stash is available in 13 languages (so far!) and it could be in your language too. If you want to help us translate Stash into your language, you can make an account at [translate.stashapp.cc](https://translate.stashapp.cc/projects/stash/stash-desktop-client/) to get started contributing new languages or improving existing ones. Thanks! +Stash is available in 15 languages (so far!) and it could be in your language too. If you want to help us translate Stash into your language, you can make an account at [translate.stashapp.cc](https://translate.stashapp.cc/projects/stash/stash-desktop-client/) to get started contributing new languages or improving existing ones. Thanks! # Support (FAQ) diff --git a/internal/api/locale.go b/internal/api/locale.go index 23381b112..4ba5621c8 100644 --- a/internal/api/locale.go +++ b/internal/api/locale.go @@ -23,6 +23,8 @@ var matcher = language.NewMatcher([]language.Tag{ language.MustParse("nl-NL"), language.MustParse("ru-RU"), language.MustParse("tr-TR"), + language.MustParse("da-DK"), + language.MustParse("pl-PL"), }) // newCollator parses a locale into a collator diff --git a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx index bf75a5aa5..985a68e1d 100644 --- a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx @@ -78,6 +78,7 @@ export const SettingsInterfacePanel: React.FC = () => { if (error) return

{error.message}

; if (loading) return ; + // https://en.wikipedia.org/wiki/List_of_language_names return ( <> @@ -87,6 +88,7 @@ export const SettingsInterfacePanel: React.FC = () => { value={iface.language ?? undefined} onChange={(v) => saveInterface({ language: v })} > + @@ -97,6 +99,7 @@ export const SettingsInterfacePanel: React.FC = () => { + diff --git a/ui/v2.5/src/locales/index.ts b/ui/v2.5/src/locales/index.ts index 9a1f270ca..601683da3 100644 --- a/ui/v2.5/src/locales/index.ts +++ b/ui/v2.5/src/locales/index.ts @@ -14,6 +14,8 @@ import nlNL from "./nl-NL.json"; import ruRU from "./ru-RU.json"; import trTR from "./tr-TR.json"; import jaJP from "./ja-JP.json"; +import plPL from "./pl-PL.json"; +import daDK from "./da-DK.json"; export default { deDE, @@ -32,4 +34,6 @@ export default { ruRU, trTR, jaJP, + plPL, + daDK, };