[Debian-l10n-commits] r2864 - in /translate-toolkit/trunk/debian: changelog patches/poencoding.patch patches/series

bubulle at users.alioth.debian.org bubulle at users.alioth.debian.org
Sat May 26 12:03:35 UTC 2012


Author: bubulle
Date: Sat May 26 12:03:33 2012
New Revision: 2864

URL: http://svn.debian.org/wsvn/?sc=1&rev=2864
Log:
Fix UnicodeEncodeError on UTF-8 encoded translator comments by
using a patch applied in upstream's SVN.
Closes: #658621

Added:
    translate-toolkit/trunk/debian/patches/poencoding.patch
Modified:
    translate-toolkit/trunk/debian/changelog
    translate-toolkit/trunk/debian/patches/series

Modified: translate-toolkit/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/changelog?rev=2864&op=diff
==============================================================================
--- translate-toolkit/trunk/debian/changelog (original)
+++ translate-toolkit/trunk/debian/changelog Sat May 26 12:03:33 2012
@@ -2,6 +2,9 @@
 
   * Fix long description of translate-toolkit-dev-doc. Grazie to
     Beatrice Torraca. Closes: #674646
+  * Fix UnicodeEncodeError on UTF-8 encoded translator comments by
+    using a patch applied in upstream's SVN.
+    Closes: #658621
 
  -- Christian Perrier <bubulle at debian.org>  Sat, 26 May 2012 13:56:57 +0200
 

Added: translate-toolkit/trunk/debian/patches/poencoding.patch
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/poencoding.patch?rev=2864&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/poencoding.patch (added)
+++ translate-toolkit/trunk/debian/patches/poencoding.patch Sat May 26 12:03:33 2012
@@ -1,0 +1,24 @@
+Description: Handle errors in the po encoding
+Origin: http://translate.svn.sourceforge.net/viewvc/translate/src/trunk/translate/storage/pocommon.py?view=patch&r1=17737&r2=17736&pathrev=17737
+Bug: http://bugs.locamotion.org/show_bug.cgi?id=1951
+Author: Stuart Prescott <stuart+debian at nanonanonano.net>
+
+Based on patch applied to upstream svn and shouldn't be needed in the release
+following 1.9.0.
+
+--- a/translate/storage/pocommon.py
++++ b/translate/storage/pocommon.py
+@@ -47,7 +47,12 @@
+ 
+ def unquote_plus(text):
+     """unquote('%7e/abc+def') -> '~/abc def'"""
+-    return urllib.unquote_plus(text).decode('utf-8')
++    try:
++        return urllib.unquote_plus(text).decode('utf-8')
++    except UnicodeEncodeError, e:
++        # for some reason there is a non-ascii character here. Let's assume it
++        # is already unicode (because of originally decoding the file)
++        return text
+ 
+ 
+ class pounit(base.TranslationUnit):

Modified: translate-toolkit/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/series?rev=2864&op=diff
==============================================================================
--- translate-toolkit/trunk/debian/patches/series (original)
+++ translate-toolkit/trunk/debian/patches/series Sat May 26 12:03:33 2012
@@ -6,3 +6,4 @@
 #po2html_duplicate
 poterminology_defaultstopfile
 #spellchecker_check_something
+poencoding.patch




More information about the Debian-l10n-commits mailing list