diff options
author | Andras Timar <atimar@suse.com> | 2011-06-29 12:25:42 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-06-29 15:40:12 +0300 |
commit | d33fd8ad9177b6550ab43c4f05f32c18ca482f55 (patch) | |
tree | fee035d69372eb69d6fa5187e3a9ebec9fdf068d | |
parent | 32fb00ba75e80669d0f18ae2c0493a2b1943d933 (diff) |
sorting additional language packs and dictionaries fdo#34479
Signed-off-by: Tor Lillqvist <tlillqvist@novell.com>
-rw-r--r-- | solenv/bin/modules/installer/windows/feature.pm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm index e5aa5f5a3fdc..fa8ebd2cae1a 100644 --- a/solenv/bin/modules/installer/windows/feature.pm +++ b/solenv/bin/modules/installer/windows/feature.pm @@ -432,6 +432,45 @@ sub create_feature_table } } + # Sorting names of language packs and dictionaries + my @tempfeaturetable; + my @langlist; + my @langpack; + my @dictlist; + my @sorteddictlist; + my @sortedlanglist; + + foreach (@featuretable) { + if (/^gm_r_Extension_Dictionary_/) { + push (@dictlist, $_); + } + elsif (/^gm_Langpack_r_/) { + push (@langlist, $_); + } + elsif (/\tgm_Langpack_r_/) { + push (@langpack, $_); + } + else { + push (@tempfeaturetable, $_); + } + } + + @sorteddictlist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @dictlist; + @sortedlanglist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @langlist; + + @featuretable = (@tempfeaturetable, @sorteddictlist); + + foreach (@sortedlanglist) { + my $sortedlanglistline = $_; + push (@featuretable, $sortedlanglistline); + foreach (@langpack) { + my $langpackline = $_; + if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) { + push (@featuretable, $langpackline); + } + } + } + # Saving the file my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage; |