From 02d64b1eed46a968ab8a2c163d2b68da5e1690fc Mon Sep 17 00:00:00 2001 From: shuaiplus <2327005759@qq.com> Date: Sat, 10 May 2025 21:21:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/util.image.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/web/util.image.js b/web/util.image.js index ceef682..d6978ff 100644 --- a/web/util.image.js +++ b/web/util.image.js @@ -41,23 +41,12 @@ function checkWebpSupport() { }); } -// 国际化提示 -const i18n = { - zh: { - tooLarge: '图片过大(超过5MB)', - }, - en: { - tooLarge: 'Image is too large (over 5MB)', - } -}; -function getLang() { - const lang = navigator.language || navigator.userLanguage; - if (lang && lang.toLowerCase().startsWith('zh')) return 'zh'; - return 'en'; -} +// 国际化提示已移除,默认英文提示 function t(key) { - const lang = getLang(); - return (i18n[lang] && i18n[lang][key]) || i18n['en'][key] || key; + const messages = { + tooLarge: 'Image is too large (over 5MB)', + }; + return messages[key] || key; } /**