Fix "Guest" being untranslated despite appearing in the po file
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14389 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -717,6 +717,17 @@ bool UserConfig::loadConfig()
|
||||
return true;
|
||||
} // loadConfig
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void UserConfig::postLoadInit()
|
||||
{
|
||||
for (int i = 0; i < UserConfigParams::m_all_players.size(); i++)
|
||||
{
|
||||
PlayerProfile* player = UserConfigParams::m_all_players.get(i);
|
||||
if (player->isGuestAccount()) player->setName(_LTR("Guest"));
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Write settings to config file. */
|
||||
void UserConfig::saveConfig()
|
||||
|
||||
@@ -716,7 +716,7 @@ public:
|
||||
const irr::core::stringw& getWarning() { return m_warning; }
|
||||
void resetWarning() { m_warning=""; }
|
||||
void setWarning(irr::core::stringw& warning) { m_warning=warning; }
|
||||
|
||||
void postLoadInit();
|
||||
void addDefaultPlayer();
|
||||
|
||||
}; // UserConfig
|
||||
|
||||
@@ -1124,7 +1124,7 @@ void initUserConfig(char *argv[])
|
||||
translations = new Translations(); // needs file_manager
|
||||
stk_config = new STKConfig(); // in case of --stk-config
|
||||
// command line parameters
|
||||
|
||||
user_config->postLoadInit();
|
||||
if (!config_ok || UserConfigParams::m_all_players.size() == 0)
|
||||
{
|
||||
user_config->addDefaultPlayer();
|
||||
|
||||
Reference in New Issue
Block a user