summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-30 08:32:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-30 08:32:44 +0000
commit200bab7db49dff811939e818c4b6345f0f1970aa (patch)
treea6a68892a6105d876579864415b162f89406536b /perl-install/lang.pm
parentd32901566dd02bf5a368ba00f9ac583de788e5d9 (diff)
downloaddrakx-backup-do-not-use-200bab7db49dff811939e818c4b6345f0f1970aa.tar
drakx-backup-do-not-use-200bab7db49dff811939e818c4b6345f0f1970aa.tar.gz
drakx-backup-do-not-use-200bab7db49dff811939e818c4b6345f0f1970aa.tar.bz2
drakx-backup-do-not-use-200bab7db49dff811939e818c4b6345f0f1970aa.tar.xz
drakx-backup-do-not-use-200bab7db49dff811939e818c4b6345f0f1970aa.zip
cleanup
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/) {