From 384499be25429152a10a277049b391eae969e856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=94=AF?= <997132391@qq.com> Date: Tue, 3 Nov 2020 16:53:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20=E4=BF=AE=E5=A4=8Dsafari=20?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E5=85=88=E8=A1=8C=E5=92=8C=E5=90=8E?= =?UTF-8?q?=E8=A1=8C=E6=96=AD=E8=A8=80=E7=9A=84=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E7=99=BD=E5=B1=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 52b3b78..7635a2c 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -54,7 +54,7 @@ function loadAtdLocales() { /\.js$/ ) files.keys().forEach(key => { - const fileName = /(?<=\/)\S+(?=\.)/.exec(key) as Array + const fileName = key.slice(2, key.lastIndexOf('.')) if (includes(TranslateTable, fileName[0])) { const localeKey = findKeyByValue(TranslateTable, fileName[0]) if (localeKey) {