mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 13:51:13 +00:00
Adding a few missing langs.
This commit is contained in:
parent
521fc55cba
commit
4a89c24075
2 changed files with 16 additions and 1 deletions
|
@ -35,6 +35,9 @@ import { th } from "./translations/th";
|
||||||
import { bg } from "./translations/bg";
|
import { bg } from "./translations/bg";
|
||||||
import { ar } from "./translations/ar";
|
import { ar } from "./translations/ar";
|
||||||
import { ko } from "./translations/ko";
|
import { ko } from "./translations/ko";
|
||||||
|
import { id } from "./translations/id";
|
||||||
|
import { nb_NO } from "./translations/nb_NO";
|
||||||
|
import { zh_Hant } from "./translations/zh_Hant";
|
||||||
|
|
||||||
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
|
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
|
||||||
const resources = {
|
const resources = {
|
||||||
|
@ -72,7 +75,10 @@ const resources = {
|
||||||
th,
|
th,
|
||||||
bg,
|
bg,
|
||||||
ar,
|
ar,
|
||||||
ko
|
ko,
|
||||||
|
id,
|
||||||
|
nb_NO,
|
||||||
|
zh_Hant,
|
||||||
};
|
};
|
||||||
|
|
||||||
function format(value: any, format: any): any {
|
function format(value: any, format: any): any {
|
||||||
|
|
|
@ -29,6 +29,8 @@ import "moment/locale/ko";
|
||||||
import "moment/locale/da";
|
import "moment/locale/da";
|
||||||
import "moment/locale/hr";
|
import "moment/locale/hr";
|
||||||
import "moment/locale/bg";
|
import "moment/locale/bg";
|
||||||
|
import "moment/locale/id";
|
||||||
|
import "moment/locale/nb";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
UserOperation,
|
UserOperation,
|
||||||
|
@ -106,6 +108,7 @@ export const languages = [
|
||||||
{ code: "gl" },
|
{ code: "gl" },
|
||||||
{ code: "hr" },
|
{ code: "hr" },
|
||||||
{ code: "hu" },
|
{ code: "hu" },
|
||||||
|
{ code: "id" },
|
||||||
{ code: "ka" },
|
{ code: "ka" },
|
||||||
{ code: "ko" },
|
{ code: "ko" },
|
||||||
{ code: "km" },
|
{ code: "km" },
|
||||||
|
@ -113,6 +116,7 @@ export const languages = [
|
||||||
{ code: "fa" },
|
{ code: "fa" },
|
||||||
{ code: "ja" },
|
{ code: "ja" },
|
||||||
{ code: "oc" },
|
{ code: "oc" },
|
||||||
|
{ code: "nb_NO" },
|
||||||
{ code: "pl" },
|
{ code: "pl" },
|
||||||
{ code: "pt_BR" },
|
{ code: "pt_BR" },
|
||||||
{ code: "zh" },
|
{ code: "zh" },
|
||||||
|
@ -128,6 +132,7 @@ export const languages = [
|
||||||
{ code: "nl" },
|
{ code: "nl" },
|
||||||
{ code: "it" },
|
{ code: "it" },
|
||||||
{ code: "bg" },
|
{ code: "bg" },
|
||||||
|
{ code: "zh_Hant" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const themes = [
|
export const themes = [
|
||||||
|
@ -458,6 +463,10 @@ export function getMomentLanguage(): string {
|
||||||
lang = "th";
|
lang = "th";
|
||||||
} else if (lang.startsWith("bg")) {
|
} else if (lang.startsWith("bg")) {
|
||||||
lang = "bg";
|
lang = "bg";
|
||||||
|
} else if (lang.startsWith("id")) {
|
||||||
|
lang = "id";
|
||||||
|
} else if (lang.startsWith("nb")) {
|
||||||
|
lang = "nb";
|
||||||
} else {
|
} else {
|
||||||
lang = "en";
|
lang = "en";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue