From ef19b9f6b8288837cac4d981533b92069fd13b8f Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 5 Feb 2021 13:13:39 -0500 Subject: [PATCH] Adding croatian. --- src/shared/i18next.ts | 2 ++ src/shared/utils.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/shared/i18next.ts b/src/shared/i18next.ts index 1ca0027..193f57c 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -30,6 +30,7 @@ import { ga } from './translations/ga'; import { sr_Latn } from './translations/sr_Latn'; import { da } from './translations/da'; import { oc } from './translations/oc'; +import { hr } from './translations/hr'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -63,6 +64,7 @@ const resources = { sr_Latn, da, oc, + hr, }; function format(value: any, format: any): any { diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 330ba08..33f9ff1 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -27,6 +27,7 @@ import 'moment/locale/ga'; import 'moment/locale/sr'; import 'moment/locale/ko'; import 'moment/locale/da'; +import 'moment/locale/hr'; import { UserOperation, @@ -102,6 +103,7 @@ export const languages = [ { code: 'de', name: 'Deutsch' }, { code: 'ga', name: 'Gaeilge' }, { code: 'gl', name: 'Galego' }, + { code: 'hr', name: 'hrvatski' }, { code: 'hu', name: 'Magyar Nyelv' }, { code: 'ka', name: 'ქართული ენა' }, { code: 'ko', name: '한국어' }, @@ -451,6 +453,8 @@ export function getMomentLanguage(): string { lang = 'da'; } else if (lang.startsWith('oc')) { lang = 'oc'; + } else if (lang.startsWith('hr')) { + lang = 'hr'; } else { lang = 'en'; } -- 2.44.1