From: btea <2356281422@qq.com> Date: Sat, 28 Dec 2024 04:57:23 +0000 (+0800) Subject: fix: extend `Intl.getCanonicalLocales` error message X-Git-Tag: v3.14.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db58bdd76eae3feb6b3222fc60908c541586f5d9;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: extend `Intl.getCanonicalLocales` error message --- diff --git a/utils/getLanguage.ts b/utils/getLanguage.ts index c96f7c7e..0334f634 100644 --- a/utils/getLanguage.ts +++ b/utils/getLanguage.ts @@ -55,7 +55,7 @@ function linkLocale(locale: string) { try { linkedLocale = Intl.getCanonicalLocales(locale)[0] } catch (error) { - console.log(`${error.toString()}\n`) + console.log(`${error.toString()}, invalid language tag: "${locale}"\n`) } switch (linkedLocale) { case 'zh-TW':