diff options
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; |