summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/genlang23
1 files changed, 17 insertions, 6 deletions
diff --git a/tools/genlang b/tools/genlang
index 010a2b1303..4c0a9d6564 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -239,10 +239,10 @@ if($english) {
239 # we unconditionally always use all IDs when the "update" 239 # we unconditionally always use all IDs when the "update"
240 # feature is used 240 # feature is used
241 $id = $maybeid; 241 $id = $maybeid;
242 # print STDERR "DEST: use this id $id\n"; 242 # print "DEST: use this id $id\n";
243 } 243 }
244 else { 244 else {
245 # print "skip $maybeid for $name\n"; 245 # print "skip $maybeid for $name\n";
246 } 246 }
247 } 247 }
248 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) { 248 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) {
@@ -434,7 +434,7 @@ while(<LANG>) {
434 $source{$idstr}=$src; 434 $source{$idstr}=$src;
435 $dest{$idstr}=$dest; 435 $dest{$idstr}=$dest;
436 $voice{$idstr}=$voice; 436 $voice{$idstr}=$voice;
437 437
438 if($verbose) { 438 if($verbose) {
439 print "id: $phrase{id} ($idnum)\n"; 439 print "id: $phrase{id} ($idnum)\n";
440 print "source: $src\n"; 440 print "source: $src\n";
@@ -645,9 +645,15 @@ elsif($voiceout) {
645 # Now, make sure we get the number from the english sort order: 645 # Now, make sure we get the number from the english sort order:
646 $idnum = $idmap{$name}; 646 $idnum = $idmap{$name};
647 647
648 $engl[$idnum] = $i; 648 if(length($idnum)) {
649 $engl[$idnum] = $i;
649 650
650 # print "Input index $i output index $idnum\n"; 651 #print "Input index $i output index $idnum\n";
652 }
653 else {
654 # not used, mark it so
655 $engl[$i] = -1
656 }
651 657
652 } 658 }
653 } 659 }
@@ -655,10 +661,15 @@ elsif($voiceout) {
655 661
656 my $o = $engl[$i]; 662 my $o = $engl[$i];
657 663
664 if(($o < 0) || !length($o)) {
665 print "#$i\nid: NOT_USED_$i\nvoice: \"\"\n";
666 next;
667 }
668
658 my $name=$idnum[$o]; # get the ID 669 my $name=$idnum[$o]; # get the ID
659 my $dest = $voice{$name}; # get the destination voice string 670 my $dest = $voice{$name}; # get the destination voice string
660 671
661 print "#$i\nid: $name\nvoice: $dest\n"; 672 print "#$i ($o)\nid: $name\nvoice: $dest\n";
662 } 673 }
663 674
664} 675}