diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-09-29 10:54:10 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-09-29 10:54:19 -0400 |
commit | 5883cb4a5254048d59a2d600b5f63b8d1c06d306 (patch) | |
tree | 5674995d93c88ae9934454c897c2a89fde611585 | |
parent | 757766e807e2922950ce9f274a0feb2b304343f1 (diff) | |
download | rockbox-5883cb4a52.tar.gz rockbox-5883cb4a52.zip |
languages: Prefer the translated <dest> over a <voice> that is identical to English
A lot of our translations have voice phrases that are identical
to English, even though they are translated in the display text.
In these scenarios, just use the translated text when generating
the voice files. These will still be flagged as problems by the
translation web site!
Change-Id: I39a9888eaad650e4c847cccc60bd89cf44ae150a
-rwxr-xr-x | tools/updatelang | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/updatelang b/tools/updatelang index 2c2b1e1d3b..61d57de532 100755 --- a/tools/updatelang +++ b/tools/updatelang @@ -388,8 +388,14 @@ foreach my $id (@langorder) { } } } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'} && !$ignoredups) { - $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n"; # print "#!! '$id:$tgt' voice identical ('$lp{$tgt}')\n"; + if ($lang{$id}{'dest'}{$tgt} ne '' && + $lang{$id}{'dest'}{$tgt} ne $english{$id}{'dest'}{$tgt}) { + $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english, copying translated <dest>\n"; + $lang{$id}{'voice'}{$tgt} = $lang{$id}{'dest'}{$tgt}; + } else { + $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n"; + } } } } |