diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-03-06 11:33:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-03-06 11:33:01 +0000 |
commit | f03ae92232e5695968b76f38a0935d1ca758cbcc (patch) | |
tree | 57dfd8824cdf344fce8b21995d4fd2650933b2de /perl-install | |
parent | 4b56b716e9c1db1d354754fcde2ae780efbe07d5 (diff) | |
download | drakx-f03ae92232e5695968b76f38a0935d1ca758cbcc.tar drakx-f03ae92232e5695968b76f38a0935d1ca758cbcc.tar.gz drakx-f03ae92232e5695968b76f38a0935d1ca758cbcc.tar.bz2 drakx-f03ae92232e5695968b76f38a0935d1ca758cbcc.tar.xz drakx-f03ae92232e5695968b76f38a0935d1ca758cbcc.zip |
- 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)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/lang.pm | 7 |
1 files 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), |