mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Made localized normal bundle take precedence over default custom locale
bundles
This commit is contained in:
parent
db2128daeb
commit
628f59ba54
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user