summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm8
-rw-r--r--perl-install/lang.pm5
2 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d6ce4ee2f..f982ae534 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -689,6 +689,9 @@ sub selectCountry {
my ($other, $ext_country);
member($country, @best) or ($ext_country, $country) = ($country, $ext_country);
+ my %cfg = getVarsFromSh($< ? "$::prefix$ENV{HOME}/.i18n" : "$::prefix/etc/sysconfig/i18n");
+ my %ims = lang::get_ims();
+ my $im = find { $ims{$_}{XIM_PROGRAM} eq $cfg{XIM_PROGRAM} } keys %ims;
$in->ask_from_(
{ title => N("Country / Region"),
messages => N("Please choose your country."),
@@ -701,9 +704,12 @@ sub selectCountry {
[ if_(@best, { val => \$country, type => 'list', format => \&lang::c2name,
list => \@best, sort => 1 }),
{ val => \$ext_country, type => 'list', format => \&lang::c2name,
- list => [ difference2(\@countries, \@best) ], advanced => scalar(@best) }
+ list => [ difference2(\@countries, \@best) ], advanced => scalar(@best) },
+ { val => \$im, type => 'list', label => N("Input method:"),
+ list => [ 'None', sort keys %ims ], advanced => 1, format => sub { uc(translate($_[0])) }, },
]) or return;
+ $locale->{IM} = $im if ($im ne 'None');
$locale->{country} = $other || !@best ? $ext_country : $country;
}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 499c15bac..81e407d79 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -526,6 +526,10 @@ my %gtkqt_im =
},
);
+
+sub get_ims() {
+ %gtkqt_im;
+}
my %xim = (
@@ -1002,6 +1006,7 @@ sub write {
}
}
+ add2hash $h, $gtkqt_im{$locale->{IM}};
add2hash $h, $xim{$h->{LANG}};
#- deactivate translations on console for RTL languages