summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-27 16:17:33 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-27 16:56:18 -0400
commitcda5b055fe8399ca3565adee9a4a832fe9f489ed (patch)
treed748728471ca1098732df55babe288dd926b7c95
parent8159c9537fd2702719ebb31584c800b774976153 (diff)
downloadrockbox-cda5b05.tar.gz
rockbox-cda5b05.zip
updatelang: Fix a few straggling issues
Change-Id: I549a33c94c339151cf5a74f13a8ecb73454bbfd4
-rwxr-xr-xtools/updatelang26
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) {
foreach my $tgt (keys(%ep)) {
if (!defined($lp{$tgt})) {
# If it doesn't exist in the language, copy it from English
- $lang{$id}{'notes'} .= "### The <source> section for '$id:$tgt' is missing! Copying from english!\n";
-# print "#!! '$id:$tgt' source missing\n";
+ if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) {
+ $lang{$id}{'notes'} .= "### The <source> section for '$id:$tgt' is missing! Copying from english!\n";
+# print "#!! '$id:$tgt' source missing\n";
+ }
$lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt};
} elsif ($lp{$tgt} ne $ep{$tgt}) {
# If the source string differs, complain, and copy from English
@@ -332,22 +334,24 @@ foreach my $id (@langorder) {
foreach my $tgt (keys(%ep)) {
if (!defined($lp{$tgt})) {
# If it doesn't exist in the language, copy it from English
- $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is missing! Copying from english\n";
-# print "#!! '$id:$tgt' dest missing\n";
+ if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) {
+ $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is missing! Copying from english\n";
+# print "#!! '$id:$tgt' dest missing\n";
+ }
$lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt};
} elsif ($lp{$tgt} ne $ep{$tgt}) {
# If the source string differs, complain, and copy from English
if ($lp{$tgt} eq '' && $ep{$tgt} ne '') {
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is blank! Copying from english!\n";
# print "#!! '$id:$tgt' dest is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
- $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt};
+ $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt};
} elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') {
# It should be kept blank!
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is not blank!\n";
$lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
$lang{$id}{'notes'} .= "### $english{$id}{dest}{$tgt}\n";
# print "#!! '$id:$tgt' dest not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
- $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt};
+ $lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt};
}
} elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) {
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\n";
@@ -379,22 +383,24 @@ foreach my $id (@langorder) {
foreach my $tgt (keys(%ep)) {
if (!defined($lp{$tgt})) {
# If it doesn't exist in the language, copy it from English
- $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is missing! Copying from english\n";
-# print "#!! '$id:$tgt' voice missing\n";
+ if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) {
+ $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is missing! Copying from english\n";
+# print "#!! '$id:$tgt' voice missing\n";
+ }
$lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
} elsif ($lp{$tgt} ne $ep{$tgt}) {
if ($lp{$tgt} eq '' && $ep{$tgt} ne '') {
# If the lang voice string is blank, complain, and copy from English
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is blank! Copying from english!\n";
# print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
- $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt};
+ $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
} elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') {
# If it's not blank, clear it and complain!
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n";
$lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
$lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n";
# print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
- $lang{$id}{'source'}{$tgt} = $english{$id}{'source'}{$tgt};
+ $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
}
} elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'}) {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n";