mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-22 22:45:04 +01:00
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 @@
|
|||
[![Build Status](https://ci.nukkitx.com/job/Geyser/job/master/badge/icon)](https://ci.nukkitx.com/job/Geyser/job/master/)
|
||||
[![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](http://discord.geysermc.org/)
|
||||
[![HitCount](http://hits.dwyl.io/Geyser/GeyserMC.svg)](http://hits.dwyl.io/Geyser/GeyserMC)
|
||||
[![Crowdin](https://badges.crowdin.net/geyser/localized.svg)](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.
|
||||
|
||||
|
|
|
@ -135,17 +135,7 @@ public class LanguageUtils {
|
|||
private static String formatLocale(String locale) {
|
||||
try {
|
||||
String[] parts = locale.toLowerCase().split("_");
|
||||
String newLocale = 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;
|
||||
}
|
||||
return parts[0] + "_" + parts[1].toUpperCase();
|
||||
} catch (Exception e) {
|
||||
return locale;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cd57d6029186293b3ca282243a90252db434714b
|
||||
Subproject commit 65e36478b894af9cec74bc6df6552cb160a0c47d
|
Loading…
Reference in a new issue