Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
cc409454
Commit
cc409454
authored
Jun 15, 2022
by
Tesutarin
Committed by
Melledy
Jun 15, 2022
Browse files
Gacha Records: Support multiple languages
parent
779e0f73
Changes
7
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/http/handlers/GachaHandler.java
View file @
cc409454
...
...
@@ -70,6 +70,9 @@ public final class GachaHandler implements Router {
String
template
=
new
String
(
FileUtils
.
read
(
recordsTemplate
),
StandardCharsets
.
UTF_8
)
.
replace
(
"{{REPLACE_RECORDS}}"
,
records
)
.
replace
(
"{{REPLACE_MAXPAGE}}"
,
String
.
valueOf
(
maxPage
))
.
replace
(
"{{TITLE}}"
,
translate
(
player
,
"gacha.records.title"
))
.
replace
(
"{{DATE}}"
,
translate
(
player
,
"gacha.records.date"
))
.
replace
(
"{{ITEM}}"
,
translate
(
player
,
"gacha.records.item"
))
.
replace
(
"{{LANGUAGE}}"
,
Utils
.
getLanguageCode
(
account
.
getLocale
()));
response
.
send
(
template
);
}
...
...
src/main/resources/defaults/data/gacha/records.html
View file @
cc409454
...
...
@@ -67,12 +67,12 @@
<body>
<div
class=
"content"
>
<div
class=
"container"
>
<h2
class=
"mb-5"
>
Gacha Records
</h2>
<h2
class=
"mb-5"
>
{{TITLE}}
</h2>
<table
id=
"container"
class=
"table table-striped custom-table"
>
<thead>
<tr>
<th
scope=
"col"
>
Date
</th>
<th
scope=
"col"
>
Item
</th>
<th
scope=
"col"
>
{{DATE}}
</th>
<th
scope=
"col"
>
{{ITEM}}
</th>
</tr>
</thead>
<tbody>
...
...
src/main/resources/languages/en-US.json
View file @
cc409454
...
...
@@ -399,6 +399,11 @@
"available_five_stars"
:
"Available 5-star Items"
,
"available_four_stars"
:
"Available 4-star Items"
,
"available_three_stars"
:
"Available 3-star Items"
},
"records"
:
{
"title"
:
"Gacha Records"
,
"date"
:
"Date"
,
"item"
:
"Item"
}
},
"documentation"
:
{
...
...
src/main/resources/languages/fr-FR.json
View file @
cc409454
...
...
@@ -399,6 +399,11 @@
"available_five_stars"
:
"Objets 5 étoiles disponibles"
,
"available_four_stars"
:
"Objets 4 étoiles disponibles"
,
"available_three_stars"
:
"Objets 3 étoiles disponibles"
},
"records"
:
{
"title"
:
"Gacha Records"
,
"date"
:
"Date"
,
"item"
:
"Objet"
}
},
"documentation"
:
{
...
...
src/main/resources/languages/pl-PL.json
View file @
cc409454
...
...
@@ -315,6 +315,11 @@
"available_five_stars"
:
"Available 5-star Items"
,
"available_four_stars"
:
"Available 4-star Items"
,
"available_three_stars"
:
"Available 3-star Items"
},
"records"
:
{
"title"
:
"Gacha Records"
,
"date"
:
"Date"
,
"item"
:
"Item"
}
}
}
\ No newline at end of file
src/main/resources/languages/zh-CN.json
View file @
cc409454
...
...
@@ -399,6 +399,11 @@
"available_five_stars"
:
"可获得的5星物品"
,
"available_four_stars"
:
"可获得的4星物品"
,
"available_three_stars"
:
"可获得的3星物品"
},
"records"
:
{
"title"
:
"祈愿记录"
,
"date"
:
"日期"
,
"item"
:
"物品"
}
},
"documentation"
:
{
...
...
src/main/resources/languages/zh-TW.json
View file @
cc409454
...
...
@@ -399,6 +399,11 @@
"available_five_stars"
:
"可獲得的5星物品"
,
"available_four_stars"
:
"可獲得的4星物品"
,
"available_three_stars"
:
"可獲得的3星物品"
},
"records"
:
{
"title"
:
"祈願記錄"
,
"date"
:
"日期"
,
"item"
:
"物品"
}
},
"documentation"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment