summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-05-27 00:16:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-05-27 00:16:03 +0000
commitebc28cc251558d3f1d53d196d3446d716de286a1 (patch)
tree5f3d6eda714b49d9151ad781578389ff73146d9c /perl-install/any.pm
parent314bbea6d661faa816c9c072b18bfbc84947d3a9 (diff)
downloaddrakx-ebc28cc251558d3f1d53d196d3446d716de286a1.tar
drakx-ebc28cc251558d3f1d53d196d3446d716de286a1.tar.gz
drakx-ebc28cc251558d3f1d53d196d3446d716de286a1.tar.bz2
drakx-ebc28cc251558d3f1d53d196d3446d716de286a1.tar.xz
drakx-ebc28cc251558d3f1d53d196d3446d716de286a1.zip
(selectCountry) display SCIM combinaisons in a sub menu
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index e7a972a0e..2a6b55c08 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -790,6 +790,10 @@ sub selectCountry {
my ($other, $ext_country);
member($country, @best) or ($ext_country, $country) = ($country, $ext_country);
+
+ my $format = sub { local $_ = $_[0]; s/(.*)\+(.*)/\1|\1+$2/ if /\+/ ; $_ };
+ $locale->{IM} = $format->($locale->{IM});
+
$in->ask_from_(
{ title => N("Country / Region"),
messages => N("Please choose your country."),
@@ -803,12 +807,13 @@ 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,
- list => [ N_("None"), sort(lang::get_ims()) ], format => sub { uc(translate($_[0])) },
+ { 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;
+ $locale->{IM} =~ s/.*\|//;
$locale->{country} = $other || !@best ? $ext_country : $country;
}