]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: extend `Intl.getCanonicalLocales` error message
authorbtea <2356281422@qq.com>
Sat, 28 Dec 2024 04:57:23 +0000 (12:57 +0800)
committerCédric Exbrayat <cexbrayat@users.noreply.github.com>
Sat, 28 Dec 2024 15:10:04 +0000 (16:10 +0100)
utils/getLanguage.ts

index c96f7c7ec8e2ccc3e42a893f427c3f343f0b691d..0334f6343e1602db03ba4ad653d8a91614d195d2 100644 (file)
@@ -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':