X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=tools%2Fclaws.i18n.status.pl;h=57da77f852644d9ab7a8f95c1746cb474a5a8bcd;hp=8ea745eb3a8fc8246da70743d91875fb6a0f6b48;hb=7930aa0c548776073af23f0012fc824a1bd8e6a1;hpb=51bd82c7afb703c360abf182035a0b345a70fe7e diff --git a/tools/claws.i18n.status.pl b/tools/claws.i18n.status.pl index 8ea745eb3..57da77f85 100644 --- a/tools/claws.i18n.status.pl +++ b/tools/claws.i18n.status.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# claws.i18n.stats.pl - Generate statistics for Sylpheed Claws po directory. +# claws.i18n.stats.pl - Generate statistics for Claws Mail po directory. # # (c) 2003 by Ricardo Mones Lastra # This program is released under the GNU General Public License. @@ -10,18 +10,13 @@ %langname = ( 'bg.po' => 'Bulgarian', 'ca.po' => 'Catalan', - 'cs.po' => 'Czech', 'de.po' => 'German', - 'el.po' => 'Greek', 'en_GB.po' => 'British English', 'es.po' => 'Spanish', 'fi.po' => 'Finnish', 'fr.po' => 'French', - 'hr.po' => 'Croatian', 'hu.po' => 'Hungarian', 'it.po' => 'Italian', - 'ja.po' => 'Japanese', - 'ko.po' => 'Korean', 'nl.po' => 'Dutch', 'pl.po' => 'Polish', 'pt_BR.po' => 'Brazilian Portuguese', @@ -30,33 +25,26 @@ 'sr.po' => 'Serbian', 'sv.po' => 'Swedish', 'zh_CN.po' => 'Simpilified Chinese', - 'zh_TW.Big5.po' => 'Taiwanese', ); %lasttranslator = ( - 'bg.po' => 'George Danchev ', - 'ca.po' => 'Miquel Oliete ', - 'cs.po' => 'Radek Vybíral ', - 'de.po' => 'Thomas Gilgin ', - 'el.po' => 'Michalis Kabrianis ', - 'en_GB.po' => 'Paul Mangan ', - 'es.po' => 'Ricardo Mones Lastra ', + 'bg.po' => 'Yasen Pramatarov ', + 'ca.po' => 'Miquel Oliete ', + 'de.po' => 'Stephan Sachse ', + 'en_GB.po' => 'Paul Mangan ', + 'es.po' => 'Ricardo Mones Lastra ', 'fi.po' => 'Flammie Pirinen ', - 'fr.po' => 'Fabien Vantard ', - 'hr.po' => 'Dragan Leskovar ', - 'hu.po' => 'Gál Zoltán ', + 'fr.po' => 'Tristan Chabredier ', + 'hu.po' => 'Páder Rezső ', 'it.po' => 'Andrea Spadaccini ', - 'ja.po' => 'Rui Hirokawa ', - 'ko.po' => 'ChiDeok, Hwang ', - 'nl.po' => 'Wilbert Berendsen ', - 'pl.po' => 'Emilian Nowak ', + 'nl.po' => 'Marcel Pol ', + 'pl.po' => 'Emilian Nowak ', 'pt_BR.po' => 'Frederico Goncalves Guimaraes ', - 'ru.po' => 'Pavlo Bohmat ', + 'ru.po' => 'Aleksei Miheev ', 'sk.po' => 'Andrej Kacian ', - 'sr.po' => 'urke ', - 'sv.po' => 'Joakim Andreasson ', - 'zh_CN.po' => 'Hansom Young ', - 'zh_TW.Big5.po' => 'Tsu-Fan Cheng ', + 'sr.po' => 'Aleksandar Urosevic ', + 'sv.po' => 'Lars Persson Fink ', + 'zh_CN.po' => 'Ralgh Young ', ); %barcolornorm = ( @@ -77,10 +65,11 @@ completed => 'red', ); -$barwidth = 300; # pixels +$barwidth = 500; # pixels $barheight = 12; # pixels -$transolddays = 90; # days to consider a translation is old, so probably unmaintained. +$transolddays = 90; # days to consider a translation is old, so probably unmaintained. +$transoldmonths = $transolddays / 30; $transneedthresold = 0.75; # percent/100 $msgfmt = '/usr/bin/msgfmt'; @@ -111,7 +100,7 @@ $cage = get_trans_age($year,$mon,$mday); # get current "age" # drawing a language status row sub print_lang { - my ($lang, $person, $trans, $fuzzy, $untrans, $tage) = @_; + my ($lang, $person, $trans, $fuzzy, $untrans, $tage, $oddeven) = @_; $total = $trans + $fuzzy + $untrans; if ($tage == 0) { $tage = $cage; } # hack for average translation print STDERR $cage, " ", $tage, "\n"; @@ -122,7 +111,9 @@ sub print_lang { } $_ = $person; if (/(.+)\s+\<(.+)\>/) { $pname = $1; $pemail = $2; } else { $pname = $pemail = $contactaddress; } - print "\n\n"; + print " 0) { print " bgcolor=#EFEFEF"; } + print ">\n\n"; if ($lang eq $averagestr) { print "$lang"; } else { @@ -150,7 +141,7 @@ sub tens { get_current_date(); # get project version from changelog (project dependent code :-/ ) -$_ = `head -1 ../ChangeLog-gtk2.claws`; +$_ = `head -1 ../ChangeLog`; if (/\S+\s+\S+\s+(\S+)/) { $genversion = $1; } else { $genversion = 'Unknown'; } $numlang = keys(%langname); @@ -163,10 +154,18 @@ $numlang = keys(%langname); #ENDOFHEAD # start -print "
\nTranslation Status (on $datetimenow for $genversion)\n
\n\n"; +print qq ~
+ Translation Status (on $datetimenow for $genversion) +
+
~; # table header -print "\n\n\n\n\n\n"; +print qq ~ + + + + + ~; # get files opendir(PODIR, ".") || die("Error: can't open current directory\n"); @@ -175,10 +174,10 @@ closedir(PODIR); @sorted_pofiles = sort(@pofiles); # iterate them -$alang = $atran = $afuzz = $auntr = 0; +$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; @@ -200,23 +199,34 @@ foreach $pofile (@sorted_pofiles) { if (/\s+(\d+)\-(\d+)\-(\d+)/) { $transage = get_trans_age($1,$2,$3); } - print_lang($langname{$pofile},$lasttranslator{$pofile},$tran,$fuzz,$untr,$transage); + print_lang($langname{$pofile},$lasttranslator{$pofile},$tran,$fuzz,$untr,$transage, $oddeven); + if ($oddeven == 1) { $oddeven = 0 } else { $oddeven++; } } } # average results for the project print "\n\n"; -print_lang($averagestr,'',$atran,$afuzz,$auntr,0); +print_lang($averagestr,'',$atran,$afuzz,$auntr,0,0); # table footer print "
LanguageTranslated|Fuzzy|UntranslatedPercent\n
LanguageTranslated|Fuzzy|UntranslatedPercent
\n"; # end # print "
Number of languages supported: $alang
"; -print "

\nLanguages marked with * really need your help to be completed.
"; -print "

The ones with grey bars are probably unmaintained because translation is more than ", $transolddays / 30, " months old, anyway, trying to contact current translator first is usually a good idea before submitting an updated one.

NOTE: 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 PO-Revision-Date field in the .po file header (or, alternatively, use a tool which does it for you).
"; -# print "If you want to help those or contribute any new language please contact us."; -print "

"; +print qq ~

+ Languages marked with * + really need your help to be completed. +

+ The ones with grey bars are probably unmaintained 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.

NOTE: 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 PO-Revision-Date field in the .po + file header (or, alternatively, use a tool which does it for you). +
+ + ~; # print `cat $pagetail`; #