2007-10-16 14:44:20 -04:00
|
|
|
#!/usr/bin/perl
|
|
|
|
#
|
|
|
|
# Phrase verification and generation script.
|
|
|
|
#
|
|
|
|
|
|
|
|
use XML::Simple;
|
|
|
|
use Data::Dumper;
|
|
|
|
|
2008-09-22 04:55:01 -04:00
|
|
|
my $ref = XMLin("phrase_en.xml");
|
2007-10-16 14:44:20 -04:00
|
|
|
|
|
|
|
foreach $language ( sort keys %{$ref}) {
|
|
|
|
foreach $item ( sort keys %{$ref->{$language}}) {
|
|
|
|
foreach $element ( sort keys %{$ref->{$language}->{$item}}) {
|
2008-09-22 04:55:01 -04:00
|
|
|
#print "Language: $language, $item, $element\n";
|
2007-10-16 15:13:48 -04:00
|
|
|
system("mkdir -p $language/$item");
|
2007-10-16 14:44:20 -04:00
|
|
|
foreach $foo (@{$ref->{$language}->{$item}->{$element}}) {
|
2008-09-22 04:55:01 -04:00
|
|
|
#print "filename: $language/$item/$foo->{filename} contains phrase \"$foo->{phrase}\"\n";
|
2007-10-16 14:44:20 -04:00
|
|
|
# insert command to verify or generate files here
|
2008-09-22 04:55:01 -04:00
|
|
|
print "$item/8000/$foo->{filename}\n";
|
2007-10-16 14:44:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|