From 56bab7485fdacaecc47764c4d61b66bece066e6c Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 26 Aug 2024 17:05:01 +0200 Subject: [PATCH] feat(i18n): add Lithuanian translation for selection --- frontend/src/i18n/index.ts | 1 + frontend/src/i18n/useDayjsLanguageSync.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index be203d7d4..45dd23b0e 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -25,6 +25,7 @@ export const SUPPORTED_LOCALES = { 'pt-BR': 'Português Brasileiro', 'hr-HR': 'Hrvatski', 'uk-UA': 'Українська', + 'lt-LT': 'Lietuvių Kalba', // IMPORTANT: Also add new languages to useDayjsLanguageSync } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index c4fb33935..350949935 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -25,6 +25,7 @@ export const DAYJS_LOCALE_MAPPING = { 'pt-BR': 'pt', 'hr-HR': 'hr', 'uk-UA': 'uk', + 'lt-LT': 'lt', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -48,6 +49,7 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'sl-si': () => import('dayjs/locale/sl'), 'pt-br': () => import('dayjs/locale/pt-br'), 'uk-ua': () => import('dayjs/locale/uk'), + 'lt-lt': () => import('dayjs/locale/lt'), } as Record Promise> export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {