From 5a2242e78d6661abe399b731629893e44b47abf1 Mon Sep 17 00:00:00 2001 From: kermieisinthehouse Date: Tue, 22 Nov 2022 18:27:47 -0500 Subject: [PATCH] I18N: Add Estonian, Russian first-level langs, add many preview langs (#3176) * Add Estonian, Russian first-level langs, add many preview langs * Changelog --- README.md | 4 ++-- internal/api/locale.go | 8 ++++++++ .../SettingsInterfacePanel.tsx | 13 ++++++++++--- ui/v2.5/src/docs/en/Changelog/v0180.md | 1 + ui/v2.5/src/locales/index.ts | 16 +++++++++++++++- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ddfb8159a..0fe3139d7 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 16 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 18 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 265d51f5e..a13aeca2f 100644 --- a/internal/api/locale.go +++ b/internal/api/locale.go @@ -26,6 +26,14 @@ var matcher = language.NewMatcher([]language.Tag{ language.MustParse("da-DK"), language.MustParse("pl-PL"), language.MustParse("ko-KR"), + language.MustParse("cs-CZ"), + language.MustParse("bn-BD"), + language.MustParse("et-EE"), + language.MustParse("fa-IR"), + language.MustParse("hu-HU"), + language.MustParse("ro-RO"), + language.MustParse("th-TH"), + language.MustParse("uk-UA"), }) // 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 2940e48e5..8e5fb1286 100644 --- a/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx +++ b/ui/v2.5/src/components/Settings/SettingsInterfacePanel/SettingsInterfacePanel.tsx @@ -124,24 +124,31 @@ export const SettingsInterfacePanel: React.FC = () => { value={iface.language ?? undefined} onChange={(v) => saveInterface({ language: v })} > + + - + + + - + + + - + + diff --git a/ui/v2.5/src/docs/en/Changelog/v0180.md b/ui/v2.5/src/docs/en/Changelog/v0180.md index 6c60dc19a..7d2ba41f0 100644 --- a/ui/v2.5/src/docs/en/Changelog/v0180.md +++ b/ui/v2.5/src/docs/en/Changelog/v0180.md @@ -13,6 +13,7 @@ * Added tag description filter criterion. ([#3011](https://github.com/stashapp/stash/pull/3011)) ### 🎨 Improvements +* Added Estonian and Russian Language translations. Added in-progress Languages for Persian, Ukrainian, Bengali, Thai, Romainian, Hungarian, and Czech.([#3024] (https://github.com/stashapp/stash/pull/3024)) * Also show imperial units for performer height and weight. ([#3097](https://github.com/stashapp/stash/pull/3097)) * Limit number of items in selector drop-downs to 200. ([#3062](https://github.com/stashapp/stash/pull/3062)) * Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060)) diff --git a/ui/v2.5/src/locales/index.ts b/ui/v2.5/src/locales/index.ts index 1124cb1bb..55d220b48 100644 --- a/ui/v2.5/src/locales/index.ts +++ b/ui/v2.5/src/locales/index.ts @@ -1,12 +1,17 @@ import Countries from "i18n-iso-countries"; export const localeCountries = { - en: () => import("i18n-iso-countries/langs/en.json"), + bn: () => import("i18n-iso-countries/langs/bn.json"), + cs: () => import("i18n-iso-countries/langs/cs.json"), da: () => import("i18n-iso-countries/langs/da.json"), de: () => import("i18n-iso-countries/langs/de.json"), + en: () => import("i18n-iso-countries/langs/en.json"), es: () => import("i18n-iso-countries/langs/es.json"), + et: () => import("i18n-iso-countries/langs/et.json"), + fa: () => import("i18n-iso-countries/langs/fa.json"), fi: () => import("i18n-iso-countries/langs/fi.json"), fr: () => import("i18n-iso-countries/langs/fr.json"), + hu: () => import("i18n-iso-countries/langs/hu.json"), hr: () => import("i18n-iso-countries/langs/hr.json"), it: () => import("i18n-iso-countries/langs/it.json"), ja: () => import("i18n-iso-countries/langs/ja.json"), @@ -14,8 +19,10 @@ export const localeCountries = { nl: () => import("i18n-iso-countries/langs/nl.json"), pl: () => import("i18n-iso-countries/langs/pl.json"), pt: () => import("i18n-iso-countries/langs/pt.json"), + ro: () => import("i18n-iso-countries/langs/ro.json"), ru: () => import("i18n-iso-countries/langs/ru.json"), sv: () => import("i18n-iso-countries/langs/sv.json"), + th: () => import("i18n-iso-countries/langs/th.json"), tr: () => import("i18n-iso-countries/langs/tr.json"), uk: () => import("i18n-iso-countries/langs/uk.json"), zh: () => import("i18n-iso-countries/langs/zh.json"), @@ -56,6 +63,13 @@ export const localeLoader = { daDK: () => import("./da-DK.json"), koKR: () => import("./ko-KR.json"), ukUA: () => import("./uk-UA.json"), + bnBD: () => import("./bn-BD.json"), + csCZ: () => import("./cs-CZ.json"), + etEE: () => import("./et-EE.json"), + faIR: () => import("./fa-IR.json"), + huHU: () => import("./hu-HU.json"), + roRO: () => import("./ro-RO.json"), + thTH: () => import("./th-TH.json"), // eslint-disable-next-line @typescript-eslint/no-explicit-any } as { [key: string]: any };