diff options
-rwxr-xr-x | tools/updatelang | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tools/updatelang b/tools/updatelang index cbeb3ff25c..df8f7e8aa4 100755 --- a/tools/updatelang +++ b/tools/updatelang | |||
@@ -295,8 +295,10 @@ foreach my $id (@langorder) { | |||
295 | foreach my $tgt (keys(%ep)) { | 295 | foreach my $tgt (keys(%ep)) { |
296 | if (!defined($lp{$tgt})) { | 296 | if (!defined($lp{$tgt})) { |
297 | # If it doesn't exist in the language, copy it from English | 297 | # If it doesn't exist in the language, copy it from English |
298 | $lang{$id}{'notes'} .= "### The <source> section for '$id:$tgt' is missing! Copying from english!\n"; | 298 | if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) { |
299 | # print "#!! '$id:$tgt' source missing\n"; | 299 | $lang{$id}{'notes'} .= "### The <source> section for '$id:$tgt' is missing! Copying from english!\n"; |
300 | # print "#!! '$id:$tgt' source missing\n"; | ||
301 | } | ||
300 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; | 302 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; |
301 | } elsif ($lp{$tgt} ne $ep{$tgt}) { | 303 | } elsif ($lp{$tgt} ne $ep{$tgt}) { |
302 | # If the source string differs, complain, and copy from English | 304 | # If the source string differs, complain, and copy from English |
@@ -332,22 +334,24 @@ foreach my $id (@langorder) { | |||
332 | foreach my $tgt (keys(%ep)) { | 334 | foreach my $tgt (keys(%ep)) { |
333 | if (!defined($lp{$tgt})) { | 335 | if (!defined($lp{$tgt})) { |
334 | # If it doesn't exist in the language, copy it from English | 336 | # If it doesn't exist in the language, copy it from English |
335 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is missing! Copying from english\n"; | 337 | if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) { |
336 | # print "#!! '$id:$tgt' dest missing\n"; | 338 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is missing! Copying from english\n"; |
339 | # print "#!! '$id:$tgt' dest missing\n"; | ||
340 | } | ||
337 | $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt}; | 341 | $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt}; |
338 | } elsif ($lp{$tgt} ne $ep{$tgt}) { | 342 | } elsif ($lp{$tgt} ne $ep{$tgt}) { |
339 | # If the source string differs, complain, and copy from English | 343 | # If the source string differs, complain, and copy from English |
340 | if ($lp{$tgt} eq '' && $ep{$tgt} ne '') { | 344 | if ($lp{$tgt} eq '' && $ep{$tgt} ne '') { |
341 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is blank! Copying from english!\n"; | 345 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is blank! Copying from english!\n"; |
342 | # print "#!! '$id:$tgt' dest is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; | 346 | # print "#!! '$id:$tgt' dest is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; |
343 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; | 347 | $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt}; |
344 | } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') { | 348 | } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') { |
345 | # It should be kept blank! | 349 | # It should be kept blank! |
346 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is not blank!\n"; | 350 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is not blank!\n"; |
347 | $lang{$id}{'notes'} .= "### the previously used one is commented below:\n"; | 351 | $lang{$id}{'notes'} .= "### the previously used one is commented below:\n"; |
348 | $lang{$id}{'notes'} .= "### $english{$id}{dest}{$tgt}\n"; | 352 | $lang{$id}{'notes'} .= "### $english{$id}{dest}{$tgt}\n"; |
349 | # print "#!! '$id:$tgt' dest not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; | 353 | # print "#!! '$id:$tgt' dest not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; |
350 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; | 354 | $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt}; |
351 | } | 355 | } |
352 | } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) { | 356 | } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) { |
353 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\n"; | 357 | $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\n"; |
@@ -379,22 +383,24 @@ foreach my $id (@langorder) { | |||
379 | foreach my $tgt (keys(%ep)) { | 383 | foreach my $tgt (keys(%ep)) { |
380 | if (!defined($lp{$tgt})) { | 384 | if (!defined($lp{$tgt})) { |
381 | # If it doesn't exist in the language, copy it from English | 385 | # If it doesn't exist in the language, copy it from English |
382 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is missing! Copying from english\n"; | 386 | if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) { |
383 | # print "#!! '$id:$tgt' voice missing\n"; | 387 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is missing! Copying from english\n"; |
388 | # print "#!! '$id:$tgt' voice missing\n"; | ||
389 | } | ||
384 | $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; | 390 | $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; |
385 | } elsif ($lp{$tgt} ne $ep{$tgt}) { | 391 | } elsif ($lp{$tgt} ne $ep{$tgt}) { |
386 | if ($lp{$tgt} eq '' && $ep{$tgt} ne '') { | 392 | if ($lp{$tgt} eq '' && $ep{$tgt} ne '') { |
387 | # If the lang voice string is blank, complain, and copy from English | 393 | # If the lang voice string is blank, complain, and copy from English |
388 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is blank! Copying from english!\n"; | 394 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is blank! Copying from english!\n"; |
389 | # print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; | 395 | # print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; |
390 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; | 396 | $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; |
391 | } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') { | 397 | } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') { |
392 | # If it's not blank, clear it and complain! | 398 | # If it's not blank, clear it and complain! |
393 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n"; | 399 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n"; |
394 | $lang{$id}{'notes'} .= "### the previously used one is commented below:\n"; | 400 | $lang{$id}{'notes'} .= "### the previously used one is commented below:\n"; |
395 | $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n"; | 401 | $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n"; |
396 | # print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; | 402 | # print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; |
397 | $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt}; | 403 | $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; |
398 | } | 404 | } |
399 | } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) { | 405 | } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) { |
400 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n"; | 406 | $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n"; |