mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-31 19:45:26 +02:00
removed call to Locale#setDefault within LocaleLoader#initialize; added static locale-parameter to all instances of a Formatter (#5141)
This commit is contained in:
@@ -109,7 +109,7 @@ public final class LocaleLoader {
|
||||
|
||||
public static String formatString(String string, Object... messageArguments) {
|
||||
if (messageArguments != null) {
|
||||
MessageFormat formatter = new MessageFormat("");
|
||||
MessageFormat formatter = new MessageFormat("", Locale.US);
|
||||
formatter.applyPattern(string.replace("'", "''"));
|
||||
string = formatter.format(messageArguments);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public final class LocaleLoader {
|
||||
|
||||
public static @NotNull TextComponent formatComponent(@NotNull String string, Object... messageArguments) {
|
||||
if (messageArguments != null) {
|
||||
MessageFormat formatter = new MessageFormat("");
|
||||
MessageFormat formatter = new MessageFormat("", Locale.US);
|
||||
formatter.applyPattern(string.replace("'", "''"));
|
||||
string = formatter.format(messageArguments);
|
||||
}
|
||||
@@ -138,7 +138,6 @@ public final class LocaleLoader {
|
||||
|
||||
private static void initialize() {
|
||||
if (bundle == null) {
|
||||
Locale.setDefault(new Locale("en", "US"));
|
||||
Locale locale = null;
|
||||
|
||||
String[] myLocale = mcMMO.p.getGeneralConfig().getLocale().split("[-_ ]");
|
||||
|
Reference in New Issue
Block a user