diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/updatelang | 20 |
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 { | |||
59 | my @targets = split(',', $1); | 59 | my @targets = split(',', $1); |
60 | foreach (@targets) { | 60 | foreach (@targets) { |
61 | my $l = trim($_); | 61 | my $l = trim($_); |
62 | |||
63 | # Strip out some keys | ||
64 | # if ($l eq "swcodec") { | ||
65 | # $l = "*"; | ||
66 | # } elsif ($l eq "lcd_bitmap") { | ||
67 | # $l = "*"; | ||
68 | # } | ||
69 | |||
62 | $thisphrase{$pos}->{$l} = $2; | 70 | $thisphrase{$pos}->{$l} = $2; |
63 | } | 71 | } |
64 | } | 72 | } |
@@ -220,11 +228,15 @@ foreach my $id (@langorder) { | |||
220 | } | 228 | } |
221 | } | 229 | } |
222 | 230 | ||
231 | if (!defined($ep{'user'}) || length($ep{'user'}) == 0) { | ||
232 | $lp{'user'} = 'core'; | ||
233 | } | ||
234 | |||
223 | if (!defined($lp{'user'}) || $lp{'user'} ne $ep{'user'}) { | 235 | if (!defined($lp{'user'}) || $lp{'user'} ne $ep{'user'}) { |
224 | if (!defined($lp{'user'})) { | 236 | $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"; |
237 | if (!defined($lp{'user'}) || length($lp{'user'}) == 0) { | ||
225 | $lp{'user'} = $ep{'user'}; | 238 | $lp{'user'} = $ep{'user'}; |
226 | } | 239 | } |
227 | $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"; | ||
228 | $lang{$id}{'phrase'}{'user'} = $english{$id}{'phrase'}{'user'}; | 240 | $lang{$id}{'phrase'}{'user'} = $english{$id}{'phrase'}{'user'}; |
229 | # print "#!! '$id' changed user\n"; | 241 | # print "#!! '$id' changed user\n"; |
230 | } | 242 | } |
@@ -389,6 +401,10 @@ foreach my $id (@finalorder) { | |||
389 | 401 | ||
390 | # phrase | 402 | # phrase |
391 | %lp = %{$lang{$id}{'phrase'}}; | 403 | %lp = %{$lang{$id}{'phrase'}}; |
404 | |||
405 | # Drop all deprecated phrases? | ||
406 | # next if ($lp{'desc'} eq 'deprecated'); | ||
407 | |||
392 | if (length($lang{$id}{'notes'}) && $printnotes) { | 408 | if (length($lang{$id}{'notes'}) && $printnotes) { |
393 | print $fh "$lang{$id}{notes}"; | 409 | print $fh "$lang{$id}{notes}"; |
394 | } | 410 | } |