File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ # !/usr/bin/perl
2+
3+ use strict;
4+ use Locale::Language;
5+ use Locale::Country;
6+
7+ print " Language;Count;Translated;Translated_finished;translated_unfinished;untranslated;part\n " ;
8+
9+ for my $i (<i18n/qgis_*.ts>) {
10+ my ($langcode ) = $i =~ / i18n\/ qgis_(.*).ts/ ;
11+
12+ my $name ;
13+ if ($langcode =~ / (.*)_(.*)/ ) {
14+ my $lang = code2language(lc $1 );
15+ my $country = code2country(lc $2 );
16+ $name = " $lang ($country )" ;
17+ } else {
18+ $name = code2language(lc $langcode );
19+ }
20+
21+
22+ open F, " lrelease $i |" ;
23+
24+ my ($translations ,$finished ,$unfinished ,$untranslated );
25+
26+ while (<F>) {
27+ if (/ Generated (\d +) translation\( s\) \( (\d +) finished and (\d +) unfinished\) / ) {
28+ $translations =$1 ;
29+ $finished =$2 ;
30+ $unfinished =$3 ;
31+ } elsif (/ Ignored (\d +) untranslated source text\( s\) / ) {
32+ $untranslated =$1 ;
33+ }
34+ }
35+
36+ close F;
37+
38+ my $n = $translations +$untranslated ;
39+
40+ print " $name ;$n ;$translations ;$finished ;$unfinished ;$untranslated ;" . sprintf (" %.1f%" , ($n -$untranslated )/$n *100) . " \n " ;
41+ }
42+
43+ __END__
44+ Updating 'qgis_de.qm'...
45+ Generated 3300 translation(s) (1217 finished and 2083 unfinished)
46+ Ignored 8 untranslated source text(s)
You can’t perform that action at this time.
0 commit comments