From 6cf3f158c7017ffd2a5efadefc2ce6c297d40139 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 17 Dec 2024 23:10:11 +0800 Subject: [PATCH] fix: Improve cache cleaning for internationalization (#7395) --- frontend/src/lang/modules/en.ts | 3 --- frontend/src/lang/modules/tw.ts | 3 --- frontend/src/lang/modules/zh.ts | 5 +---- frontend/src/views/toolbox/clean/index.vue | 16 +++++++++++----- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 54c8c3464..d59c43ab8 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1761,7 +1761,6 @@ const message = { upgradeHelper: '(Recommend keeping the latest upgrade backup for system rollback)', cache: 'System cache files', cacheHelper: '(Proceed with caution, cleaning requires a service restart)', - snapshot: 'System snapshot temporary files', snapshotTmp: 'System snapshot upload temporary files', snapshotLocal: 'System snapshot creation temporary files', rollback: 'Backup files before recover', @@ -1784,9 +1783,7 @@ const message = { 'System log information, container build or image pull log information, and log files generated in scheduled tasks', dockerLog: 'Container operation log files', taskLog: 'Scheduled task execution log files', - shell: 'Shell script scheduled tasks', containerShell: 'Container internal Shell script scheduled tasks', - curl: 'CURL scheduled tasks', containerTrash: 'Container Trash', images: 'Images', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index b267888bf..3b4bc5312 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1645,7 +1645,6 @@ const message = { upgradeHelper: '( 建議保留最新的升級備份用於系統回滾 )', cache: '系統緩存文件', cacheHelper: '( 謹慎操作,清理需要重啟服務 )', - snapshot: '系統快照臨時文件', snapshotTmp: '系統快照上傳臨時文件', snapshotLocal: '系統快照製作臨時文件', rollback: '恢復前備份目錄', @@ -1667,9 +1666,7 @@ const message = { systemLogHelper: '系統日誌信息、容器構建或鏡像拉取等日誌信息以及計劃任務中產生的日誌文件', dockerLog: '容器操作日誌文件', taskLog: '計劃任務執行日誌文件', - shell: 'Shell 腳本計劃任務', containerShell: '容器內執行 Shell 腳本計劃任務', - curl: 'CURL 計劃任務', containerTrash: '容器垃圾', images: '鏡像', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 1f240921a..79864edc1 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1644,7 +1644,6 @@ const message = { upgradeHelper: '( 建议保留最新的升级备份用于系统回滚 )', cache: '系统缓存文件', cacheHelper: '( 谨慎操作,清理需要重启服务 )', - snapshot: '系统快照临时文件', snapshotTmp: '系统快照上传临时文件', snapshotLocal: '系统快照制作临时文件', rollback: '恢复前备份目录', @@ -1666,9 +1665,7 @@ const message = { systemLogHelper: '系统日志信息、容器构建或镜像拉取等日志信息以及计划任务中产生的日志文件', dockerLog: '容器操作日志文件', taskLog: '计划任务执行日志文件', - shell: 'Shell 脚本计划任务', - containerShell: '容器内执行 Shell 脚本计划任务', - curl: 'CURL 计划任务', + containerShell: '容器内 Shell 脚本', containerTrash: '容器垃圾', images: '镜像', diff --git a/frontend/src/views/toolbox/clean/index.vue b/frontend/src/views/toolbox/clean/index.vue index f3ea4c34c..ed40c6ae4 100644 --- a/frontend/src/views/toolbox/clean/index.vue +++ b/frontend/src/views/toolbox/clean/index.vue @@ -599,8 +599,6 @@ function load18n(label: string) { return i18n.global.t('clean.upgrade'); case 'cache': return i18n.global.t('clean.cache'); - case 'snapshot': - return i18n.global.t('clean.snapshot'); case 'snapshot_tmp': return i18n.global.t('clean.snapshotTmp'); case 'snapshot_local': @@ -641,12 +639,20 @@ function load18n(label: string) { return i18n.global.t('clean.dockerLog'); case 'task_log': return i18n.global.t('clean.taskLog'); - case 'shell': - return i18n.global.t('clean.shell'); case 'containerShell': return i18n.global.t('clean.containerShell'); case 'curl': - return i18n.global.t('clean.curl'); + case 'shell': + case 'app': + case 'website': + case 'database': + case 'directory': + case 'log': + case 'cutWebsiteLog': + case 'clean': + case 'snapshot': + case 'ntp': + return i18n.global.t('cronjob.' + label); case 'container_images': return i18n.global.t('clean.images'); case 'container_containers':