From a2b0f6ec04d360aee2e9100735b173baf1b11d56 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 15 Jan 2021 16:57:45 -0500 Subject: [PATCH] Adding occitan. --- lemmy-translations | 2 +- src/shared/i18next.ts | 2 ++ src/shared/utils.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lemmy-translations b/lemmy-translations index ca499a9..916c8e7 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit ca499a90d6c026a4f37768fb82edcd18ace44115 +Subproject commit 916c8e709717f736984942fe3d21fc69d9d22285 diff --git a/src/shared/i18next.ts b/src/shared/i18next.ts index bcbee8d..1ca0027 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -29,6 +29,7 @@ import { km } from './translations/km'; import { ga } from './translations/ga'; import { sr_Latn } from './translations/sr_Latn'; import { da } from './translations/da'; +import { oc } from './translations/oc'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -61,6 +62,7 @@ const resources = { ga, sr_Latn, da, + oc, }; function format(value: any, format: any): any { diff --git a/src/shared/utils.ts b/src/shared/utils.ts index b41c6dc..504c337 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -107,6 +107,7 @@ export const languages = [ { code: 'hi', name: 'मानक हिन्दी' }, { code: 'fa', name: 'فارسی' }, { code: 'ja', name: '日本語' }, + { code: 'oc', name: 'Occitan' }, { code: 'pl', name: 'Polski' }, { code: 'pt_BR', name: 'Português Brasileiro' }, { code: 'zh', name: '中文' }, @@ -446,6 +447,8 @@ export function getMomentLanguage(): string { lang = 'ko'; } else if (lang.startsWith('da')) { lang = 'da'; + } else if (lang.startsWith('oc')) { + lang = 'oc'; } else { lang = 'en'; } -- 2.44.1