Better fallback for missing menu and splash translations.
This commit is contained in:
parent
4f2032a9c2
commit
d836126c75
2 changed files with 10 additions and 9 deletions
|
@ -26,8 +26,8 @@ FGMenuBar::getLocalizedLabel(SGPropertyNode* node)
|
|||
if (translated)
|
||||
return translated;
|
||||
|
||||
// return default
|
||||
return node->getStringValue("label");
|
||||
// return default with fallback to name
|
||||
return node->getStringValue("label", name);
|
||||
}
|
||||
|
||||
// end of menubar.cxx
|
||||
|
|
|
@ -395,12 +395,14 @@ void fgSplashProgress( const char *identifier ) {
|
|||
|
||||
fgSetString("/sim/startup/splash-progress-spinner", spin_status);
|
||||
|
||||
const char* text = "";
|
||||
std::string text;
|
||||
if (identifier[0] != 0)
|
||||
{
|
||||
std::string id = std::string("splash/") + identifier;
|
||||
text = globals->get_locale()->getLocalizedString(id.c_str(),
|
||||
"sys", "<incomplete language resource>");
|
||||
std::string id = std::string("splash/") + identifier;
|
||||
text = globals->get_locale()->getLocalizedString(id.c_str(), "sys", "");
|
||||
|
||||
if( text.empty() )
|
||||
text = "<incomplete language resource>: " + id;
|
||||
}
|
||||
|
||||
if (!strcmp(identifier,"downloading-scenery")) {
|
||||
|
@ -414,9 +416,8 @@ void fgSplashProgress( const char *identifier ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!strcmp(fgGetString("/sim/startup/splash-progress-text"), text)) {
|
||||
return;
|
||||
}
|
||||
if( fgGetString("/sim/startup/splash-progress-text") == text )
|
||||
return;
|
||||
|
||||
SG_LOG( SG_VIEW, SG_INFO, "Splash screen progress " << identifier );
|
||||
fgSetString("/sim/startup/splash-progress-text", text);
|
||||
|
|
Loading…
Add table
Reference in a new issue