summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-17 17:28:14 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-17 17:28:14 +0000
commit224b14cb6b741fb15dcc4fd170306dc0165cba29 (patch)
tree6135c5e28a8638890df3e201b5b349136aedb0ba /perl-install/lang.pm
parentd057708b3e1217b809c383563d54ae9e316bf189 (diff)
downloaddrakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.gz
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.bz2
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.tar.xz
drakx-224b14cb6b741fb15dcc4fd170306dc0165cba29.zip
no_comment
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm12
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;