diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-17 17:28:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-17 17:28:14 +0000 |
commit | 224b14cb6b741fb15dcc4fd170306dc0165cba29 (patch) | |
tree | 6135c5e28a8638890df3e201b5b349136aedb0ba /perl-install/lang.pm | |
parent | d057708b3e1217b809c383563d54ae9e316bf189 (diff) | |
download | drakx-backup-do-not-use-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar drakx-backup-do-not-use-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.gz drakx-backup-do-not-use-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.bz2 drakx-backup-do-not-use-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.xz drakx-backup-do-not-use-224b14cb6b741fb15dcc4fd170306dc0165cba29.zip |
no_comment
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r-- | perl-install/lang.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 6a7e264a4..0fa0f6a1b 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -208,15 +208,21 @@ sub load_po($) { my ($s, $from, $to, $state, $fuzzy); $s .= "package po::I18N;\n"; - $s .= "\%$lang = ("; + $s .= "no strict;\n"; + $s .= "\%{'$lang'} = ("; -#- $lang = substr($lang, 0, 2); my $f; -e ($f = "$_/po/$lang.po") and last foreach @INC; unless (-e $f) { -e ($f = "$_") and last foreach @INC; $f = commands::install_cpio("$f/po", "$lang.po"); } - local *F; open F, $f; #- not returning here help avoiding reading the same multiple times. + local *F; + unless (-e $f) { + -e ($f = "$_/po/$lang.po.bz2") and last foreach @INC; + open F, "bzip2 -dc $f 2>/dev/null |"; + } else { + open F, $f; #- not returning here help avoiding reading the same multiple times. + } foreach (<F>) { /^msgstr/ and $state = 1; /^msgid/ && !$fuzzy and $state = 2; |