summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 81e407d79..2851d68df 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -527,9 +527,7 @@ my %gtkqt_im =
);
-sub get_ims() {
- %gtkqt_im;
-}
+sub get_ims() { keys %gtkqt_im }
my %xim = (
@@ -943,7 +941,12 @@ sub read {
$prefix ||= "";
my ($f1, $f2) = ("$prefix$ENV{HOME}/.i18n", "$prefix/etc/sysconfig/i18n");
my %h = getVarsFromSh($user_only && -e $f1 ? $f1 : $f2);
- system_locales_to_ourlocale($h{LC_MESSAGES} || 'en_US', $h{LC_MONETARY} || 'en_US');
+ my $locale = system_locales_to_ourlocale($h{LC_MESSAGES} || 'en_US', $h{LC_MONETARY} || 'en_US');
+
+ if ($h{XIM_PROGRAM}) {
+ $locale->{IM} = find { $gtkqt_im{$_}{XIM_PROGRAM} eq $locale->{XIM_PROGRAM} } keys %gtkqt_im;
+ }
+ $locale;
}
sub write_langs {
@@ -1006,8 +1009,8 @@ sub write {
}
}
- add2hash $h, $gtkqt_im{$locale->{IM}};
- add2hash $h, $xim{$h->{LANG}};
+ add2hash($h, $gtkqt_im{$locale->{IM}});
+ add2hash($h, $xim{$h->{LANG}});
#- deactivate translations on console for RTL languages
if ($h->{LANG} =~ /ar|fa|he|ur|yi/) {