chore: Fix some internationalization content

This commit is contained in:
ssongliu 2025-12-31 16:13:34 +08:00
parent d9a5418029
commit 247040fa63
18 changed files with 117 additions and 33 deletions

View file

@ -19,7 +19,7 @@ type RuleSearch struct {
}
type FirewallOperation struct {
Operation string `json:"operation" validate:"required,oneof=start stop restart disablePing enablePing"`
Operation string `json:"operation" validate:"required,oneof=start stop restart disableBanPing enableBanPing"`
WithDockerRestart bool `json:"withDockerRestart"`
}

View file

@ -687,11 +687,6 @@ func loadLogTree(fileOp fileUtils.FileOp) []dto.CleanTree {
size2, _ := fileOp.GetDirSize(path2)
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "task_log", Size: uint64(size2), Children: list2, Type: "task_log"})
path3 := path.Join(global.Dir.TmpDir, "script")
list3 := loadTreeWithAllFile(true, path3, "script", path3, fileOp)
size3, _ := fileOp.GetDirSize(path3)
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "script", Size: uint64(size3), Children: list3, Type: "script", IsRecommend: true})
websiteLogList := loadWebsiteLogTree(fileOp)
logTotalSize := uint64(0)
for _, websiteLog := range websiteLogList {

View file

@ -201,13 +201,13 @@ func (u *FirewallService) OperateFirewall(req dto.FirewallOperation) error {
return err
}
needRestartDocker = true
case "disablePing":
case "disableBanPing":
if err := firewall.UpdatePingStatus("0"); err != nil {
_ = settingRepo.Update("BanPing", constant.StatusDisable)
return err
}
return nil
case "enablePing":
case "enableBanPing":
if err := firewall.UpdatePingStatus("1"); err != nil {
_ = settingRepo.Update("BanPing", constant.StatusEnable)
return err

View file

@ -22560,6 +22560,12 @@ const docTemplate = `{
},
"dto.CleanData": {
"properties": {
"backupClean": {
"items": {
"$ref": "#/definitions/dto.CleanTree"
},
"type": "array"
},
"containerClean": {
"items": {
"$ref": "#/definitions/dto.CleanTree"
@ -22821,10 +22827,7 @@ const docTemplate = `{
"dto.ComposeCreate": {
"properties": {
"env": {
"items": {
"type": "string"
},
"type": "array"
"type": "string"
},
"file": {
"type": "string"
@ -22857,6 +22860,9 @@ const docTemplate = `{
},
"dto.ComposeLogClean": {
"properties": {
"detailPath": {
"type": "string"
},
"name": {
"type": "string"
},
@ -22972,11 +22978,11 @@ const docTemplate = `{
"content": {
"type": "string"
},
"detailPath": {
"type": "string"
},
"env": {
"items": {
"type": "string"
},
"type": "array"
"type": "string"
},
"name": {
"type": "string"
@ -24591,8 +24597,8 @@ const docTemplate = `{
"start",
"stop",
"restart",
"disablePing",
"enablePing"
"disableBanPing",
"enableBanPing"
],
"type": "string"
},
@ -25254,6 +25260,9 @@ const docTemplate = `{
},
"dto.InspectReq": {
"properties": {
"detail": {
"type": "string"
},
"id": {
"type": "string"
},
@ -27541,7 +27550,8 @@ const docTemplate = `{
"ssl": {
"enum": [
"Enable",
"Disable"
"Disable",
"Mux"
],
"type": "string"
},
@ -29048,6 +29058,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"isIP": {
"type": "boolean"
},
"keyType": {
"type": "string"
},
@ -29689,6 +29702,9 @@ const docTemplate = `{
},
"mountPoint": {
"type": "string"
},
"noFail": {
"type": "boolean"
}
},
"required": [
@ -32179,6 +32195,9 @@ const docTemplate = `{
"content": {
"type": "string"
},
"sync": {
"type": "boolean"
},
"type": {
"type": "string"
}
@ -32535,6 +32554,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"isIp": {
"type": "boolean"
},
"keyType": {
"type": "string"
},
@ -34692,6 +34714,9 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"isIP": {
"type": "boolean"
},
"keyType": {
"type": "string"
},
@ -34782,4 +34807,4 @@ var SwaggerInfo = &swag.Spec{
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
}

View file

@ -22556,6 +22556,12 @@
},
"dto.CleanData": {
"properties": {
"backupClean": {
"items": {
"$ref": "#/definitions/dto.CleanTree"
},
"type": "array"
},
"containerClean": {
"items": {
"$ref": "#/definitions/dto.CleanTree"
@ -22817,10 +22823,7 @@
"dto.ComposeCreate": {
"properties": {
"env": {
"items": {
"type": "string"
},
"type": "array"
"type": "string"
},
"file": {
"type": "string"
@ -22853,6 +22856,9 @@
},
"dto.ComposeLogClean": {
"properties": {
"detailPath": {
"type": "string"
},
"name": {
"type": "string"
},
@ -22968,11 +22974,11 @@
"content": {
"type": "string"
},
"detailPath": {
"type": "string"
},
"env": {
"items": {
"type": "string"
},
"type": "array"
"type": "string"
},
"name": {
"type": "string"
@ -24587,8 +24593,8 @@
"start",
"stop",
"restart",
"disablePing",
"enablePing"
"disableBanPing",
"enableBanPing"
],
"type": "string"
},
@ -25250,6 +25256,9 @@
},
"dto.InspectReq": {
"properties": {
"detail": {
"type": "string"
},
"id": {
"type": "string"
},
@ -27537,7 +27546,8 @@
"ssl": {
"enum": [
"Enable",
"Disable"
"Disable",
"Mux"
],
"type": "string"
},
@ -29044,6 +29054,9 @@
"id": {
"type": "integer"
},
"isIP": {
"type": "boolean"
},
"keyType": {
"type": "string"
},
@ -29685,6 +29698,9 @@
},
"mountPoint": {
"type": "string"
},
"noFail": {
"type": "boolean"
}
},
"required": [
@ -32175,6 +32191,9 @@
"content": {
"type": "string"
},
"sync": {
"type": "boolean"
},
"type": {
"type": "string"
}
@ -32531,6 +32550,9 @@
"id": {
"type": "integer"
},
"isIp": {
"type": "boolean"
},
"keyType": {
"type": "string"
},
@ -34688,6 +34710,9 @@
"id": {
"type": "integer"
},
"isIP": {
"type": "boolean"
},
"keyType": {
"type": "string"
},

View file

@ -1224,6 +1224,7 @@ const message = {
interactive: 'Interactive script',
interactiveHelper: 'Requires user input during execution and cannot be used in scheduled tasks.',
library: 'Script Library',
remoteLibrary: 'Remote Script Library',
create: 'Add Script',
edit: 'Edit Script',
groupHelper:
@ -2936,6 +2937,8 @@ const message = {
startFirewallHelper:
'After the firewall is enabled, the server security can be better protected. Do you want to continue?',
noPing: 'Disable ping',
enableBanPing: 'Block Ping',
disableBanPing: 'Unblock Ping',
noPingTitle: 'Disable ping',
noPingHelper: `This will disable ping, and the server won't echo ICMP response. Do you want to continue?`,
onPingHelper: 'This will enable ping, and hackers may discover your server. Do you want to continue?',

View file

@ -1231,6 +1231,7 @@ const message = {
interactive: 'Script interactivo',
interactiveHelper:
'Requiere introducir datos durante la ejecución y no puede ser usada en tareas programadas.',
remoteLibrary: 'Biblioteca de Scripts Remota',
library: 'Librería de scripts',
create: 'Agregar script',
edit: 'Editar script',
@ -2919,6 +2920,8 @@ const message = {
startFirewallHelper:
'Tras habilitar el firewall, la seguridad del servidor podrá protegerse mejor. ¿Deseas continuar?',
noPing: 'Deshabilitar ping',
enableBanPing: 'Bloquear Ping',
disableBanPing: 'Desbloquear Ping',
noPingTitle: 'Deshabilitar ping',
noPingHelper: `Esto deshabilitará el ping, y el servidor no responderá con eco ICMP. ¿Deseas continuar?`,
onPingHelper: 'Esto habilitará el ping, y los atacantes podrían descubrir tu servidor. ¿Deseas continuar?',

View file

@ -2856,6 +2856,8 @@ const message = {
startFirewallHelper:
'ファイアウォールが有効になった後サーバーのセキュリティをよりよく保護できます続けたいですか',
noPing: 'pingを無効にします',
enableBanPing: 'Ping禁止',
disableBanPing: 'Ping禁止解除',
noPingTitle: 'pingを無効にします',
noPingHelper: `これによりPingが無効になり、サーバーはICMP応答をエコーしません。続けたいですか`,
onPingHelper: 'これによりPingが可能になりハッカーはサーバーを発見する場合があります続けたいですか',

View file

@ -1178,6 +1178,7 @@ const message = {
interactive: '대화형 스크립트',
interactiveHelper: '실행 사용자 입력이 필요하며 예약 작업에서는 사용할 없습니다.',
library: '스크립트 라이브러리',
remoteLibrary: 'リモートスクリプトライブラリ',
create: '스크립트 추가',
edit: '스크립트 수정',
groupHelper:
@ -2803,6 +2804,8 @@ const message = {
stopFirewallHelper: ' 작업은 서버 보안을 잃게 만듭니다. 계속하시겠습니까?',
startFirewallHelper: '방화벽이 활성화되면 서버 보안이 강화됩니다. 계속하시겠습니까?',
noPing: 'Ping 비활성화',
enableBanPing: 'Ping 차단',
disableBanPing: 'Ping 차단 해제',
noPingTitle: 'Ping 비활성화',
noPingHelper: ' 작업은 Ping 비활성화하며 서버는 ICMP 응답을 보내지 않게 됩니다. 계속하시겠습니까?',
onPingHelper: ' 작업은 Ping 활성화하여 해커가 서버를 발견할 있습니다. 계속하시겠습니까?',

View file

@ -1216,6 +1216,7 @@ const message = {
interactiveHelper:
'Memerlukan input pengguna semasa pelaksanaan dan tidak boleh digunakan dalam tugas terjadual.',
library: 'Perpustakaan Skrip',
remoteLibrary: 'Pustaka Skrip Jauh',
create: 'Tambah Skrip',
edit: 'Sunting Skrip',
groupHelper:
@ -2917,6 +2918,8 @@ const message = {
startFirewallHelper:
'Selepas firewall diaktifkan, keselamatan pelayan boleh dilindungi dengan lebih baik. Adakah anda mahu meneruskan?',
noPing: 'Lumpuhkan ping',
enableBanPing: 'Sekat Ping',
disableBanPing: 'Nyahsekat Ping',
noPingTitle: 'Lumpuhkan ping',
noPingHelper: `Ini akan melumpuhkan ping, dan pelayan tidak akan memberikan tindak balas ICMP. Adakah anda mahu meneruskan?`,
onPingHelper:

View file

@ -1209,6 +1209,7 @@ const message = {
interactiveHelper:
'Requer entrada do usuário durante a execução e não pode ser usado em tarefas agendadas.',
library: 'Biblioteca de Scripts',
remoteLibrary: 'Biblioteca de Scripts Remota',
create: 'Adicionar Script',
edit: 'Editar Script',
groupHelper:
@ -2922,6 +2923,8 @@ const message = {
startFirewallHelper:
'Depois que o firewall for habilitado, a segurança do servidor será melhor protegida. Deseja continuar?',
noPing: 'Desativar ping',
enableBanPing: 'Bloquear Ping',
disableBanPing: 'Desbloquear Ping',
noPingTitle: 'Desativar ping',
noPingHelper: 'Isso desativará o ping, e o servidor não responderá ao ICMP. Deseja continuar?',
onPingHelper: 'Isso ativará o ping, permitindo que hackers descubram seu servidor. Deseja continuar?',

View file

@ -1211,6 +1211,7 @@ const message = {
interactiveHelper:
'Требует ввода пользователя во время выполнения и не может использоваться в запланированных задачах.',
library: 'Библиотека скриптов',
remoteLibrary: 'Удаленная Библиотека Скриптов',
create: 'Добавить скрипт',
edit: 'Редактировать скрипт',
groupHelper:
@ -2915,6 +2916,8 @@ const message = {
startFirewallHelper:
'После включения межсетевого экрана безопасность сервера будет лучше защищена. Хотите продолжить?',
noPing: 'Отключить ping',
enableBanPing: 'Блокировать Ping',
disableBanPing: 'Разблокировать Ping',
noPingTitle: 'Отключить ping',
noPingHelper: 'Это отключит ping, и сервер не будет отвечать на ICMP-запросы. Хотите продолжить?',
onPingHelper: 'Это включит ping, и хакеры смогут обнаружить ваш сервер. Хотите продолжить?',

View file

@ -1237,6 +1237,7 @@ const message = {
interactive: 'Etkileşimli script',
interactiveHelper: 'Yürütme sırasında kullanıcı girişi gerektirir ve zamanlanmış görevlerde kullanılamaz.',
library: 'Script Kütüphanesi',
remoteLibrary: 'Uzak Komut Dosyası Kütüphanesi',
create: 'Script Ekle',
edit: 'Script Düzenle',
groupHelper:
@ -2018,7 +2019,7 @@ const message = {
error416: 'Aralık Karşılanamadı',
error444: 'Bağlantı Kapalı',
error500: 'Dahili Sunucu Hatası',
https: 'Panel için HTTPS ayarlamak erişim güvenliğini artırır.\nStrict modda HTTPS olmayan trafik panele bağlanamaz.\nMux modu HTTP\'yi HTTPS\'e yönlendirir, ancak güvenliği biraz azaltabilir.',
https: "Panel için HTTPS ayarlamak erişim güvenliğini artırır.\nStrict modda HTTPS olmayan trafik panele bağlanamaz.\nMux modu HTTP'yi HTTPS'e yönlendirir, ancak güvenliği biraz azaltabilir.",
certType: 'Sertifika türü',
selfSigned: 'Kendi kendine imzalı',
selfSignedHelper:
@ -2974,6 +2975,8 @@ const message = {
startFirewallHelper:
'Güvenlik duvarı etkinleştirildiğinde, sunucu güvenliği daha iyi korunabilir. Devam etmek istiyor musunuz?',
noPing: 'Pingi devre dışı bırak',
enableBanPing: 'Ping Engelle',
disableBanPing: 'Ping Engellemeyi Kaldır',
noPingTitle: 'Pingi devre dışı bırak',
noPingHelper:
'Bu, pingi devre dışı bırakacak ve sunucu ICMP yanıtını geri göndermeyecek. Devam etmek istiyor musunuz?',

View file

@ -1158,6 +1158,7 @@ const message = {
interactive: '互動式腳本',
interactiveHelper: '在腳本執行過程中需要使用者輸入參數或做出選擇且無法用於計劃任務中',
library: '腳本庫',
remoteLibrary: '遠端腳本庫',
create: '新增腳本',
edit: '修改腳本',
groupHelper: '根據腳本特徵設定不同的分組可以更快地對腳本進行篩選操作',
@ -2730,6 +2731,8 @@ const message = {
stopFirewallHelper: '系統防火牆關閉後伺服器將失去安全防護是否繼續',
startFirewallHelper: '系統防火牆開啟後可以更好的防護伺服器安全是否繼續',
noPing: ' ping',
enableBanPing: ' Ping',
disableBanPing: '解除禁 Ping',
noPingTitle: '是否禁 ping',
noPingHelper: ' ping 後將無法 ping 通伺服器是否繼續',
onPingHelper: '解除禁 ping 後您的伺服器可能會被駭客發現是否繼續',

View file

@ -1162,6 +1162,7 @@ const message = {
interactive: '交互式脚本',
interactiveHelper: '在脚本执行过程中需要用户输入参数或做出选择且无法用于计划任务中',
library: '脚本库',
remoteLibrary: '远程脚本库',
create: '添加脚本',
edit: '修改脚本',
groupHelper: '针对脚本特征设置不同的分组可以更加快速的对脚本进行筛选操作',
@ -2729,6 +2730,8 @@ const message = {
stopFirewallHelper: '系统防火墙关闭后服务器将失去安全防护是否继续',
startFirewallHelper: '系统防火墙开启后可以更好的防护服务器安全是否继续',
noPing: ' ping',
enableBanPing: ' ping',
disableBanPing: '解除禁 ping',
noPingTitle: '是否禁 ping',
noPingHelper: ' ping 后将无法 ping 通服务器是否继续',
onPingHelper: '解除禁 ping 后您的服务器可能会被黑客发现是否继续',

View file

@ -256,7 +256,7 @@ const onPingOperate = async (operation: string) => {
})
.then(async () => {
emit('update:loading', true);
operation = operation === 'Disable' ? 'disablePing' : 'enablePing';
operation = operation === 'Disable' ? 'disableBanPing' : 'enableBanPing';
emit('update:maskShow', true);
await operateFire(operation, false)
.then(() => {

View file

@ -183,6 +183,8 @@ const replacements = {
'[Enable]': 'commons.button.enable',
'[disable]': 'commons.button.disable',
'[Disable]': 'commons.button.disable',
'[disableBanPing]': 'firewall.disableBanPing',
'[enableBanPing]': 'firewall.enableBanPing',
'[light]': 'setting.light',
'[dark]': 'setting.dark',
'[delete]': 'commons.button.delete',

View file

@ -600,8 +600,16 @@ function load18n(label: string) {
case 'System':
case 'Website':
return i18n.global.t('menu.' + label.toLowerCase());
case 'Backup':
return i18n.global.t('logs.detail.backups');
case 'Tamper':
return i18n.global.t('xpack.tamper.tamper');
case 'TaskRollback':
return i18n.global.t('setting.rollback');
case 'Script':
return i18n.global.t('cronjob.library.library');
case 'ScriptLibrary':
return i18n.global.t('cronjob.library.remoteLibrary');
case 'Compose':
return i18n.global.t('container.compose');
case 'CustomAppstore':