summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2010-05-11 11:50:51 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2010-05-11 11:50:51 +0000
commit84b6081b91b04f26e816c48e4a109239004bd7e2 (patch)
treed998af46e33ea09ed5119c0750af5e65d1a17692
parentfa4a11783335146b06ff1f570554d9315962d8bc (diff)
downloaddrakx-84b6081b91b04f26e816c48e4a109239004bd7e2.tar
drakx-84b6081b91b04f26e816c48e4a109239004bd7e2.tar.gz
drakx-84b6081b91b04f26e816c48e4a109239004bd7e2.tar.bz2
drakx-84b6081b91b04f26e816c48e4a109239004bd7e2.tar.xz
drakx-84b6081b91b04f26e816c48e4a109239004bd7e2.zip
handle zh_TW and similar locales in unused locales detection
Unused locale code tries to look for packages named locales-$cur_locale but this isn't right when the locale is zh_TW or similar since the package is named locales-zh for these locales. For such locales, use the main locale name when doing the package lookup.
-rw-r--r--perl-install/pkgs.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 2122b117d..ff1399261 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -240,7 +240,7 @@ sub detect_unselected_locale_packages {
require lang;
my $locales_prefix = 'locales-';
my $locale = lang::read();
- my $selected_locale = $locales_prefix . $locale->{lang};
+ my $selected_locale = $locales_prefix . lang::locale_to_main_locale($locale->{lang});
my @available_locales = $do_pkgs->are_installed($locales_prefix . '*');
member($selected_locale, @available_locales) ? difference2(\@available_locales, [ $selected_locale ]) : ();
}