]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/DoFilelist.pm
Restore translation support in the Perl modules
[deb/packages.git] / lib / Packages / DoFilelist.pm
index 585504250a2c3842f2478329aa27de3fc648d481..188cfb8bd6e59acedfc5e3dc1daeeb25dadad7f3 100644 (file)
@@ -22,15 +22,16 @@ our @EXPORT = qw( do_filelist );
 
 sub do_filelist {
     my ($params, $opts, $page_content) = @_;
+    my $cat = $opts->{cat};
 
     if ($params->{errors}{package}) {
-       fatal_error( _g( "package not valid or not specified" ) );
+       fatal_error( $cat->g( "package not valid or not specified" ) );
     }
     if ($params->{errors}{suite}) {
-       fatal_error( _g( "suite not valid or not specified" ) );
+       fatal_error( $cat->g( "suite not valid or not specified" ) );
     }
     if ($params->{errors}{arch}) {
-       fatal_error( _g( "architecture not valid or not specified" ) );
+       fatal_error( $cat->g( "architecture not valid or not specified" ) );
     }
 
     my $pkg = $opts->{package};
@@ -45,7 +46,7 @@ sub do_filelist {
            O_RDONLY, 0666, $DB_BTREE) {
 
            unless (exists $contents{$pkg}) {
-               fatal_error( _g( "No such package in this suite on this architecture." ) );
+               fatal_error( $cat->g( "No such package in this suite on this architecture." ) );
            } else {
                my @files = unpack "L/(CC/a)", $contents{$pkg};
                my $file = '';
@@ -57,7 +58,7 @@ sub do_filelist {
                }
            }
        } else {
-           fatal_error( _g( "Invalid suite/architecture combination" ) );
+           fatal_error( $cat->g( "Invalid suite/architecture combination" ) );
        }
     }
 }