diff options
author | Francois Pons <fpons@mandriva.com> | 2000-02-10 18:59:34 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-02-10 18:59:34 +0000 |
commit | 011cd29962ce3251d3d2816334a62846b5554ce6 (patch) | |
tree | d0b0dba387bf30ed694edcdaa460b571676541ae /perl-install/lang.pm | |
parent | ed7a5159df93917b8e6a17e9db3686d58c2ef9ab (diff) | |
download | drakx-011cd29962ce3251d3d2816334a62846b5554ce6.tar drakx-011cd29962ce3251d3d2816334a62846b5554ce6.tar.gz drakx-011cd29962ce3251d3d2816334a62846b5554ce6.tar.bz2 drakx-011cd29962ce3251d3d2816334a62846b5554ce6.tar.xz drakx-011cd29962ce3251d3d2816334a62846b5554ce6.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r-- | perl-install/lang.pm | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 6ceabf918..aa7087390 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -203,24 +203,30 @@ sub set { my ($lang, $langs) = @_; if ($lang) { + #- use extract_archive that follow symlinks and expand directory. + #- it is necessary as there is a lot of symlinks inside locale.cz2, + #- using a compressed cpio archive is nighmare to extract all files. + #- reset locale environment variable to avoid any warnings by perl, + #- so installation of new locale is done with empty locale ... + unless (-e "/usr/share/locale/".$languages{$lang}[2]) { + @ENV{qw(LANG LC_ALL LANGUAGE LINGUAS)} = (); + + eval { commands::rm("-r", "/usr/share/locale") }; + require 'run_program.pm'; + run_program::run("extract_archive", "/usr/share/locale.cz2", '/usr/share/locale', $languages{$lang}[2]); + } + $ENV{LC_ALL} = $lang; $ENV{LANG} = $languages{$lang}[2]; $ENV{LANGUAGE} = $languages{$lang}[3]; #- apparently autoconf/automake doesn't like LINGUAS having a list of values #- $ENV{LINGUAS} = $languages{$lang}[3]; set_langs($langs || [$lang]); - - local $_ = $languages{$lang}[1]; - s/iso-8859-1$/iso-8859-15/; - s/iso-/iso/; - s/koi8-.*/koi8/; - s/cp1251/mscp1251/; - - commands::install_cpio("/usr/share/locale", $languages{$lang}[2], "misc", $_); } else { # stick with the default (English) */ delete $ENV{LANG}; delete $ENV{LC_ALL}; + delete $ENV{LINGUAGE}; delete $ENV{LINGUAS}; delete $ENV{RPM_INSTALL_LANG}; } @@ -283,7 +289,6 @@ sub load_po($) { open F, "bzip2 -dc $f 2>/dev/null |"; } else { -e ($f = "$_/po.cz2") and last foreach @INC; - $f =~ s/\.cz2//; log::l("trying to load $lang.po from $f"); open F, "extract_archive $f '' $lang.po 2>/dev/null |"; } |