summaryrefslogtreecommitdiff
path: root/tools/genlang
diff options
context:
space:
mode:
Diffstat (limited to 'tools/genlang')
-rwxr-xr-xtools/genlang24
1 files changed, 16 insertions, 8 deletions
diff --git a/tools/genlang b/tools/genlang
index aa7e090c35..010a2b1303 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -230,9 +230,20 @@ if($english) {
230 push @phrase, $_; 230 push @phrase, $_;
231 if($_ =~ /^ *\<dest\>/i) { 231 if($_ =~ /^ *\<dest\>/i) {
232 $withindest=1; 232 $withindest=1;
233 $deststr="";
233 } 234 }
234 elsif($withindest && ($_ =~ /^ *\<\/dest\>/i)) { 235 elsif($withindest && ($_ =~ /^ *\<\/dest\>/i)) {
235 $withindest=0; 236 $withindest=0;
237
238 if($update || ($deststr && ($deststr !~ /^none\z/i))) {
239 # we unconditionally always use all IDs when the "update"
240 # feature is used
241 $id = $maybeid;
242 # print STDERR "DEST: use this id $id\n";
243 }
244 else {
245 # print "skip $maybeid for $name\n";
246 }
236 } 247 }
237 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) { 248 elsif($withindest && ($_ =~ / *([^:]+): *(.*)/)) {
238 my ($name, $val)=($1, $2); 249 my ($name, $val)=($1, $2);
@@ -240,13 +251,10 @@ if($english) {
240 # model name isn't "our" 251 # model name isn't "our"
241 dest($_, $name, $val); 252 dest($_, $name, $val);
242 253
243 # print STDERR "DEST: \"$dest\" for $name / $id\n"; 254 if($dest) {
244 255 # Store the current dest string. If this target matches
245 if($update || ($dest && ($dest !~ /^none\z/i))) { 256 # multiple strings, it will get updated several times.
246 # we unconditionally always use all IDs when the "update" 257 $deststr = $dest;
247 # feature is used
248 $id = $maybeid;
249 # print STDERR "DEST: use this id $id\n";
250 } 258 }
251 } 259 }
252 } 260 }
@@ -537,7 +545,7 @@ MOO
537 545
538 $name =~ s/\"//g; # cut off the quotes 546 $name =~ s/\"//g; # cut off the quotes
539 547
540 printf HFILE (" %s,\n", $name); 548 printf HFILE (" %s, /* %d */\n", $name, $i-1);
541 } 549 }
542 550
543# Output separation marker for last string ID and the upcoming voice IDs 551# Output separation marker for last string ID and the upcoming voice IDs