Skip to content

Commit 8fb3e78

Browse files
authored
chore: Fix some internationalization content (#11528)
Refs #11517
1 parent 01ab004 commit 8fb3e78

File tree

18 files changed

+117
-33
lines changed

18 files changed

+117
-33
lines changed

agent/app/dto/firewall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type RuleSearch struct {
1919
}
2020

2121
type FirewallOperation struct {
22-
Operation string `json:"operation" validate:"required,oneof=start stop restart disablePing enablePing"`
22+
Operation string `json:"operation" validate:"required,oneof=start stop restart disableBanPing enableBanPing"`
2323
WithDockerRestart bool `json:"withDockerRestart"`
2424
}
2525

agent/app/service/device_clean.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,6 @@ func loadLogTree(fileOp fileUtils.FileOp) []dto.CleanTree {
687687
size2, _ := fileOp.GetDirSize(path2)
688688
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "task_log", Size: uint64(size2), Children: list2, Type: "task_log"})
689689

690-
path3 := path.Join(global.Dir.TmpDir, "script")
691-
list3 := loadTreeWithAllFile(true, path3, "script", path3, fileOp)
692-
size3, _ := fileOp.GetDirSize(path3)
693-
treeData = append(treeData, dto.CleanTree{ID: uuid.NewString(), Label: "script", Size: uint64(size3), Children: list3, Type: "script", IsRecommend: true})
694-
695690
websiteLogList := loadWebsiteLogTree(fileOp)
696691
logTotalSize := uint64(0)
697692
for _, websiteLog := range websiteLogList {

agent/app/service/firewall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ func (u *FirewallService) OperateFirewall(req dto.FirewallOperation) error {
201201
return err
202202
}
203203
needRestartDocker = true
204-
case "disablePing":
204+
case "disableBanPing":
205205
if err := firewall.UpdatePingStatus("0"); err != nil {
206206
_ = settingRepo.Update("BanPing", constant.StatusDisable)
207207
return err
208208
}
209209
return nil
210-
case "enablePing":
210+
case "enableBanPing":
211211
if err := firewall.UpdatePingStatus("1"); err != nil {
212212
_ = settingRepo.Update("BanPing", constant.StatusEnable)
213213
return err

core/cmd/server/docs/docs.go

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22560,6 +22560,12 @@ const docTemplate = `{
2256022560
},
2256122561
"dto.CleanData": {
2256222562
"properties": {
22563+
"backupClean": {
22564+
"items": {
22565+
"$ref": "#/definitions/dto.CleanTree"
22566+
},
22567+
"type": "array"
22568+
},
2256322569
"containerClean": {
2256422570
"items": {
2256522571
"$ref": "#/definitions/dto.CleanTree"
@@ -22821,10 +22827,7 @@ const docTemplate = `{
2282122827
"dto.ComposeCreate": {
2282222828
"properties": {
2282322829
"env": {
22824-
"items": {
22825-
"type": "string"
22826-
},
22827-
"type": "array"
22830+
"type": "string"
2282822831
},
2282922832
"file": {
2283022833
"type": "string"
@@ -22857,6 +22860,9 @@ const docTemplate = `{
2285722860
},
2285822861
"dto.ComposeLogClean": {
2285922862
"properties": {
22863+
"detailPath": {
22864+
"type": "string"
22865+
},
2286022866
"name": {
2286122867
"type": "string"
2286222868
},
@@ -22972,11 +22978,11 @@ const docTemplate = `{
2297222978
"content": {
2297322979
"type": "string"
2297422980
},
22981+
"detailPath": {
22982+
"type": "string"
22983+
},
2297522984
"env": {
22976-
"items": {
22977-
"type": "string"
22978-
},
22979-
"type": "array"
22985+
"type": "string"
2298022986
},
2298122987
"name": {
2298222988
"type": "string"
@@ -24591,8 +24597,8 @@ const docTemplate = `{
2459124597
"start",
2459224598
"stop",
2459324599
"restart",
24594-
"disablePing",
24595-
"enablePing"
24600+
"disableBanPing",
24601+
"enableBanPing"
2459624602
],
2459724603
"type": "string"
2459824604
},
@@ -25254,6 +25260,9 @@ const docTemplate = `{
2525425260
},
2525525261
"dto.InspectReq": {
2525625262
"properties": {
25263+
"detail": {
25264+
"type": "string"
25265+
},
2525725266
"id": {
2525825267
"type": "string"
2525925268
},
@@ -27541,7 +27550,8 @@ const docTemplate = `{
2754127550
"ssl": {
2754227551
"enum": [
2754327552
"Enable",
27544-
"Disable"
27553+
"Disable",
27554+
"Mux"
2754527555
],
2754627556
"type": "string"
2754727557
},
@@ -29048,6 +29058,9 @@ const docTemplate = `{
2904829058
"id": {
2904929059
"type": "integer"
2905029060
},
29061+
"isIP": {
29062+
"type": "boolean"
29063+
},
2905129064
"keyType": {
2905229065
"type": "string"
2905329066
},
@@ -29689,6 +29702,9 @@ const docTemplate = `{
2968929702
},
2969029703
"mountPoint": {
2969129704
"type": "string"
29705+
},
29706+
"noFail": {
29707+
"type": "boolean"
2969229708
}
2969329709
},
2969429710
"required": [
@@ -32179,6 +32195,9 @@ const docTemplate = `{
3217932195
"content": {
3218032196
"type": "string"
3218132197
},
32198+
"sync": {
32199+
"type": "boolean"
32200+
},
3218232201
"type": {
3218332202
"type": "string"
3218432203
}
@@ -32535,6 +32554,9 @@ const docTemplate = `{
3253532554
"id": {
3253632555
"type": "integer"
3253732556
},
32557+
"isIp": {
32558+
"type": "boolean"
32559+
},
3253832560
"keyType": {
3253932561
"type": "string"
3254032562
},
@@ -34692,6 +34714,9 @@ const docTemplate = `{
3469234714
"id": {
3469334715
"type": "integer"
3469434716
},
34717+
"isIP": {
34718+
"type": "boolean"
34719+
},
3469534720
"keyType": {
3469634721
"type": "string"
3469734722
},
@@ -34782,4 +34807,4 @@ var SwaggerInfo = &swag.Spec{
3478234807

3478334808
func init() {
3478434809
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
34785-
}
34810+
}

core/cmd/server/docs/swagger.json

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22556,6 +22556,12 @@
2255622556
},
2255722557
"dto.CleanData": {
2255822558
"properties": {
22559+
"backupClean": {
22560+
"items": {
22561+
"$ref": "#/definitions/dto.CleanTree"
22562+
},
22563+
"type": "array"
22564+
},
2255922565
"containerClean": {
2256022566
"items": {
2256122567
"$ref": "#/definitions/dto.CleanTree"
@@ -22817,10 +22823,7 @@
2281722823
"dto.ComposeCreate": {
2281822824
"properties": {
2281922825
"env": {
22820-
"items": {
22821-
"type": "string"
22822-
},
22823-
"type": "array"
22826+
"type": "string"
2282422827
},
2282522828
"file": {
2282622829
"type": "string"
@@ -22853,6 +22856,9 @@
2285322856
},
2285422857
"dto.ComposeLogClean": {
2285522858
"properties": {
22859+
"detailPath": {
22860+
"type": "string"
22861+
},
2285622862
"name": {
2285722863
"type": "string"
2285822864
},
@@ -22968,11 +22974,11 @@
2296822974
"content": {
2296922975
"type": "string"
2297022976
},
22977+
"detailPath": {
22978+
"type": "string"
22979+
},
2297122980
"env": {
22972-
"items": {
22973-
"type": "string"
22974-
},
22975-
"type": "array"
22981+
"type": "string"
2297622982
},
2297722983
"name": {
2297822984
"type": "string"
@@ -24587,8 +24593,8 @@
2458724593
"start",
2458824594
"stop",
2458924595
"restart",
24590-
"disablePing",
24591-
"enablePing"
24596+
"disableBanPing",
24597+
"enableBanPing"
2459224598
],
2459324599
"type": "string"
2459424600
},
@@ -25250,6 +25256,9 @@
2525025256
},
2525125257
"dto.InspectReq": {
2525225258
"properties": {
25259+
"detail": {
25260+
"type": "string"
25261+
},
2525325262
"id": {
2525425263
"type": "string"
2525525264
},
@@ -27537,7 +27546,8 @@
2753727546
"ssl": {
2753827547
"enum": [
2753927548
"Enable",
27540-
"Disable"
27549+
"Disable",
27550+
"Mux"
2754127551
],
2754227552
"type": "string"
2754327553
},
@@ -29044,6 +29054,9 @@
2904429054
"id": {
2904529055
"type": "integer"
2904629056
},
29057+
"isIP": {
29058+
"type": "boolean"
29059+
},
2904729060
"keyType": {
2904829061
"type": "string"
2904929062
},
@@ -29685,6 +29698,9 @@
2968529698
},
2968629699
"mountPoint": {
2968729700
"type": "string"
29701+
},
29702+
"noFail": {
29703+
"type": "boolean"
2968829704
}
2968929705
},
2969029706
"required": [
@@ -32175,6 +32191,9 @@
3217532191
"content": {
3217632192
"type": "string"
3217732193
},
32194+
"sync": {
32195+
"type": "boolean"
32196+
},
3217832197
"type": {
3217932198
"type": "string"
3218032199
}
@@ -32531,6 +32550,9 @@
3253132550
"id": {
3253232551
"type": "integer"
3253332552
},
32553+
"isIp": {
32554+
"type": "boolean"
32555+
},
3253432556
"keyType": {
3253532557
"type": "string"
3253632558
},
@@ -34688,6 +34710,9 @@
3468834710
"id": {
3468934711
"type": "integer"
3469034712
},
34713+
"isIP": {
34714+
"type": "boolean"
34715+
},
3469134716
"keyType": {
3469234717
"type": "string"
3469334718
},

frontend/src/lang/modules/en.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,7 @@ const message = {
12241224
interactive: 'Interactive script',
12251225
interactiveHelper: 'Requires user input during execution and cannot be used in scheduled tasks.',
12261226
library: 'Script Library',
1227+
remoteLibrary: 'Remote Script Library',
12271228
create: 'Add Script',
12281229
edit: 'Edit Script',
12291230
groupHelper:
@@ -2936,6 +2937,8 @@ const message = {
29362937
startFirewallHelper:
29372938
'After the firewall is enabled, the server security can be better protected. Do you want to continue?',
29382939
noPing: 'Disable ping',
2940+
enableBanPing: 'Block Ping',
2941+
disableBanPing: 'Unblock Ping',
29392942
noPingTitle: 'Disable ping',
29402943
noPingHelper: `This will disable ping, and the server won't echo ICMP response. Do you want to continue?`,
29412944
onPingHelper: 'This will enable ping, and hackers may discover your server. Do you want to continue?',

frontend/src/lang/modules/es-es.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ const message = {
12311231
interactive: 'Script interactivo',
12321232
interactiveHelper:
12331233
'Requiere introducir datos durante la ejecución y no puede ser usada en tareas programadas.',
1234+
remoteLibrary: 'Biblioteca de Scripts Remota',
12341235
library: 'Librería de scripts',
12351236
create: 'Agregar script',
12361237
edit: 'Editar script',
@@ -2919,6 +2920,8 @@ const message = {
29192920
startFirewallHelper:
29202921
'Tras habilitar el firewall, la seguridad del servidor podrá protegerse mejor. ¿Deseas continuar?',
29212922
noPing: 'Deshabilitar ping',
2923+
enableBanPing: 'Bloquear Ping',
2924+
disableBanPing: 'Desbloquear Ping',
29222925
noPingTitle: 'Deshabilitar ping',
29232926
noPingHelper: `Esto deshabilitará el ping, y el servidor no responderá con eco ICMP. ¿Deseas continuar?`,
29242927
onPingHelper: 'Esto habilitará el ping, y los atacantes podrían descubrir tu servidor. ¿Deseas continuar?',

frontend/src/lang/modules/ja.ts

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

frontend/src/lang/modules/ko.ts

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

frontend/src/lang/modules/ms.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,7 @@ const message = {
12161216
interactiveHelper:
12171217
'Memerlukan input pengguna semasa pelaksanaan dan tidak boleh digunakan dalam tugas terjadual.',
12181218
library: 'Perpustakaan Skrip',
1219+
remoteLibrary: 'Pustaka Skrip Jauh',
12191220
create: 'Tambah Skrip',
12201221
edit: 'Sunting Skrip',
12211222
groupHelper:
@@ -2917,6 +2918,8 @@ const message = {
29172918
startFirewallHelper:
29182919
'Selepas firewall diaktifkan, keselamatan pelayan boleh dilindungi dengan lebih baik. Adakah anda mahu meneruskan?',
29192920
noPing: 'Lumpuhkan ping',
2921+
enableBanPing: 'Sekat Ping',
2922+
disableBanPing: 'Nyahsekat Ping',
29202923
noPingTitle: 'Lumpuhkan ping',
29212924
noPingHelper: `Ini akan melumpuhkan ping, dan pelayan tidak akan memberikan tindak balas ICMP. Adakah anda mahu meneruskan?`,
29222925
onPingHelper:

0 commit comments

Comments
 (0)