diff options
author | Claude Paroz <claude@2xlibre.net> | 2011-06-12 21:40:36 +0200 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2011-06-23 16:04:51 -0400 |
commit | 7ecd70b27d5cc22f8d6b35fc68aa9fe9cd3a7def (patch) | |
tree | 48a51211d13ed7eba763e3e7d9b03675ab3a45f8 /tests | |
parent | fadb43fc37dbe18d9b1204bb13fb5ccea492b649 (diff) | |
download | itstool-7ecd70b27d5cc22f8d6b35fc68aa9fe9cd3a7def.tar.gz |
Extract and translate node attributes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Translate1.ll.po | 4 | ||||
-rw-r--r-- | tests/Translate1.ll.xml | 2 | ||||
-rw-r--r-- | tests/Translate1.pot | 4 | ||||
-rw-r--r-- | tests/Translate2.ll.po | 4 | ||||
-rw-r--r-- | tests/Translate2.ll.xml | 2 | ||||
-rw-r--r-- | tests/Translate2.pot | 4 | ||||
-rw-r--r-- | tests/TranslateGlobal.ll.po | 23 | ||||
-rw-r--r-- | tests/TranslateGlobal.ll.xml | 13 | ||||
-rw-r--r-- | tests/TranslateGlobal.pot | 23 | ||||
-rw-r--r-- | tests/run_tests.py | 7 |
10 files changed, 80 insertions, 6 deletions
diff --git a/tests/Translate1.ll.po b/tests/Translate1.ll.po index 29cb646..8a43b60 100644 --- a/tests/Translate1.ll.po +++ b/tests/Translate1.ll.po @@ -13,6 +13,10 @@ msgstr "" msgid "Text with an image: <img alt=\"Image description\" src=\"img.png\"/>." msgstr "Texte avec une image : <img alt=\"Description d'image\" src=\"img.png\"/>." +#: tests/Translate1.xml:16(body/par@title) +msgid "Text" +msgstr "Texte" + #: tests/Translate1.xml:16(body/par) msgid "This is the first paragraph. It has some <_:verbatim-1/>." msgstr "C'est le premier paragraphe. Il contient du texte <_:verbatim-1/>." diff --git a/tests/Translate1.ll.xml b/tests/Translate1.ll.xml index bff12e0..72b30fe 100644 --- a/tests/Translate1.ll.xml +++ b/tests/Translate1.ll.xml @@ -12,7 +12,7 @@ </head> <body> <par>Texte avec une image : <img alt="Description d'image" src="img.png"/>.</par> - <par id="100" title="Text">C'est le premier paragraphe. Il contient du texte <verbatim>un-translatable + <par id="100" title="Texte">C'est le premier paragraphe. Il contient du texte <verbatim>un-translatable code with an image: <img src="test.png" alt="Image description"/></verbatim>.</par> <insert xmlns:z="myChineseMakupLanguage" xmlns:i="http://www.w3.org/2005/11/its"> <z:书籍> diff --git a/tests/Translate1.pot b/tests/Translate1.pot index 312e0d6..d89dc93 100644 --- a/tests/Translate1.pot +++ b/tests/Translate1.pot @@ -13,6 +13,10 @@ msgstr "" msgid "Text with an image: <img alt=\"Image description\" src=\"img.png\"/>." msgstr "" +#: tests/Translate1.xml:16(body/par@title) +msgid "Text" +msgstr "" + #: tests/Translate1.xml:16(body/par) msgid "This is the first paragraph. It has some <_:verbatim-1/>." msgstr "" diff --git a/tests/Translate2.ll.po b/tests/Translate2.ll.po index 9078ab4..0ccb8de 100644 --- a/tests/Translate2.ll.po +++ b/tests/Translate2.ll.po @@ -9,6 +9,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: tests/Translate2.xml:8(body/par@title) +msgid "Text" +msgstr "Texte" + #: tests/Translate2.xml:8(body/par) msgid "This is the first paragraph. It has some <_:code-1/>." msgstr "C'est le premier paragraphe. Il contient du texte <_:code-1/>." diff --git a/tests/Translate2.ll.xml b/tests/Translate2.ll.xml index 2092f86..959c733 100644 --- a/tests/Translate2.ll.xml +++ b/tests/Translate2.ll.xml @@ -4,7 +4,7 @@ <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="Translate2_LinkedRules.xml"/> </head> <body> - <par id="100" title="Text">C'est le premier paragraphe. Il contient du texte <code>un-translatable code</code>.</par> + <par id="100" title="Texte">C'est le premier paragraphe. Il contient du texte <code>un-translatable code</code>.</par> </body> </myDoc> <!-- timestamp $Id: Translate2.xml,v 1.4 2007/02/02 16:55:05 srahtz3 Exp $ --> diff --git a/tests/Translate2.pot b/tests/Translate2.pot index 85aac4f..0d21731 100644 --- a/tests/Translate2.pot +++ b/tests/Translate2.pot @@ -9,6 +9,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: tests/Translate2.xml:8(body/par@title) +msgid "Text" +msgstr "" + #: tests/Translate2.xml:8(body/par) msgid "This is the first paragraph. It has some <_:code-1/>." msgstr "" diff --git a/tests/TranslateGlobal.ll.po b/tests/TranslateGlobal.ll.po new file mode 100644 index 0000000..17e30d3 --- /dev/null +++ b/tests/TranslateGlobal.ll.po @@ -0,0 +1,23 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2011-06-04 17:32+0200\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" + +#: tests/TranslateGlobal.xml:10(body/par@title) +msgid "Text" +msgstr "Texte" + +#: tests/TranslateGlobal.xml:10(body/par) +msgid "This is the first paragraph. It has some <_:code-1/>." +msgstr "Voici le premier paragraphe. Il contient du texte <_:code-1/>." + +#: tests/TranslateGlobal.xml:11(body/par) +msgid "Some additional text." +msgstr "Du texte supplémentaire." + diff --git a/tests/TranslateGlobal.ll.xml b/tests/TranslateGlobal.ll.xml new file mode 100644 index 0000000..eed9b8b --- /dev/null +++ b/tests/TranslateGlobal.ll.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<myDoc> + <head> + <its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" xlink:type="simple" xlink:href="TranslateGlobal_LinkedRules.xml"> + <its:translateRule selector="//par[@id='101']/@title" translate="no"/> + </its:rules> + </head> + <body> + <par id="100" title="Texte">Voici le premier paragraphe. Il contient du texte <code>un-translatable code</code>.</par> + <par id="101" title="Not extractable text">Du texte supplémentaire.</par> + </body> +</myDoc> +<!-- timestamp $Id: TranslateGlobal.xml,v 1.4 2007/02/02 16:55:05 srahtz3 Exp $ --> diff --git a/tests/TranslateGlobal.pot b/tests/TranslateGlobal.pot new file mode 100644 index 0000000..7ac794e --- /dev/null +++ b/tests/TranslateGlobal.pot @@ -0,0 +1,23 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2011-06-04 17:32+0200\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" + +#: tests/TranslateGlobal.xml:10(body/par@title) +msgid "Text" +msgstr "" + +#: tests/TranslateGlobal.xml:10(body/par) +msgid "This is the first paragraph. It has some <_:code-1/>." +msgstr "" + +#: tests/TranslateGlobal.xml:11(body/par) +msgid "Some additional text." +msgstr "" + diff --git a/tests/run_tests.py b/tests/run_tests.py index fafc1cb..fe8727c 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -59,11 +59,11 @@ class ItstoolTests(unittest.TestCase): def test_locnotes(self): - # FIXME: only the third note appears currently, as attribute extraction is not yet implemented + # FIXME: only the third note appears currently, as notes on subnodes don't propagate to parent nodes self._test_pot_generation('LocNote1.xml') def test_locnotes_external(self): - # FIXME: only the third note appears currently, as attribute extraction is not yet implemented + # FIXME: only the third note appears currently, as notes on subnodes don't propagate to parent nodes self._test_pot_generation('LocNote2.xml') def test_locnotes_ontags(self): @@ -101,8 +101,7 @@ class ItstoolTests(unittest.TestCase): def test_last_rule_win(self): self._test_translation_process('Translate7.xml') - # FIXME: currently deactivated until attributes are translatable - def xx_test_attribute_selectable(self): + def test_attribute_selectable(self): self._test_translation_process('TranslateGlobal.xml') def test_withintext(self): |