[Debian-l10n-commits] r1725 - /translate-toolkit/trunk/debian/patches/po2html_duplicate

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Fri May 22 18:15:44 UTC 2009


Author: nekral-guest
Date: Fri May 22 18:15:44 2009
New Revision: 1725

URL: http://svn.debian.org/wsvn/?sc=1&rev=1725
Log:
  * debian/patches/po2html_duplicate: Added minimal support for duplicate
    strings in po2html. This should work in most cases, but has a lot of
    flaws. Closes: #524106

Added:
    translate-toolkit/trunk/debian/patches/po2html_duplicate

Added: translate-toolkit/trunk/debian/patches/po2html_duplicate
URL: http://svn.debian.org/wsvn/translate-toolkit/trunk/debian/patches/po2html_duplicate?rev=1725&op=file
==============================================================================
--- translate-toolkit/trunk/debian/patches/po2html_duplicate (added)
+++ translate-toolkit/trunk/debian/patches/po2html_duplicate Fri May 22 18:15:44 2009
@@ -1,0 +1,24 @@
+Goal: Basic support for translation of HTML with duplicate strings
+
+Fixes: 524106
+
+This is still very incomplete.
+
+Comment on html2po:
+ * replace() will not work if a string is a substring of another.
+ * when duplicates are resolved with context, the wrong translation may be
+   chosen.
+
+Status wrt upstream: not forwarded yet. html2po should be fixed in a more
+                     general way.
+
+--- a/translate/convert/po2html.py
++++ b/translate/convert/po2html.py
+@@ -79,6 +79,7 @@
+             else:
+                 msgstr = self.wrapmessage(inputunit.source)
+             if msgstr.strip():
++              for l in inputunit.getlocations():
+                 # TODO: "msgid" is already html-encoded ("&" -> "&"), while
+                 #   "msgstr" is not encoded -> thus the replace fails
+                 #   see test_po2html.py in line 67




More information about the Debian-l10n-commits mailing list