summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-17 17:50:11 -0700
committerIra Rice <irarice@gmail.com>2009-01-17 17:50:11 -0700
commit7398e19f1bbf44ee732b6739f6620cdcb6c3b554 (patch)
tree49c492aa0b88dc2f59fae76288388ea643a30bc8
parent1ac350cb425249f37961206a04427e084d2fa833 (diff)
downloadmana-7398e19f1bbf44ee732b6739f6620cdcb6c3b554.tar.gz
mana-7398e19f1bbf44ee732b6739f6620cdcb6c3b554.tar.bz2
mana-7398e19f1bbf44ee732b6739f6620cdcb6c3b554.tar.xz
mana-7398e19f1bbf44ee732b6739f6620cdcb6c3b554.zip
Added a few XML files for "translation". Idea obtained from IchigoBlack,
where these "translation" strings can be used to tell the client to use a separate XML file than the English one, so that item descriptions, monster names, etc. which are obtained from updates can be translated as well. Ex. instead of pointing to items.xml for Spanish, tell the client to translate that string to items.es.xml, or for monsters.xml, tell it to point to monsters.zh.xml for Chinese. Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/gui/skill.cpp2
-rw-r--r--src/resources/itemdb.cpp2
-rw-r--r--src/resources/monsterdb.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 2ff82030..44f77253 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -36,7 +36,7 @@
#include "../utils/strprintf.h"
#include "../utils/xml.h"
-static const char *SKILLS_FILE = "skills.xml";
+static const char *SKILLS_FILE = _("skills.xml");
struct SkillInfo {
std::string name;
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 270083ef..7091abed 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -57,7 +57,7 @@ void ItemDB::load()
mUnknown->setSprite("error.xml", GENDER_MALE);
mUnknown->setSprite("error.xml", GENDER_FEMALE);
- XML::Document doc("items.xml");
+ XML::Document doc(_("items.xml"));
xmlNodePtr rootNode = doc.rootNode();
if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "items"))
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 92009826..4ee7b89e 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -45,7 +45,7 @@ void MonsterDB::load()
logger->log(_("Initializing monster database..."));
- XML::Document doc("monsters.xml");
+ XML::Document doc(_("monsters.xml"));
xmlNodePtr rootNode = doc.rootNode();
if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "monsters"))