Package: intltool-debian
Version: 0.35.0+20060710.1+nmu1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Hi Nicolas,

While working on a bug with broken translation merges in update-notifier in
Ubuntu
(https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/993672), I
found that intltool-merge does not correctly handle the case where the first
line in an RFC822Deb file needs translations, because it prepends the same
"newline" character to each translation that was prepended to the original
string - i.e., none at all.

The attached patch corrects this issue, AFAICS.

  * Non-maintainer upload.
  * intltool-merge: correctly handle translations of the first line in an
    rfc822deb file.  LP: #993672.

I've not uploaded to Ubuntu because I don't think this warrants a delta from
Debian - the one case where I've seen this behavior, we've now worked around
by reordering the source file.

Thanks for considering the patch.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
=== modified file 'debian/changelog'

=== modified file 'intltool-bin/intltool-merge'
--- intltool-bin/intltool-merge	2006-07-10 21:43:23 +0000
+++ intltool-bin/intltool-merge	2012-05-14 22:35:49 +0000
@@ -1343,7 +1343,7 @@
                 $str_translated = ' '.$str_translated if length ($str_translated) && $str_translated !~ /^\n/s;
 
                 $_ = $non_translated_line;
-                s/^(\w+):\s*.*/$newline${1}-$lang.$encodings{$lang}:$str_translated/s;
+                s/^(\w+):\s*.*/\n${1}-$lang.$encodings{$lang}:$str_translated/s;
                 print OUTPUT;
             }
         }

Reply via email to