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-3c2a110728.tar.gz rockbox-3c2a110728.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($) { ################## if($#ARGV != 2) { - print "Usage: updatelang <english.lang> <otherlang> <outfile|->\n"; + print "Usage: [ENGLISHORDER=1] updatelang <english.lang> <otherlang> <outfile|->\n"; exit; } @@ -502,7 +502,14 @@ foreach (@langheader) { print $fh $_; } -my @finalorder = @langorder; # TODO make configurable vs @englishorder +my @finalorder; + +if ($ENV{'ENGLISHORDER'}) { + @finalorder = @englishorder; +} else { + @finalorder = @langorder; +} + foreach my $id (@finalorder) { if (!defined($english{$id})) { next; |