Kaynağa Gözat

Unify and mark strings for translation

Guillem Jover 17 yıl önce
ebeveyn
işleme
abc43d47ac

+ 3 - 3
scripts/Dpkg/Arch.pm

@@ -119,7 +119,7 @@ sub read_cputable
     local $/ = "\n";
     local $/ = "\n";
 
 
     open CPUTABLE, "$pkgdatadir/cputable"
     open CPUTABLE, "$pkgdatadir/cputable"
-	or syserr(_g("unable to open cputable"));
+	or syserr(_g("cannot open %s"), "cputable");
     while (<CPUTABLE>) {
     while (<CPUTABLE>) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
 	    $cputable{$1} = $2;
 	    $cputable{$1} = $2;
@@ -138,7 +138,7 @@ sub read_ostable
     local $/ = "\n";
     local $/ = "\n";
 
 
     open OSTABLE, "$pkgdatadir/ostable"
     open OSTABLE, "$pkgdatadir/ostable"
-	or syserr(_g("unable to open ostable"));
+	or syserr(_g("cannot open %s"), "ostable");
     while (<OSTABLE>) {
     while (<OSTABLE>) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	    $ostable{$1} = $2;
 	    $ostable{$1} = $2;
@@ -157,7 +157,7 @@ sub read_triplettable()
     local $/ = "\n";
     local $/ = "\n";
 
 
     open TRIPLETTABLE, "$pkgdatadir/triplettable"
     open TRIPLETTABLE, "$pkgdatadir/triplettable"
-	or syserr(_g("unable to open triplettable"));
+	or syserr(_g("cannot open %s"), "triplettable");
     while (<TRIPLETTABLE>) {
     while (<TRIPLETTABLE>) {
 	if (m/^(?!\#)(\S+)\s+(\S+)/) {
 	if (m/^(?!\#)(\S+)\s+(\S+)/) {
 	    my $debtriplet = $1;
 	    my $debtriplet = $1;

+ 2 - 2
scripts/Dpkg/Shlibs/Objdump.pm

@@ -80,7 +80,7 @@ sub has_object {
 	} else {
 	} else {
 	    local $ENV{LC_ALL} = "C";
 	    local $ENV{LC_ALL} = "C";
 	    open(P, "-|", "objdump", "-a", "--", $file)
 	    open(P, "-|", "objdump", "-a", "--", $file)
-		|| syserr(_g("cannot fork for objdump"));
+		|| syserr(_g("cannot fork for %s"), "objdump");
 	    while (<P>) {
 	    while (<P>) {
 		chomp;
 		chomp;
 		if (/^\s*\S+:\s*file\s+format\s+(\S+)\s*$/) {
 		if (/^\s*\S+:\s*file\s+format\s+(\S+)\s*$/) {
@@ -154,7 +154,7 @@ sub _read {
 
 
     local $ENV{LC_ALL} = 'C';
     local $ENV{LC_ALL} = 'C';
     open(my $objdump, "-|", "objdump", "-w", "-f", "-p", "-T", "-R", $file)
     open(my $objdump, "-|", "objdump", "-w", "-f", "-p", "-T", "-R", $file)
-	|| syserr(_g("cannot fork %s"), "objdump");
+	|| syserr(_g("cannot fork for %s"), "objdump");
     my $ret = $self->_parse($objdump);
     my $ret = $self->_parse($objdump);
     close($objdump);
     close($objdump);
     return $ret;
     return $ret;

+ 1 - 1
scripts/Dpkg/Source/Package.pm

@@ -369,7 +369,7 @@ sub extract {
         my $srcdir = File::Spec->catdir($newdirectory, "debian", "source");
         my $srcdir = File::Spec->catdir($newdirectory, "debian", "source");
         my $format_file = File::Spec->catfile($srcdir, "format");
         my $format_file = File::Spec->catfile($srcdir, "format");
         mkdir($srcdir) unless -e $srcdir;
         mkdir($srcdir) unless -e $srcdir;
-        open(FORMAT, ">", $format_file) || syserr(_g("can't write %s"), $format_file);
+        open(FORMAT, ">", $format_file) || syserr(_g("cannot write %s"), $format_file);
         print FORMAT $self->{'fields'}{'Format'} . "\n";
         print FORMAT $self->{'fields'}{'Format'} . "\n";
         close(FORMAT);
         close(FORMAT);
     }
     }

+ 2 - 2
scripts/Dpkg/Source/Package/V2.pm

@@ -290,7 +290,7 @@ sub do_build {
     my %auth_bin_files;
     my %auth_bin_files;
     my $incbin_file = File::Spec->catfile($dir, "debian", "source", "include-binaries");
     my $incbin_file = File::Spec->catfile($dir, "debian", "source", "include-binaries");
     if (-f $incbin_file) {
     if (-f $incbin_file) {
-        open(INC, "<", $incbin_file) || syserr(_g("can't read %s"), $incbin_file);
+        open(INC, "<", $incbin_file) || syserr(_g("cannot read %s"), $incbin_file);
         while(defined($_ = <INC>)) {
         while(defined($_ = <INC>)) {
             chomp; s/^\s*//; s/\s*$//;
             chomp; s/^\s*//; s/\s*$//;
             next if /^#/ or /^$/;
             next if /^#/ or /^$/;
@@ -398,7 +398,7 @@ sub do_build {
     # Update debian/source/include-binaries if needed
     # Update debian/source/include-binaries if needed
     if (scalar(@binary_files) and $include_binaries) {
     if (scalar(@binary_files) and $include_binaries) {
         mkpath(File::Spec->catdir($dir, "debian", "source"));
         mkpath(File::Spec->catdir($dir, "debian", "source"));
-        open(INC, ">>", $incbin_file) || syserr(_g("can't write %s"), $incbin_file);
+        open(INC, ">>", $incbin_file) || syserr(_g("cannot write %s"), $incbin_file);
         foreach my $binary (@binary_files) {
         foreach my $binary (@binary_files) {
             unless ($auth_bin_files{$binary}) {
             unless ($auth_bin_files{$binary}) {
                 print INC "$binary\n";
                 print INC "$binary\n";

+ 1 - 1
scripts/dpkg-gencontrol.pl

@@ -293,7 +293,7 @@ if (!defined($substvars->get('Installed-Size'))) {
     if (!$c) {
     if (!$c) {
         chdir("$packagebuilddir") ||
         chdir("$packagebuilddir") ||
             syserr(_g("chdir for du to \`%s'"), $packagebuilddir);
             syserr(_g("chdir for du to \`%s'"), $packagebuilddir);
-        exec("du", "-k", "-s", ".") or syserr(_g("exec du"));
+        exec("du", "-k", "-s", ".") or syserr(_g("exec %s"), "du");
     }
     }
     my $duo = '';
     my $duo = '';
     while (<DU>) {
     while (<DU>) {

+ 1 - 1
scripts/dpkg-scansources.pl

@@ -356,7 +356,7 @@ sub main {
     load_extra_override $Extra_override_file if defined $Extra_override_file;
     load_extra_override $Extra_override_file if defined $Extra_override_file;
 
 
     open FIND, "find \Q$dir\E -follow -name '*.dsc' -print |"
     open FIND, "find \Q$dir\E -follow -name '*.dsc' -print |"
-	or syserr(_g("can't fork"));
+        or syserr(_g("cannot fork for %s"), "find");
     while (<FIND>) {
     while (<FIND>) {
     	chomp;
     	chomp;
 	s-^\./+--;
 	s-^\./+--;

+ 1 - 1
scripts/dpkg-shlibdeps.pl

@@ -799,7 +799,7 @@ sub find_packages {
     return $pkgmatch unless scalar(@files);
     return $pkgmatch unless scalar(@files);
 
 
     my $pid = open(DPKG, "-|");
     my $pid = open(DPKG, "-|");
-    syserr(_g("cannot fork for dpkg --search")) unless defined($pid);
+    syserr(_g("cannot fork for %s"), "dpkg --search") unless defined($pid);
     if (!$pid) {
     if (!$pid) {
 	# Child process running dpkg --search and discarding errors
 	# Child process running dpkg --search and discarding errors
 	close STDERR;
 	close STDERR;

+ 1 - 1
src/enquiry.c

@@ -376,7 +376,7 @@ void predeppackage(const char *const *argv) {
   } while (dep);
   } while (dep);
 
 
   /* OK, we've found it - pkg has no unsatisfied pre-dependencies ! */
   /* OK, we've found it - pkg has no unsatisfied pre-dependencies ! */
-  writerecord(stdout,"<stdout>",pkg,&pkg->available);
+  writerecord(stdout, _("<standard output>"), pkg, &pkg->available);
 
 
   m_output(stdout, _("<standard output>"));
   m_output(stdout, _("<standard output>"));
 }
 }

+ 2 - 2
src/query.c

@@ -311,7 +311,7 @@ void enqperpackage(const char *const *argv) {
         fprintf(stderr,_("Package `%s' is not installed and no info is available.\n"),pkg->name);
         fprintf(stderr,_("Package `%s' is not installed and no info is available.\n"),pkg->name);
         failures++;
         failures++;
       } else {
       } else {
-        writerecord(stdout, "<stdout>", pkg, &pkg->installed);
+        writerecord(stdout, _("<standard output>"), pkg, &pkg->installed);
       }
       }
       break;
       break;
 
 
@@ -320,7 +320,7 @@ void enqperpackage(const char *const *argv) {
         fprintf(stderr,_("Package `%s' is not available.\n"),pkg->name);
         fprintf(stderr,_("Package `%s' is not available.\n"),pkg->name);
         failures++;
         failures++;
       } else {
       } else {
-        writerecord(stdout, "<stdout>", pkg, &pkg->available);
+        writerecord(stdout, _("<standard output>"), pkg, &pkg->available);
       }
       }
       break;
       break;