[qet] [1208] Trivial fixes in elements collection. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 1208
Author: xavier
Date: 2011-03-10 22:05:09 +0100 (Thu, 10 Mar 2011)
Log Message:
-----------
Trivial fixes in elements collection.
Slightly improved translations_stat script.
Modified Paths:
--------------
branches/0.3/elements/bornes/borne_continuite.elmt
branches/0.3/elements/variateurs_de_frequence/siemens/qet_directory
branches/0.3/misc/translations_stat.pl
Modified: branches/0.3/elements/bornes/borne_continuite.elmt
===================================================================
--- branches/0.3/elements/bornes/borne_continuite.elmt 2011-03-10 09:29:26 UTC (rev 1207)
+++ branches/0.3/elements/bornes/borne_continuite.elmt 2011-03-10 21:05:09 UTC (rev 1208)
@@ -7,7 +7,7 @@
<name lang="es">Punto de combinación</name>
<name lang="cs">Spojovací svorka</name>
<name lang="pt">Terminal de combinação</name>
- <name lang="pl" >Zacisk</name>
+ <name lang="pl">Zacisk</name>
<name lang="it">Terminale di unione</name>
</names>
<informations>Author: The QElectroTech team
Modified: branches/0.3/elements/variateurs_de_frequence/siemens/qet_directory
===================================================================
--- branches/0.3/elements/variateurs_de_frequence/siemens/qet_directory 2011-03-10 09:29:26 UTC (rev 1207)
+++ branches/0.3/elements/variateurs_de_frequence/siemens/qet_directory 2011-03-10 21:05:09 UTC (rev 1208)
@@ -1,8 +1,8 @@
<qet-directory>
<names>
- <name lang="en">Siemens</name>
+ <name lang="en">Siemens</name>
<name lang="fr">Siemens</name>
<name lang="pl">Siemens</name>
- <name lang="it"ZSiemens</name>
+ <name lang="it">Siemens</name>
</names>
</qet-directory>
Modified: branches/0.3/misc/translations_stat.pl
===================================================================
--- branches/0.3/misc/translations_stat.pl 2011-03-10 09:29:26 UTC (rev 1207)
+++ branches/0.3/misc/translations_stat.pl 2011-03-10 21:05:09 UTC (rev 1208)
@@ -130,6 +130,7 @@
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 @@
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'};
}
}