[Debian-l10n-commits] r1904 - in /pootle/trunk/debian: changelog patches/series patches/translate_toolkit_1_4.patch

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Wed Sep 2 19:09:55 UTC 2009


Author: nekral-guest
Date: Wed Sep  2 19:09:55 2009
New Revision: 1904

URL: http://svn.debian.org/wsvn/?sc=1&rev=1904
Log:
  * debian/patches/translate_toolkit_1_4.patch: Fix failures with the new
    translate toolkit version (1.4).

Added:
    pootle/trunk/debian/patches/translate_toolkit_1_4.patch
Modified:
    pootle/trunk/debian/changelog
    pootle/trunk/debian/patches/series

Modified: pootle/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/changelog?rev=1904&op=diff
==============================================================================
--- pootle/trunk/debian/changelog (original)
+++ pootle/trunk/debian/changelog Wed Sep  2 19:09:55 2009
@@ -1,3 +1,10 @@
+pootle (1.2.1-4) unstable; urgency=low
+
+  * debian/patches/translate_toolkit_1_4.patch: Fix failures with the new
+    translate toolkit version (1.4).
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Wed, 02 Sep 2009 21:07:46 +0200
+
 pootle (1.2.1-3) unstable; urgency=low
 
   * debian/patches/pootle_continue_after_po_failure.patch: Updated patch.

Modified: pootle/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/patches/series?rev=1904&op=diff
==============================================================================
--- pootle/trunk/debian/patches/series (original)
+++ pootle/trunk/debian/patches/series Wed Sep  2 19:09:55 2009
@@ -3,3 +3,4 @@
 pootle_ll_CC_languages.patch
 pootle_continue_after_po_failure.patch
 debian_dont_send_password_by_mail.patch
+translate_toolkit_1_4.patch

Added: pootle/trunk/debian/patches/translate_toolkit_1_4.patch
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/patches/translate_toolkit_1_4.patch?rev=1904&op=file
==============================================================================
--- pootle/trunk/debian/patches/translate_toolkit_1_4.patch (added)
+++ pootle/trunk/debian/patches/translate_toolkit_1_4.patch Wed Sep  2 19:09:55 2009
@@ -1,0 +1,51 @@
+Goal: use findunit instead of directly accessing sourceindex
+      needed to work with Translate Toolkit 1.4
+
+Status wrt upstream: this patch comes from upstream (r12249).
+
+--- a/Pootle/projects.py
++++ b/Pootle/projects.py
+@@ -1363,7 +1363,7 @@
+         pofile.makeindex()
+       elif not hasattr(pofile, "sourceindex"):
+         pofile.makeindex()
+-      unit = pofile.sourceindex.get(message, None)
++      unit = pofile.findunit(message)
+       if not unit or not unit.istranslated():
+         continue
+       tmsg = unit.target
+@@ -1377,7 +1377,7 @@
+       try:
+         if pofile.pofreshen() or not hasattr(pofile, "sourceindex"):
+           pofile.makeindex()
+-        unit = pofile.sourceindex.get(message, None)
++        unit = pofile.findunit(message)
+         if not unit or not unit.istranslated():
+           continue
+         tmsg = unit.target
+@@ -1402,7 +1402,7 @@
+         nplural, pluralequation = pofile.getheaderplural()
+         if pluralequation:
+           pluralfn = gettext.c2py(pluralequation)
+-          unit = pofile.sourceindex.get(singular, None)
++          unit = pofile.findunit(singular)
+           if not unit or not unit.istranslated():
+             continue
+           tmsg = unit.target.strings[pluralfn(n)]
+--- a/Pootle/pootlefile.py
++++ b/Pootle/pootlefile.py
+@@ -629,11 +629,9 @@
+           # We can't use the multistring, because it might contain more than two
+           # entries in a PO xliff file. Rather use the singular.
+           source = unicode(newpo.source)
+-          if source in self.sourceindex:
+-            oldpo = self.sourceindex[source]
+-            matches.append((oldpo, newpo))
+-          else:
+-            matches.append((None, newpo))
++          oldpo = self.findunit(source)
++          matches.append((oldpo, newpo))
++
+       # find items that have been removed
+       matcheditems = set(oldpo for oldpo, newpo in matches if oldpo)
+       for oldpo in self.units:




More information about the Debian-l10n-commits mailing list