Skip to content

Commit 8bfcd3c

Browse files
FireflyF09claude
andcommitted
fix: 关于我们页面项目名改为可点击链接,提交问卷按钮改为加入我们
- joinUsText 拆分为结构化的 joinUsPrefix/joinUsProjects/joinUsSeparator/joinUsSuffix - 项目名渲染为可点击的 GitHub 链接,不再以纯文本显示 URL - i18n t() 支持返回数组/对象等非字符串值 - 按钮文案 提交问卷 → 加入我们(四语言本地化) - 更新 version.json 至 1.9.14 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4838993 commit 8bfcd3c

4 files changed

Lines changed: 57 additions & 13 deletions

File tree

‎public/config/version.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"appVersion": "1.9.13",
2+
"appVersion": "1.9.14",
33
"policyVersion": "1.0.1"
44
}

‎src/i18n/index.ts‎

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,16 @@ export const messages = {
128128
donateText: '您可以加群获取HSN2026年度预算报表,并前往我们的爱发电主页进行捐赠,感谢❤️❤️❤️。',
129129
donateButton: '前往爱发电',
130130
joinUs: '关于HSN Phira多人游戏服务器使用的项目',
131-
joinUsText: 'HSN Phira多人游戏服务器由HSNPhira(https://github.com/HyperSynapseNetwork/HSNPhira),PMP (https://github.com/HyperSynapseNetwork/Phira-mp-plus),phira-web-monitor(https://github.com/HyperSynapseNetwork/phira-web-monitor),phira-mp-logprocessor(https://github.com/HyperSynapseNetwork/phira-mp-logprocessor)等项目强势驱动',
132-
joinUsButton: '提交问卷',
131+
joinUsPrefix: 'HSN Phira多人游戏服务器由',
132+
joinUsProjects: [
133+
{ name: 'HSNPhira', url: 'https://github.com/HyperSynapseNetwork/HSNPhira' },
134+
{ name: 'PMP', url: 'https://github.com/HyperSynapseNetwork/Phira-mp-plus' },
135+
{ name: 'phira-web-monitor', url: 'https://github.com/HyperSynapseNetwork/phira-web-monitor' },
136+
{ name: 'phira-mp-logprocessor', url: 'https://github.com/HyperSynapseNetwork/phira-mp-logprocessor' }
137+
],
138+
joinUsSeparator: ',',
139+
joinUsSuffix: '等项目强势驱动',
140+
joinUsButton: '加入我们',
133141
acknowledgements: '致谢',
134142
acknowledgementsNote: '注:以下贡献者排序不分先后'
135143
},
@@ -686,8 +694,16 @@ export const messages = {
686694
donateText: 'You can join the group to get the HSN 2026 annual budget report and donate at our Afdian homepage. Thank you ❤️❤️❤️.',
687695
donateButton: 'Go to Afdian',
688696
joinUs: 'About the Projects Powering HSN Phira Multiplayer Server',
689-
joinUsText: 'HSN Phira Multiplayer Server is proudly powered by HSNPhira (https://github.com/HyperSynapseNetwork/HSNPhira), PMP (https://github.com/HyperSynapseNetwork/Phira-mp-plus), phira-web-monitor (https://github.com/HyperSynapseNetwork/phira-web-monitor), phira-mp-logprocessor (https://github.com/HyperSynapseNetwork/phira-mp-logprocessor), and other projects.',
690-
joinUsButton: 'Submit Questionnaire',
697+
joinUsPrefix: 'HSN Phira Multiplayer Server is proudly powered by ',
698+
joinUsProjects: [
699+
{ name: 'HSNPhira', url: 'https://github.com/HyperSynapseNetwork/HSNPhira' },
700+
{ name: 'PMP', url: 'https://github.com/HyperSynapseNetwork/Phira-mp-plus' },
701+
{ name: 'phira-web-monitor', url: 'https://github.com/HyperSynapseNetwork/phira-web-monitor' },
702+
{ name: 'phira-mp-logprocessor', url: 'https://github.com/HyperSynapseNetwork/phira-mp-logprocessor' }
703+
],
704+
joinUsSeparator: ', ',
705+
joinUsSuffix: ', and other projects.',
706+
joinUsButton: 'Join Us',
691707
acknowledgements: 'Acknowledgements',
692708
acknowledgementsNote: 'Note: Contributors are listed in no particular order'
693709
},
@@ -1244,8 +1260,16 @@ export const messages = {
12441260
donateText: 'グループに参加してHSN2026年度予算報告書を取得し、愛発電ホームページで寄付することができます。ありがとうございます❤️❤️❤️。',
12451261
donateButton: '愛発電へ行く',
12461262
joinUs: 'HSN Phira マルチプレイヤーサーバーを支えるプロジェクトについて',
1247-
joinUsText: 'HSN Phira マルチプレイヤーサーバーは、HSNPhira(https://github.com/HyperSynapseNetwork/HSNPhira)、PMP(https://github.com/HyperSynapseNetwork/Phira-mp-plus)、phira-web-monitor(https://github.com/HyperSynapseNetwork/phira-web-monitor)、phira-mp-logprocessor(https://github.com/HyperSynapseNetwork/phira-mp-logprocessor)などのプロジェクトによって強力に支えられています。',
1248-
joinUsButton: 'アンケートを提出',
1263+
joinUsPrefix: 'HSN Phira マルチプレイヤーサーバーは、',
1264+
joinUsProjects: [
1265+
{ name: 'HSNPhira', url: 'https://github.com/HyperSynapseNetwork/HSNPhira' },
1266+
{ name: 'PMP', url: 'https://github.com/HyperSynapseNetwork/Phira-mp-plus' },
1267+
{ name: 'phira-web-monitor', url: 'https://github.com/HyperSynapseNetwork/phira-web-monitor' },
1268+
{ name: 'phira-mp-logprocessor', url: 'https://github.com/HyperSynapseNetwork/phira-mp-logprocessor' }
1269+
],
1270+
joinUsSeparator: '、',
1271+
joinUsSuffix: 'などのプロジェクトによって強力に支えられています。',
1272+
joinUsButton: '参加する',
12491273
acknowledgements: '謝辞',
12501274
acknowledgementsNote: '注:貢献者の順序は特に決まっていません'
12511275
},
@@ -1803,8 +1827,16 @@ export const messages = {
18031827
donateText: '您可以加群獲取HSN2026年度預算報表,並前往我們的愛發電主頁進行捐贈,感謝❤️❤️❤️。',
18041828
donateButton: '前往愛發電',
18051829
joinUs: '關於驅動 HSN Phira 多人遊戲伺服器的專案',
1806-
joinUsText: 'HSN Phira 多人遊戲伺服器由 HSNPhira(https://github.com/HyperSynapseNetwork/HSNPhira)、PMP(https://github.com/HyperSynapseNetwork/Phira-mp-plus)、phira-web-monitor(https://github.com/HyperSynapseNetwork/phira-web-monitor)、phira-mp-logprocessor(https://github.com/HyperSynapseNetwork/phira-mp-logprocessor)等專案強勢驅動。',
1807-
joinUsButton: '提交問卷',
1830+
joinUsPrefix: 'HSN Phira 多人遊戲伺服器由 ',
1831+
joinUsProjects: [
1832+
{ name: 'HSNPhira', url: 'https://github.com/HyperSynapseNetwork/HSNPhira' },
1833+
{ name: 'PMP', url: 'https://github.com/HyperSynapseNetwork/Phira-mp-plus' },
1834+
{ name: 'phira-web-monitor', url: 'https://github.com/HyperSynapseNetwork/phira-web-monitor' },
1835+
{ name: 'phira-mp-logprocessor', url: 'https://github.com/HyperSynapseNetwork/phira-mp-logprocessor' }
1836+
],
1837+
joinUsSeparator: '、',
1838+
joinUsSuffix: '等專案強勢驅動。',
1839+
joinUsButton: '加入我們',
18081840
acknowledgements: '致謝',
18091841
acknowledgementsNote: '注:以下貢獻者排序不分先後'
18101842
},

‎src/stores/i18n.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ export const useI18nStore = defineStore('i18n', () => {
99
const currentLanguage = ref<Language>(detectLanguage())
1010

1111
const t = computed(() => {
12-
return (key: string, params?: Record<string, any>): string => {
12+
return (key: string, params?: Record<string, any>): any => {
1313
const keys = key.split('.')
1414
let value: any = (messages as any)[currentLanguage.value]
1515

1616
for (const k of keys) {
1717
value = value?.[k]
1818
}
1919

20-
if (typeof value !== 'string') {
20+
// 支持返回数组/对象等非字符串值(如 about.joinUsProjects)
21+
if (value === undefined || value === null) {
2122
return key
2223
}
2324

2425
// 替换参数
25-
if (params) {
26+
if (params && typeof value === 'string') {
2627
return value.replace(/\{(\w+)\}/g, (_: string, key: string) => params[key] || '')
2728
}
2829

‎src/views/About.vue‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,15 @@
109109
<h2 class="text-2xl md:text-3xl font-bold text-white mb-6">{{ t('about.joinUs') }}</h2>
110110
<div class="glass-dark rounded-2xl p-6">
111111
<p class="text-white/80 mb-4">
112-
{{ t('about.joinUsText') }}
112+
{{ t('about.joinUsPrefix') }}<template
113+
v-for="(project, index) in joinUsProjects"
114+
:key="project.name"
115+
><a
116+
:href="project.url"
117+
target="_blank"
118+
rel="noopener noreferrer"
119+
class="text-primary underline decoration-primary/40 hover:decoration-primary transition-colors"
120+
>{{ project.name }}</a><template v-if="index < joinUsProjects.length - 1">{{ t('about.joinUsSeparator') }}</template></template>{{ t('about.joinUsSuffix') }}
113121
</p>
114122
<a
115123
href="https://v.wjx.cn/vm/rCUAXVd.aspx"
@@ -168,6 +176,9 @@ const teamIntroductionText = computed(() => {
168176
return getLocalizedText(config.teamIntroduction)
169177
})
170178
179+
// 加入我们 - 驱动项目列表(可点击跳转)
180+
const joinUsProjects = computed(() => t('about.joinUsProjects') as { name: string; url: string }[])
181+
171182
// 团队成员数据(从配置加载)
172183
const teamMembers = computed(() => {
173184
const config = getAboutConfig()

0 commit comments

Comments
 (0)