From 6d39c116ed926d84c00ab7cc2265a2c592be7436 Mon Sep 17 00:00:00 2001
From: StillKnotKnown
Date: Sat, 14 Mar 2026 02:01:44 +0200
Subject: [PATCH 1/9] feat(i18n): add 19 new languages to type definitions
Add type definitions for 19 new languages:
- Spanish, Chinese (Simplified & Traditional)
- Hindi, Portuguese (Brazil & Portugal)
- Russian, Japanese, German, Korean
- Turkish, Italian, Vietnamese, Thai
- Dutch, Polish, Norwegian, Indonesian, Ukrainian
Total: 21 supported languages
Co-Authored-By: Claude Opus 4.6
---
apps/desktop/src/shared/constants/i18n.ts | 37 ++++++++++++++++++++---
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/apps/desktop/src/shared/constants/i18n.ts b/apps/desktop/src/shared/constants/i18n.ts
index 5f4ebbde38..1c3bda3306 100644
--- a/apps/desktop/src/shared/constants/i18n.ts
+++ b/apps/desktop/src/shared/constants/i18n.ts
@@ -3,11 +3,40 @@
* Available languages and display labels
*/
-export type SupportedLanguage = 'en' | 'fr';
+export type SupportedLanguage =
+ | 'en' | 'fr' | 'es' | 'zh-CN' | 'zh-TW' | 'hi'
+ | 'pt-BR' | 'pt-PT' | 'ru' | 'ja' | 'de' | 'ko' | 'tr'
+ | 'it' | 'vi' | 'th' | 'nl' | 'pl' | 'no' | 'id' | 'uk';
-export const AVAILABLE_LANGUAGES = [
- { value: 'en' as const, label: 'English', nativeLabel: 'English' },
- { value: 'fr' as const, label: 'French', nativeLabel: 'Français' }
+export interface LocaleMetadata {
+ code: SupportedLanguage;
+ label: string;
+ nativeLabel: string;
+ dateFormat: string;
+}
+
+export const AVAILABLE_LANGUAGES: LocaleMetadata[] = [
+ { code: 'en', label: 'English', nativeLabel: 'English', dateFormat: 'MM/DD/YYYY' },
+ { code: 'fr', label: 'French', nativeLabel: 'Français', dateFormat: 'DD/MM/YYYY' },
+ { code: 'es', label: 'Spanish', nativeLabel: 'Español', dateFormat: 'DD/MM/YYYY' },
+ { code: 'de', label: 'German', nativeLabel: 'Deutsch', dateFormat: 'DD.MM.YYYY' },
+ { code: 'ja', label: 'Japanese', nativeLabel: '日本語', dateFormat: 'YYYY/MM/DD' },
+ { code: 'zh-CN', label: 'Chinese (Simplified)', nativeLabel: '简体中文', dateFormat: 'YYYY/MM/DD' },
+ { code: 'zh-TW', label: 'Chinese (Traditional)', nativeLabel: '繁體中文', dateFormat: 'YYYY/MM/DD' },
+ { code: 'hi', label: 'Hindi', nativeLabel: 'हिन्दी', dateFormat: 'DD/MM/YYYY' },
+ { code: 'pt-BR', label: 'Portuguese (Brazil)', nativeLabel: 'Português (Brasil)', dateFormat: 'DD/MM/YYYY' },
+ { code: 'pt-PT', label: 'Portuguese (Portugal)', nativeLabel: 'Português (Portugal)', dateFormat: 'DD/MM/YYYY' },
+ { code: 'ru', label: 'Russian', nativeLabel: 'Русский', dateFormat: 'DD.MM.YYYY' },
+ { code: 'ko', label: 'Korean', nativeLabel: '한국어', dateFormat: 'YYYY.MM.DD' },
+ { code: 'tr', label: 'Turkish', nativeLabel: 'Türkçe', dateFormat: 'DD/MM/YYYY' },
+ { code: 'it', label: 'Italian', nativeLabel: 'Italiano', dateFormat: 'DD/MM/YYYY' },
+ { code: 'vi', label: 'Vietnamese', nativeLabel: 'Tiếng Việt', dateFormat: 'DD/MM/YYYY' },
+ { code: 'th', label: 'Thai', nativeLabel: 'ไทย', dateFormat: 'DD/MM/YYYY' },
+ { code: 'nl', label: 'Dutch', nativeLabel: 'Nederlands', dateFormat: 'DD-MM-YYYY' },
+ { code: 'pl', label: 'Polish', nativeLabel: 'Polski', dateFormat: 'DD.MM.YYYY' },
+ { code: 'no', label: 'Norwegian', nativeLabel: 'Norsk', dateFormat: 'DD.MM.YYYY' },
+ { code: 'id', label: 'Indonesian', nativeLabel: 'Bahasa Indonesia', dateFormat: 'DD/MM/YYYY' },
+ { code: 'uk', label: 'Ukrainian', nativeLabel: 'Українська', dateFormat: 'DD.MM.YYYY' }
] as const;
export const DEFAULT_LANGUAGE: SupportedLanguage = 'en';
From 05f4c31c835933dfabb5f103ee769484944231ff Mon Sep 17 00:00:00 2001
From: StillKnotKnown
Date: Sat, 14 Mar 2026 02:10:18 +0200
Subject: [PATCH 2/9] fix(i18n): update LanguageSettings to use 'code' instead
of 'value'
Update component to match new LocaleMetadata interface.
Co-Authored-By: Claude Opus 4.6
---
.../src/renderer/components/settings/LanguageSettings.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/desktop/src/renderer/components/settings/LanguageSettings.tsx b/apps/desktop/src/renderer/components/settings/LanguageSettings.tsx
index ccf8ad205c..9b47039bac 100644
--- a/apps/desktop/src/renderer/components/settings/LanguageSettings.tsx
+++ b/apps/desktop/src/renderer/components/settings/LanguageSettings.tsx
@@ -48,11 +48,11 @@ export function LanguageSettings({ settings, onSettingsChange }: LanguageSetting
{AVAILABLE_LANGUAGES.map((lang) => {
- const isSelected = currentLanguage === lang.value;
+ const isSelected = currentLanguage === lang.code;
return (