diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-23 18:48:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-23 18:48:32 +0000 |
commit | e58875f801fa0703cef9138df2ed456b34462969 (patch) | |
tree | a19cb45c9223771542847b0bb6de18c16ac4f5fb /perl-install/common.pm | |
parent | db1ceba674784dfd8ffaacbff6446e6a6102b448 (diff) | |
download | drakx-e58875f801fa0703cef9138df2ed456b34462969.tar drakx-e58875f801fa0703cef9138df2ed456b34462969.tar.gz drakx-e58875f801fa0703cef9138df2ed456b34462969.tar.bz2 drakx-e58875f801fa0703cef9138df2ed456b34462969.tar.xz drakx-e58875f801fa0703cef9138df2ed456b34462969.zip |
do not use the po's directly. Use mo's through gettext
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 73c1d9adb..0eed816b1 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -53,9 +53,7 @@ sub fold_left(&@) { sub _ { my $s = shift @_; my $t = translate($s); - $t && ref $t or return sprintf $t, @_; - my ($T, @p) = @$t; - sprintf $T, @_[@p]; + sprintf $t, @_; } #-delete $main::{'_'}; sub __ { $_[0] } @@ -368,20 +366,7 @@ sub list_skels { sub translate { my ($s) = @_; - if (ref($s) eq 'ARRAY') { - $s = $s->[0] == 1 ? "singular\0$s->[1]" : "plural\0$s->[2]"; - } - my ($lang) = $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LC_ALL} || $ENV{LANG} || 'en'; - - require lang; - foreach (split ':', $lang) { - lang::load_po($_) unless defined $po::I18N::{$_}; - if (%{$po::I18N::{$_}}) { - return if $s eq '_I18N_'; - return ${$po::I18N::{$_}}{$s} || $s - } - } - $s; + c::dgettext('libDrakX', $s); } sub untranslate($@) { |