From 7d1afc99fe7e06f4929aadffe6592fca88b98808 Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 17 Jun 2019 11:01:04 +0800 Subject: [PATCH] Fix missing achievements translation --- src/achievements/achievement_info.cpp | 8 +++++++- src/achievements/achievement_info.hpp | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/achievements/achievement_info.cpp b/src/achievements/achievement_info.cpp index 8f09b8fad..ab2811b11 100644 --- a/src/achievements/achievement_info.cpp +++ b/src/achievements/achievement_info.cpp @@ -258,4 +258,10 @@ int AchievementInfo::recursiveProgressCount(goalTree &parent) irr::core::stringw AchievementInfo::getDescription() const { return _(m_description.c_str()); -} // recursiveProgressCount +} // getDescription + +// ---------------------------------------------------------------------------- +irr::core::stringw AchievementInfo::getName() const +{ + return _(m_name.c_str()); +} // getName diff --git a/src/achievements/achievement_info.hpp b/src/achievements/achievement_info.hpp index 81f5666b5..acae76e95 100644 --- a/src/achievements/achievement_info.hpp +++ b/src/achievements/achievement_info.hpp @@ -62,10 +62,10 @@ private: uint32_t m_id; /** The title of this achievement. */ - irr::core::stringw m_name; + std::string m_name; /** The description of this achievement. */ - irr::core::stringw m_description; + std::string m_description; /** A secret achievement has its progress not shown. */ bool m_is_secret; @@ -92,7 +92,7 @@ public: int getDepth() { return getRecursiveDepth(m_goal_tree); } uint32_t getID() const { return m_id; } irr::core::stringw getDescription() const; - const irr::core::stringw& getName() const { return m_name; } + irr::core::stringw getName() const; bool isSecret() const { return m_is_secret; } // This function should not be called if copy already has children