From b42262b1e1a30bfd7f09210e1d3b6f0da8ca6734 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 9 Aug 2004 03:10:27 +0000 Subject: we never pass a prefix to lang::read() which is always use in standalone, so use $::prefix and don't pass a prefix anymore --- perl-install/lang.pm | 7 +++---- perl-install/standalone/drakxtv | 2 +- perl-install/standalone/localedrake | 4 ++-- perl-install/ugtk2.pm | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 695c37b18..11e0efaa0 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -954,10 +954,9 @@ sub system_locales_to_ourlocale { } sub read { - my ($prefix, $user_only) = @_; - $prefix ||= ""; - my ($f1, $f2) = ("$prefix$ENV{HOME}/.i18n", "$prefix/etc/sysconfig/i18n"); - my %h = getVarsFromSh($user_only && -e $f1 ? $f1 : $f2); + my ($b_user_only) = @_; + my ($f1, $f2) = ("$::prefix$ENV{HOME}/.i18n", "$::prefix/etc/sysconfig/i18n"); + my %h = getVarsFromSh($b_user_only && -e $f1 ? $f1 : $f2); my $locale = system_locales_to_ourlocale($h{LC_MESSAGES} || 'en_US', $h{LC_MONETARY} || 'en_US'); if ($h{XIM_PROGRAM}) { diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv index b57547113..51738d3ed 100755 --- a/perl-install/standalone/drakxtv +++ b/perl-install/standalone/drakxtv @@ -68,7 +68,7 @@ sub scan4channels() { ); my $tbl; - my $locale = lang::read('', $>); + my $locale = lang::read($>); $locale->{country} =~ /$_/ and $tbl = $countries{$_} foreach keys %countries; if ($tbl) { $ftable_id = $tbl->[0]; diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake index e89804d3f..916e2fa76 100644 --- a/perl-install/standalone/localedrake +++ b/perl-install/standalone/localedrake @@ -21,7 +21,7 @@ if (defined $klang) { $klang or exit(-1); my $lang = member($klang, lang::list_langs()) ? $klang : 'en_US'; my $country = member($kcountry, lang::list_countries()) ? $kcountry : 'US'; - my $locale = lang::read('', $>); + my $locale = lang::read($>); $klang and $locale->{lang} = $lang; $kcountry and $locale->{country} = $country; lang::write('', $locale, $>, 'dont_touch_kde_files') if $apply; @@ -31,7 +31,7 @@ if (defined $klang) { exit(0); } -my $locale = lang::read('', $>); +my $locale = lang::read($>); my $in = 'interactive'->vnew; sub select_language() { diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 7fcdb2c24..b7b6c7e0c 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -5,7 +5,7 @@ use strict; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $wm_icon $force_center_at_pos $force_center $force_focus $grab $pop_it $border); #- leave it on one line, for automatic removal of the line at package creation use lang; -$::o = { locale => lang::read('', 1) } if !$::isInstall; +$::o = { locale => lang::read(1) } if !$::isInstall; @ISA = qw(Exporter); %EXPORT_TAGS = ( -- cgit v1.2.1