Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/desktop/src/i18n/catalog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ar } from './ar'
import { en } from './en'
import { ja } from './ja'
import { pt } from './pt'
import type { Locale, Translations } from './types'
import { zh } from './zh'
import { zhHant } from './zh-hant'
Expand All @@ -10,5 +11,6 @@ export const TRANSLATIONS: Record<Locale, Translations> = {
zh,
'zh-hant': zhHant,
ja,
ar
ar,
pt
}
15 changes: 14 additions & 1 deletion apps/desktop/src/i18n/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export const LOCALE_OPTIONS = [
name: 'العربية',
englishName: 'Arabic',
configValue: 'ar'
},
{
id: 'pt',
name: 'Português',
englishName: 'Portuguese',
configValue: 'pt'
}
] as const satisfies readonly { configValue: string; englishName: string; id: Locale; name: string }[]

Expand Down Expand Up @@ -79,7 +85,14 @@ const LOCALE_ALIASES: Record<string, Locale> = {
'ar-eg': 'ar',
ar_eg: 'ar',
arabic: 'ar',
العربية: 'ar'
العربية: 'ar',
pt: 'pt',
'pt-br': 'pt',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add regression coverage in languages.test.ts for pt-BR normalization and the corresponding pt exact-id/config-value behavior. Existing locale additions, including Arabic in 5b6990e7a056, extend these tests.

pt_br: 'pt',
'pt-pt': 'pt',
pt_pt: 'pt',
portuguese: 'pt',
'português': 'pt'
}

export function isLocale(value: unknown): value is Locale {
Expand Down
Loading