Skip to content

Commit f5d5b25

Browse files
authored
Merge pull request #32 from qcsmallblack/chuni/profile_translate
refactor(i18n): add localization support for chuni profile page (en/zh) and replace hardcoded strings
2 parents 83e299c + c0d811d commit f5d5b25

File tree

3 files changed

+53
-19
lines changed

3 files changed

+53
-19
lines changed

src/app/sega/chunithm/v2/v2-profile/v2-profile.component.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
<h1 class="page-heading">Profile</h1>
1+
<h1 class="page-heading">{{'ChuniV2.ProfilePage.Title' | translate}}</h1>
22
<div class="card">
33
<div class="card-body">
44
<h5 class="card-title mb-3">{{'ChuniV2.ProfilePage.Overview' | translate}}</h5>
55
<div *ngIf="profile" class="card-subtitle mb-3">{{profile.userName}}</div>
66
<table *ngIf="profile" class="table table-striped table-borderless">
77
<tbody>
88
<tr>
9-
<th>Level</th>
9+
<th>{{'ChuniV2.ProfilePage.Level' | translate}}</th>
1010
<td>{{profile.reincarnationNum * 100 + profile.level}}</td>
1111
</tr>
1212
<tr>
13-
<th>Rating</th>
14-
<td>{{profile.playerRating / 100}} (max {{profile.highestRating / 100}})</td>
13+
<th>{{'ChuniV2.ProfilePage.Rating' | translate}}</th>
14+
<td>{{profile.playerRating / 100}} ({{'ChuniV2.ProfilePage.Max' | translate}} {{profile.highestRating / 100}})</td>
1515
</tr>
1616
<tr>
17-
<th>Over Power</th>
17+
<th>{{'ChuniV2.ProfilePage.OverPower' | translate}}</th>
1818
<td>{{profile.overPowerPoint / 100}} ({{profile.overPowerRate / 100}}%)</td>
1919
</tr>
2020
<tr>
21-
<th>Play Count</th>
21+
<th>{{'ChuniV2.ProfilePage.PlayCount' | translate}}</th>
2222
<td>{{profile.playCount}}</td>
2323
</tr>
2424
<tr>
25-
<th>Last Play</th>
25+
<th>{{'ChuniV2.ProfilePage.LastPlay' | translate}}</th>
2626
<td>{{profile.lastPlayDate}}</td>
2727
</tr>
2828
<tr>
29-
<th>Current points</th>
29+
<th>{{'ChuniV2.ProfilePage.CurrentPoints' | translate}}</th>
3030
<td>{{profile.point}}</td>
3131
</tr>
3232
<tr>
33-
<th>Acquired points</th>
33+
<th>{{'ChuniV2.ProfilePage.AcquiredPoints' | translate}}</th>
3434
<td>{{profile.totalPoint}}</td>
3535
</tr>
3636
</tbody>
3737
</table>
38-
<p>Looking for more? Some info moved to its respective menus.</p>
38+
<p>{{'ChuniV2.ProfilePage.MoreInfo' | translate}}</p>
3939
</div>
4040
</div>
4141

4242
<div class="card mt-3">
4343
<div class="card-body">
44-
<h5 class="card-title mb-3">Score Statistics</h5>
44+
<h5 class="card-title mb-3">{{'ChuniV2.ProfilePage.ScoreStatistics' | translate}}</h5>
4545
<table *ngIf="profile" class="table table-striped table-borderless">
4646
<tbody>
4747
<tr>
48-
<th>Total High Score</th>
48+
<th>{{'ChuniV2.ProfilePage.TotalHighScore' | translate}}</th>
4949
<td>{{profile.totalHiScore}}</td>
5050
</tr>
5151
<tr>
52-
<th>Total Basic High Score</th>
52+
<th>{{'ChuniV2.ProfilePage.TotalBasicHighScore' | translate}}</th>
5353
<td>{{profile.totalBasicHighScore}}</td>
5454
</tr>
5555
<tr>
56-
<th>Total Advanced High Score</th>
56+
<th>{{'ChuniV2.ProfilePage.TotalAdvancedHighScore' | translate}}</th>
5757
<td>{{profile.totalAdvancedHighScore}}</td>
5858
</tr>
5959
<tr>
60-
<th>Total Expert High Score</th>
60+
<th>{{'ChuniV2.ProfilePage.TotalExpertHighScore' | translate}}</th>
6161
<td>{{profile.totalExpertHighScore}}</td>
6262
</tr>
6363
<tr>
64-
<th>Total Master High Score</th>
64+
<th>{{'ChuniV2.ProfilePage.TotalMasterHighScore' | translate}}</th>
6565
<td>{{profile.totalMasterHighScore}}</td>
6666
</tr>
6767
<tr>
68-
<th>Total Ultima High Score</th>
68+
<th>{{'ChuniV2.ProfilePage.TotalUltimaHighScore' | translate}}</th>
6969
<td>{{profile.totalUltimaHighScore}}</td>
7070
</tr>
7171
</tbody>

src/assets/i18n/en.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,24 @@
406406
},
407407
"ChuniV2": {
408408
"ProfilePage": {
409-
"Overview": "Overview"
409+
"Title": "Profile",
410+
"Overview": "Overview",
411+
"Level": "Level",
412+
"Rating": "Rating",
413+
"Max": "Max",
414+
"OverPower": "Over Power",
415+
"PlayCount": "Play Count",
416+
"LastPlay": "Last Play",
417+
"CurrentPoints": "Current Points",
418+
"AcquiredPoints": "Acquired Points",
419+
"MoreInfo": "Looking for more? Check other menu sections for more details.",
420+
"ScoreStatistics": "Score Statistics",
421+
"TotalHighScore": "Total High Score",
422+
"TotalBasicHighScore": "Total Basic High Score",
423+
"TotalAdvancedHighScore": "Total Advanced High Score",
424+
"TotalExpertHighScore": "Total Expert High Score",
425+
"TotalMasterHighScore": "Total Master High Score",
426+
"TotalUltimaHighScore": "Total Ultima High Score"
410427
},
411428
"CharacterPage": {
412429
"Title": "Character",

src/assets/i18n/zh.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,24 @@
411411
},
412412
"ChuniV2": {
413413
"ProfilePage": {
414-
"Overview": "概览"
414+
"Title": "档案",
415+
"Overview": "概览",
416+
"Level": "等级",
417+
"Rating": "评级",
418+
"Max": "最高",
419+
"OverPower": "完成度",
420+
"PlayCount": "游玩次数",
421+
"LastPlay": "最后游玩日期",
422+
"CurrentPoints": "当前点数",
423+
"AcquiredPoints": "已获得点数",
424+
"MoreInfo": "想了解更多内容?请前往其他菜单查看详细信息。",
425+
"ScoreStatistics": "分数统计",
426+
"TotalHighScore": "最高分数总计",
427+
"TotalBasicHighScore": "Basic 最高分数总计",
428+
"TotalAdvancedHighScore": "Advanced 最高分数总计",
429+
"TotalExpertHighScore": "Expert 最高分数总计",
430+
"TotalMasterHighScore": "Master 最高分数总计",
431+
"TotalUltimaHighScore": "Ultima 最高分数总计"
415432
},
416433
"CharacterPage": {
417434
"Title": "伙伴",

0 commit comments

Comments
 (0)