修复启动错误
parent
1fbb5d81a6
commit
a3ffa67a66
|
|
@ -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 () => {
|
||||||
|
try {
|
||||||
const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN';
|
const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN';
|
||||||
await i18n.switchLocale(newLocale);
|
await i18n.switchLocale(newLocale);
|
||||||
btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文';
|
btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文';
|
||||||
updateDynamicTexts();
|
updateDynamicTexts();
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Language switch failed:', e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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": "保存无水印图",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue