mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 16:37:58 +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) {
|
private void writeNewDefaultLocale(File localeFile) {
|
||||||
try {
|
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) {
|
} catch (IOException | IllegalStateException e) {
|
||||||
logger.error("Failed to write new Locale file at " + localeFile.getAbsolutePath());
|
logger.error("Failed to write new Locale file at " + localeFile.getAbsolutePath());
|
||||||
errorHandler.log(L.WARN, this.getClass(), e);
|
errorHandler.log(L.WARN, this.getClass(), e);
|
||||||
|
Loading…
Reference in New Issue
Block a user