mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-13 02:54:43 +02:00
Made localized normal bundle take precedence over default custom locale
bundles
This commit is contained in:
@ -37,31 +37,27 @@ public final class LocaleLoader {
|
|||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ResourceBundle bundle : bundles) {
|
for(ResourceBundle customBundle : bundles) {
|
||||||
if(bundle.containsKey(key)) {
|
if(customBundle.containsKey(key)) {
|
||||||
return getString(key, bundle, messageArguments);
|
return getString(key, customBundle, messageArguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(ResourceBundle bundle : defaultBundles) {
|
if(bundle.containsKey(key)) {
|
||||||
if(bundle.containsKey(key)) {
|
return getString(key, bundle, messageArguments);
|
||||||
return getString(key, bundle, messageArguments);
|
}
|
||||||
|
for(ResourceBundle defaultCustomBundle : defaultBundles) {
|
||||||
|
if(defaultCustomBundle.containsKey(key)) {
|
||||||
|
return getString(key, defaultCustomBundle, messageArguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
if(enBundle.containsKey(key)) {
|
||||||
return getString(key, bundle, messageArguments);
|
return getString(key, enBundle, messageArguments);
|
||||||
|
}
|
||||||
|
if (!key.contains("Guides")) {
|
||||||
|
mcMMO.p.getLogger().warning("Could not find locale string: " + key);
|
||||||
}
|
}
|
||||||
catch (MissingResourceException ex) {
|
|
||||||
try {
|
|
||||||
return getString(key, enBundle, messageArguments);
|
|
||||||
}
|
|
||||||
catch (MissingResourceException ex2) {
|
|
||||||
if (!key.contains("Guides")) {
|
|
||||||
mcMMO.p.getLogger().warning("Could not find locale string: " + key);
|
|
||||||
}
|
|
||||||
|
|
||||||
return '!' + key + '!';
|
return '!' + key + '!';
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getString(String key, ResourceBundle bundle, Object... messageArguments) throws MissingResourceException {
|
private static String getString(String key, ResourceBundle bundle, Object... messageArguments) throws MissingResourceException {
|
||||||
|
Reference in New Issue
Block a user