gui2/title_screen: Don't display locale identifiers on the Language button
CC #6205
This commit is contained in:
parent
869926a2b4
commit
c1005f2d1f
2 changed files with 7 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
* Updated translations: British English, Czech, Italian, Japanese, Portuguese (Brazil), Spanish.
|
||||
### Units
|
||||
### User interface
|
||||
* Don't display the locale API identifier on the Language button (issue #6205).
|
||||
### WML Engine
|
||||
### Miscellaneous and Bug Fixes
|
||||
|
||||
|
|
|
@ -326,9 +326,12 @@ void title_screen::pre_show(window& win)
|
|||
return lang.localename == boost_name;
|
||||
});
|
||||
|
||||
// If somehow the locale doesn't match a known translation, use the
|
||||
// locale identifier as a last resort
|
||||
lang_button->set_label(lang_def != langs.end() ? lang_def->language.str() : locale.name());
|
||||
// If the locale doesn't match a known translation, we might be using the System Default
|
||||
// Language option (issue #6205 <https://github.com/wesnoth/wesnoth/issues/6205>) or
|
||||
// something weirder is up. Use the WML-defined default label instead in that case.
|
||||
if(lang_def != langs.end()) {
|
||||
lang_button->set_label(lang_def->language.str());
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue