mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(i18n): add support for Brazilian Portuguese
This commit is contained in:
parent
9f93d30b99
commit
5a767dae34
@ -676,6 +676,8 @@ export async function getFullCalendarLocale(locale: string) {
|
|||||||
return (await import("@fullcalendar/core/locales/ru")).default;
|
return (await import("@fullcalendar/core/locales/ru")).default;
|
||||||
case "ja":
|
case "ja":
|
||||||
return (await import("@fullcalendar/core/locales/ja")).default;
|
return (await import("@fullcalendar/core/locales/ja")).default;
|
||||||
|
case "pt_BR":
|
||||||
|
return (await import("@fullcalendar/core/locales/pt-br")).default;
|
||||||
case "uk":
|
case "uk":
|
||||||
return (await import("@fullcalendar/core/locales/uk")).default;
|
return (await import("@fullcalendar/core/locales/uk")).default;
|
||||||
case "en":
|
case "en":
|
||||||
|
@ -18,6 +18,7 @@ const DAYJS_LOADER: Record<LOCALE_IDS, () => Promise<typeof import("dayjs/locale
|
|||||||
"he": () => import("dayjs/locale/he.js"),
|
"he": () => import("dayjs/locale/he.js"),
|
||||||
"ja": () => import("dayjs/locale/ja.js"),
|
"ja": () => import("dayjs/locale/ja.js"),
|
||||||
"ku": () => import("dayjs/locale/ku.js"),
|
"ku": () => import("dayjs/locale/ku.js"),
|
||||||
|
"pt_BR": () => import("dayjs/locale/pt_BR.js"),
|
||||||
"ro": () => import("dayjs/locale/ro.js"),
|
"ro": () => import("dayjs/locale/ro.js"),
|
||||||
"ru": () => import("dayjs/locale/ru.js"),
|
"ru": () => import("dayjs/locale/ru.js"),
|
||||||
"tw": () => import("dayjs/locale/zh-tw.js"),
|
"tw": () => import("dayjs/locale/zh-tw.js"),
|
||||||
@ -40,8 +41,10 @@ export async function initializeTranslations() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Initialize dayjs locale.
|
// Initialize dayjs locale.
|
||||||
const dayjsLocale = await DAYJS_LOADER[locale]();
|
const dayjsLocale = DAYJS_LOADER[locale];
|
||||||
dayjs.locale(dayjsLocale);
|
if (dayjsLocale) {
|
||||||
|
dayjs.locale(await dayjsLocale());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ordinal(date: Dayjs) {
|
export function ordinal(date: Dayjs) {
|
||||||
|
@ -10,56 +10,17 @@ export interface Locale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const UNSORTED_LOCALES: Locale[] = [
|
const UNSORTED_LOCALES: Locale[] = [
|
||||||
{
|
{ id: "cn", name: "简体中文", electronLocale: "zh_CN" },
|
||||||
id: "en",
|
{ id: "de", name: "Deutsch", electronLocale: "de" },
|
||||||
name: "English",
|
{ id: "en", name: "English", electronLocale: "en" },
|
||||||
electronLocale: "en"
|
{ id: "es", name: "Español", electronLocale: "es" },
|
||||||
},
|
{ id: "fr", name: "Français", electronLocale: "fr" },
|
||||||
{
|
{ id: "ja", name: "日本語", electronLocale: "ja" },
|
||||||
id: "de",
|
{ id: "pt_BR", name: "Português (Brasil)", electronLocale: "pt-BR" },
|
||||||
name: "Deutsch",
|
{ id: "ro", name: "Română", electronLocale: "ro" },
|
||||||
electronLocale: "de"
|
{ id: "ru", name: "Русский", electronLocale: "ru" },
|
||||||
},
|
{ id: "tw", name: "繁體中文", electronLocale: "zh_TW" },
|
||||||
{
|
{ id: "uk", name: "Українська", electronLocale: "uk" },
|
||||||
id: "es",
|
|
||||||
name: "Español",
|
|
||||||
electronLocale: "es"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "fr",
|
|
||||||
name: "Français",
|
|
||||||
electronLocale: "fr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "cn",
|
|
||||||
name: "简体中文",
|
|
||||||
electronLocale: "zh_CN"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "tw",
|
|
||||||
name: "繁體中文",
|
|
||||||
electronLocale: "zh_TW"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "ro",
|
|
||||||
name: "Română",
|
|
||||||
electronLocale: "ro"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "ru",
|
|
||||||
name: "Русский",
|
|
||||||
electronLocale: "ru"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "uk",
|
|
||||||
name: "Українська",
|
|
||||||
electronLocale: "uk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "ja",
|
|
||||||
name: "日本語",
|
|
||||||
electronLocale: "ja"
|
|
||||||
},
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Right to left languages
|
* Right to left languages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user