mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-04 23:48:42 +01:00
Writing new locale now takes locale setting into account
This commit is contained in:
parent
28153dd3e4
commit
6c4e241b4b
@ -105,7 +105,11 @@ public class LocaleSystem implements SubSystem {
|
||||
|
||||
private void writeNewDefaultLocale(File localeFile) {
|
||||
try {
|
||||
new LocaleFileWriter(localeFile.exists() ? Locale.fromFile(localeFile) : locale).writeToFile(localeFile);
|
||||
Locale writing = loadSettingLocale().orElse(locale);
|
||||
if (localeFile.exists()) {
|
||||
writing.putAll(Locale.fromFile(localeFile));
|
||||
}
|
||||
new LocaleFileWriter(writing).writeToFile(localeFile);
|
||||
} catch (IOException | IllegalStateException e) {
|
||||
logger.error("Failed to write new Locale file at " + localeFile.getAbsolutePath());
|
||||
errorHandler.log(L.WARN, this.getClass(), e);
|
||||
|
Loading…
Reference in New Issue
Block a user