Add translation badge and remove manual remapping of language codes (#1060)

This commit is contained in:
rtm516 2020-07-30 21:07:59 +01:00 committed by GitHub
parent 118747c66b
commit 600c54d89d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

View file

@ -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