mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-13 13:20:03 +02:00
Improved the translation statistics script so that it displays any collection item having two identical "lang" attributes.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1358 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -140,8 +140,11 @@ sub analyze_element_file {
|
|||||||
my $file = $_;
|
my $file = $_;
|
||||||
our %languages;
|
our %languages;
|
||||||
for my $lang_key (our @ordered_languages) {
|
for my $lang_key (our @ordered_languages) {
|
||||||
if (get_pattern_count_in_file('file' => $file, 'pattern' => sprintf('<name\s+lang="%s"\s*>', $lang_key, 'limit' => 1)) == 1) {
|
my $translations_count = get_pattern_count_in_file('file' => $file, 'pattern' => sprintf('<name\s+lang="%s"\s*>', $lang_key));
|
||||||
|
if ($translations_count == 1) {
|
||||||
++ $languages{$lang_key}{'translated_elements_count'};
|
++ $languages{$lang_key}{'translated_elements_count'};
|
||||||
|
} elsif ($translations_count > 1) {
|
||||||
|
print STDERR "Multiple translation in $File::Find::name\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user