From 24f9f077526c9fb6b1c19499465ad1ec50f1723a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 3 Sep 2026 12:54:46 +0000 Subject: [PATCH] fix(web): map pt-BR to pt_BR for tool metadata (#41745) --- web/i18n-config/language.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }