From: Frank Lichtenheld Date: Sat, 17 Nov 2007 19:52:21 +0000 (+0100) Subject: ttxgettext: Fix to actually include comments into the .pot files X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=968c41e87231365eb85c185481b0f3c175c5f65a;p=deb%2Fpackages.git ttxgettext: Fix to actually include comments into the .pot files --- diff --git a/bin/ttxgettext b/bin/ttxgettext index 2afeafc..fddfbd0 100755 --- a/bin/ttxgettext +++ b/bin/ttxgettext @@ -67,13 +67,15 @@ sub processFile { # $lineno += $nextlineno; # next; # wrong domain # } - $comment = ''; - if ($1 =~ m/(((^|\n)[ \t]*#.*)+)\n?[^\n]*$/) { - $comment = $1; - $comment =~ s/^\s+#\s*//; - $comment =~ s/\n[ \t]*#\s*/\n/g; - } - push (@msgids, $msgid); + $comment = ''; + if ($1 =~ m/(((^|\n)\s*(\[%)?\s*#.*)+)\n?[^\n]*$/) { + $comment = $1; + $comment =~ s/\[%//g; + $comment =~ s/%\]//g; + $comment =~ s/^\s+#\s*//; + $comment =~ s/\n[ \t]*#\s*/\n/g; + } + push (@msgids, $msgid); # if (defined ($messages->{$msgid})) { # print STDERR "ttxgettext: Warning: msgid multiple defined:\n\t". # $msgid."\n"; diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index 205e85b..f90586a 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -48,7 +48,6 @@
-[%# @translators: I'm really sorry :/ %] [% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s) $suite_enc"); section_wording = (section_enc == 'all') ? g("all sections") : g("section(s) $section_enc"); arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s) $architectures_enc"); @@ -58,6 +57,7 @@ source_wording, keyword_enc, suite_wording, section_wording, arch_wording); ELSE; exact_wording = opts.exact ? "" : g(" (including subword matching)"); + # @translators: I'm really sorry :/ msg = g("You have searched for %s in packages names and descriptions in %s, %s, and %s%s.", keyword_enc, suite_wording, section_wording, arch_wording, exact_wording); END %] diff --git a/templates/html/search_contents.tmpl b/templates/html/search_contents.tmpl index 93ff2c6..64547ba 100644 --- a/templates/html/search_contents.tmpl +++ b/templates/html/search_contents.tmpl @@ -69,7 +69,6 @@ [%- PROCESS 'html/messages.tmpl' -%]
-[%# @translators: I'm really sorry :/ %] [% section_wording = ( section_enc == 'all' ? g("all sections") : g("section(s) %s", section_enc) ); arch_wording = ( architectures_enc == 'any' ? g("all architectures") : g("architecture(s) %s", architectures_enc) ); wording = g("paths that end with"); @@ -78,6 +77,7 @@ ELSIF mode == 'exactfilename'; wording = g("filenames that contain"); END %] +[%# @translators: I'm really sorry :/ %]

[% g('You have searched for %s %s in suite %s, %s, and %s.', wording, keyword_enc, suite, section_wording, arch_wording) %]