forked from GeyserMC/Geyser
Add translation badge and remove manual remapping of language codes (#1060)
This commit is contained in:
parent
118747c66b
commit
600c54d89d
3 changed files with 3 additions and 12 deletions
|
@ -6,6 +6,7 @@
|
||||||
[](https://ci.nukkitx.com/job/Geyser/job/master/)
|
[](https://ci.nukkitx.com/job/Geyser/job/master/)
|
||||||
[](http://discord.geysermc.org/)
|
[](http://discord.geysermc.org/)
|
||||||
[](http://hits.dwyl.io/Geyser/GeyserMC)
|
[](http://hits.dwyl.io/Geyser/GeyserMC)
|
||||||
|
[](https://translate.geysermc.org/)
|
||||||
|
|
||||||
Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition, closing the gap from those wanting to play true cross-platform.
|
Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition, closing the gap from those wanting to play true cross-platform.
|
||||||
|
|
||||||
|
|
|
@ -135,17 +135,7 @@ public class LanguageUtils {
|
||||||
private static String formatLocale(String locale) {
|
private static String formatLocale(String locale) {
|
||||||
try {
|
try {
|
||||||
String[] parts = locale.toLowerCase().split("_");
|
String[] parts = locale.toLowerCase().split("_");
|
||||||
String newLocale = parts[0] + "_" + parts[1].toUpperCase();
|
return parts[0] + "_" + parts[1].toUpperCase();
|
||||||
switch (newLocale) { // Fallback to the closest language if we don't support it but Bedrock does.
|
|
||||||
case "es_MX":
|
|
||||||
return "es_ES";
|
|
||||||
case "pt_BR":
|
|
||||||
return "pt_PT";
|
|
||||||
case "fr_CA":
|
|
||||||
return "fr_FR";
|
|
||||||
default:
|
|
||||||
return newLocale;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return locale;
|
return locale;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit cd57d6029186293b3ca282243a90252db434714b
|
Subproject commit 65e36478b894af9cec74bc6df6552cb160a0c47d
|
Loading…
Reference in a new issue