From cfc7f173520ff4e8d6a4b32adf5ac57406a1c95d Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 27 Mar 2025 11:54:17 +0100 Subject: [PATCH] feat(i18n): add Finnish translation for selection --- frontend/src/i18n/index.ts | 1 + frontend/src/i18n/useDayjsLanguageSync.ts | 2 ++ pkg/i18n/i18n.go | 1 + 3 files changed, 4 insertions(+) diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index 876006b64..512d3ee5a 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -37,6 +37,7 @@ export const SUPPORTED_LOCALES = { 'bg-BG': 'Български', 'ko-KR': '한국어', 'tr-TR': 'Türkçe', + 'fi-FI': 'Suomi', // IMPORTANT: Also add new languages to useDayjsLanguageSync // IMPORTANT: Also add new languages to pkg/i18n/i18n.go } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index d0f7a1c26..67989e5d5 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -29,6 +29,7 @@ export const DAYJS_LOCALE_MAPPING = { 'bg-bg': 'bg', 'ko-kr': 'ko', 'tr-tr': 'tr', + 'fi-fi': 'fi', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -57,6 +58,7 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'bg-bg': () => import('dayjs/locale/bg'), 'ko-kr': () => import('dayjs/locale/ko'), 'tr-tr': () => import('dayjs/locale/tr'), + 'fi-fi': () => import('dayjs/locale/fi'), } as Record Promise> export async function loadDayJsLocale(language: SupportedLocale) { diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index 0399285c6..16b9e9941 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -73,6 +73,7 @@ var availableLanguages = map[string]bool{ "bg-BG": true, "ko-KR": true, "tr-TR": true, + "fi-FI": true, // IMPORTANT: Also add new languages to the frontend }