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
e5a85f81
Commit
e5a85f81
authored
May 11, 2022
by
ImmuState
Committed by
Melledy
May 11, 2022
Browse files
Insert language setting based on the player's account.
parent
57c7f7a4
Changes
2
Show whitespace changes
Inline
Side-by-side
data/gacha_details.html
View file @
e5a85f81
...
...
@@ -81,11 +81,11 @@
</footer>
<script>
fiveStarItems
=
{{
FIVE_STARS
}};
fourStarItems
=
{{
FOUR_STARS
}};
threeStarItems
=
{{
THREE_STARS
}};
var
fiveStarItems
=
{{
FIVE_STARS
}};
var
fourStarItems
=
{{
FOUR_STARS
}};
var
threeStarItems
=
{{
THREE_STARS
}};
var
lang
=
"
{{LANGUAGE}}
"
;
var
lang
=
new
window
.
URLSearchParams
(
window
.
location
.
search
).
get
(
"
lang
"
);
function
getNameForId
(
itemId
)
{
if
(
mappings
[
lang
]
!=
null
&&
mappings
[
lang
][
itemId
]
!=
null
)
{
return
mappings
[
lang
][
itemId
][
0
];
...
...
src/main/java/emu/grasscutter/server/dispatch/http/GachaDetailsHandler.java
View file @
e5a85f81
...
...
@@ -52,6 +52,8 @@ public final class GachaDetailsHandler implements HttpContextHandler {
response
=
response
.
replace
(
"{{AVAILABLE_FOUR_STARS}}"
,
translate
(
player
,
"gacha.details.available_four_stars"
));
response
=
response
.
replace
(
"{{AVAILABLE_THREE_STARS}}"
,
translate
(
player
,
"gacha.details.available_three_stars"
));
response
=
response
.
replace
(
"{{LANGUAGE}}"
,
Utils
.
getLanguageCode
(
account
.
getLocale
()));
// Get the banner info for the banner we want.
int
gachaType
=
Integer
.
parseInt
(
req
.
query
(
"gachaType"
));
GachaManager
manager
=
Grasscutter
.
getGameServer
().
getGachaManager
();
...
...
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