diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-08-25 16:31:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-08-25 16:31:24 +0000 |
commit | aaac324afdf01fa17b077040b283fc58ee6f8328 (patch) | |
tree | e46b5d20d093555ae9fdb2aff674a1487e398dbc /perl-install/common.pm | |
parent | 4e915a66b1d826e7b9407ff1c25dd3889be5c220 (diff) | |
download | drakx-aaac324afdf01fa17b077040b283fc58ee6f8328.tar drakx-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.gz drakx-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.bz2 drakx-aaac324afdf01fa17b077040b283fc58ee6f8328.tar.xz drakx-aaac324afdf01fa17b077040b283fc58ee6f8328.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index e1b44ac2d..4578b61c9 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -181,14 +181,15 @@ sub unmakedev { $_[0] >> 8, $_[0] & 0xff } sub translate { my ($s) = @_; - unless (defined %po::I18N::I18N) { - if (my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2)) { - local $@; - local $SIG{__DIE__} = 'none'; - eval { require "po/$lang.pm" }; - } + my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2); + unless (defined $po::I18N::{$lang}) { + local $@; + local $SIG{__DIE__} = 'none'; + eval { require "po/$lang.pm"; }; } - $po::I18N::I18N{$s} || $s; + $po::I18N::{$lang} or return $s; + my $l = *{$po::I18N::{$lang}}; + $l->{$s} || $s; } sub untranslate($@) { |