add Poruguese translator
[claws.git] / tools / claws.i18n.status.pl
index 6514458c6244e96066d6754b183083adf2cad7e8..b48fc57c7420ee501cc1a5d4b92e8146d9960e33 100644 (file)
@@ -2,63 +2,74 @@
 #
 # claws.i18n.stats.pl - Generate statistics for Claws Mail po directory.
 # 
-# (c) 2003 by Ricardo Mones Lastra <mones@aic.uniovi.es>
+# Copyright (C) 2003-2016 by Ricardo Mones <ricardo@mones.org>,
+#                            Paul Mangan <paul@claws-mail.org>
 # This program is released under the GNU General Public License.
 #
 # constants -----------------------------------------------------------------
 
 %langname = (
-       'bg.po' => 'Bulgarian',
+#      'bg.po' => 'Bulgarian',
        'ca.po' => 'Catalan',
-       'cs.po' => 'Czech',
+       'cs.po' => 'Czech',
+       'da.po' => 'Danish',
        'de.po' => 'German',
-       'el.po' => 'Greek',
        'en_GB.po' => 'British English',
+#      'eo.po' => 'Esperanto',
        'es.po' => 'Spanish',
        'fi.po' => 'Finnish',
        'fr.po' => 'French',
-       'hr.po' => 'Croatian',
+#      'he.po' => 'Hebrew',
        'hu.po' => 'Hungarian',
+       'id_ID.po' => 'Indonesian',
        'it.po' => 'Italian',
        'ja.po' => 'Japanese',
-       'ko.po' => 'Korean',
-       'nb.po' => 'Norwegian',
+#      'lt.po' => 'Lithuanian',
+       'nb.po' => 'Norwegian Bokm&aring;l',
        'nl.po' => 'Dutch',
        'pl.po' => 'Polish',
        'pt_BR.po' => 'Brazilian Portuguese',
+       'pt_PT.po' => 'Portuguese',
+       'ro.po' => 'Romanian',
        'ru.po' => 'Russian',
        'sk.po' => 'Slovak',
-       'sr.po' => 'Serbian',
        'sv.po' => 'Swedish',
-       'zh_CN.po' => 'Simpilified Chinese',
-       'zh_TW.po' => 'Taiwanese',
+       'tr.po' => 'Turkish',
+#      'uk.po' => 'Ukrainian',
+#      'zh_CN.po' => 'Simplified Chinese',
+       'zh_TW.po' => 'Traditional Chinese',
 );
 
 %lasttranslator = (
-       'bg.po' => 'Yasen Pramatarov <yasen@lindeas.com>',
-       'ca.po' => 'Miquel Oliete <ktalanet@yahoo.es>',
-       'cs.po' => 'Tim <timbrain@post.cz>',
-       'de.po' => 'Stephan Sachse <white@dev-zero.com>',
-       'el.po' => 'Stavros Giannouris  <stavrosg2002@freemail.gr>',
+#      'bg.po' => 'Yasen Pramatarov <yasen@lindeas.com>',
+       'ca.po' => 'David Medina <opensusecatala@gmail.com>',
+       'cs.po' => 'David Vachulka <david@konstrukce-cad.com>',
+       'da.po' => 'Erik P. Olsen <epodata@gmail.com>',
+       'de.po' => 'Simon Legner <simon.legner@gmail.com>',
        'en_GB.po' => 'Paul Mangan <paul@claws-mail.org>',
+#      'eo.po' => 'Sian Mountbatten <poenikatu@fastmail.co.uk>',
        'es.po' => 'Ricardo Mones Lastra <ricardo@mones.org>',
        'fi.po' => 'Flammie Pirinen <flammie@iki.fi>',
-       'fr.po' => 'Fabien Vantard <fzzzzz@gmail.com>',
-       'hr.po' => 'Dragan Leskovar <drleskov@inet.hr>',
-       'hu.po' => 'Pader Rezso <rezso@rezso.net>',
-       'it.po' => 'Andrea Spadaccini <a.spadaccini@catania.linux.it>',
-       'ja.po' => 'Rui Hirokawa <rui_hirokawa@ybb.ne.jp>',
-       'ko.po' => 'ChiDeok, Hwang <hwang@mizi.co.kr>',
-       'nb.po' => 'Geir Helland <pjallabais@users.sourceforge.net>',
-       'nl.po' => 'Tim Dijkstra <tim@famdijkstra.org>',
-       'pl.po' => 'Pawel Pekala <c0rn@o2.pl>',
+       'fr.po' => 'Tristan Chabredier <wwp@claws-mail.org>',
+#      'he.po' => 'Isratine Citizen <genghiskhan@gmx.ca>',
+       'hu.po' => 'P&aacute;der Rezs&#337; <rezso@rezso.net>',
+       'id_ID.po' => 'MSulchan Darmawan <bleketux@gmail.com>',
+       'it.po' => 'Luigi Votta <luigi.vtt@gmail.com>',
+       'ja.po' => 'UTUMI Hirosi <utuhiro78@yahoo.co.jp>',
+#      'lt.po' => 'Mindaugas Baranauskas <embar@super.lt>',
+       'nb.po' => 'Petter Adsen <petter@synth.no>',
+       'nl.po' => 'Marcel Pol <mpol@gmx.net>',
+       'pl.po' => 'Jakub Jankiewicz <jcubic@jcubic.pl>',
        'pt_BR.po' => 'Frederico Goncalves Guimaraes <fggdebian@yahoo.com.br>',
-       'ru.po' => 'Pavlo Bohmat <bohm@ukr.net>',
-       'sk.po' => 'Andrej Kacian <andrej@kacian.sk>',
-       'sr.po' => 'urke <urke@users.sourceforge.net>',
-       'sv.po' => 'Anders Trob&auml;ck <sylpheed@troback.com>',
-       'zh_CN.po' => 'Ralgh Young <bamanzi@gmail.com>',
-       'zh_TW.po' => 'Wei-Lun Chao <chaoweilun@pcmail.com.tw>',
+       'pt_PT.po' => 'Pedro Albuquerque <palbuquerque73@gmail.com>',
+       'ro.po' => 'Cristian Secar&#259; <liste@secarica.ro>',
+       'ru.po' => 'Mikhail Kurinnoi <viewizard@viewizard.com>',
+       'sk.po' => 'Slavko <slavino@slavino.sk>',
+       'sv.po' => 'Andreas Rönnquist <gusnan@openmailbox.org>',
+       'tr.po' => 'Numan Demirdöğen <if.gnu.linux@gmail.com>',
+#      'uk.po' => 'YUP <yupadmin@gmail.com>',
+#      'zh_CN.po' => 'Rob <rbnwmk@gmail.com>',
+       'zh_TW.po' => 'Mark Chang <mark.cyj@gmail.com>',
 );
 
 %barcolornorm = (
@@ -82,7 +93,7 @@
 $barwidth = 500; # pixels
 $barheight = 12; # pixels
 
-$transolddays = 90;    # days to consider a translation is old, so probably unmaintained.
+$transolddays = 120;   # days to consider a translation is old, so probably unmaintained.
 $transoldmonths = $transolddays / 30;
 $transneedthresold = 0.75; # percent/100
 
@@ -142,7 +153,6 @@ sub print_lang {
        $barlen3 = $barwidth - $barlen2 - $barlen;
        print "<td style='width:$barlen3", "px' bgcolor=\"$$barcolor{default}\"></td>\n";
        print "</tr>\n</table>\n</td>\n\n<td style='text-align: right'>", int(($trans / $total) * 10000) / 100,  "%</td>\n";
-       if (($lang eq $langname{'en_GB.po'}) or ($lang eq $averagestr)) { $trans = $total; } # hack for en_GB and average results
        $transtatus = (($trans / $total) < $transneedthresold)? '<font size="+1" color="red"> * </font>': '';
        print "<td>$transtatus</td>\n</tr>\n";
 }
@@ -191,7 +201,7 @@ closedir(PODIR);
 $alang = $atran = $afuzz = $auntr = $oddeven = 0;
 foreach $pofile (@sorted_pofiles) {
        $_ = $pofile;
-       if (/.+\.po$/) {
+       if (/.+\.po$/ && defined($langname{$pofile}) ) {
                print STDERR "Processing $_\n"; # be a little informative
                ++$alang;
                $transage = $tran = $fuzz = $untr = 0;
@@ -209,9 +219,16 @@ foreach $pofile (@sorted_pofiles) {
                $atran += $tran;
                $afuzz += $fuzz;
                $auntr += $untr;
-               $_ = `grep 'PO-Revision-Date:' $pofile | cut -f2 -d:`;
-               if (/\s+(\d+)\-(\d+)\-(\d+)/) { 
-                       $transage = get_trans_age($1,$2,$3); 
+               if ($pofile eq "en_GB.po") {
+                       $tran = $tran+$fuzz;
+                       $untr = "0";
+                       $fuzz = "0";
+                       $transage = $cage;
+               } else {
+                       $_ = `grep 'PO-Revision-Date:' $pofile | cut -f2 -d:`;
+                       if (/\s+(\d+)\-(\d+)\-(\d+)/) { 
+                               $transage = get_trans_age($1,$2,$3); 
+                       }
                }
                print_lang($langname{$pofile},$lasttranslator{$pofile},$tran,$fuzz,$untr,$transage, $oddeven);
                if ($oddeven == 1) { $oddeven = 0 } else { $oddeven++; } 
@@ -227,19 +244,19 @@ print "</table>\n";
 
 # end
 # print "<br>Number of languages supported: $alang <br>";
-print qq ~<p>
-         Languages marked with <font size="+1" color="red"> *</font>
-         really need your help to be completed.
-          <p>
-         The ones with grey bars are <i>probably unmaintained</i> because
-          translation is more than $transoldmonths months old, anyway, trying
-         to contact current translator first is usually a good idea before
-         submitting an updated one.<p><b>NOTE</b>: if you are the translator
-         of one of them and don't want to see your language bar in grey you
-         should manually update the <tt>PO-Revision-Date</tt> field in the .po
-         file header (or, alternatively, use a tool which does it for you).
-         <br>
-         </div>
+print qq ~<p>
+#        Languages marked with <font size="+1" color="red"> *</font>
+#        really need your help to be completed.
+          <p>
+#        The ones with grey bars are <i>probably unmaintained</i> because
+          translation is more than $transoldmonths months old, anyway, trying
+#        to contact current translator first is usually a good idea before
+#        submitting an updated one.<p><b>NOTE</b>: if you are the translator
+#        of one of them and don't want to see your language bar in grey you
+#        should manually update the <tt>PO-Revision-Date</tt> field in the .po
+#        file header (or, alternatively, use a tool which does it for you).
+#        <br>
+print qq ~</div>
          </div>~;
 
 # print `cat $pagetail`;