Skip to content
Permalink
Browse files
tstat.pl: switch to Locales
(cherry picked from commit 8dde0b1)
  • Loading branch information
jef-n committed Jun 26, 2021
1 parent 702c3be commit 0a45e7fb60ed3e143c6749e305dda747c6152812
Showing with 8 additions and 14 deletions.
  1. +4 −4 doc/TRANSLATORS
  2. +4 −10 scripts/tsstat.pl
@@ -4,12 +4,12 @@
<tr><td align="center"><img src="qrc:/images/flags/de.svg" height="20"></td><td>German</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>Jürgen E. Fischer, Stephan Holl, Otto Dassau, Werner Macho</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/eu.svg" height="20"></td><td>Basque</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>Asier Sarasua Garmendia, Irantzu Alvarez</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ja.svg" height="20"></td><td>Japanese</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>BABA Yoshihiko, Yoichi Kayama, Minoru Akagi, Takayuki Nuimura, Takayuki Mizutani, Norihiro Yamate, Kohei Tomita</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/nb.svg" height="20"></td><td>Norwegian Bokmal</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>James Stott, Maléne Peterson, Kjell Cato Heskjestad</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/nb.svg" height="20"></td><td>Norwegian Bokmål</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>James Stott, Maléne Peterson, Kjell Cato Heskjestad</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/nl.svg" height="20"></td><td>Dutch</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>Richard Duivenvoorde, Raymond Nijssen, Carlo van Rijswijk, Diethard Jansen, Willem Hoffmans, Dick Groskamp</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/zh-Hans.svg" height="20"></td><td>Chinese simplified</td><td><div title="finished:30377 unfinished:0 untranslated:1" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>Calvin Ngei, Lisashen, Wang Shuai, Xu Baocai</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/it.svg" height="20"></td><td>Italian</td><td><div title="finished:30364 unfinished:0 untranslated:14" class="bartodo"><div class="bardone" style="width:99px">100.0</div></div></td><td>Marco Braida, Stefano Campus, Roberta Castelli, Francesco D'Amore, Eleonora D'Elia, Simone Falceri, Giulio Fattori, Matteo Ghetta, Federico Gianoli, Marco Grisolia, Italang, Luca76, Pipep, Valerio Pinna, Alberto Vallortigara, Giuseppe Mattiozzi (documentation)</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ko.svg" height="20"></td><td>Korean</td><td><div title="finished:29207 unfinished:0 untranslated:1171" class="bartodo"><div class="bardone" style="width:96px">96.1</div></div></td><td>OSGeo Korean Chapter</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/pt_BR.svg" height="20"></td><td>Portuguese (Brazil)</td><td><div title="finished:28218 unfinished:0 untranslated:2160" class="bartodo"><div class="bardone" style="width:92px">92.9</div></div></td><td>Sidney Schaberle Goveia, Arthur Nanni, Marcelo Soares Souza, Narcélio de Sá Pereira Filho, Leônidas Descovi Filho, Felipe Sodré Barros </td></tr>
<tr><td align="center"><img src="qrc:/images/flags/pt_BR.svg" height="20"></td><td>Brazilian Portuguese</td><td><div title="finished:28218 unfinished:0 untranslated:2160" class="bartodo"><div class="bardone" style="width:92px">92.9</div></div></td><td>Sidney Schaberle Goveia, Arthur Nanni, Marcelo Soares Souza, Narcélio de Sá Pereira Filho, Leônidas Descovi Filho, Felipe Sodré Barros </td></tr>
<tr><td align="center"><img src="qrc:/images/flags/sv.svg" height="20"></td><td>Swedish</td><td><div title="finished:27939 unfinished:0 untranslated:2439" class="bartodo"><div class="bardone" style="width:91px">92.0</div></div></td><td>Victor Axbom, Lars Luthman, Magnus Homann, Klas Karlsson, Isabelle J Wigren, Daniel Rosander, Anders Ekwall, Magnus Nilsson, Jonas Svensson, Christian Brinkenberg</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/fr.svg" height="20"></td><td>French</td><td><div title="finished:27452 unfinished:0 untranslated:2926" class="bartodo"><div class="bardone" style="width:90px">90.4</div></div></td><td>Arnaud Morvan, Augustin Roche, Didier Vanden Berghe, Dofabien, Etienne Trimaille, Harrissou Sant-anna, Jean-Roc Morreale, Jérémy Garniaux, Loïc Buscoz, Lsam, Marc-André Saia, Marie Silvestre, Mathieu Bossaert, Mathieu Lattes, Mayeul Kauffmann, Médéric Ribreux, Mehdi Semchaoui, Michael Douchin, Nicolas Boisteault, Nicolas Rochard, Pascal Obstetar, Robin Prest, Rod Bera, Stéphane Henriod, Stéphane Possamai, sylther, Sylvain Badey, Sylvain Maillard, Vincent Picavet, Xavier Tardieu, Yann Leveille-Menez, yoda89, Vincent Bré</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/hu.svg" height="20"></td><td>Hungarian</td><td><div title="finished:26485 unfinished:0 untranslated:3893" class="bartodo"><div class="bardone" style="width:87px">87.2</div></div></td><td>Zoltan Siki, Zoltan Toldi</td></tr>
@@ -19,7 +19,7 @@
<tr><td align="center"><img src="qrc:/images/flags/es.svg" height="20"></td><td>Spanish</td><td><div title="finished:24312 unfinished:0 untranslated:6066" class="bartodo"><div class="bardone" style="width:80px">80.0</div></div></td><td>Carlos Dávila, Javier César Aldariz, Gabriela Awad, Edwin Amado, Mayeul Kauffmann, Diana Galindo, Fran Raga</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ro.svg" height="20"></td><td>Romanian</td><td><div title="finished:23925 unfinished:0 untranslated:6453" class="bartodo"><div class="bardone" style="width:78px">78.8</div></div></td><td>Sorin Călinică, Tudor Bărăscu, Georgiana Ioanovici, Alex Bădescu, Lonut Losifescu-Enescu, Bogdan Pacurar</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/cs.svg" height="20"></td><td>Czech</td><td><div title="finished:23407 unfinished:0 untranslated:6971" class="bartodo"><div class="bardone" style="width:77px">77.1</div></div></td><td>Jan Helebrant, Martin Landa, Peter Antolik, Martin Dzurov, Stanislav Horáček</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/pt_PT.svg" height="20"></td><td>Portuguese (Portugal)</td><td><div title="finished:22866 unfinished:0 untranslated:7512" class="bartodo"><div class="bardone" style="width:75px">75.3</div></div></td><td>Giovanni Manghi, Joana Simões, Duarte Carreira, Alexandre Neto, Pedro Pereira, Pedro Palheiro, Nelson Silva, Ricardo Sena, Leandro Infantini, João Gaspar, José Macau</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/pt_PT.svg" height="20"></td><td>Iberian Portuguese</td><td><div title="finished:22866 unfinished:0 untranslated:7512" class="bartodo"><div class="bardone" style="width:75px">75.3</div></div></td><td>Giovanni Manghi, Joana Simões, Duarte Carreira, Alexandre Neto, Pedro Pereira, Pedro Palheiro, Nelson Silva, Ricardo Sena, Leandro Infantini, João Gaspar, José Macau</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/lt.svg" height="20"></td><td>Lithuanian</td><td><div title="finished:20818 unfinished:0 untranslated:9560" class="bartodo"><div class="bardone" style="width:68px">68.5</div></div></td><td>Paulius Litvinas, Tomas Straupis, Kestas M</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/uk.svg" height="20"></td><td>Ukrainian</td><td><div title="finished:20727 unfinished:0 untranslated:9651" class="bartodo"><div class="bardone" style="width:68px">68.2</div></div></td><td>Alexander Bruy, Daria Svidzinska, Svitlana Shulik, Alesya Shushova</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ru.svg" height="20"></td><td>Russian</td><td><div title="finished:18472 unfinished:0 untranslated:11906" class="bartodo"><div class="bardone" style="width:60px">60.8</div></div></td><td>Alexander Bruy, Artem Popov</td></tr>
@@ -35,4 +35,4 @@
<tr><td align="center"><img src="qrc:/images/flags/sc.svg" height="20"></td><td>Sardinian</td><td><div title="finished:12049 unfinished:0 untranslated:18329" class="bartodo"><div class="bardone" style="width:39px">39.7</div></div></td><td>Valerio Pinna</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/zh-Hant.svg" height="20"></td><td>Chinese traditional</td><td><div title="finished:11410 unfinished:0 untranslated:18968" class="bartodo"><div class="bardone" style="width:37px">37.6</div></div></td><td>Calvin Ngei, Zhang Jun, Richard Xie, Dennis Raylin Chen</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/lv.svg" height="20"></td><td>Latvian</td><td><div title="finished:11334 unfinished:0 untranslated:19044" class="bartodo"><div class="bardone" style="width:37px">37.3</div></div></td><td>Maris Nartiss, Pēteris Brūns</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/el.svg" height="20"></td><td>Modern Greek (1453-)</td><td><div title="finished:10786 unfinished:1 untranslated:19591" class="bartodo"><div class="bardone" style="width:35px">35.5</div></div></td><td>Theodoros Vakkas, Ioannis Tsimpiris, Evripidis Argyropoulos, Mike Pegnigiannis, Nikos Ves</td></tr></table>
<tr><td align="center"><img src="qrc:/images/flags/el.svg" height="20"></td><td>Greek</td><td><div title="finished:10786 unfinished:1 untranslated:19591" class="bartodo"><div class="bardone" style="width:35px">35.5</div></div></td><td>Theodoros Vakkas, Ioannis Tsimpiris, Evripidis Argyropoulos, Mike Pegnigiannis, Nikos Ves</td></tr></table>
@@ -16,8 +16,7 @@

use strict;
use warnings;
use Locale::Language;
use Locale::Country;
use Locales;

my @lang;

@@ -99,6 +98,8 @@

my $maxn;

my $locale = Locales->new("en_US");

for my $i (<i18n/qgis_*.ts>) {
my ($langcode) = $i =~ /i18n\/qgis_(.*).ts/;
next if $langcode eq "en";
@@ -121,15 +122,8 @@
$charset = " traditional";
$langcode = $1;
}
my $name;
if($langcode =~ /(.*)_(.*)/) {
my $lang = code2language(lc $1);
my $country = code2country(lc $2);
$name = "$lang ($country)";
} else {
$name = code2language(lc $langcode);
}

my $name = $locale->get_language_from_code($langcode);
$name .= $charset;

open F, "lrelease $i|";

0 comments on commit 0a45e7f

Please sign in to comment.