summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-09 15:58:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-09 15:58:51 +0300
commit12ebce86d17596542edf094c179ee2e75bb9308e (patch)
tree8aaeb2e0cea233bf68fcad2580feeba7e4d3dfa5 /src/resources/mapreader.cpp
parent3125abdf853768cdeeb2bba568c4a4a0c5853c5c (diff)
downloadmv-12ebce86d17596542edf094c179ee2e75bb9308e.tar.gz
mv-12ebce86d17596542edf094c179ee2e75bb9308e.tar.bz2
mv-12ebce86d17596542edf094c179ee2e75bb9308e.tar.xz
mv-12ebce86d17596542edf094c179ee2e75bb9308e.zip
Translate map names.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 9ede3db7a..b4905eb67 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -59,6 +59,8 @@
#include "utils/physfstools.h"
#include "utils/stringmap.h"
+#include "utils/translation/podict.h"
+
#include <zlib.h>
#include "debug.h"
@@ -514,7 +516,12 @@ void MapReader::readProperties(const XmlNodePtrConst node,
const std::string value = XML::getProperty(childNode, "value", "");
if (!name.empty() && !value.empty())
- props->setProperty(name, value);
+ {
+ if (name == "name")
+ props->setProperty(name, translator->getStr(value));
+ else
+ props->setProperty(name, value);
+ }
}
BLOCK_END("MapReader::readProperties")
}