forked from Mirrors/freeswitch
6987f2ab99
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5909 d0543943-73ff-0310-b7d9-9358b9ac24b2
26 lines
690 B
Perl
26 lines
690 B
Perl
#!/usr/bin/perl
|
|
#
|
|
# Phrase verification and generation script.
|
|
#
|
|
|
|
use XML::Simple;
|
|
use Data::Dumper;
|
|
|
|
my $ref = XMLin("phrase.xml");
|
|
|
|
foreach $language ( sort keys %{$ref}) {
|
|
foreach $item ( sort keys %{$ref->{$language}}) {
|
|
foreach $element ( sort keys %{$ref->{$language}->{$item}}) {
|
|
print "Language: $language, $item, $element\n";
|
|
system("mkdir -p $language/$item");
|
|
foreach $foo (@{$ref->{$language}->{$item}->{$element}}) {
|
|
print "filename: $language/$item/$foo->{filename} contains phrase \"$foo->{phrase}\"\n";
|
|
# insert command to verify or generate files here
|
|
system("swift -o $language/$item/$foo->{filename} \"$foo->{phrase}\"");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|