Fixed ticket #134: challenges would stay in the langauge with which STK
was started up, ignoring a language switch via the UI. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8204 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <irrlicht.h>
|
||||
|
||||
#include "utils/no_copy.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
class XMLNode;
|
||||
|
||||
@@ -98,7 +99,8 @@ public:
|
||||
const std::string &getId() const { return m_id; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the name of the challenge. */
|
||||
const irr::core::stringw &getName() const { return m_name; }
|
||||
const irr::core::stringw getName() const
|
||||
{ return irr::core::stringw(_(m_name.c_str())); }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Sets the name of the challenge. */
|
||||
void setName(const irr::core::stringw & s) { m_name = s; }
|
||||
@@ -112,8 +114,9 @@ public:
|
||||
void setChallengeDescription(const irr::core::stringw& d)
|
||||
{m_challenge_description=d; }
|
||||
// ------------------------------------------------------------------------
|
||||
const irr::core::stringw&
|
||||
getChallengeDescription() const {return m_challenge_description; }
|
||||
const irr::core::stringw
|
||||
getChallengeDescription() const
|
||||
{return _(m_challenge_description.c_str()); }
|
||||
// ------------------------------------------------------------------------
|
||||
void addDependency(const std::string id) {m_prerequisites.push_back(id);}
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "race/race_manager.hpp"
|
||||
#include "tracks/track.hpp"
|
||||
#include "tracks/track_manager.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
ChallengeData::ChallengeData(const std::string& filename)
|
||||
#ifndef WIN32
|
||||
@@ -94,10 +93,10 @@ ChallengeData::ChallengeData(const std::string& filename)
|
||||
|
||||
if(!root->get("name", &s) ) error("name");
|
||||
//std::cout << " // Challenge name = <" << s.c_str() << ">\n";
|
||||
setName( _(s.c_str()) );
|
||||
setName( s.c_str() );
|
||||
|
||||
if(!root->get("description", &s) ) error("description");
|
||||
setChallengeDescription( _(s.c_str()) );
|
||||
setChallengeDescription( s.c_str() );
|
||||
//std::cout << " // Challenge description = <" << s.c_str() << ">\n";
|
||||
|
||||
if(!root->get("karts", &m_num_karts) ) error("karts");
|
||||
|
||||
Reference in New Issue
Block a user