forked from len0rd/rockbox
updatelang: Add the ability to sort output file in the English file's order
Change-Id: Ia115549b96365cbee6f1f96c5b0351dcec538955
This commit is contained in:
parent
d5a4230901
commit
3c2a110728
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue