From f6c041db5b9b358aee784715fc72438d6cd7ac55 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 30 Jun 2024 22:05:21 +0200 Subject: [PATCH] feat(i18n): add Ukrainian for language selection in UI --- 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 0f348f3a8..73f2e2ea1 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -24,6 +24,7 @@ export const SUPPORTED_LOCALES = { 'sl-SI': 'Slovenščina', 'pt-BR': 'Português Brasileiro', 'hr-HR': 'Hrvatski', + 'uk-UA': 'українська', // IMPORTANT: Also add new languages to useDayjsLanguageSync } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index c40647452..c4fb33935 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -24,6 +24,7 @@ export const DAYJS_LOCALE_MAPPING = { 'sl-SI': 'sl', 'pt-BR': 'pt', 'hr-HR': 'hr', + 'uk-UA': 'uk', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -46,6 +47,7 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'ar-sa': () => import('dayjs/locale/ar-sa'), 'sl-si': () => import('dayjs/locale/sl'), 'pt-br': () => import('dayjs/locale/pt-br'), + 'uk-ua': () => import('dayjs/locale/uk'), } as Record Promise> export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {