Solved the problem with custom menu labels not properly displayed.
This commit is contained in:
parent
7d2955347e
commit
560e7a3d12
1 changed files with 6 additions and 4 deletions
|
@ -23,10 +23,12 @@ FGMenuBar::getLocalizedLabel(SGPropertyNode* node)
|
||||||
if (!node)
|
if (!node)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
std::string name = node->getStringValue("name", "");
|
std::string name = node->getStringValue("name", "");
|
||||||
const auto translated = globals->get_locale()->getLocalizedString(name, "menu");
|
if (!name.empty()) {
|
||||||
if (!translated.empty())
|
const auto translated = globals->get_locale()->getLocalizedString(name, "menu");
|
||||||
return translated;
|
if (!translated.empty())
|
||||||
|
return translated;
|
||||||
|
}
|
||||||
|
|
||||||
// return default with fallback to name
|
// return default with fallback to name
|
||||||
std::string label = node->getStringValue("label", name.c_str());
|
std::string label = node->getStringValue("label", name.c_str());
|
||||||
|
|
Loading…
Reference in a new issue