diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-28 20:42:17 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-28 20:45:34 -0400 |
commit | 3c2a1107288c546d59e6d265ae5143030fb236f6 (patch) | |
tree | 3cfa62f812eb455b23cb6bc1b383d3c2b1d100de | |
parent | d5a4230901e6c6e20b03b3e9873d2f788e834d8c (diff) | |
download | rockbox-3c2a1107288c546d59e6d265ae5143030fb236f6.tar.gz rockbox-3c2a1107288c546d59e6d265ae5143030fb236f6.zip |
updatelang: Add the ability to sort output file in the English file's order
Change-Id: Ia115549b96365cbee6f1f96c5b0351dcec538955
-rwxr-xr-x | tools/updatelang | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/updatelang b/tools/updatelang index 534aa6d00f..28f259bdbb 100755 --- a/tools/updatelang +++ b/tools/updatelang | |||
@@ -158,7 +158,7 @@ sub reduceformat($) { | |||
158 | ################## | 158 | ################## |
159 | 159 | ||
160 | if($#ARGV != 2) { | 160 | if($#ARGV != 2) { |
161 | print "Usage: updatelang <english.lang> <otherlang> <outfile|->\n"; | 161 | print "Usage: [ENGLISHORDER=1] updatelang <english.lang> <otherlang> <outfile|->\n"; |
162 | exit; | 162 | exit; |
163 | } | 163 | } |
164 | 164 | ||
@@ -502,7 +502,14 @@ foreach (@langheader) { | |||
502 | print $fh $_; | 502 | print $fh $_; |
503 | } | 503 | } |
504 | 504 | ||
505 | my @finalorder = @langorder; # TODO make configurable vs @englishorder | 505 | my @finalorder; |
506 | |||
507 | if ($ENV{'ENGLISHORDER'}) { | ||
508 | @finalorder = @englishorder; | ||
509 | } else { | ||
510 | @finalorder = @langorder; | ||
511 | } | ||
512 | |||
506 | foreach my $id (@finalorder) { | 513 | foreach my $id (@finalorder) { |
507 | if (!defined($english{$id})) { | 514 | if (!defined($english{$id})) { |
508 | next; | 515 | next; |