diff --git a/public/index.html b/public/index.html index 455c18b..ae73bef 100644 --- a/public/index.html +++ b/public/index.html @@ -88,13 +88,13 @@

- Gemini Watermark Remover + Gemini Watermark Remover

@@ -241,8 +241,8 @@ diff --git a/public/terms.html b/public/terms.html index efe78f2..2b91844 100644 --- a/public/terms.html +++ b/public/terms.html @@ -36,7 +36,7 @@

- Gemini Watermark Remover + Gemini Watermark Remover

@@ -129,10 +129,13 @@ + \ No newline at end of file diff --git a/src/i18n.js b/src/i18n.js index 04688e8..4667abb 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -9,14 +9,18 @@ const i18n = { }, async loadTranslations(locale) { - const res = await fetch(`/i18n/${locale}.json?_=${Date.now()}`); + const res = await fetch(`./i18n/${locale}.json?_=${Date.now()}`); this.translations = await res.json(); this.locale = locale; localStorage.setItem('locale', locale); }, t(key) { - return this.translations[key] || key; + let text = this.translations[key] || key; + if (typeof text === 'string') { + text = text.replace('{{year}}', new Date().getFullYear()); + } + return text; }, applyTranslations() { diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index 1709d99..0b4449d 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -27,8 +27,9 @@ "footer.desc": "Gemini Watermark Remover, for educational purposes only", "footer.links": "Links", "footer.terms": "Terms of Use", + "footer.github": "GitHub", "footer.tech": "Technology", - "footer.copyright": "© 2025 Gemini Watermark Remover. All rights reserved.", + "footer.copyright": "© {{year}} Gemini Watermark Remover. All rights reserved.", "loading.text": "Processing...", "status.loading": "Loading resources...", "status.pending": "Pending...", diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index 76b18e3..bebf33d 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -27,8 +27,9 @@ "footer.desc": "Gemini 无损去水印工具,本工具仅供学习交流使用", "footer.links": "链接", "footer.terms": "使用条款", + "footer.github": "GitHub", "footer.tech": "技术", - "footer.copyright": "© 2025 Gemini Watermark Remover. All rights reserved.", + "footer.copyright": "© {{year}} Gemini Watermark Remover. All rights reserved.", "loading.text": "正在处理...", "status.loading": "正在加载资源...", "status.pending": "等待处理...",