summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-06 09:10:11 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-06 09:10:11 +0000
commit152b0b998e117a4a79dd77d401df8cfc234574a5 (patch)
tree142ed19b54273ede98330a2b878e8e9a27567120 /perl-install/common.pm
parent07021694c8d96ab2205c9398a68d177e2d185f2a (diff)
downloaddrakx-152b0b998e117a4a79dd77d401df8cfc234574a5.tar
drakx-152b0b998e117a4a79dd77d401df8cfc234574a5.tar.gz
drakx-152b0b998e117a4a79dd77d401df8cfc234574a5.tar.bz2
drakx-152b0b998e117a4a79dd77d401df8cfc234574a5.tar.xz
drakx-152b0b998e117a4a79dd77d401df8cfc234574a5.zip
*** empty log message ***
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index b32f9ff11..59e32bd61 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -239,11 +239,15 @@ sub translate {
my ($s) = @_;
my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2);
- require 'lang.pm';
- lang::load_po ($lang) unless defined $po::I18N::{$lang}; #- the space if needed to mislead perl2fcalls (as lang is not included here)
- $po::I18N::{$lang} or return $s;
- my $l = *{$po::I18N::{$lang}};
- $l->{$s} || $s;
+ if ($lang) {
+ require 'lang.pm';
+ lang::load_po ($lang) unless defined $po::I18N::{$lang}; #- the space if needed to mislead perl2fcalls (as lang is not included here)
+ $po::I18N::{$lang} or return $s;
+ my $l = *{$po::I18N::{$lang}};
+ $l->{$s} || $s;
+ } else {
+ $s; #- should avoid some strange behaviour if no lang defined.
+ }
}
sub untranslate($@) {