移除国际化提示,默认使用英文提示

This commit is contained in:
shuaiplus committed 2025-05-10 21:21:28 +08:00
1 parent c1301a6d81
commit 02d64b1eed
1 file changed
+5 -16
+5 -16
View File
@@ -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;
}
/**