]> git.deb.at Git - deb/packages.git/commitdiff
ttxgettext: Fix to actually include comments into the .pot files
authorFrank Lichtenheld <frank@lichtenheld.de>
Sat, 17 Nov 2007 19:52:21 +0000 (20:52 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sat, 17 Nov 2007 20:46:06 +0000 (21:46 +0100)
bin/ttxgettext
templates/html/search.tmpl
templates/html/search_contents.tmpl

index 2afeafcd321956ccfc9b91a5f5f14cfab295006f..fddfbd0d458d393adf85920acdc0d64a616262df 100755 (executable)
@@ -67,13 +67,15 @@ sub processFile {
 #                   $lineno += $nextlineno;
 #                   next;  # wrong domain
 #                }
 #                   $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";
 #                if (defined ($messages->{$msgid})) {
 #                        print STDERR "ttxgettext: Warning: msgid multiple defined:\n\t".
 #                                $msgid."\n";
index 205e85bbb8c7d1ab36d49c23c3264a8267faa443..f90586ae51b4d46a47fb803aa07fc6e94f5b3464 100644 (file)
@@ -48,7 +48,6 @@
 
 <div id="psearchres">
 
 
 <div id="psearchres">
 
-[%# @translators: I'm really sorry :/ %]
 [% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s) <em>$suite_enc</em>");
    section_wording = (section_enc == 'all') ? g("all sections") : g("section(s) <em>$section_enc</em>");
    arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s) <em>$architectures_enc</em>");
 [% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s) <em>$suite_enc</em>");
    section_wording = (section_enc == 'all') ? g("all sections") : g("section(s) <em>$section_enc</em>");
    arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s) <em>$architectures_enc</em>");
@@ -58,6 +57,7 @@
                source_wording, keyword_enc, suite_wording, section_wording, arch_wording);
     ELSE;
        exact_wording = opts.exact ? "" : g(" (including subword matching)");
                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 <em>%s</em> in packages names and descriptions in %s, %s, and %s%s.",
                keyword_enc, suite_wording, section_wording, arch_wording, exact_wording);
     END %]
        msg = g("You have searched for <em>%s</em> in packages names and descriptions in %s, %s, and %s%s.",
                keyword_enc, suite_wording, section_wording, arch_wording, exact_wording);
     END %]
index 93ff2c6fe1bcf95e759cf73b03de0900c56ab003..64547ba3c0fa4469a8310ac42ff1a8c65c8213fc 100644 (file)
@@ -69,7 +69,6 @@
 [%- PROCESS 'html/messages.tmpl' -%]
 <div id="pcontentsres">
 
 [%- PROCESS 'html/messages.tmpl' -%]
 <div id="pcontentsres">
 
-[%# @translators: I'm really sorry :/ %]
 [% section_wording = ( section_enc == 'all' ? g("all sections") : g("section(s) <em>%s</em>", section_enc) );
    arch_wording = ( architectures_enc == 'any' ? g("all architectures") : g("architecture(s) <em>%s</em>", architectures_enc) );
    wording = g("paths that end with");
 [% section_wording = ( section_enc == 'all' ? g("all sections") : g("section(s) <em>%s</em>", section_enc) );
    arch_wording = ( architectures_enc == 'any' ? g("all architectures") : g("architecture(s) <em>%s</em>", architectures_enc) );
    wording = g("paths that end with");
@@ -78,6 +77,7 @@
    ELSIF mode == 'exactfilename';
        wording = g("filenames that contain");
    END %]
    ELSIF mode == 'exactfilename';
        wording = g("filenames that contain");
    END %]
+[%# @translators: I'm really sorry :/ %]
 <p>[% g('You have searched for %s <em>%s</em> in suite <em>%s</em>, %s, and %s.',
        wording, keyword_enc, suite, section_wording, arch_wording) %]
 
 <p>[% g('You have searched for %s <em>%s</em> in suite <em>%s</em>, %s, and %s.',
        wording, keyword_enc, suite, section_wording, arch_wording) %]