修复启动错误

main
mula.liu 2026-02-03 00:53:55 +08:00
parent 1fbb5d81a6
commit a3ffa67a66
3 changed files with 10 additions and 6 deletions

View File

@ -104,10 +104,14 @@ function setupLanguageSwitch() {
const btn = document.getElementById('langSwitch'); const btn = document.getElementById('langSwitch');
btn.textContent = i18n.locale === 'zh-CN' ? 'EN' : '中文'; btn.textContent = i18n.locale === 'zh-CN' ? 'EN' : '中文';
btn.addEventListener('click', async () => { btn.addEventListener('click', async () => {
const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN'; try {
await i18n.switchLocale(newLocale); const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN';
btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文'; await i18n.switchLocale(newLocale);
updateDynamicTexts(); btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文';
updateDynamicTexts();
} catch (e) {
console.error('Language switch failed:', e);
}
}); });
} }

View File

@ -6,7 +6,7 @@
"main.title": "Gemini AI Watermark Removal", "main.title": "Gemini AI Watermark Removal",
"main.subtitle": "Based on reverse alpha blending algorithm, pure browser-side processing, Free, Fast, and Lossless", "main.subtitle": "Based on reverse alpha blending algorithm, pure browser-side processing, Free, Fast, and Lossless",
"upload.text": "Click to select or drag images here", "upload.text": "Click to select or drag images here",
"upload.hint": "Supports JPG, PNG, WebP", "upload.hint": "Supports JPG, PNG, WebP, PDF",
"step.1": "Select Original Image", "step.1": "Select Original Image",
"step.2": "Auto Processing", "step.2": "Auto Processing",
"step.3": "Save Clean Image", "step.3": "Save Clean Image",

View File

@ -6,7 +6,7 @@
"main.title": "Gemini AI 图像去水印", "main.title": "Gemini AI 图像去水印",
"main.subtitle": "基于反向 Alpha 混合算法,纯浏览器本地处理,免费、极速、无损", "main.subtitle": "基于反向 Alpha 混合算法,纯浏览器本地处理,免费、极速、无损",
"upload.text": "点击选择 或 拖拽图片至此", "upload.text": "点击选择 或 拖拽图片至此",
"upload.hint": "支持 JPG, PNG, WebP", "upload.hint": "支持 JPG, PNG, WebP, PDF",
"step.1": "选择原始图片", "step.1": "选择原始图片",
"step.2": "算法自动解析", "step.2": "算法自动解析",
"step.3": "保存无水印图", "step.3": "保存无水印图",