Skip to content

Commit c84e7bd

Browse files
Vanilla-Yukirinluoingly
authored andcommitted
fix: localize home announcement create button
Replace the hardcoded "Create" label on the home announcements section with a dedicated i18n key. Add create_announcement translations for both zh-CN and en-US to keep action labels consistent and explicit.
1 parent cbcb336 commit c84e7bd

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

frontend/src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"contest_ended": "Contest Ended",
5656
"contests": "Contests",
5757
"create": "Create",
58+
"create_announcement": "Create Announcement",
5859
"create_contest": "Create Contest",
5960
"create_discussion": "Create Discussion",
6061
"create_group": "Create Group",

frontend/src/locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"contest_ended": "比赛已结束",
5656
"contests": "比赛",
5757
"create": "创建",
58+
"create_announcement": "创建公告",
5859
"create_contest": "创建比赛",
5960
"create_discussion": "创建讨论",
6061
"create_group": "创建群组",

frontend/src/views/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ onRouteQueryUpdate(fetch)
7878
</div>
7979

8080
<RouterLink v-if="isAdmin" :to="{ name: 'newsCreate' }">
81-
<Button icon="pi pi-plus" label="Create" />
81+
<Button icon="pi pi-plus" :label="t('ptoj.create_announcement')" />
8282
</RouterLink>
8383
</div>
8484

0 commit comments

Comments
 (0)