summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2012-05-05 20:07:00 -0400
committerShaun McCance <shaunm@gnome.org>2012-05-05 20:07:00 -0400
commit9c5e6b9d2d90c9f5fc4693acd727f45d4512e687 (patch)
tree1888e247f0007ad42a0ab15606cf2bb3b06cad80
parent63e2b5739977a99a70898e6c78798b7eaa66293e (diff)
downloaditstool-9c5e6b9d2d90c9f5fc4693acd727f45d4512e687.tar.gz
Better handling of comments, new XML path markers
Comments were getting lost if they weren't specified at exactly the same level as translation units were taken from. This commit changes how comments are handled to prevent that. I also moved path markers from the file context comment, because it's wrong and messes up some tools.
-rwxr-xr-xitstool.in167
-rw-r--r--tests/Attributes1.pot8
-rw-r--r--tests/Context.pot17
-rw-r--r--tests/Droprule.pot5
-rw-r--r--tests/EX-locNote-selector-2.pot37
-rw-r--r--tests/EX-locNotePointer-attribute-1.pot8
-rw-r--r--tests/EX-locNoteRefPointer-attribute-1.pot12
-rw-r--r--tests/IT-locNote-inline.pot20
-rw-r--r--tests/IT-locNote-inline.xml15
-rw-r--r--tests/IT-locNote-multiples.pot28
-rw-r--r--tests/IT-locNote-multiples.xml19
-rw-r--r--tests/LocNote1.pot11
-rw-r--r--tests/LocNote2.pot11
-rw-r--r--tests/LocNote3.pot18
-rw-r--r--tests/LocNote4.pot19
-rw-r--r--tests/Placeholder.pot21
-rw-r--r--tests/Translate1.pot23
-rw-r--r--tests/Translate2.pot8
-rw-r--r--tests/Translate3.pot21
-rw-r--r--tests/Translate4.pot21
-rw-r--r--tests/Translate5.pot8
-rw-r--r--tests/Translate6.pot36
-rw-r--r--tests/Translate7.pot8
-rw-r--r--tests/TranslateGlobal.pot11
-rw-r--r--tests/WithinText1.pot11
-rw-r--r--tests/WithinText2.pot32
-rw-r--r--tests/run_tests.py9
27 files changed, 481 insertions, 123 deletions
diff --git a/itstool.in b/itstool.in
index f6c1ca7..76d45eb 100755
--- a/itstool.in
+++ b/itstool.in
@@ -72,7 +72,7 @@ class MessageList (object):
msg = Message()
msg.set_context('_')
msg.add_text('translator-credits')
- msg.add_comment('Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2')
+ msg.add_comment(Comment('Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2'))
self._messages.append(msg)
self._has_credits = True
@@ -90,6 +90,8 @@ class MessageList (object):
if msgdict.has_key(key):
for source in msg.get_sources():
msgdict[key].add_source(source)
+ for marker in msg.get_markers():
+ msgdict[key].add_marker(marker)
for comment in msg.get_comments():
msgdict[key].add_comment(comment)
if msg.get_preserve_space():
@@ -113,6 +115,50 @@ class MessageList (object):
out.write('\n')
+class Comment (object):
+ def __init__ (self, text):
+ self._text = text
+ assert(text is not None)
+ self._markers = []
+
+ def add_marker (self, marker):
+ self._markers.append(marker)
+
+ def get_markers (self):
+ return self._markers
+
+ def get_text (self):
+ return self._text
+
+ def format (self):
+ ret = u''
+ markers = {}
+ for marker in self._markers:
+ if not markers.has_key(marker):
+ ret += '#. (itstool) comment: ' + marker + '\n'
+ markers[marker] = marker
+ if '\n' in self._text:
+ doadd = False
+ for line in self._text.split('\n'):
+ if line != '':
+ doadd = True
+ if not doadd:
+ continue
+ ret += u'#. %s\n' % line
+ else:
+ text = self._text
+ while len(text) > 72:
+ j = text.rfind(' ', 0, 72)
+ if j == -1:
+ j = text.find(' ')
+ if j == -1:
+ break
+ ret += u'#. %s\n' % text[:j]
+ text = text[j+1:]
+ ret += '#. %s\n' % text
+ return ret
+
+
class Message (object):
def __init__ (self):
self._message = []
@@ -120,6 +166,7 @@ class Message (object):
self._ctxt = None
self._placeholders = []
self._sources = []
+ self._markers = []
self._comments = []
self._preserve = False
@@ -201,6 +248,14 @@ class Message (object):
def get_sources (self):
return self._sources
+ def add_marker (self, marker):
+ if not isinstance(marker, unicode):
+ marker = unicode(marker, 'utf-8')
+ self._markers.append(marker)
+
+ def get_markers (self):
+ return self._markers
+
def add_comment (self, comment):
if comment is not None:
self._comments.append(comment)
@@ -229,28 +284,25 @@ class Message (object):
def format (self):
ret = u''
- for i in range(len(self._comments)):
+ markers = {}
+ for marker in self._markers:
+ if not markers.has_key(marker):
+ ret += '#. (itstool) path: ' + marker + '\n'
+ markers[marker] = marker
+ comments = []
+ commentsdict = {}
+ for comment in self._comments:
+ key = comment.get_text()
+ if commentsdict.has_key(key):
+ for marker in comment.get_markers():
+ commentsdict[key].add_marker(marker)
+ else:
+ comments.append(comment)
+ commentsdict[key] = comment
+ for i in range(len(comments)):
if i != 0:
ret += '#.\n'
- comment = self._comments[i]
- if '\n' in comment:
- doadd = False
- for line in comment.split('\n'):
- if line != '':
- doadd = True
- if not doadd:
- continue
- ret += u'#. %s\n' % line
- else:
- while len(comment) > 72:
- j = comment.rfind(' ', 0, 72)
- if j == -1:
- j = comment.find(' ')
- if j == -1:
- break
- ret += u'#. %s\n' % comment[:j]
- comment = comment[j+1:]
- ret += '#. %s\n' % comment
+ ret += comments[i].format()
for source in self._sources:
ret += u'#: %s\n' % source
if self._preserve:
@@ -391,11 +443,11 @@ class Document (object):
break
if locnote is None:
if rule.hasProp('locNoteRef'):
- locnote = 'SEE: ' + re.sub('\s+', ' ', rule.prop('locNoteRef')).strip()
+ locnote = '(itstool) link: ' + re.sub('\s+', ' ', rule.prop('locNoteRef')).strip()
if rule.prop('selector') is not None:
for node in self._try_xpath_eval(xpath, rule.prop('selector')):
if locnote is not None:
- self._its_loc_notes[node] = locnote
+ self._its_loc_notes.setdefault(node, []).append(locnote)
else:
if rule.hasProp('locNotePointer'):
sel = rule.prop('locNotePointer')
@@ -412,7 +464,7 @@ class Document (object):
xpath.setContextNode(node)
note = self._try_xpath_eval(xpath, sel)
if isinstance(note, basestring):
- self._its_loc_notes[node] = note
+ self._its_loc_notes.setdefault(node, []).append(note)
else:
for note in note:
if self.get_preserve_space(note):
@@ -420,8 +472,8 @@ class Document (object):
else:
cont = re.sub('\s+', ' ', note.content).strip()
if ref:
- cont = 'SEE: ' + cont
- self._its_loc_notes[node] = cont
+ cont = '(itstool) link: ' + cont
+ self._its_loc_notes.setdefault(node, []).append(cont)
break
xpath.setContextNode(oldnode)
elif xml_is_ns_name(rule, NS_ITS, 'langRule'):
@@ -761,12 +813,13 @@ class Document (object):
txt = "external ref='%s' md5='%s'" % (ext[1], filemd5)
msg.set_context('_')
msg.add_text(txt)
- msg.add_source('%s:%i(%s)' % (self._doc.name, ext[0].lineNo(), ext[0].name))
- msg.add_comment('This is a reference to an external file such as an image or'
- ' video. When the file changes, the md5 hash will change to'
- ' let you know you need to update your localized copy. The'
- ' msgstr is not used at all. Set it to whatever you like'
- ' once you have updated your copy of the file.')
+ msg.add_source('%s:%i' % (self._doc.name, ext[0].lineNo()))
+ msg.add_marker(ext[0].name)
+ msg.add_comment(Comment('This is a reference to an external file such as an image or'
+ ' video. When the file changes, the md5 hash will change to'
+ ' let you know you need to update your localized copy. The'
+ ' msgstr is not used at all. Set it to whatever you like'
+ ' once you have updated your copy of the file.'))
self._msgs.add_message(msg, None)
self._in_translatable = True
for child in xml_child_iter(self._doc):
@@ -774,7 +827,7 @@ class Document (object):
self.generate_message(child, None, comments=comments)
break
- def generate_message (self, node, msg, comments=True):
+ def generate_message (self, node, msg, comments=True, path=None):
if node.type in ('text', 'cdata') and msg is not None:
msg.add_text(node.content)
return
@@ -784,6 +837,8 @@ class Document (object):
return
if self._itst_drop_nodes.get(node, 'no') == 'yes':
return
+ if path is None:
+ path = ''
translate = self.get_its_translate(node)
if translate is None:
if self._in_translatable:
@@ -811,7 +866,8 @@ class Document (object):
msg.set_context(ctxt)
if self.get_preserve_space(node):
msg.set_preserve_space()
- msg.add_source('%s:%i(%s/%s)' % (self._doc.name, node.lineNo(), node.parent.name, node.name))
+ msg.add_source('%s:%i' % (self._doc.name, node.lineNo()))
+ msg.add_marker('%s/%s' % (node.parent.name, node.name))
else:
withinText = True
msg.add_start_tag(node)
@@ -821,21 +877,37 @@ class Document (object):
for attr in xml_attr_iter(node):
if self._its_translate_nodes.get(attr, 'no') == 'yes':
attr_msg = Message()
- attr_msg.add_source('%s:%i(%s/%s@%s)' % (
- self._doc.name, node.lineNo(), node.parent.name, node.name, attr.name))
+ attr_msg.add_source('%s:%i' % (self._doc.name, node.lineNo()))
+ attr_msg.add_marker('%s/%s@%s' % (node.parent.name, node.name, attr.name))
attr_msg.add_text(attr.content)
if comments:
- attr_msg.add_comment(self.get_its_loc_note(attr))
+ for locnote in self.get_its_loc_notes(attr):
+ comment = Comment(locnote)
+ comment.add_marker ('%s/%s@%s' % (
+ node.parent.name, node.name, attr.name))
+ attr_msg.add_comment(comment)
self._msgs.add_message(attr_msg, attr)
-
if comments and msg is not None:
- msg.add_comment(self.get_its_loc_note(node))
+ cnode = node
+ while cnode is not None:
+ hasnote = False
+ for locnote in self.get_its_loc_notes(cnode):
+ comment = Comment(locnote)
+ if withinText:
+ comment.add_marker('.%s/%s' % (path, cnode.name))
+ msg.add_comment(comment)
+ hasnote = True
+ if hasnote or not is_unit:
+ break
+ cnode = cnode.parent
in_translatable = self._in_translatable
self._in_translatable = (translate == 'yes')
+ if withinText:
+ path = path + '/' + node.name
for child in xml_child_iter(node):
- self.generate_message(child, msg, comments=comments)
+ self.generate_message(child, msg, comments=comments, path=path)
self._in_translatable = in_translatable
if translate:
@@ -873,17 +945,20 @@ class Document (object):
def get_its_within_text (self, node):
return self._its_within_text_nodes.get(node, 'no')
- def get_its_loc_note (self, node):
+ def get_its_loc_notes (self, node):
+ ret = []
if node.hasNsProp('locNote', NS_ITS):
- return re.sub('\s+', ' ', node.nsProp('locNote', NS_ITS)).strip()
+ ret.append(re.sub('\s+', ' ', node.nsProp('locNote', NS_ITS)).strip())
if node.hasNsProp('locNoteRef', NS_ITS):
- return 'SEE: ' + re.sub('\s+', ' ', node.nsProp('locNoteRef', NS_ITS)).strip()
+ ret.append('(itstool) link: ' + re.sub('\s+', ' ', node.nsProp('locNoteRef', NS_ITS)).strip())
if xml_is_ns_name(node, NS_ITS, 'span'):
if node.hasProp('locNote'):
- return re.sub('\s+', ' ', node.prop('locNote')).strip()
+ ret.append(re.sub('\s+', ' ', node.prop('locNote')).strip())
if node.hasProp('locNoteRef'):
- return 'SEE: ' + re.sub('\s+', ' ', node.prop('locNoteRef')).strip()
- return self._its_loc_notes.get(node, None)
+ ret.append('(itstool) link: ' + re.sub('\s+', ' ', node.prop('locNoteRef')).strip())
+ for locnote in self._its_loc_notes.get(node, []):
+ ret.append(locnote)
+ return ret
@staticmethod
def _try_xpath_eval (xpath, expr):
diff --git a/tests/Attributes1.pot b/tests/Attributes1.pot
index 476d1af..995d8f1 100644
--- a/tests/Attributes1.pot
+++ b/tests/Attributes1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-23 16:08-0400\n"
+"POT-Creation-Date: 2012-05-04 11:46-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,11 +9,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Attributes1.xml:9(page/code@title)
+#. (itstool) path: page/code@title
+#: tests/Attributes1.xml:9
msgid "one"
msgstr ""
-#: tests/Attributes1.xml:9(code/span@title)
+#. (itstool) path: code/span@title
+#: tests/Attributes1.xml:9
msgid "two"
msgstr ""
diff --git a/tests/Context.pot b/tests/Context.pot
index 26e078c..827dc58 100644
--- a/tests/Context.pot
+++ b/tests/Context.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-25 14:23-0400\n"
+"POT-Creation-Date: 2012-05-04 11:57-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,26 +9,31 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Context.xml:8(info/title)
+#. (itstool) path: info/title
+#: tests/Context.xml:8
msgctxt "[[sort]]"
msgid "Title"
msgstr ""
-#: tests/Context.xml:9(info/title)
+#. (itstool) path: info/title
+#: tests/Context.xml:9
msgctxt "link"
msgid "Link title"
msgstr ""
-#: tests/Context.xml:10(info/title)
+#. (itstool) path: info/title
+#: tests/Context.xml:10
msgctxt "link:topic"
msgid "Topic link title"
msgstr ""
-#: tests/Context.xml:12(page/title)
+#. (itstool) path: page/title
+#: tests/Context.xml:12
msgid "Title"
msgstr ""
-#: tests/Context.xml:13(page/p)
+#. (itstool) path: page/p
+#: tests/Context.xml:13
msgctxt "paragraph"
msgid "Context is paragraph"
msgstr ""
diff --git a/tests/Droprule.pot b/tests/Droprule.pot
index e490476..84dba7f 100644
--- a/tests/Droprule.pot
+++ b/tests/Droprule.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 22:50+0200\n"
+"POT-Creation-Date: 2012-05-04 11:55-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,7 +9,8 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Droprule.xml:8(content/p)
+#. (itstool) path: content/p
+#: tests/Droprule.xml:8
msgid "Everything started now."
msgstr ""
diff --git a/tests/EX-locNote-selector-2.pot b/tests/EX-locNote-selector-2.pot
new file mode 100644
index 0000000..4ea79df
--- /dev/null
+++ b/tests/EX-locNote-selector-2.pot
@@ -0,0 +1,37 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 13:50-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: data/value
+#. Keep the leading space!
+#: tests/EX-locNote-selector-2.xml:5
+#, no-wrap
+msgid ""
+" Variant {0} = {1} ({2})"
+msgstr ""
+
+#. (itstool) path: value/span
+#. %1\$s is the original text's date in the format YYYY-MM-DD HH:MM always
+#. in GMT
+#: tests/EX-locNote-selector-2.xml:8
+#, no-wrap
+msgid ""
+"%1\\$s"
+msgstr ""
+
+#. (itstool) path: data/value
+#. %1\$s is the original text's date in the format YYYY-MM-DD HH:MM always
+#. in GMT
+#: tests/EX-locNote-selector-2.xml:8
+#, no-wrap
+msgid ""
+"Translated from English content dated <_:span-1/> GMT."
+msgstr ""
+
diff --git a/tests/EX-locNotePointer-attribute-1.pot b/tests/EX-locNotePointer-attribute-1.pot
index cf4868f..178b2a1 100644
--- a/tests/EX-locNotePointer-attribute-1.pot
+++ b/tests/EX-locNotePointer-attribute-1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 10:24+0200\n"
+"POT-Creation-Date: 2012-05-04 13:34-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,13 +9,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. (itstool) path: msg/data
#. Indicates that the resource file {0} could not be loaded.
-#: tests/EX-locNotePointer-attribute-1.xml:12(msg/data)
+#: tests/EX-locNotePointer-attribute-1.xml:12
msgid "Cannot find the file {0}."
msgstr ""
+#. (itstool) path: msg/data
#. A division by 0 was going to be computed.
-#: tests/EX-locNotePointer-attribute-1.xml:16(msg/data)
+#: tests/EX-locNotePointer-attribute-1.xml:16
msgid "Invalid parameter."
msgstr ""
diff --git a/tests/EX-locNoteRefPointer-attribute-1.pot b/tests/EX-locNoteRefPointer-attribute-1.pot
index ba33be4..4ed7edc 100644
--- a/tests/EX-locNoteRefPointer-attribute-1.pot
+++ b/tests/EX-locNoteRefPointer-attribute-1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 10:31+0200\n"
+"POT-Creation-Date: 2012-05-04 13:40-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,13 +9,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. SEE: Comments.html#FileNotFound
-#: tests/EX-locNoteRefPointer-attribute-1.xml:10(string/data)
+#. (itstool) path: string/data
+#. (itstool) link: Comments.html#FileNotFound
+#: tests/EX-locNoteRefPointer-attribute-1.xml:10
msgid "Cannot find the file {0}."
msgstr ""
-#. SEE: Comments.html#DivByZero
-#: tests/EX-locNoteRefPointer-attribute-1.xml:13(string/data)
+#. (itstool) path: string/data
+#. (itstool) link: Comments.html#DivByZero
+#: tests/EX-locNoteRefPointer-attribute-1.xml:13
msgid "Invalid parameter."
msgstr ""
diff --git a/tests/IT-locNote-inline.pot b/tests/IT-locNote-inline.pot
new file mode 100644
index 0000000..be1ab7c
--- /dev/null
+++ b/tests/IT-locNote-inline.pot
@@ -0,0 +1,20 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-05 12:37-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: body/block
+#. This is the block comment
+#.
+#. (itstool) comment: ./span/em/a
+#. This is the inline comment.
+#: tests/IT-locNote-inline.xml:11
+msgid "This is some text that contains a <span>span that contains an <em>em that contains an <a>a element</a></em></span>."
+msgstr ""
+
diff --git a/tests/IT-locNote-inline.xml b/tests/IT-locNote-inline.xml
new file mode 100644
index 0000000..a0661ff
--- /dev/null
+++ b/tests/IT-locNote-inline.xml
@@ -0,0 +1,15 @@
+<msgList xmlns:its="http://www.w3.org/2005/11/its">
+ <head>
+ <its:rules version="1.0">
+ <its:withinTextRule selector="//span|//em|//a" withinText="yes"/>
+ <its:locNoteRule selector="//a">
+ <its:locNote>This is the inline comment.</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+ </head>
+ <body>
+ <block its:locNote="This is the block comment">This is some text that
+ contains a <span>span that contains an <em>em that contains an <a>a
+ element</a></em></span>.</block>
+ </body>
+</msgList>
diff --git a/tests/IT-locNote-multiples.pot b/tests/IT-locNote-multiples.pot
new file mode 100644
index 0000000..d67538d
--- /dev/null
+++ b/tests/IT-locNote-multiples.pot
@@ -0,0 +1,28 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 13:43-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: block/block
+#. Specific comment #1
+#.
+#. This is the generic block comment
+#.
+#. Specific comment #2
+#: tests/IT-locNote-multiples.xml:12
+#: tests/IT-locNote-multiples.xml:16
+msgid "This is a block in a block"
+msgstr ""
+
+#. (itstool) path: body/block
+#. This is the generic block comment
+#: tests/IT-locNote-multiples.xml:11
+msgid "<_:block-1/> <inline>This is an inline statement</inline>"
+msgstr ""
+
diff --git a/tests/IT-locNote-multiples.xml b/tests/IT-locNote-multiples.xml
new file mode 100644
index 0000000..fcfd880
--- /dev/null
+++ b/tests/IT-locNote-multiples.xml
@@ -0,0 +1,19 @@
+<msgList xmlns:its="http://www.w3.org/2005/11/its">
+ <head>
+ <its:rules version="1.0">
+ <its:withinTextRule selector="//inline" withinText="yes"/>
+ <its:locNoteRule selector="//block">
+ <its:locNote>This is the generic block comment</its:locNote>
+ </its:locNoteRule>
+ </its:rules>
+ </head>
+ <body>
+ <block>
+ <block its:locNote="Specific comment #1">This is a block in a block</block>
+ <inline>This is an inline statement</inline>
+ </block>
+ <block its:locNote="Specific comment #2">
+ <block its:locNote="Specific comment #2">This is a block in a block</block>
+ </block>
+ </body>
+</msgList>
diff --git a/tests/LocNote1.pot b/tests/LocNote1.pot
index 0be16e3..c2ae789 100644
--- a/tests/LocNote1.pot
+++ b/tests/LocNote1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 09:53+0200\n"
+"POT-Creation-Date: 2012-05-04 13:24-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,17 +9,20 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/LocNote1.xml:17(body/msg)
+#. (itstool) path: body/msg
+#: tests/LocNote1.xml:17
msgid "This is a hippoptamus: <_:img-1/>."
msgstr ""
-#: tests/LocNote1.xml:18(body/msg)
+#. (itstool) path: body/msg
+#: tests/LocNote1.xml:18
msgid "This is an elephant: <_:img-1/>."
msgstr ""
+#. (itstool) path: body/msg
#. The variable {0} has three possible values: 'printer', 'stacker' and
#. 'stapler options'.
-#: tests/LocNote1.xml:19(body/msg)
+#: tests/LocNote1.xml:19
msgid "The {0} has been disabled."
msgstr ""
diff --git a/tests/LocNote2.pot b/tests/LocNote2.pot
index 46d04a0..8ab05e9 100644
--- a/tests/LocNote2.pot
+++ b/tests/LocNote2.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 15:08+0200\n"
+"POT-Creation-Date: 2012-05-04 13:25-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,17 +9,20 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/LocNote2.xml:11(body/msg)
+#. (itstool) path: body/msg
+#: tests/LocNote2.xml:11
msgid "This is a hippoptamus: <_:img-1/>."
msgstr ""
-#: tests/LocNote2.xml:12(body/msg)
+#. (itstool) path: body/msg
+#: tests/LocNote2.xml:12
msgid "This is an elephant: <_:img-1/>."
msgstr ""
+#. (itstool) path: body/msg
#. The variable {0} has three possible values: 'printer', 'stacker' and
#. 'stapler options'.
-#: tests/LocNote2.xml:13(body/msg)
+#: tests/LocNote2.xml:13
msgid "The {0} has been disabled."
msgstr ""
diff --git a/tests/LocNote3.pot b/tests/LocNote3.pot
index f8e3806..61996a0 100644
--- a/tests/LocNote3.pot
+++ b/tests/LocNote3.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 10:03+0200\n"
+"POT-Creation-Date: 2012-05-04 13:29-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,21 +9,27 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/LocNote3.xml:5(msg/data)
+#. (itstool) path: msg/data
+#. The variable {0} is the name of the host.
+#: tests/LocNote3.xml:5
msgid "Host {0} cannot be found."
msgstr ""
-#: tests/LocNote3.xml:8(msg/data)
+#. (itstool) path: msg/data
+#. The variable {0} is the name of the host.
+#: tests/LocNote3.xml:8
msgid "The connection with {0} has been lost."
msgstr ""
+#. (itstool) path: msg/data
#. {0} is a filename
-#: tests/LocNote3.xml:11(msg/data)
+#: tests/LocNote3.xml:11
msgid "{0} not found."
msgstr ""
-#. SEE: myLocNotes.htm#CannotLog
-#: tests/LocNote3.xml:14(msg/data)
+#. (itstool) path: msg/data
+#. (itstool) link: myLocNotes.htm#CannotLog
+#: tests/LocNote3.xml:14
msgid "Cannot log with this username."
msgstr ""
diff --git a/tests/LocNote4.pot b/tests/LocNote4.pot
index 421ea1f..9d8beb0 100644
--- a/tests/LocNote4.pot
+++ b/tests/LocNote4.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 10:12+0200\n"
+"POT-Creation-Date: 2012-05-04 13:31-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,22 +9,27 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. SEE: http://en.wikipedia.org/wiki/Doppelganger
-#: tests/LocNote4.xml:5(span/span)
+#. (itstool) path: span/span
+#. (itstool) link: http://en.wikipedia.org/wiki/Doppelganger
+#: tests/LocNote4.xml:5
msgid "doppelgänger"
msgstr ""
-#: tests/LocNote4.xml:6(span/b)
+#. (itstool) path: span/b
+#. If possible keep the non-English terms in the translated version too
+#: tests/LocNote4.xml:6
msgid "serious"
msgstr ""
-#. SEE: http://en.wikipedia.org/wiki/Aficionado
-#: tests/LocNote4.xml:6(span/span)
+#. (itstool) path: span/span
+#. (itstool) link: http://en.wikipedia.org/wiki/Aficionado
+#: tests/LocNote4.xml:6
msgid "aficionado"
msgstr ""
+#. (itstool) path: p/span
#. If possible keep the non-English terms in the translated version too
-#: tests/LocNote4.xml:4(p/span)
+#: tests/LocNote4.xml:4
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a <_:b-2/> baseball <_:span-3/>."
msgstr ""
diff --git a/tests/Placeholder.pot b/tests/Placeholder.pot
new file mode 100644
index 0000000..8bc6774
--- /dev/null
+++ b/tests/Placeholder.pot
@@ -0,0 +1,21 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 13:39-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: note/p
+#: tests/Placeholder.xml:3
+msgid "This is a note."
+msgstr ""
+
+#. (itstool) path: body/p
+#: tests/Placeholder.xml:3
+msgid "This is the first paragraph. It has a note on its final word<_:note-1/>."
+msgstr ""
+
diff --git a/tests/Translate1.pot b/tests/Translate1.pot
index d89dc93..0cc5de3 100644
--- a/tests/Translate1.pot
+++ b/tests/Translate1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-05-30 18:39+0200\n"
+"POT-Creation-Date: 2012-05-04 10:43-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,31 +9,38 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Translate1.xml:15(body/par)
+#. (itstool) path: body/par
+#: tests/Translate1.xml:15
msgid "Text with an image: <img alt=\"Image description\" src=\"img.png\"/>."
msgstr ""
-#: tests/Translate1.xml:16(body/par@title)
+#. (itstool) path: body/par@title
+#: tests/Translate1.xml:16
msgid "Text"
msgstr ""
-#: tests/Translate1.xml:16(body/par)
+#. (itstool) path: body/par
+#: tests/Translate1.xml:16
msgid "This is the first paragraph. It has some <_:verbatim-1/>."
msgstr ""
-#: tests/Translate1.xml:21(封面/汇集)
+#. (itstool) path: 封面/汇集
+#: tests/Translate1.xml:21
msgid "The Lord of the Rings"
msgstr ""
-#: tests/Translate1.xml:22(封面/标题)
+#. (itstool) path: 封面/标题
+#: tests/Translate1.xml:22
msgid "The Return of the King"
msgstr ""
-#: tests/Translate1.xml:26(章节/头注)
+#. (itstool) path: 章节/头注
+#: tests/Translate1.xml:26
msgid "Minas Tirith"
msgstr ""
-#: tests/Translate1.xml:27(章节/段落识别)
+#. (itstool) path: 章节/段落识别
+#: tests/Translate1.xml:27
msgid "<_:姓名-1/> looked out from the shelter of <_:姓名-2/>'s cloak."
msgstr ""
diff --git a/tests/Translate2.pot b/tests/Translate2.pot
index 0d21731..66b110f 100644
--- a/tests/Translate2.pot
+++ b/tests/Translate2.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-05-31 21:17+0200\n"
+"POT-Creation-Date: 2012-05-04 10:48-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,11 +9,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Translate2.xml:8(body/par@title)
+#. (itstool) path: body/par@title
+#: tests/Translate2.xml:8
msgid "Text"
msgstr ""
-#: tests/Translate2.xml:8(body/par)
+#. (itstool) path: body/par
+#: tests/Translate2.xml:8
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr ""
diff --git a/tests/Translate3.pot b/tests/Translate3.pot
new file mode 100644
index 0000000..240c28c
--- /dev/null
+++ b/tests/Translate3.pot
@@ -0,0 +1,21 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 11:00-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: head/title
+#: tests/Translate3.xml:6
+msgid "The Life of a Simple Man"
+msgstr ""
+
+#. (itstool) path: body/p
+#: tests/Translate3.xml:9
+msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
+msgstr ""
+
diff --git a/tests/Translate4.pot b/tests/Translate4.pot
new file mode 100644
index 0000000..2c7a552
--- /dev/null
+++ b/tests/Translate4.pot
@@ -0,0 +1,21 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 11:16-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: head/title
+#: tests/Translate4.xml:3
+msgid "The Life of a Simple Man"
+msgstr ""
+
+#. (itstool) path: body/p
+#: tests/Translate4.xml:6
+msgid "Everything started when Zebulon discovered that he had a <_:fexp-1/> who was a serious baseball <_:fexp-2/>."
+msgstr ""
+
diff --git a/tests/Translate5.pot b/tests/Translate5.pot
index 0e48c38..ac73acc 100644
--- a/tests/Translate5.pot
+++ b/tests/Translate5.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-05-31 21:45+0200\n"
+"POT-Creation-Date: 2012-05-04 11:18-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,11 +9,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Translate5.xml:9(info/item)
+#. (itstool) path: info/item
+#: tests/Translate5.xml:9
msgid "The Life of a <_:b-1/>"
msgstr ""
-#: tests/Translate5.xml:15(content/p)
+#. (itstool) path: content/p
+#: tests/Translate5.xml:15
msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
msgstr ""
diff --git a/tests/Translate6.pot b/tests/Translate6.pot
new file mode 100644
index 0000000..d86bb52
--- /dev/null
+++ b/tests/Translate6.pot
@@ -0,0 +1,36 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-05-04 11:27-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: item/b
+#: tests/Translate6.xml:9
+msgid "Simple Man"
+msgstr ""
+
+#. (itstool) path: info/item
+#: tests/Translate6.xml:9
+msgid "The Life of a <_:b-1/>"
+msgstr ""
+
+#. (itstool) path: p/span
+#: tests/Translate6.xml:16
+msgid "doppelgänger"
+msgstr ""
+
+#. (itstool) path: p/span
+#: tests/Translate6.xml:17
+msgid "aficionado"
+msgstr ""
+
+#. (itstool) path: content/p
+#: tests/Translate6.xml:15
+msgid "Everything started when Zebulon discovered that he had a <_:span-1/> who was a serious baseball <_:span-2/>."
+msgstr ""
+
diff --git a/tests/Translate7.pot b/tests/Translate7.pot
index 2fe7d5e..60ab061 100644
--- a/tests/Translate7.pot
+++ b/tests/Translate7.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-05-31 21:56+0200\n"
+"POT-Creation-Date: 2012-05-04 11:30-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,11 +9,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/Translate7.xml:19(body/p)
+#. (itstool) path: body/p
+#: tests/Translate7.xml:19
msgid "For the implementation of ITS, apply the rules in the order:"
msgstr ""
-#: tests/Translate7.xml:26(body/p)
+#. (itstool) path: body/p
+#: tests/Translate7.xml:26
msgid "<_:ph-1/> The last rule wins."
msgstr ""
diff --git a/tests/TranslateGlobal.pot b/tests/TranslateGlobal.pot
index 7ac794e..5da4806 100644
--- a/tests/TranslateGlobal.pot
+++ b/tests/TranslateGlobal.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-04 17:32+0200\n"
+"POT-Creation-Date: 2012-05-04 11:34-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,15 +9,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/TranslateGlobal.xml:10(body/par@title)
+#. (itstool) path: body/par@title
+#: tests/TranslateGlobal.xml:10
msgid "Text"
msgstr ""
-#: tests/TranslateGlobal.xml:10(body/par)
+#. (itstool) path: body/par
+#: tests/TranslateGlobal.xml:10
msgid "This is the first paragraph. It has some <_:code-1/>."
msgstr ""
-#: tests/TranslateGlobal.xml:11(body/par)
+#. (itstool) path: body/par
+#: tests/TranslateGlobal.xml:11
msgid "Some additional text."
msgstr ""
diff --git a/tests/WithinText1.pot b/tests/WithinText1.pot
index de0b699..3d73289 100644
--- a/tests/WithinText1.pot
+++ b/tests/WithinText1.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 08:49+0200\n"
+"POT-Creation-Date: 2012-05-04 10:54-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,15 +9,18 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/WithinText1.xml:9(body/p)
+#. (itstool) path: body/p
+#: tests/WithinText1.xml:9
msgid "This is a paragraph with <b>bold</b>, <i>italic</i>, and <u>underlined</u>."
msgstr ""
-#: tests/WithinText1.xml:10(p/fn)
+#. (itstool) path: p/fn
+#: tests/WithinText1.xml:10
msgid "This is the text of the footnote"
msgstr ""
-#: tests/WithinText1.xml:10(body/p)
+#. (itstool) path: body/p
+#: tests/WithinText1.xml:10
msgid "This is a paragraph with a footnote<_:fn-1/> at the middle."
msgstr ""
diff --git a/tests/WithinText2.pot b/tests/WithinText2.pot
index 0830499..e37f86f 100644
--- a/tests/WithinText2.pot
+++ b/tests/WithinText2.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-01 09:34+0200\n"
+"POT-Creation-Date: 2012-05-04 10:52-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9,43 +9,53 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: tests/WithinText2.xml:9(prolog/author)
+#. (itstool) path: prolog/author
+#: tests/WithinText2.xml:9
msgid "Zebulon Fairfield"
msgstr ""
-#: tests/WithinText2.xml:10(prolog/version)
+#. (itstool) path: prolog/version
+#: tests/WithinText2.xml:10
msgid "version 12, revision 2 - 2006-08-14"
msgstr ""
-#: tests/WithinText2.xml:11(keywords/kw)
+#. (itstool) path: keywords/kw
+#: tests/WithinText2.xml:11
msgid "horse"
msgstr ""
-#: tests/WithinText2.xml:11(keywords/kw)
+#. (itstool) path: keywords/kw
+#: tests/WithinText2.xml:11
msgid "appaloosa"
msgstr ""
-#: tests/WithinText2.xml:12(prolog/storageKey)
+#. (itstool) path: prolog/storageKey
+#: tests/WithinText2.xml:12
msgid "articles-6D272BA9-3B89CAD8"
msgstr ""
-#: tests/WithinText2.xml:16(section/title)
+#. (itstool) path: section/title
+#: tests/WithinText2.xml:16
msgid "Appaloosa"
msgstr ""
-#: tests/WithinText2.xml:17(p/fnote)
+#. (itstool) path: p/fnote
+#: tests/WithinText2.xml:17
msgid "The name comes from \"Palouse horse\" in reference to the Palouse River in Northern Idaho."
msgstr ""
-#: tests/WithinText2.xml:17(section/p)
+#. (itstool) path: section/p
+#: tests/WithinText2.xml:17
msgid "The Appaloosa<_:fnote-1/> are rugged horses originally breed by the <kw>Nez-Perce</kw> tribe in the US Northwest."
msgstr ""
-#: tests/WithinText2.xml:20(section/p)
+#. (itstool) path: section/p
+#: tests/WithinText2.xml:20
msgid "They are often characterized by their spotted coats, as shown here: <img src=\"appaloosa.png\" alt=\"Appaloosa horses\"/>"
msgstr ""
-#: tests/WithinText2.xml:23(footer/p)
+#. (itstool) path: footer/p
+#: tests/WithinText2.xml:23
msgid "Copyright: <em>Zebulon Inc.</em>"
msgstr ""
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 3447b8d..47cb46e 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -89,7 +89,8 @@ class ItstoolTests(unittest.TestCase):
def test_locnotes_refpointer(self):
self._test_pot_generation('EX-locNoteRefPointer-attribute-1.xml')
- # FIXME: test EX-locNote-selector-2.xml when parent locNotes will propagate to children
+ def test_EX_locNote_selector_2(self):
+ self._test_pot_generation('EX-locNote-selector-2.xml')
def test_unicode_markup(self):
self._test_translation_process('Translate1.xml')
@@ -121,6 +122,12 @@ class ItstoolTests(unittest.TestCase):
def test_withintext_linkedrules(self):
self._test_translation_process('WithinText2.xml')
+ def test_IT_locNote_inline(self):
+ self._test_pot_generation('IT-locNote-inline.xml')
+
+ def test_IT_locNote_multiples(self):
+ self._test_pot_generation('IT-locNote-multiples.xml')
+
# **** custom itst rules ****
def test_droprule(self):
self._test_translation_process('Droprule.xml')