summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index f56831cad..4accdcdc2 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -828,9 +828,6 @@ sub selectCountry {
my ($other, $ext_country);
member($country, @best) or ($ext_country, $country) = ($country, $ext_country);
- my $format = sub { $_[0] =~ /(.*)\+(.*)/ ? "$1|$1+$2" : $_[0] };
- $locale->{IM} = $format->($locale->{IM});
-
$in->ask_from_(
{ title => N("Country / Region"),
messages => N("Please choose your country."),
@@ -844,13 +841,14 @@ sub selectCountry {
list => \@best, sort => 1 }),
{ val => \$ext_country, type => 'list', format => \&lang::c2name,
list => [ @countries ], advanced => scalar(@best) },
- { val => \$locale->{IM}, type => 'combo', label => N("Input method:"), sort => 0, separator => '|', not_edit => 1,
- list => [ N_("None"), map { $format->($_) } sort(lang::get_ims()) ], format => sub { uc(translate($_[0])) },
- advanced => !$locale->{IM} || $locale->{IM} eq 'None',
- },
- ]) or return;
+ { val => \$locale->{IM}, type => 'combo', label => N("Input method:"),
+ sort => 0, separator => '|',
+ list => [ '', sort(lang::get_ims()) ],
+ format => sub { $_[0] ? uc($_[0] =~ /(.*)\+(.*)/ ? "$1|$1+$2" : $_[0]) : N("None") },
+ advanced => !$locale->{IM},
+ },
+ ]) or return;
- $locale->{IM} =~ s/.*\|//;
$locale->{country} = $other || !@best ? $ext_country : $country;
}