mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-05 20:19:58 +01:00
Trivial fixes in elements collection.
Slightly improved translations_stat script. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1208 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -130,6 +130,7 @@ sub get_pattern_count_in_file {
|
||||
|
||||
sub analyze_element_file {
|
||||
return if (($File::Find::name =~ m/\.svn/) || (! -f $_));
|
||||
return if ($_ !~ m/(^qet_directory|\.elmt)$/);
|
||||
|
||||
# One more element, count it
|
||||
our $elements_count;
|
||||
@@ -139,7 +140,7 @@ sub analyze_element_file {
|
||||
my $file = $_;
|
||||
our %languages;
|
||||
for my $lang_key (our @ordered_languages) {
|
||||
if (get_pattern_count_in_file('file' => $file, 'pattern' => sprintf('<name lang="%s">', $lang_key, 'limit' => 1)) == 1) {
|
||||
if (get_pattern_count_in_file('file' => $file, 'pattern' => sprintf('<name\s+lang="%s"\s*>', $lang_key, 'limit' => 1)) == 1) {
|
||||
++ $languages{$lang_key}{'translated_elements_count'};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user