aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-04-27 06:23:28 +1000
committerGitHub <noreply@github.com>2024-04-26 22:23:28 +0200
commitb3ca5b1ffc698ede14d4e9d8ed2dc86711201de1 (patch)
treeb30f23c9745bfc66c721e7bfdb440a336142871a /src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
parentd3106bf41e099d329d9db330ab09e167519fce25 (diff)
downloadnotenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.tar.gz
notenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.tar.bz2
notenoughupdates-b3ca5b1ffc698ede14d4e9d8ed2dc86711201de1.zip
Fix Profile viewer issues with Turkish language (#1116)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
index 025b09b7..60099e2b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -65,6 +65,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
@@ -695,7 +696,7 @@ public class BasicPage extends GuiProfileViewerPage {
String totalXpS = StringUtils.formatNumber((long) level.totalXp);
tooltipToDisplay.add(EnumChatFormatting.GRAY + "Total XP: " + EnumChatFormatting.DARK_PURPLE + totalXpS +
EnumChatFormatting.DARK_GRAY + " (" +
- StringUtils.formatToTenths(guiProfileViewer.getPercentage(entry.getKey().toLowerCase(), level)) +
+ StringUtils.formatToTenths(guiProfileViewer.getPercentage(entry.getKey().toLowerCase(Locale.ROOT), level)) +
"% to " + level.maxLevel + ")");
if (entry.getKey().equals("farming")) {
// double drops + pelts
@@ -715,7 +716,7 @@ public class BasicPage extends GuiProfileViewerPage {
tooltipToDisplay.add(" ");
for (String medalName : medalNames) {
String textWithoutFormattingCodes =
- EnumChatFormatting.getTextWithoutFormattingCodes(medalName.toLowerCase());
+ EnumChatFormatting.getTextWithoutFormattingCodes(medalName.toLowerCase(Locale.ROOT));
if (medals_inv.has(textWithoutFormattingCodes)) {
int medalAmount = medals_inv.get(textWithoutFormattingCodes).getAsInt();
tooltipToDisplay.add(EnumChatFormatting.GRAY + WordUtils.capitalize(medalName) + ": " +
@@ -727,7 +728,7 @@ public class BasicPage extends GuiProfileViewerPage {
}
}
- String slayerNameLower = entry.getKey().toLowerCase();
+ String slayerNameLower = entry.getKey().toLowerCase(Locale.ROOT);
if (Weight.SLAYER_NAMES.contains(slayerNameLower)) {
JsonObject slayerToTier = Constants.LEVELING.getAsJsonObject("slayer_to_highest_tier");
if (slayerToTier == null) {