Sort Norwegian Bokmål and Norwegian Nynorsk next to each other, as if

their language code were 'no' (LP: #40144).
master
Colin Watson 15 years ago
parent 1f7c2e9dce
commit ea641f11c3

2
debian/changelog vendored

@ -3,6 +3,8 @@ gfxboot-theme-ubuntu (0.8.1) UNRELEASED; urgency=low
* Make menu columns variable-width, to make it easier to fit more * Make menu columns variable-width, to make it easier to fit more
languages and keymaps onto the screen. languages and keymaps onto the screen.
* Update langlist from langnames.inc, forgotten in 0.8.0 (LP: #311699). * Update langlist from langnames.inc, forgotten in 0.8.0 (LP: #311699).
* Sort Norwegian Bokmål and Norwegian Nynorsk next to each other, as if
their language code were 'no' (LP: #40144).
-- Colin Watson <cjwatson@ubuntu.com> Wed, 10 Jun 2009 01:04:31 +0100 -- Colin Watson <cjwatson@ubuntu.com> Wed, 10 Jun 2009 01:04:31 +0100

@ -38,9 +38,9 @@ lv
mk mk
ml ml
mr mr
nb
ne ne
nl nl
nb
nn nn
pa pa
pl pl

@ -39,9 +39,9 @@
[ "mk" "mk_MK" "Македонски" ] [ "mk" "mk_MK" "Македонски" ]
[ "ml" "ml_IN" "Malayalam" ] [ "ml" "ml_IN" "Malayalam" ]
[ "mr" "mr_IN" "Marathi" ] [ "mr" "mr_IN" "Marathi" ]
[ "nb" "nb_NO" "Norsk bokmål" ]
[ "ne" "ne_NP" "Nepali" ] [ "ne" "ne_NP" "Nepali" ]
[ "nl" "nl_NL" "Nederlands" ] [ "nl" "nl_NL" "Nederlands" ]
[ "nb" "nb_NO" "Norsk bokmål" ]
[ "nn" "nn_NO" "Norsk nynorsk" ] [ "nn" "nn_NO" "Norsk nynorsk" ]
[ "pa" "pa_IN" "Punjabi (Gurmukhi)" ] [ "pa" "pa_IN" "Punjabi (Gurmukhi)" ]
[ "pl" "pl_PL" "Polski" ] [ "pl" "pl_PL" "Polski" ]

@ -37,6 +37,13 @@ my @langname_notranslate = (
); );
my %langname_notranslate = map { $_ => 1 } @langname_notranslate; my %langname_notranslate = map { $_ => 1 } @langname_notranslate;
# Adjust the sort order slightly. (The values are not real language codes;
# they're just there to make the sort unambiguous.)
my %sort_ids = (
'nb' => 'no_NB',
'nn' => 'no_NN',
);
my %langnames; my %langnames;
my %locales; my %locales;
open LIST, '<:utf8', "$localechooser/languagelist" open LIST, '<:utf8', "$localechooser/languagelist"
@ -54,13 +61,14 @@ while (<LIST>) {
$langnames{$lang} = $bits[2]; $langnames{$lang} = $bits[2];
} }
($locales{$lang} = "$bits[6]") =~ s/[.@].*//; ($locales{$lang} = "$bits[6]") =~ s/[.@].*//;
$sort_ids{$lang} = $lang unless exists $sort_ids{$lang};
} }
close LIST; close LIST;
binmode STDOUT, ':utf8'; binmode STDOUT, ':utf8';
print "/lang.defaultnames [\n"; print "/lang.defaultnames [\n";
for my $lang (sort keys %langnames) { for my $lang (sort { $sort_ids{$a} cmp $sort_ids{$b} } keys %langnames) {
print qq{ [ "$lang" "$locales{$lang}" "$langnames{$lang}" ]\n}; print qq{ [ "$lang" "$locales{$lang}" "$langnames{$lang}" ]\n};
} }
print "] def\n"; print "] def\n";

Loading…
Cancel
Save