[Debian-l10n-commits] r1810 - in /dl10n/trunk: Changelog dl10n-pts

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Thu Jul 23 12:10:51 UTC 2009


Author: nekral-guest
Date: Thu Jul 23 12:10:48 2009
New Revision: 1810

URL: http://svn.debian.org/wsvn/?sc=1&rev=1810
Log:
	* dl10n-pts: Added tests for packages with no up-to-date
	po-debconf translation and less than 5 po-debconf translations.

Modified:
    dl10n/trunk/Changelog
    dl10n/trunk/dl10n-pts

Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1810&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Thu Jul 23 12:10:48 2009
@@ -1,3 +1,8 @@
+2009-07-23  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* dl10n-pts: Added tests for packages with no up-to-date
+	po-debconf translation and less than 5 po-debconf translations.
+
 2009-07-23  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* dl10n-pts: Only display the categories where a PO file exist.

Modified: dl10n/trunk/dl10n-pts
URL: http://svn.debian.org/wsvn/dl10n/trunk/dl10n-pts?rev=1810&op=diff
==============================================================================
--- dl10n/trunk/dl10n-pts (original)
+++ dl10n/trunk/dl10n-pts Thu Jul 23 12:10:48 2009
@@ -214,17 +214,6 @@
     if (defined $errors{$pkg}) {
         $todo = 1;
     }
-    print PKGLIST "$pkg ".
-                  $data->version($pkg).
-                  " (".
-                  output_percent($global_score{$pkg}{debian}).
-                  ",".
-                  output_percent($global_score{$pkg}{nondebian}).
-                  ") ".
-                  "http://i18n.debian.net/l10n-pkg-status/$pkgstatus".
-                  " ".
-                  $todo.
-                  "\n";
     $pkgstatus = "$GENDIR/".$pkgstatus;
     unless (-d "$GENDIR/".pkg_letter($pkg)) {
         mkdir "$GENDIR/".pkg_letter($pkg);
@@ -259,6 +248,66 @@
     </div>
 EOF
     }
+    if (defined $score{$pkg}{"podebconf"}) {
+        my $msg = "";
+        # Check if there are no up to date languages
+        my $uptodate = 0;
+        foreach my $lang (keys %{$score{$pkg}{"podebconf"}}) {
+            if (    ($score{$pkg}{"podebconf"}{$lang} =~ m/^([0-9]+)t0f0u$/)
+                and ($1 ne "0")) {
+                $uptodate = 1;
+                $todo = 1;
+            }
+        }
+        if (not $uptodate) {
+            $msg = <<EOF;
+    <div>
+      There are no up-to-date PO files in your package.
+      You should call for translations before uploading to unstable.
+    </div>
+EOF
+        }
+        my $languages = scalar (keys %{$score{$pkg}{"podebconf"}}) - 2;
+        if ($languages < 5) {
+            # There are at least 5 very active translation teams:
+            # es,de,pt,sv,cs
+            $todo = 1;
+            $msg = <<EOF;
+    <div>
+      You debconf templates are translated in only $languages languages.
+      You should send a call for translations.
+    </div>
+EOF
+        }
+        if (length $msg) {
+            print PKGSTATUS <<EOF;
+    <h1>Call for translation needed for package $pkg</h1>
+$msg
+    <div>
+      You can send a call for translation using the podebconf-report-po
+      command (package po-debconf):
+      <pre style="border-style:solid;border-width:1px">
+
+        cd &lt;po directory&gt;
+        podebconf-report-po --call
+      </pre>
+    </div>
+EOF
+        }
+    }
+
+    print PKGLIST "$pkg ".
+                  $data->version($pkg).
+                  " (".
+                  output_percent($global_score{$pkg}{debian}).
+                  ",".
+                  output_percent($global_score{$pkg}{nondebian}).
+                  ") ".
+                  "http://i18n.debian.net/l10n-pkg-status/$pkgstatus".
+                  " ".
+                  $todo.
+                  "\n";
+
     print PKGSTATUS <<EOF;
     <h1>Translation status of package $pkg</h1>
     <table>




More information about the Debian-l10n-commits mailing list