From 4f57db543d5f07caed089095c9968581cfe3fc9d Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Sat, 28 Dec 2024 12:57:23 +0800 Subject: [PATCH] fix: extend `Intl.getCanonicalLocales` error message --- utils/getLanguage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/getLanguage.ts b/utils/getLanguage.ts index c96f7c7ec..0334f6343 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':
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: