From f03ae92232e5695968b76f38a0935d1ca758cbcc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 6 Mar 2002 11:33:01 +0000 Subject: - create the kde share/config's directory, so that kde config files are created in any case - in user_only localedrake, ensure the /etc/sysconfig/i18n is taken into account when ~/.i18n doesn't exist (thanks to F.Crozat) --- perl-install/lang.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 34f42f07f..ddb386d07 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -679,8 +679,8 @@ sub unpack_langs { sub read { my ($prefix, $user_only) = @_; - my $file = $prefix . ($user_only ? "$ENV{HOME}/.i18n" : '/etc/sysconfig/i18n'); - my %h = getVarsFromSh("$prefix$file"); + my ($f1, $f2) = ("$prefix$ENV{HOME}/.i18n", "$prefix/etc/sysconfig/i18n"); + my %h = getVarsFromSh($user_only && -e $f1 ? $f1 : $f2); my $lang = $h{LC_MESSAGES} || 'en_US'; $lang = bestMatchSentence($lang, list()) if !exists $languages{$lang}; my $langs = $user_only ? () : @@ -741,6 +741,9 @@ sub write { my $charset = lang2charset($lang); my $confdir = $prefix . ($user_only ? "$ENV{HOME}/.kde" : '/usr') . '/share/config'; my ($prev_kde_charset) = cat_("$confdir/kdeglobals") =~ /^Charset=(.*)/mi; + + mkdir_p($confdir); + update_gnomekderc("$confdir/kdeglobals", Locale => ( Charset => charset2kde_charset($charset), Country => lang2country($lang, $prefix), -- cgit v1.2.1