-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10294 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
jef
committed
Mar 19, 2009
1 parent
b05f5ea
commit 913cb37
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use Locale::Language; | ||
use Locale::Country; | ||
|
||
print "Language;Count;Translated;Translated_finished;translated_unfinished;untranslated;part\n"; | ||
|
||
for my $i (<i18n/qgis_*.ts>) { | ||
my ($langcode) = $i =~ /i18n\/qgis_(.*).ts/; | ||
|
||
my $name; | ||
if($langcode =~ /(.*)_(.*)/) { | ||
my $lang = code2language(lc $1); | ||
my $country = code2country(lc $2); | ||
$name = "$lang ($country)"; | ||
} else { | ||
$name = code2language(lc $langcode); | ||
} | ||
|
||
|
||
open F, "lrelease $i|"; | ||
|
||
my($translations,$finished,$unfinished,$untranslated); | ||
|
||
while(<F>) { | ||
if(/Generated (\d+) translation\(s\) \((\d+) finished and (\d+) unfinished\)/) { | ||
$translations=$1; | ||
$finished=$2; | ||
$unfinished=$3; | ||
} elsif(/Ignored (\d+) untranslated source text\(s\)/) { | ||
$untranslated=$1; | ||
} | ||
} | ||
|
||
close F; | ||
|
||
my $n = $translations+$untranslated; | ||
|
||
print "$name;$n;$translations;$finished;$unfinished;$untranslated;" . sprintf("%.1f%", ($n-$untranslated)/$n*100) . "\n"; | ||
} | ||
|
||
__END__ | ||
Updating 'qgis_de.qm'... | ||
Generated 3300 translation(s) (1217 finished and 2083 unfinished) | ||
Ignored 8 untranslated source text(s) |