summaryrefslogtreecommitdiffstats
path: root/tools/updatelang
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-11-17 10:02:11 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-11-17 11:06:09 -0500
commit7ff3c94e1340f6a78b232a631832c8fd4199a00a (patch)
treeeee016e03eced95e017a26e2cf8042fb202aba78 /tools/updatelang
parent0400a391d3138800752c4301070c65707043034d (diff)
downloadrockbox-7ff3c94e1340f6a78b232a631832c8fd4199a00a.tar.gz
rockbox-7ff3c94e1340f6a78b232a631832c8fd4199a00a.tar.bz2
rockbox-7ff3c94e1340f6a78b232a631832c8fd4199a00a.zip
lang: Make all swcodec &| lcd_bitmap strings default.
Change-Id: Id0a3282884c3e258c5b2f24b35aa7e618a8e8bbe
Diffstat (limited to 'tools/updatelang')
-rwxr-xr-xtools/updatelang20
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/updatelang b/tools/updatelang
index 62e7c327b6..de17e2248e 100755
--- a/tools/updatelang
+++ b/tools/updatelang
@@ -59,6 +59,14 @@ sub parselangfile {
my @targets = split(',', $1);
foreach (@targets) {
my $l = trim($_);
+
+ # Strip out some keys
+# if ($l eq "swcodec") {
+# $l = "*";
+# } elsif ($l eq "lcd_bitmap") {
+# $l = "*";
+# }
+
$thisphrase{$pos}->{$l} = $2;
}
}
@@ -220,11 +228,15 @@ foreach my $id (@langorder) {
}
}
+ if (!defined($ep{'user'}) || length($ep{'user'}) == 0) {
+ $lp{'user'} = 'core';
+ }
+
if (!defined($lp{'user'}) || $lp{'user'} ne $ep{'user'}) {
- if (!defined($lp{'user'})) {
+ $lang{$id}{'notes'} .= "### The 'user' field for '$id' differs from the english!\n### the previously used desc is commented below:\n### desc: $lp{user}\n";
+ if (!defined($lp{'user'}) || length($lp{'user'}) == 0) {
$lp{'user'} = $ep{'user'};
}
- $lang{$id}{'notes'} .= "### The 'user' field for '$id' differs from the english!\n### the previously used desc is commented below:\n### desc: $lp{user}\n";
$lang{$id}{'phrase'}{'user'} = $english{$id}{'phrase'}{'user'};
# print "#!! '$id' changed user\n";
}
@@ -389,6 +401,10 @@ foreach my $id (@finalorder) {
# phrase
%lp = %{$lang{$id}{'phrase'}};
+
+ # Drop all deprecated phrases?
+# next if ($lp{'desc'} eq 'deprecated');
+
if (length($lang{$id}{'notes'}) && $printnotes) {
print $fh "$lang{$id}{notes}";
}