mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Fix loading custom en based translations
This commit is contained in:
parent
6b05e47deb
commit
ab0e25a56d
@ -101,7 +101,11 @@ public class TranslationManager {
|
|||||||
*/
|
*/
|
||||||
private void loadBase() {
|
private void loadBase() {
|
||||||
ResourceBundle bundle = ResourceBundle.getBundle("luckperms", DEFAULT_LOCALE, UTF8ResourceBundleControl.get());
|
ResourceBundle bundle = ResourceBundle.getBundle("luckperms", DEFAULT_LOCALE, UTF8ResourceBundleControl.get());
|
||||||
this.registry.registerAll(DEFAULT_LOCALE, bundle, false);
|
try {
|
||||||
|
this.registry.registerAll(DEFAULT_LOCALE, bundle, false);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +135,7 @@ public class TranslationManager {
|
|||||||
// try registering the locale without a country code - if we don't already have a registration for that
|
// try registering the locale without a country code - if we don't already have a registration for that
|
||||||
loaded.forEach((locale, bundle) -> {
|
loaded.forEach((locale, bundle) -> {
|
||||||
Locale localeWithoutCountry = new Locale(locale.getLanguage());
|
Locale localeWithoutCountry = new Locale(locale.getLanguage());
|
||||||
if (!locale.equals(localeWithoutCountry) && this.installed.add(localeWithoutCountry)) {
|
if (!locale.equals(localeWithoutCountry) && !localeWithoutCountry.equals(DEFAULT_LOCALE) && this.installed.add(localeWithoutCountry)) {
|
||||||
this.registry.registerAll(localeWithoutCountry, bundle, false);
|
this.registry.registerAll(localeWithoutCountry, bundle, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user