Skip to content

Commit 9e10e52

Browse files
committed
feat: improve i18n support for QQ group and update page titles in translation files
1 parent ce76934 commit 9e10e52

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

js/i18n/en-US.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const enUS = {
2-
title: 'JavaScript Debugger Bypass Goat Testing Platform',
2+
title: 'JavaScript debugger bypass Goat Testing Platform',
33
nav: {
44
home: 'Home',
55
testCases: 'Test Cases'
66
},
77
hero: {
88
badge: 'Open Source',
9-
title: 'JavaScript Debugger Bypass Goat Testing Platform',
9+
title: 'JavaScript debugger bypass Goat Testing Platform',
1010
description: 'An online platform for testing and validating JavaScript debugger bypass techniques',
1111
startTest: 'Start Testing',
1212
viewSource: 'View Source'
@@ -43,6 +43,7 @@ const enUS = {
4343
title: 'Join Our Community',
4444
reverseGroup: 'WeChat Group (Chinese Tech Community)',
4545
wechat: 'WeChat (Send "Reverse Group" to join)',
46+
qq: 'QQ Group',
4647
telegram: 'Telegram Group',
4748
click_to_join: 'Click to join'
4849
},

js/i18n/i18n-home.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,30 @@ class I18nHome {
9494
if (joinGroupTitle) joinGroupTitle.textContent = this.i18n.t('joinGroup.title');
9595

9696
const qrCodes = document.querySelectorAll('.qr-code p');
97-
if (qrCodes.length >= 3) {
97+
if (qrCodes.length >= 4) {
9898
qrCodes[0].textContent = this.i18n.t('joinGroup.reverseGroup');
9999
qrCodes[1].textContent = this.i18n.t('joinGroup.wechat');
100100

101-
// 对于第三个 QR 码,我们需要小心处理,因为它包含一个链接
102-
const telegramText = qrCodes[2].childNodes[0];
101+
// 处理QQ群
102+
const qqText = qrCodes[2].childNodes[0];
103+
if (qqText) {
104+
qqText.textContent = this.i18n.t('joinGroup.qq') + ' ';
105+
}
106+
107+
// 更新QQ群"点此加入"链接文本
108+
const qqLink = qrCodes[2].querySelector('a');
109+
if (qqLink) {
110+
qqLink.textContent = this.i18n.t('joinGroup.click_to_join');
111+
}
112+
113+
// 处理Telegram群
114+
const telegramText = qrCodes[3].childNodes[0];
103115
if (telegramText) {
104116
telegramText.textContent = this.i18n.t('joinGroup.telegram') + ' ';
105117
}
106118

107-
// 更新"点此加入"链接文本
108-
const telegramLink = qrCodes[2].querySelector('a');
119+
// 更新Telegram"点此加入"链接文本
120+
const telegramLink = qrCodes[3].querySelector('a');
109121
if (telegramLink) {
110122
telegramLink.textContent = this.i18n.t('joinGroup.click_to_join');
111123
}

js/i18n/zh-CN.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const zhCN = {
2-
title: 'JavaScript 调试绕过靶场测试平台',
2+
title: 'JavaScript debugger bypass绕过靶场测试平台',
33
nav: {
44
home: '首页',
55
testCases: '测试用例'
66
},
77
hero: {
88
badge: '开源项目',
9-
title: 'JavaScript 调试绕过靶场测试平台',
9+
title: 'JavaScript debugger bypass绕过靶场测试平台',
1010
description: '一个用于测试和验证 JavaScript 调试绕过技术的在线靶场平台',
1111
startTest: '开始测试',
1212
viewSource: '查看源码'
@@ -43,6 +43,7 @@ const zhCN = {
4343
title: '加入我们的交流群',
4444
reverseGroup: '微信技术交流群',
4545
wechat: '微信个人号(发送【逆向群】拉你进群)',
46+
qq: 'QQ群',
4647
telegram: 'Telegram 电报群',
4748
click_to_join: '点此加入'
4849
},

0 commit comments

Comments
 (0)