Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): map pt-BR to pt_BR for tool metadata (#41745)

非法操作24f9f077526c
diff --git a/web/i18n-config/language.ts b/web/i18n-config/language.ts
index 1d00d7b42f9..2c615f66ca7 100644
--- a/web/i18n-config/language.ts
+++ b/web/i18n-config/language.ts
@@ -13,7 +13,8 @@ export const LanguagesSupported: Locale[] = languages
.map((item) => item.value)
export const getLanguage = (locale: Locale): Locale => {
- if (['zh-Hans', 'ja-JP'].includes(locale)) return locale.replace('-', '_') as Locale
+ // Plugin metadata supports only en_US, zh_Hans, ja_JP, and pt_BR; otherwise use en_US.
+ if (['zh-Hans', 'ja-JP', 'pt-BR'].includes(locale)) return locale.replace('-', '_') as Locale
return LanguagesSupported[0]!.replace('-', '_') as Locale
}