From a3ffa67a66c556ac3ff65aae8baeb69e77e1e33e Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Tue, 3 Feb 2026 00:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.js | 12 ++++++++---- src/i18n/en-US.json | 2 +- src/i18n/zh-CN.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app.js b/src/app.js index c4558e5..36e3655 100644 --- a/src/app.js +++ b/src/app.js @@ -104,10 +104,14 @@ function setupLanguageSwitch() { const btn = document.getElementById('langSwitch'); btn.textContent = i18n.locale === 'zh-CN' ? 'EN' : '中文'; btn.addEventListener('click', async () => { - const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN'; - await i18n.switchLocale(newLocale); - btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文'; - updateDynamicTexts(); + try { + const newLocale = i18n.locale === 'zh-CN' ? 'en-US' : 'zh-CN'; + await i18n.switchLocale(newLocale); + btn.textContent = newLocale === 'zh-CN' ? 'EN' : '中文'; + updateDynamicTexts(); + } catch (e) { + console.error('Language switch failed:', e); + } }); } diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index 0b4449d..52cf500 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -6,7 +6,7 @@ "main.title": "Gemini AI Watermark Removal", "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.hint": "Supports JPG, PNG, WebP", + "upload.hint": "Supports JPG, PNG, WebP, PDF", "step.1": "Select Original Image", "step.2": "Auto Processing", "step.3": "Save Clean Image", diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index bebf33d..1f5e50f 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -6,7 +6,7 @@ "main.title": "Gemini AI 图像去水印", "main.subtitle": "基于反向 Alpha 混合算法,纯浏览器本地处理,免费、极速、无损", "upload.text": "点击选择 或 拖拽图片至此", - "upload.hint": "支持 JPG, PNG, WebP", + "upload.hint": "支持 JPG, PNG, WebP, PDF", "step.1": "选择原始图片", "step.2": "算法自动解析", "step.3": "保存无水印图",