diff options
author | Shaun McCance <shaunm@gnome.org> | 2014-03-17 14:40:42 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2014-03-17 14:40:42 -0400 |
commit | d75f68cbc58075b57aee53d57b9156655a2fc99a (patch) | |
tree | 21759fc6c0df51ea9135d31c2750c307c8010617 /tests | |
parent | 6f1761d86b4749a65607d4b4af622f6771e1f330 (diff) | |
download | itstool-d75f68cbc58075b57aee53d57b9156655a2fc99a.tar.gz |
Fix UTF-8 handling for translated attributes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/IT-attributes-2.ll.po | 21 | ||||
-rw-r--r-- | tests/IT-attributes-2.ll.xml | 10 | ||||
-rw-r--r-- | tests/IT-attributes-2.pot | 21 | ||||
-rw-r--r-- | tests/IT-attributes-2.xml | 10 | ||||
-rw-r--r-- | tests/run_tests.py | 3 |
5 files changed, 65 insertions, 0 deletions
diff --git a/tests/IT-attributes-2.ll.po b/tests/IT-attributes-2.ll.po new file mode 100644 index 0000000..fefd42d --- /dev/null +++ b/tests/IT-attributes-2.ll.po @@ -0,0 +1,21 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\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" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. (itstool) path: page/code@title +#: tests/IT-attributes-2.xml:9 +msgid "one" +msgstr "öñé" + +#. (itstool) path: code/span@title +#: tests/IT-attributes-2.xml:9 +msgid "two" +msgstr "ŧwô" diff --git a/tests/IT-attributes-2.ll.xml b/tests/IT-attributes-2.ll.xml new file mode 100644 index 0000000..2a1044d --- /dev/null +++ b/tests/IT-attributes-2.ll.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<page> + <info> + <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"> + <its:translateRule selector="//code" translate="no"/> + <its:translateRule selector="//@title" translate="yes"/> + </its:rules> + </info> + <code title="öñé">Not translated <span title="ŧwô"/></code> +</page> diff --git a/tests/IT-attributes-2.pot b/tests/IT-attributes-2.pot new file mode 100644 index 0000000..e989b08 --- /dev/null +++ b/tests/IT-attributes-2.pot @@ -0,0 +1,21 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. (itstool) path: page/code@title +#: tests/IT-attributes-2.xml:9 +msgid "one" +msgstr "" + +#. (itstool) path: code/span@title +#: tests/IT-attributes-2.xml:9 +msgid "two" +msgstr "" + diff --git a/tests/IT-attributes-2.xml b/tests/IT-attributes-2.xml new file mode 100644 index 0000000..3233132 --- /dev/null +++ b/tests/IT-attributes-2.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<page> + <info> + <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"> + <its:translateRule selector="//code" translate="no"/> + <its:translateRule selector="//@title" translate="yes"/> + </its:rules> + </info> + <code title="one">Not translated <span title="two"/></code> +</page> diff --git a/tests/run_tests.py b/tests/run_tests.py index 6939ff6..af62d76 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -311,6 +311,9 @@ class ItstoolTests(unittest.TestCase): def test_IT_attributes_1(self): self._test_translation_process('IT-attributes-1.xml') + def test_IT_attributes_2(self): + self._test_translation_process('IT-attributes-2.xml') + def test_IT_context_1(self): self._test_translation_process('IT-context-1.xml') |