From 84b6081b91b04f26e816c48e4a109239004bd7e2 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 11 May 2010 11:50:51 +0000 Subject: 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. --- perl-install/pkgs.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]) : (); } -- cgit v1.2.1