summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelson Martell <nelson6e65-dev@yahoo.es>2015-11-08 21:04:26 -0430
committerNelson Martell <nelson6e65-dev@yahoo.es>2015-11-08 21:04:26 -0430
commit69697219418c417728b21856277d5b4242c6ab0d (patch)
treeb1b501b88460cf9f5d77a4719e84ad0a9048f68b
parent15297ebaa6b286358a4b714c95fae3f84c7e3b05 (diff)
downloadclientdata-github/fork/nelson6e65/itstool-fixes.tar.gz
clientdata-github/fork/nelson6e65/itstool-fixes.tar.bz2
clientdata-github/fork/nelson6e65/itstool-fixes.tar.xz
clientdata-github/fork/nelson6e65/itstool-fixes.zip
add: ITS rules for "monsters/*.xml" files.github/fork/nelson6e65/itstool-fixes
This avoid including unnecesary strings to be translated. Only the NAME of monster must to be translatable. Usage: Via "-i" command-line option. Just run this command: $ itstool monsters/monster*.xml -o "monsters.pot" -i "monsters/_monsters.its" Using XLink href attribute in *.xml files. - Add this line after root node (monsters) to ALL monster files: <its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="_monsters.its" xlink:type="simple"/> - Then run: $ itstool monsters/monster*.xml -o "monsters.pot"
-rw-r--r--monsters/_monsters.its15
1 files changed, 15 insertions, 0 deletions
diff --git a/monsters/_monsters.its b/monsters/_monsters.its
new file mode 100644
index 00000000..324e9852
--- /dev/null
+++ b/monsters/_monsters.its
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- ITS rules for "monsters/monster*.xml" files. -->
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
+ <!-- Ignore translations for all xpaths... -->
+ <its:translateRule selector="//*" translate="no"/>
+ <!-- ...except the name of the monster (as attribute and element) -->
+ <its:translateRule selector="//monster/@name" translate="yes"/>
+ <its:translateRule selector="//monster/name" translate="yes"/>
+
+ <!-- Description for translators -->
+ <its:locNoteRule selector="//monster/name | //monster/@name"
+ locNoteType="description">
+ <its:locNote>Monster's name</its:locNote>
+ </its:locNoteRule>
+</its:rules>