Bug#851458: not-enough-i18n'ed string on devel/website/stats/ pages

victory <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <20170115145306.f7132fd6561e41b082d278ca__12909.325984265$1484459845$gmane$org@gmail.com>
Package: www.debian.org
Severity: wishlist
Tags: patch l10n

I-have-known-since-5-years-ago bug, though, 
on current devel/website/stats/ pages,
a gettext string is not enough i18n'ed as it does not include its object;

w/ the patch applied, the string will become like
 "Created with <trasstatslink>"
instead of
 "Created with"
so we can translate it as
 "<trasstatslink> により生成しました"

patch below

Index: stattrans.pl
===================================================================
--- stattrans.pl	(revision 240)
+++ stattrans.pl	(working copy)
@@ -535,6 +535,11 @@
         if (open (HTML, ">$config{'htmldir'}/$l.wml")) {
 	    printf HTML "#use wml::debian::template title=\"<:=\$trans{\$CUR_ISO_LANG}{%s}:>\"\n", $lang;
 	    print HTML "#use wml::debian::toc\n";
+printf HTML qq|<define-tag trasstatslink><a href="%s">webwml-stattrans</a></define-tag>\n|,
+		alioth_cvs_view_url('stattrans.pl');
+printf HTML "<define-tag createdwith><address>\n";
+printf HTML "<gettext domain=\"stats\">Created with <trasstatslink></gettext>\n"
+printf HTML "</address></define-tag>\n";
             print HTML "<script src=\"diffstat.js\" type=\"text/javascript\"></script>\n\n";
             $color = get_color ($percent_a{$lang});
 
@@ -655,10 +660,7 @@
                 print HTML "</table>\n";
             }
 
-            print HTML
-                '<address><gettext domain="stats">Created with</gettext> <a href="'
-                . alioth_cvs_view_url('stattrans.pl')
-                . '">webwml-stattrans</a></address>' . "\n";
+            print HTML "<createdwith>\n";
             close (HTML);
         } else {
             print "Can't open $config{'htmldir'}/$l.wml\n";
@@ -809,10 +811,7 @@
 print HTMLI "</tbody>";
 print HTMLI "</table>\n";
 
-print HTMLI
-    '<address><gettext domain="stats">Created with</gettext> <a href="'
-    . alioth_cvs_view_url('stattrans.pl')
-    . '">webwml-stattrans</a></address>' . "\n";
+print HTMLI "<createdwith>\n";
 close (HTMLI);
 
 print "done.\n" if ($config{'verbose'});
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.