From 224b14cb6b741fb15dcc4fd170306dc0165cba29 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 17 Dec 1999 17:28:14 +0000 Subject: no_comment --- perl-install/lang.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'perl-install/lang.pm') 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 () { /^msgstr/ and $state = 1; /^msgid/ && !$fuzzy and $state = 2; -- cgit v1.2.1