From 360e7aec424ca07a0329e18549f8dce692495ed8 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 1 Jul 2020 18:50:38 -0400 Subject: [PATCH] Adding Albanian for weblate. --- ui/src/i18next.ts | 2 ++ ui/src/utils.ts | 4 ++++ ui/translations/sq.json | 1 + 3 files changed, 7 insertions(+) create mode 100644 ui/translations/sq.json diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 5fa8f4e88..7a341ceab 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -24,6 +24,7 @@ import { gl } from './translations/gl'; import { tr } from './translations/tr'; import { hu } from './translations/hu'; import { uk } from './translations/uk'; +import { sq } from './translations/sq'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -51,6 +52,7 @@ const resources = { tr, hu, uk, + sq, }; function format(value: any, format: any, lng: any): any { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 7bf6fdd1d..48d2095df 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -21,6 +21,7 @@ import 'moment/locale/gl'; import 'moment/locale/tr'; import 'moment/locale/hu'; import 'moment/locale/uk'; +import 'moment/locale/sq'; import { UserOperation, @@ -83,6 +84,7 @@ export const languages = [ { code: 'fi', name: 'Suomi' }, { code: 'fr', name: 'Français' }, { code: 'sv', name: 'Svenska' }, + { code: 'sq', name: 'Shqip' }, { code: 'tr', name: 'Türkçe' }, { code: 'uk', name: 'українська мова' }, { code: 'ru', name: 'Русский' }, @@ -414,6 +416,8 @@ export function getMomentLanguage(): string { lang = 'hu'; } else if (lang.startsWith('uk')) { lang = 'uk'; + } else if (lang.startsWith('sq')) { + lang = 'sq'; } else { lang = 'en'; } diff --git a/ui/translations/sq.json b/ui/translations/sq.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/ui/translations/sq.json @@ -0,0 +1 @@ +{}