mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 00:31:19 +08:00
fix(web): map pt-BR to pt_BR for tool metadata (#41745)
This commit is contained in:
parent
4beffa97e0
commit
24f9f07752
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user