From c8b0c64a8d53808e104672f2b86538bc5ce46e0b Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 12 May 2023 11:51:15 +0200 Subject: [PATCH] Add new languages to resources (#293) --- src/i18n/translations.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index f2d36150..81bd0187 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -11,11 +11,20 @@ import ar from 'i18n/locale/ar.json'; import de from 'i18n/locale/de.json'; import es from 'i18n/locale/es.json'; import fr from 'i18n/locale/fr.json'; +import ja from 'i18n/locale/ja.json'; +import pt from 'i18n/locale/pt.json'; +import uk from 'i18n/locale/uk.json'; +import zh_Hans from 'i18n/locale/zh_Hans.json'; +import zh_Hant from 'i18n/locale/zh_Hant.json'; const translationHelper = (lng: T) => ({ translation: lng, }); +/** + * Keys have to match {@link ISOLanguages} codes, they're used for showing the language name in the dropdown in the {@link Settings}.
+ * In case there is no language code for the key in {@link ISOLanguages}, the corresponding language has to be added + */ const resources = { en: translationHelper(en), @@ -23,6 +32,11 @@ const resources = { de: translationHelper(de), es: translationHelper(es), fr: translationHelper(fr), + ja: translationHelper(ja), + pt: translationHelper(pt), + uk: translationHelper(uk), + 'zh-Hans': translationHelper(zh_Hans), + 'zh-Hant': translationHelper(zh_Hant), } as const; export default resources;