mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-10 02:15:11 +00:00
Adding vi, sk, mnc, and cy languages. (#378)
This commit is contained in:
parent
1779b36001
commit
08aa1bb511
|
@ -2,6 +2,7 @@ import i18next, { i18nTyped } from "i18next";
|
|||
import { ar } from "./translations/ar";
|
||||
import { bg } from "./translations/bg";
|
||||
import { ca } from "./translations/ca";
|
||||
import { cy } from "./translations/cy";
|
||||
import { da } from "./translations/da";
|
||||
import { de } from "./translations/de";
|
||||
import { el } from "./translations/el";
|
||||
|
@ -23,18 +24,21 @@ import { ja } from "./translations/ja";
|
|||
import { ka } from "./translations/ka";
|
||||
import { km } from "./translations/km";
|
||||
import { ko } from "./translations/ko";
|
||||
import { mnc } from "./translations/mnc";
|
||||
import { nb_NO } from "./translations/nb_NO";
|
||||
import { nl } from "./translations/nl";
|
||||
import { oc } from "./translations/oc";
|
||||
import { pl } from "./translations/pl";
|
||||
import { pt_BR } from "./translations/pt_BR";
|
||||
import { ru } from "./translations/ru";
|
||||
import { sk } from "./translations/sk";
|
||||
import { sq } from "./translations/sq";
|
||||
import { sr_Latn } from "./translations/sr_Latn";
|
||||
import { sv } from "./translations/sv";
|
||||
import { th } from "./translations/th";
|
||||
import { tr } from "./translations/tr";
|
||||
import { uk } from "./translations/uk";
|
||||
import { vi } from "./translations/vi";
|
||||
import { zh } from "./translations/zh";
|
||||
import { zh_Hant } from "./translations/zh_Hant";
|
||||
import { getLanguage } from "./utils";
|
||||
|
@ -79,6 +83,10 @@ const resources = {
|
|||
id,
|
||||
nb_NO,
|
||||
zh_Hant,
|
||||
cy,
|
||||
mnc,
|
||||
sk,
|
||||
vi,
|
||||
};
|
||||
|
||||
function format(value: any, format: any): any {
|
||||
|
|
|
@ -30,6 +30,7 @@ import markdown_it_sup from "markdown-it-sup";
|
|||
import moment from "moment";
|
||||
import "moment/locale/bg";
|
||||
import "moment/locale/ca";
|
||||
import "moment/locale/cy";
|
||||
import "moment/locale/da";
|
||||
import "moment/locale/de";
|
||||
import "moment/locale/el";
|
||||
|
@ -55,11 +56,13 @@ import "moment/locale/nl";
|
|||
import "moment/locale/pl";
|
||||
import "moment/locale/pt-br";
|
||||
import "moment/locale/ru";
|
||||
import "moment/locale/sk";
|
||||
import "moment/locale/sq";
|
||||
import "moment/locale/sr";
|
||||
import "moment/locale/sv";
|
||||
import "moment/locale/tr";
|
||||
import "moment/locale/uk";
|
||||
import "moment/locale/vi";
|
||||
import "moment/locale/zh-cn";
|
||||
import { Subscription } from "rxjs";
|
||||
import { delay, retryWhen, take } from "rxjs/operators";
|
||||
|
@ -138,6 +141,10 @@ export const languages = [
|
|||
{ code: "it" },
|
||||
{ code: "bg" },
|
||||
{ code: "zh_Hant" },
|
||||
{ code: "cy" },
|
||||
{ code: "mnc" },
|
||||
{ code: "sk" },
|
||||
{ code: "vi" },
|
||||
];
|
||||
|
||||
export const themes = [
|
||||
|
@ -483,6 +490,12 @@ export function getMomentLanguage(): string {
|
|||
lang = "id";
|
||||
} else if (lang.startsWith("nb")) {
|
||||
lang = "nb";
|
||||
} else if (lang.startsWith("cy")) {
|
||||
lang = "cy";
|
||||
} else if (lang.startsWith("sk")) {
|
||||
lang = "sk";
|
||||
} else if (lang.startsWith("vi")) {
|
||||
lang = "vi";
|
||||
} else {
|
||||
lang = "en";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue