Don't cache GP names translations so that if you switch the language they apepar in the new language

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8938 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2011-06-17 01:46:30 +00:00
parent bf08eb1e8c
commit f27e3bfae4
2 changed files with 6 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ GrandPrixData::GrandPrixData(const std::string filename) throw(std::logic_error)
delete root;
throw std::logic_error("File contents are incomplete or corrupt");
}
m_name = _LTR(temp_name.c_str());
m_name = temp_name.c_str();
foundName = true;
}
else

View File

@@ -27,15 +27,15 @@
#include <irrString.h>
#include <stdexcept>
#include "utils/translation.hpp"
/** Simple class that hold the data relevant to a 'grand_prix', aka. a number
* of races that has to be completed one after the other
* \ingroup race
*/
class GrandPrixData
{
irr::core::stringw m_name; //!< The name of the grand prix - might be translated!
//irr::core::stringw m_description; //!< Description for this GP
irr::core::stringw m_name; //!< The name of the grand prix
std::string m_id; //!< Internal name of the grand prix, not translated
std::string m_filename; //!< Original filename, only for error handling needed
@@ -58,8 +58,8 @@ public:
GrandPrixData (const std::string filename) throw(std::logic_error);
GrandPrixData () {}; // empty for initialising
/** @return the (potentially translated) user-visible name of the Grand Prix */
const irr::core::stringw& getName () const { return m_name; }
/** @return the (potentially translated) user-visible name of the Grand Prix (apply fribidi as needed) */
const irr::core::stringw getName () const { return _LTR(m_name.c_str()); }
/** @return the (potentially translated) user-visible description of the Grand Prix */
//const irr::core::stringw& getDescription () const { return m_description; }