From 5883cb4a5254048d59a2d600b5f63b8d1c06d306 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 29 Sep 2021 10:54:10 -0400 Subject: languages: Prefer the translated over a 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 --- tools/updatelang | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 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 section for '$id:$tgt' is identical to english, copying translated \n"; + $lang{$id}{'voice'}{$tgt} = $lang{$id}{'dest'}{$tgt}; + } else { + $lang{$id}{'notes'} .= "### The section for '$id:$tgt' is identical to english!\n"; + } } } } -- cgit v1.2.3