diff --git a/.i18nrc.cjs b/.i18nrc.cjs index 2efe5f9662..53acf05468 100644 --- a/.i18nrc.cjs +++ b/.i18nrc.cjs @@ -9,7 +9,7 @@ module.exports = defineConfig({ entry: 'src/locales/en', entryLocale: 'en', output: 'src/locales', - outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr'], + outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr', 'pt-BR'], reference: `Special names to keep untranslated: flux, photomaker, clip, vae, cfg, stable audio, stable cascade, stable zero, controlnet, lora, HiDream. 'latent' is the short form of 'latent space'. 'mask' is in the context of image processing. diff --git a/CODEOWNERS b/CODEOWNERS index 840ffdea39..922dc2cb21 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -54,10 +54,11 @@ # Translations /src/locales/ @Yorha4D @KarryCharon @shinshin86 @Comfy-Org/comfy_maintainer @Comfy-org/comfy_frontend_devs +/src/locales/pt-BR/ @JonatanAtila @Yorha4D @KarryCharon @shinshin86 # LLM Instructions (blank on purpose) .claude/ .cursor/ .cursorrules **/AGENTS.md -**/CLAUDE.md \ No newline at end of file +**/CLAUDE.md diff --git a/apps/desktop-ui/src/components/common/LanguageSelector.vue b/apps/desktop-ui/src/components/common/LanguageSelector.vue index d8a5dc8cf6..55703930c6 100644 --- a/apps/desktop-ui/src/components/common/LanguageSelector.vue +++ b/apps/desktop-ui/src/components/common/LanguageSelector.vue @@ -59,7 +59,8 @@ const LOCALES = [ ['fr', 'Français'], ['es', 'Español'], ['ar', 'عربي'], - ['tr', 'Türkçe'] + ['tr', 'Türkçe'], + ['pt-BR', 'Português (BR)'] ] as const satisfies ReadonlyArray<[string, string]> type SupportedLocale = (typeof LOCALES)[number][0] diff --git a/apps/desktop-ui/src/i18n.ts b/apps/desktop-ui/src/i18n.ts index 5f0739db75..350376ff7a 100644 --- a/apps/desktop-ui/src/i18n.ts +++ b/apps/desktop-ui/src/i18n.ts @@ -40,7 +40,8 @@ const localeLoaders: Record< ru: () => import('@frontend-locales/ru/main.json'), tr: () => import('@frontend-locales/tr/main.json'), zh: () => import('@frontend-locales/zh/main.json'), - 'zh-TW': () => import('@frontend-locales/zh-TW/main.json') + 'zh-TW': () => import('@frontend-locales/zh-TW/main.json'), + 'pt-BR': () => import('@frontend-locales/pt-BR/main.json') } const nodeDefsLoaders: Record< @@ -55,7 +56,8 @@ const nodeDefsLoaders: Record< ru: () => import('@frontend-locales/ru/nodeDefs.json'), tr: () => import('@frontend-locales/tr/nodeDefs.json'), zh: () => import('@frontend-locales/zh/nodeDefs.json'), - 'zh-TW': () => import('@frontend-locales/zh-TW/nodeDefs.json') + 'zh-TW': () => import('@frontend-locales/zh-TW/nodeDefs.json'), + 'pt-BR': () => import('@frontend-locales/pt-BR/nodeDefs.json') } const commandsLoaders: Record< @@ -70,7 +72,8 @@ const commandsLoaders: Record< ru: () => import('@frontend-locales/ru/commands.json'), tr: () => import('@frontend-locales/tr/commands.json'), zh: () => import('@frontend-locales/zh/commands.json'), - 'zh-TW': () => import('@frontend-locales/zh-TW/commands.json') + 'zh-TW': () => import('@frontend-locales/zh-TW/commands.json'), + 'pt-BR': () => import('@frontend-locales/pt-BR/commands.json') } const settingsLoaders: Record< @@ -85,7 +88,8 @@ const settingsLoaders: Record< ru: () => import('@frontend-locales/ru/settings.json'), tr: () => import('@frontend-locales/tr/settings.json'), zh: () => import('@frontend-locales/zh/settings.json'), - 'zh-TW': () => import('@frontend-locales/zh-TW/settings.json') + 'zh-TW': () => import('@frontend-locales/zh-TW/settings.json'), + 'pt-BR': () => import('@frontend-locales/pt-BR/settings.json') } // Track which locales have been loaded diff --git a/src/i18n.ts b/src/i18n.ts index d3e34245ca..c0ffd1094e 100644 --- a/src/i18n.ts +++ b/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 diff --git a/src/locales/pt-BR/commands.json b/src/locales/pt-BR/commands.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/src/locales/pt-BR/commands.json @@ -0,0 +1 @@ +{} diff --git a/src/locales/pt-BR/main.json b/src/locales/pt-BR/main.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/src/locales/pt-BR/main.json @@ -0,0 +1 @@ +{} diff --git a/src/locales/pt-BR/nodeDefs.json b/src/locales/pt-BR/nodeDefs.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/src/locales/pt-BR/nodeDefs.json @@ -0,0 +1 @@ +{} diff --git a/src/locales/pt-BR/settings.json b/src/locales/pt-BR/settings.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/src/locales/pt-BR/settings.json @@ -0,0 +1 @@ +{} diff --git a/src/platform/settings/constants/coreSettings.ts b/src/platform/settings/constants/coreSettings.ts index 0931733ea4..7590c0f88f 100644 --- a/src/platform/settings/constants/coreSettings.ts +++ b/src/platform/settings/constants/coreSettings.ts @@ -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' },