mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
feat(i18n): add Portuguese (Brazil) locale (pt-BR) (#6943)
Finalmente o idioma em Portugues do Brasil verá a luz do dia (se tudo correr bem). What has been done: - Added pt-BR to .i18nrc.cjs and settings - Included loaders in src/i18n.ts and apps/desktop-ui/src/i18n.ts - Now Portuguese (BR) is displayed in the language selector - Created empty main.json, commands.json, settings.json and nodeDefs.json files to be populated by CI - Checklist: the language appears in the dropdown list, selection occurs without errors, the fallback to English, in case technical terms have no translation, is working correctly. - I will maintain the pt-br translation and review for as long as necessary. --------- Co-authored-by: Comfy Contributor <dev@example.com>
This commit is contained in:
12
src/i18n.ts
12
src/i18n.ts
@@ -36,7 +36,8 @@ const localeLoaders: Record<
|
||||
ru: () => import('./locales/ru/main.json'),
|
||||
tr: () => import('./locales/tr/main.json'),
|
||||
zh: () => import('./locales/zh/main.json'),
|
||||
'zh-TW': () => import('./locales/zh-TW/main.json')
|
||||
'zh-TW': () => import('./locales/zh-TW/main.json'),
|
||||
'pt-BR': () => import('./locales/pt-BR/main.json')
|
||||
}
|
||||
|
||||
const nodeDefsLoaders: Record<
|
||||
@@ -51,7 +52,8 @@ const nodeDefsLoaders: Record<
|
||||
ru: () => import('./locales/ru/nodeDefs.json'),
|
||||
tr: () => import('./locales/tr/nodeDefs.json'),
|
||||
zh: () => import('./locales/zh/nodeDefs.json'),
|
||||
'zh-TW': () => import('./locales/zh-TW/nodeDefs.json')
|
||||
'zh-TW': () => import('./locales/zh-TW/nodeDefs.json'),
|
||||
'pt-BR': () => import('./locales/pt-BR/nodeDefs.json')
|
||||
}
|
||||
|
||||
const commandsLoaders: Record<
|
||||
@@ -66,7 +68,8 @@ const commandsLoaders: Record<
|
||||
ru: () => import('./locales/ru/commands.json'),
|
||||
tr: () => import('./locales/tr/commands.json'),
|
||||
zh: () => import('./locales/zh/commands.json'),
|
||||
'zh-TW': () => import('./locales/zh-TW/commands.json')
|
||||
'zh-TW': () => import('./locales/zh-TW/commands.json'),
|
||||
'pt-BR': () => import('./locales/pt-BR/commands.json')
|
||||
}
|
||||
|
||||
const settingsLoaders: Record<
|
||||
@@ -81,7 +84,8 @@ const settingsLoaders: Record<
|
||||
ru: () => import('./locales/ru/settings.json'),
|
||||
tr: () => import('./locales/tr/settings.json'),
|
||||
zh: () => import('./locales/zh/settings.json'),
|
||||
'zh-TW': () => import('./locales/zh-TW/settings.json')
|
||||
'zh-TW': () => import('./locales/zh-TW/settings.json'),
|
||||
'pt-BR': () => import('./locales/pt-BR/settings.json')
|
||||
}
|
||||
|
||||
// Track which locales have been loaded
|
||||
|
||||
1
src/locales/pt-BR/commands.json
Normal file
1
src/locales/pt-BR/commands.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/locales/pt-BR/main.json
Normal file
1
src/locales/pt-BR/main.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/locales/pt-BR/nodeDefs.json
Normal file
1
src/locales/pt-BR/nodeDefs.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/locales/pt-BR/settings.json
Normal file
1
src/locales/pt-BR/settings.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -416,7 +416,8 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
{ value: 'fr', text: 'Français' },
|
||||
{ value: 'es', text: 'Español' },
|
||||
{ value: 'ar', text: 'عربي' },
|
||||
{ value: 'tr', text: 'Türkçe' }
|
||||
{ value: 'tr', text: 'Türkçe' },
|
||||
{ value: 'pt-BR', text: 'Português (BR)' }
|
||||
],
|
||||
defaultValue: () => navigator.language.split('-')[0] || 'en'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user