From 5def7e6bc89f2a4c78955586d7711f9246080f28 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 2 Apr 2021 10:14:33 -0400 Subject: [PATCH] Adding bulgarian language. --- 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 99dbc70..60edeb4 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -32,6 +32,7 @@ import { da } from "./translations/da"; import { oc } from "./translations/oc"; import { hr } from "./translations/hr"; import { th } from "./translations/th"; +import { bg } from "./translations/bg"; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -67,6 +68,7 @@ const resources = { oc, hr, th, + bg, }; function format(value: any, format: any): any { diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 3049a03..919ade5 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -28,6 +28,7 @@ import "moment/locale/sr"; import "moment/locale/ko"; import "moment/locale/da"; import "moment/locale/hr"; +import "moment/locale/bg"; import { UserOperation, @@ -124,6 +125,7 @@ export const languages = [ { code: "ru" }, { code: "nl" }, { code: "it" }, + { code: "bg" }, ]; export const themes = [ @@ -451,6 +453,8 @@ export function getMomentLanguage(): string { lang = "hr"; } else if (lang.startsWith("th")) { lang = "th"; + } else if (lang.startsWith("bg")) { + lang = "bg"; } else { lang = "en"; } -- 2.44.1