From 6cbec9a3dded8bd949d69d607f4e97e30abfb255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=AF=E5=9F=B9=E6=9D=B0?= Date: Tue, 10 Oct 2023 17:39:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(plugin-locale):=E4=BD=BF=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E4=B8=8D=E4=BB=85=E9=99=90=E4=BA=8E[a-z]{2}$?= =?UTF-8?q?{separator}[A-Z]{2}=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-locale/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-locale/src/utils.ts b/packages/plugin-locale/src/utils.ts index 974c0ee3..7b60596e 100644 --- a/packages/plugin-locale/src/utils.ts +++ b/packages/plugin-locale/src/utils.ts @@ -81,7 +81,7 @@ export const getLocaleList = async ( addAntdLocales, } = opts; const localeFileMath = new RegExp( - `^([a-z]{2})${separator}?([A-Z]{2})?\.(js|json|ts)$`, + `^([a-zA-Z]{0,})${separator}?([a-zA-Z]{0,})?\.(js|json|ts)$`, ); const localeFiles = glob From 644b4353c55cafcffc0cce1a6bb80c5fa1add1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=AF=E5=9F=B9=E6=9D=B0?= Date: Tue, 10 Oct 2023 18:19:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(plugin-locale):=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6=E5=89=8D=E7=9A=84=E8=A7=84=E5=88=99=E4=B8=8D=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-locale/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-locale/src/utils.ts b/packages/plugin-locale/src/utils.ts index 7b60596e..8e339cfc 100644 --- a/packages/plugin-locale/src/utils.ts +++ b/packages/plugin-locale/src/utils.ts @@ -81,7 +81,7 @@ export const getLocaleList = async ( addAntdLocales, } = opts; const localeFileMath = new RegExp( - `^([a-zA-Z]{0,})${separator}?([a-zA-Z]{0,})?\.(js|json|ts)$`, + `^([a-z]{2})${separator}?([a-zA-Z]{0,})?\.(js|json|ts)$`, ); const localeFiles = glob