Your message dated Sat, 02 Apr 2016 18:20:17 +0000
with message-id <e1amq9h-0008cy...@franck.debian.org>
and subject line Bug#810989: fixed in itstool 2.0.2-3
has caused the Debian Bug report #810989,
regarding itstool: Itstool fails to translate xml attributes, when unicode
character is used
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
810989: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810989
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: itstool
Version: 2.0.2-2
Severity: grave
Tags: patch
Justification: renders package unusable
When trying to translate strings from English to another langage, itstool fails
because unicode character where used in the translation file (.mo).
As mainly every langage except english uses unicode characters, the package
is unusable.
A fix has been published on the official Github page :
https://github.com/itstool/itstool/commit/6f1761d86b4749a65607d4b4af622f6771e1f330
The issue also affects Debian Jessie and Debian Sid.
-- System Information:
Debian Release: stretch/sid
APT prefers testing-updates
APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.3.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages itstool depends on:
ii python 2.7.11-1
ii python-libxml2 2.9.3+dfsg1-1
itstool recommends no packages.
itstool suggests no packages.
-- no debconf information
>From d75f68cbc58075b57aee53d57b9156655a2fc99a Mon Sep 17 00:00:00 2001
From: Shaun McCance <sha...@gnome.org>
Date: Mon, 17 Mar 2014 14:40:42 -0400
Subject: [PATCH] Fix UTF-8 handling for translated attributes
---
itstool.in | 2 +-
tests/IT-attributes-2.ll.po | 21 +++++++++++++++++++++
tests/IT-attributes-2.ll.xml | 10 ++++++++++
tests/IT-attributes-2.pot | 21 +++++++++++++++++++++
tests/IT-attributes-2.xml | 10 ++++++++++
tests/run_tests.py | 3 +++
6 files changed, 66 insertions(+), 1 deletion(-)
create mode 100644 tests/IT-attributes-2.ll.po
create mode 100644 tests/IT-attributes-2.ll.xml
create mode 100644 tests/IT-attributes-2.pot
create mode 100644 tests/IT-attributes-2.xml
diff --git a/itstool.in b/itstool.in
index 96fb913..d0e76a1 100755
--- a/itstool.in
+++ b/itstool.in
@@ -966,7 +966,7 @@ class Document (object):
for attr in trans_attrs:
newcontent = translations.ugettext(attr.get_content())
if newcontent:
- newnode.setProp(attr.name, translations.ugettext(attr.get_content()))
+ newnode.setProp(attr.name, newcontent.encode('utf-8'))
def get_translated (self, node, translations, strict=False, lang=None):
msg = self._msgs.get_message_by_node(node)
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 <l...@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 <l...@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')
--
2.1.4
--- End Message ---
--- Begin Message ---
Source: itstool
Source-Version: 2.0.2-3
We believe that the bug you reported is fixed in the latest version of
itstool, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 810...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Tanguy Ortolo <tanguy+deb...@ortolo.eu> (supplier of updated itstool package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 02 Apr 2016 19:10:04 +0200
Source: itstool
Binary: itstool
Architecture: source all
Version: 2.0.2-3
Distribution: unstable
Urgency: medium
Maintainer: Python Applications Packaging Team
<python-apps-t...@lists.alioth.debian.org>
Changed-By: Tanguy Ortolo <tanguy+deb...@ortolo.eu>
Description:
itstool - tool for translating XML documents with PO files
Closes: 810989
Changes:
itstool (2.0.2-3) unstable; urgency=medium
.
* debian/patches/fix-utf8-handling.patch: Backport an upstream fix to
prevent itstool from failing on non-ASCII characters. (Closes: #810989)
* debian/control:
- Switch Vcs-Browser URL to HTTPS.
- Update Standards-Version to 3.9.7 (no change needed).
Checksums-Sha1:
47ea085353507102ce3ee32b5091475e2e8cff0c 1951 itstool_2.0.2-3.dsc
fc5b0329a6dbcefd2008bf6cd6a06beafb1cec6f 3048 itstool_2.0.2-3.debian.tar.xz
7bff0c5796eda5773382fa3a66dcb971c8552085 37804 itstool_2.0.2-3_all.deb
Checksums-Sha256:
ad525683eb1bfd88f127e298d9da2e407ce86769ce4532510b2569d99dc20d23 1951
itstool_2.0.2-3.dsc
76289c61b58c5790bd071ce343e10cf569b28cb4efe4d494de54506237b1b58a 3048
itstool_2.0.2-3.debian.tar.xz
e5c8a24f09a23dacd5a937248eccc4504cbf372aa5b79512ca6296ab8dead617 37804
itstool_2.0.2-3_all.deb
Files:
7fd4d7c7f5681c440a65628c3c54179e 1951 text extra itstool_2.0.2-3.dsc
dcfd645f924042af39c168e1ff7eb2f2 3048 text extra itstool_2.0.2-3.debian.tar.xz
b8b8a9094fbe97ee50a5f903cbf71540 37804 text extra itstool_2.0.2-3_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJXAAERAAoJEOryzVHFAGgZMroP/3G33HR32Frpid1D7VjDxGnX
PDpnCXo4UvCibgwNUi6MMGGgh86kvkFA1CdNMtB7WJBgKuRaRpvW0bhpJzoMt1ol
BQkTWGiiUxnL1bJpmQVrARWhB2xdYvJit174AxTJWXm33vkkoQyt22iIoS/dsedt
wnVpWKD1/4l+t+ry01yy/BJo6sZogTL0s/E+wQBoMDgiAJ6X6Nc9VceFIVT/Vyj6
4X6u4GHMh3ZIbwuzVcaolqyj3ZBjU+uLQZYaMRrLkW0P47S9HUqgp6p+gIrWEY8+
csbZ0jdYYBchAeFlB1qlfs4ckdq30dIKC753oaM0tfYvD2oyVM81TnXhQsGrkL2d
6YBu22Qo+GMTLLZKm1zVlsl5si3ClbZ8OXOCBxSIbaqebdBkGbBw/Av+GyAzEEpr
aFQKEp6bev7bJ1VDEb3sCkOGhJLOocwwKwEoja6rH0Dt6qxqCCO4N0gAaebrp20F
uufTS//3KJ4NjwzhRr3ndZn8XI6opzN3esAJRMF73n6YGfAF9QId47w3AqNjCiP2
Yr7KCnhoAHSmnQoFV0xeu4dpdI0KBmrWJLQwx7jPI5qFpvUPGyHm0iKni8bBrR2r
183v5owq0Urxy/k8jgviwY1yhTogwdYnF5VPlgspFyq7l3xrWQBGao8Inf9kgjh2
sP/10oQ9fYbaQcuCzV9a
=Kyvx
-----END PGP SIGNATURE-----
--- End Message ---