mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-25 03:12:52 +08:00
Insert language setting based on the player's account.
This commit is contained in:
parent
57c7f7a43b
commit
e5a85f81c2
@ -38,7 +38,7 @@
|
||||
<div class="content">
|
||||
<div class="container">
|
||||
<h2 class="mb-5">{{TITLE}}</h2>
|
||||
|
||||
|
||||
<h3 class="">{{AVAILABLE_FIVE_STARS}}</h3>
|
||||
<hr />
|
||||
<ul id="5-star-list">
|
||||
@ -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];
|
||||
|
@ -51,6 +51,8 @@ public final class GachaDetailsHandler implements HttpContextHandler {
|
||||
response = response.replace("{{AVAILABLE_FIVE_STARS}}", translate(player, "gacha.details.available_five_stars"));
|
||||
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"));
|
||||
|
Loading…
Reference in New Issue
Block a user