diff --git a/index.html b/index.html
index f05de863..b94410ca 100644
--- a/index.html
+++ b/index.html
@@ -301,6 +301,34 @@
setTimeout(function() {
const timeoutEl = document.getElementById('loading-timeout');
if (timeoutEl) {
+ // 适配多语言
+ const lang = navigator.language || 'zh-CN';
+ const messages = {
+ 'zh-CN': {
+ text: '页面加载似乎遇到了阻碍,请尝试',
+ btn: '清除缓存'
+ },
+ 'zh-TW': {
+ text: '頁面載入似乎遇到了阻礙,請嘗試',
+ btn: '清除快取'
+ },
+ 'en-US': {
+ text: 'Page loading seems to be blocked, please try',
+ btn: 'Clear Cache'
+ }
+ };
+
+ // 默认匹配前缀,如 en-GB 匹配 en-US 的逻辑
+ let msg = messages['zh-CN'];
+ if (lang.startsWith('zh-TW') || lang.startsWith('zh-HK')) {
+ msg = messages['zh-TW'];
+ } else if (lang.startsWith('en')) {
+ msg = messages['en-US'];
+ } else if (lang.startsWith('zh')) {
+ msg = messages['zh-CN'];
+ }
+
+ timeoutEl.innerHTML = msg.text + ' ' + msg.btn + '';
timeoutEl.style.display = 'block';
}
}, 15000); // 15秒后显示超时提示
@@ -319,9 +347,7 @@
-
+
diff --git a/src/components/dialog/AboutDialog.vue b/src/components/dialog/AboutDialog.vue
index 64745d36..04ac0fdf 100644
--- a/src/components/dialog/AboutDialog.vue
+++ b/src/components/dialog/AboutDialog.vue
@@ -120,7 +120,7 @@ function releaseTime(releaseDate: string) {
}
// 强制清除缓存
-async function cleanCache() {
+async function clearCache() {
await clearCachesAndServiceWorker()
// 刷新页面,添加时间戳参数以强制更新
reloadWithTimestamp()
@@ -191,12 +191,12 @@ onMounted(() => {
size="x-small"
variant="tonal"
class="ms-2"
- @click="cleanCache"
+ @click="clearCache"
>
- {{ t('setting.about.cleanCache') }}
+ {{ t('setting.about.clearCache') }}
diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts
index 0700b691..aaf49b12 100644
--- a/src/locales/en-US.ts
+++ b/src/locales/en-US.ts
@@ -1250,7 +1250,7 @@ export default {
dataDirectory: '/moviepilot',
expand: 'Expand',
collapse: 'Collapse',
- cleanCache: 'Clear Cache',
+ clearCache: 'Clear Cache',
},
system: {
custom: 'Custom',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index f95c75d2..a8e9df96 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1247,7 +1247,7 @@ export default {
dataDirectory: '/moviepilot',
expand: '展开',
collapse: '收起',
- cleanCache: '清除缓存',
+ clearCache: '清除缓存',
},
system: {
custom: '自定义',
diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts
index 1b1b30c1..abde346c 100644
--- a/src/locales/zh-TW.ts
+++ b/src/locales/zh-TW.ts
@@ -1235,7 +1235,7 @@ export default {
dataDirectory: '/moviepilot',
expand: '展開',
collapse: '收起',
- cleanCache: '清除緩存',
+ clearCache: '清除快取',
},
system: {
custom: '自定義',