Skip to content

Commit

Permalink
Suppress annoying "Missing lang file" messages when core fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Mar 22, 2021
1 parent 231140e commit dc0b14e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ private boolean try_reload_localization() {
if ("inherit".equals(lang_code)) {
lang_code = core.config_lang;

// Fallback to en in case 'inherit' is used in vane-core.
if ("inherit".equals(lang_code)) {
if (lang_code == null) {
// Core failed to load, so the server will be shutdown anyway.
// Prevent an additional warning by falling back to en.
lang_code = "en";
} else if ("inherit".equals(lang_code)) {
// Fallback to en in case 'inherit' is used in vane-core.
lang_code = "en";
}
}
Expand Down

0 comments on commit dc0b14e

Please sign in to comment.