Parcourir la source

Lots and lots of i18n updates.
Author: doogie
Date: 2003-02-10 07:34:41 GMT
Lots and lots of i18n updates.

Arch Librarian il y a 22 ans
Parent
commit
dc738e7ae6
30 fichiers modifiés avec 16890 ajouts et 7941 suppressions
  1. 16 16
      ftparchive/apt-ftparchive.cc
  2. 8 7
      ftparchive/cachedb.cc
  3. 4 3
      ftparchive/contents.cc
  4. 16 15
      ftparchive/multicompress.cc
  5. 12 11
      ftparchive/override.cc
  6. 26 26
      ftparchive/writer.cc
  7. 9 8
      methods/cdrom.cc
  8. 16 15
      methods/connect.cc
  9. 4 3
      methods/copy.cc
  10. 4 3
      methods/file.cc
  11. 43 41
      methods/ftp.cc
  12. 7 6
      methods/gzip.cc
  13. 22 21
      methods/http.cc
  14. 14 13
      methods/rsh.cc
  15. 602 20
      po/apt-all.pot
  16. 1002 653
      po/da.po
  17. 985 550
      po/de.po
  18. 969 164
      po/en_GB.po
  19. 1502 910
      po/es.po
  20. 1171 813
      po/fr.po
  21. 1438 894
      po/hu.po
  22. 1125 787
      po/it.po
  23. 1 1
      po/makefile
  24. 1500 622
      po/nl.po
  25. 1070 347
      po/no_NO.po
  26. 1068 338
      po/pl.po
  27. 1075 344
      po/pt_BR.po
  28. 1124 734
      po/ru.po
  29. 1074 344
      po/sv.po
  30. 983 232
      po/zh_TW.po

+ 16 - 16
ftparchive/apt-ftparchive.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: apt-ftparchive.cc,v 1.5 2002/11/11 04:27:51 doogie Exp $
+// $Id: apt-ftparchive.cc,v 1.6 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    apt-scanpackages - Efficient work-alike for dpkg-scanpackages
    apt-scanpackages - Efficient work-alike for dpkg-scanpackages
@@ -160,9 +160,9 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
 			   flCombine(OverrideDir,BinOverride),
 			   flCombine(OverrideDir,BinOverride),
 			   flCombine(OverrideDir,ExtraOverride));
 			   flCombine(OverrideDir,ExtraOverride));
    if (PkgExt.empty() == false && Packages.SetExts(PkgExt) == false)
    if (PkgExt.empty() == false && Packages.SetExts(PkgExt) == false)
-      return _error->Error("Package extension list is too long");
+      return _error->Error(_("Package extension list is too long"));
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
    
    
    Packages.PathPrefix = PathPrefix;
    Packages.PathPrefix = PathPrefix;
    Packages.DirStrip = ArchiveDir;
    Packages.DirStrip = ArchiveDir;
@@ -176,7 +176,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
 		      PkgCompress,Permissions);
 		      PkgCompress,Permissions);
    Packages.Output = Comp.Input;
    Packages.Output = Comp.Input;
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
    
    
    c0out << ' ' << BaseDir << ":" << flush;
    c0out << ' ' << BaseDir << ":" << flush;
    
    
@@ -199,7 +199,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
    if (Comp.Finalize(Size) == false)
    if (Comp.Finalize(Size) == false)
    {
    {
       c0out << endl;
       c0out << endl;
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
    }
    }
    
    
    if (Size != 0)
    if (Size != 0)
@@ -246,9 +246,9 @@ bool PackageMap::GenSources(Configuration &Setup,struct CacheDB::Stats &Stats)
 			 flCombine(OverrideDir,SrcOverride),
 			 flCombine(OverrideDir,SrcOverride),
 			 flCombine(OverrideDir,SrcExtraOverride));
 			 flCombine(OverrideDir,SrcExtraOverride));
    if (SrcExt.empty() == false && Sources.SetExts(SrcExt) == false)
    if (SrcExt.empty() == false && Sources.SetExts(SrcExt) == false)
-      return _error->Error("Source extension list is too long");
+      return _error->Error(_("Source extension list is too long"));
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
    
    
    Sources.PathPrefix = PathPrefix;
    Sources.PathPrefix = PathPrefix;
    Sources.DirStrip = ArchiveDir;
    Sources.DirStrip = ArchiveDir;
@@ -262,7 +262,7 @@ bool PackageMap::GenSources(Configuration &Setup,struct CacheDB::Stats &Stats)
 		      SrcCompress,Permissions);
 		      SrcCompress,Permissions);
    Sources.Output = Comp.Input;
    Sources.Output = Comp.Input;
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
 
 
    c0out << ' ' << BaseDir << ":" << flush;
    c0out << ' ' << BaseDir << ":" << flush;
    
    
@@ -284,7 +284,7 @@ bool PackageMap::GenSources(Configuration &Setup,struct CacheDB::Stats &Stats)
    if (Comp.Finalize(Size) == false)
    if (Comp.Finalize(Size) == false)
    {
    {
       c0out << endl;
       c0out << endl;
-      return _error->Error("Error Processing directory %s",BaseDir.c_str());
+      return _error->Error(_("Error Processing directory %s"),BaseDir.c_str());
    }
    }
       
       
    if (Size != 0)
    if (Size != 0)
@@ -333,7 +333,7 @@ bool PackageMap::GenContents(Configuration &Setup,
    // Create a package writer object.
    // Create a package writer object.
    ContentsWriter Contents("");
    ContentsWriter Contents("");
    if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false)
    if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false)
-      return _error->Error("Package extension list is too long");
+      return _error->Error(_("Package extension list is too long"));
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
       return false;
       return false;
 
 
@@ -363,7 +363,7 @@ bool PackageMap::GenContents(Configuration &Setup,
 	    return false;
 	    return false;
 	 
 	 
 	 if (fwrite(Buf,1,ToRead,Comp.Input) != ToRead)
 	 if (fwrite(Buf,1,ToRead,Comp.Input) != ToRead)
-	    return _error->Errno("fwrite","Error writing header to contents file");
+	    return _error->Errno("fwrite",_("Error writing header to contents file"));
 	 
 	 
 	 Size -= ToRead;
 	 Size -= ToRead;
       }            
       }            
@@ -393,7 +393,7 @@ bool PackageMap::GenContents(Configuration &Setup,
    if (Comp.Finalize(Size) == false || _error->PendingError() == true)
    if (Comp.Finalize(Size) == false || _error->PendingError() == true)
    {
    {
       c0out << endl;
       c0out << endl;
-      return _error->Error("Error Processing Contents %s",
+      return _error->Error(_("Error Processing Contents %s"),
 			   this->Contents.c_str());
 			   this->Contents.c_str());
    }
    }
    
    
@@ -547,7 +547,7 @@ bool ShowHelp(CommandLine &CmdL)
       return true;
       return true;
 
 
    cout << 
    cout << 
-      "Usage: apt-ftparchive [options] command\n"
+    _("Usage: apt-ftparchive [options] command\n"
       "Commands: packges binarypath [overridefile [pathprefix]]\n"
       "Commands: packges binarypath [overridefile [pathprefix]]\n"
       "          sources srcpath [overridefile [pathprefix]]\n"
       "          sources srcpath [overridefile [pathprefix]]\n"
       "          contents path\n"
       "          contents path\n"
@@ -583,7 +583,7 @@ bool ShowHelp(CommandLine &CmdL)
       "  --no-delink Enable delinking debug mode\n"
       "  --no-delink Enable delinking debug mode\n"
       "  --contents  Control contents file generation\n"
       "  --contents  Control contents file generation\n"
       "  -c=?  Read this configuration file\n"
       "  -c=?  Read this configuration file\n"
-      "  -o=?  Set an arbitary configuration option" << endl;
+      "  -o=?  Set an arbitary configuration option") << endl;
    
    
    return true;
    return true;
 }
 }
@@ -728,7 +728,7 @@ bool Generate(CommandLine &CmdL)
       if (RegexChoice(List,CmdL.FileList + 2,CmdL.FileList + CmdL.FileSize()) == 0)
       if (RegexChoice(List,CmdL.FileList + 2,CmdL.FileList + CmdL.FileSize()) == 0)
       {
       {
 	 delete [] List;
 	 delete [] List;
-	 return _error->Error("No selections matched");
+	 return _error->Error(_("No selections matched"));
       }
       }
       _error->DumpErrors();
       _error->DumpErrors();
       
       
@@ -801,7 +801,7 @@ bool Generate(CommandLine &CmdL)
       {
       {
 	 if (MultiCompress::GetStat(flCombine(ArchiveDir,I->PkgFile),I->PkgCompress,B) == false)
 	 if (MultiCompress::GetStat(flCombine(ArchiveDir,I->PkgFile),I->PkgCompress,B) == false)
 	 {
 	 {
-	    _error->Warning("Some files are missing in the package file group `%s'",I->PkgFile.c_str());
+	    _error->Warning(_("Some files are missing in the package file group `%s'"),I->PkgFile.c_str());
 	    continue;
 	    continue;
 	 }
 	 }
 	 
 	 

+ 8 - 7
ftparchive/cachedb.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: cachedb.cc,v 1.5 2002/11/22 18:02:08 doogie Exp $
+// $Id: cachedb.cc,v 1.6 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    CacheDB
    CacheDB
@@ -16,6 +16,7 @@
 
 
 #include "cachedb.h"
 #include "cachedb.h"
 
 
+#include <apti18n.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
@@ -39,7 +40,7 @@ bool CacheDB::ReadyDB(string DB)
       corrupted DB */
       corrupted DB */
    if (DBFailed() == true)
    if (DBFailed() == true)
    {
    {
-      _error->Warning("DB was corrupted, file renamed to %s.old",DBFile.c_str());
+      _error->Warning(_("DB was corrupted, file renamed to %s.old"),DBFile.c_str());
       rename(DBFile.c_str(),(DBFile+".old").c_str());
       rename(DBFile.c_str(),(DBFile+".old").c_str());
    }
    }
    
    
@@ -55,7 +56,7 @@ bool CacheDB::ReadyDB(string DB)
                         0644,0,0,&Dbp)) != 0)
                         0644,0,0,&Dbp)) != 0)
    {
    {
       Dbp = 0;
       Dbp = 0;
-      return _error->Errno("db_open","Unable to open DB2 file %s",DB.c_str());
+      return _error->Errno("db_open",_("Unable to open DB2 file %s"),DB.c_str());
    }
    }
    
    
    DBFile = DB;
    DBFile = DB;
@@ -95,7 +96,7 @@ bool CacheDB::SetFile(string FileName,struct stat St,FileFd *Fd)
       {
       {
 	 CurStat.mtime = htonl(St.st_mtime);
 	 CurStat.mtime = htonl(St.st_mtime);
 	 CurStat.Flags = 0;
 	 CurStat.Flags = 0;
-	 _error->Warning("File date has changed %s",FileName.c_str());
+	 _error->Warning(_("File date has changed %s"),FileName.c_str());
       }      
       }      
    }      
    }      
    else
    else
@@ -136,7 +137,7 @@ bool CacheDB::LoadControl()
       return false;
       return false;
 
 
    if (Control.Control == 0)
    if (Control.Control == 0)
-      return _error->Error("Archive has no control record");
+      return _error->Error(_("Archive has no control record"));
    
    
    // Write back the control information
    // Write back the control information
    InitQuery("cl");
    InitQuery("cl");
@@ -249,11 +250,11 @@ bool CacheDB::Clean()
 #if DB_VERSION_MAJOR >= 2 && DB_VERSION_MINOR >= 7
 #if DB_VERSION_MAJOR >= 2 && DB_VERSION_MINOR >= 7
    DBC *Cursor;
    DBC *Cursor;
    if ((errno = Dbp->cursor(Dbp,0,&Cursor,0)) != 0)
    if ((errno = Dbp->cursor(Dbp,0,&Cursor,0)) != 0)
-      return _error->Error("Unable to get a cursor");
+      return _error->Error(_("Unable to get a cursor"));
 #else
 #else
    DBC *Cursor;
    DBC *Cursor;
    if ((errno = Dbp->cursor(Dbp,0,&Cursor)) != 0)
    if ((errno = Dbp->cursor(Dbp,0,&Cursor)) != 0)
-      return _error->Error("Unable to get a cursor");
+      return _error->Error(_("Unable to get a cursor"));
 #endif
 #endif
    
    
    DBT Key;
    DBT Key;

+ 4 - 3
ftparchive/contents.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: contents.cc,v 1.3 2001/02/27 04:24:09 jgg Exp $
+// $Id: contents.cc,v 1.4 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
    
    
    contents - Archive contents generator
    contents - Archive contents generator
@@ -35,6 +35,7 @@
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
 #include "contents.h"
 #include "contents.h"
 
 
+#include <apti18n.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -342,7 +343,7 @@ bool ContentsExtract::DoItem(Item &Itm,int &Fd)
 	 MaxSize = 512*1024/2;
 	 MaxSize = 512*1024/2;
       char *NewData = (char *)realloc(Data,MaxSize*2);
       char *NewData = (char *)realloc(Data,MaxSize*2);
       if (NewData == 0)
       if (NewData == 0)
-	 return _error->Error("realloc - Failed to allocate memory");
+	 return _error->Error(_("realloc - Failed to allocate memory"));
       Data = NewData;
       Data = NewData;
       MaxSize *= 2;
       MaxSize *= 2;
    }
    }
@@ -373,7 +374,7 @@ bool ContentsExtract::TakeContents(const void *NewData,unsigned long Length)
       
       
       char *NewData = (char *)realloc(Data,MaxSize*2);
       char *NewData = (char *)realloc(Data,MaxSize*2);
       if (NewData == 0)
       if (NewData == 0)
-	 return _error->Error("realloc - Failed to allocate memory");
+	 return _error->Error(_("realloc - Failed to allocate memory"));
       Data = NewData;
       Data = NewData;
       MaxSize *= 2;
       MaxSize *= 2;
    }
    }

+ 16 - 15
ftparchive/multicompress.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: multicompress.cc,v 1.3 2001/05/29 03:48:27 jgg Exp $
+// $Id: multicompress.cc,v 1.4 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    MultiCompressor
    MultiCompressor
@@ -20,6 +20,7 @@
 
 
 #include "multicompress.h"
 #include "multicompress.h"
     
     
+#include <apti18n.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/md5.h>
@@ -71,7 +72,7 @@ MultiCompress::MultiCompress(string Output,string Compress,
       // Hmm.. unknown.
       // Hmm.. unknown.
       if (Comp->Name == 0)
       if (Comp->Name == 0)
       {
       {
-	 _error->Warning("Unknown Compresison Algorithm '%s'",string(Start,I).c_str());
+	 _error->Warning(_("Unknown Compresison Algorithm '%s'"),string(Start,I).c_str());
 	 continue;
 	 continue;
       }
       }
       
       
@@ -101,7 +102,7 @@ MultiCompress::MultiCompress(string Output,string Compress,
 
 
    if (Outputs == 0)
    if (Outputs == 0)
    {
    {
-      _error->Error("Compressed output %s needs a compression set",Output.c_str());
+      _error->Error(_("Compressed output %s needs a compression set"),Output.c_str());
       return;
       return;
    }
    }
 
 
@@ -168,7 +169,7 @@ bool MultiCompress::Start()
    // Create a data pipe
    // Create a data pipe
    int Pipe[2] = {-1,-1};
    int Pipe[2] = {-1,-1};
    if (pipe(Pipe) != 0)
    if (pipe(Pipe) != 0)
-      return _error->Errno("pipe","Failed to create IPC pipe to subprocess");
+      return _error->Errno("pipe",_("Failed to create IPC pipe to subprocess"));
    for (int I = 0; I != 2; I++)
    for (int I = 0; I != 2; I++)
       SetCloseExec(Pipe[I],true);
       SetCloseExec(Pipe[I],true);
    
    
@@ -194,10 +195,10 @@ bool MultiCompress::Start()
    close(Pipe[0]);
    close(Pipe[0]);
    Input = fdopen(Pipe[1],"w");
    Input = fdopen(Pipe[1],"w");
    if (Input == 0)
    if (Input == 0)
-      return _error->Errno("fdopen","Failed to create FILE*");
+      return _error->Errno("fdopen",_("Failed to create FILE*"));
    
    
    if (Outputter == -1)
    if (Outputter == -1)
-      return _error->Errno("fork","Failed to fork");   
+      return _error->Errno("fork",_("Failed to fork"));   
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -211,7 +212,7 @@ bool MultiCompress::Die()
    
    
    fclose(Input);
    fclose(Input);
    Input = 0;
    Input = 0;
-   bool Res = ExecWait(Outputter,"Compress Child",false);
+   bool Res = ExecWait(Outputter,_("Compress Child"),false);
    Outputter = -1;
    Outputter = -1;
    return Res;
    return Res;
 }
 }
@@ -234,7 +235,7 @@ bool MultiCompress::Finalize(unsigned long &OutSize)
    {
    {
       struct stat St;
       struct stat St;
       if (stat(I->Output.c_str(),&St) != 0)
       if (stat(I->Output.c_str(),&St) != 0)
-	 return  _error->Error("Internal Error, Failed to create %s",
+	 return  _error->Error(_("Internal Error, Failed to create %s"),
 			       I->Output.c_str());
 			       I->Output.c_str());
       
       
       if (I->OldMTime != St.st_mtime)
       if (I->OldMTime != St.st_mtime)
@@ -285,7 +286,7 @@ bool MultiCompress::OpenCompress(const CompType *Prog,int &Pid,int FileFd,
    // Create a data pipe
    // Create a data pipe
    int Pipe[2] = {-1,-1};
    int Pipe[2] = {-1,-1};
    if (pipe(Pipe) != 0)
    if (pipe(Pipe) != 0)
-      return _error->Errno("pipe","Failed to create subprocess IPC");
+      return _error->Errno("pipe",_("Failed to create subprocess IPC"));
    for (int J = 0; J != 2; J++)
    for (int J = 0; J != 2; J++)
       SetCloseExec(Pipe[J],true);
       SetCloseExec(Pipe[J],true);
 
 
@@ -320,7 +321,7 @@ bool MultiCompress::OpenCompress(const CompType *Prog,int &Pid,int FileFd,
 	 Args[1] = Prog->UnCompArgs;
 	 Args[1] = Prog->UnCompArgs;
       Args[2] = 0;
       Args[2] = 0;
       execvp(Args[0],(char **)Args);
       execvp(Args[0],(char **)Args);
-      cerr << "Failed to exec compressor " << Args[0] << endl;
+      cerr << _("Failed to exec compressor ") << Args[0] << endl;
       _exit(100);
       _exit(100);
    };      
    };      
    if (Comp == true)
    if (Comp == true)
@@ -359,7 +360,7 @@ bool MultiCompress::CloseOld(int Fd,int Proc)
 {
 {
    close(Fd);
    close(Fd);
    if (Proc != -1)
    if (Proc != -1)
-      if (ExecWait(Proc,"decompressor",false) == false)
+      if (ExecWait(Proc,_("decompressor"),false) == false)
 	 return false;
 	 return false;
    return true;
    return true;
 }   
 }   
@@ -402,7 +403,7 @@ bool MultiCompress::Child(int FD)
       {
       {
 	 if (write(I->Fd,Buffer,Res) != Res)
 	 if (write(I->Fd,Buffer,Res) != Res)
 	 {
 	 {
-	    _error->Errno("write","IO to subprocess/file failed");
+	    _error->Errno("write",_("IO to subprocess/file failed"));
 	    break;
 	    break;
 	 }
 	 }
       }      
       }      
@@ -454,7 +455,7 @@ bool MultiCompress::Child(int FD)
 	 if (Res == 0)
 	 if (Res == 0)
 	    break;
 	    break;
 	 if (Res < 0)
 	 if (Res < 0)
-	    return _error->Errno("read","Failed to read while computing MD5");
+	    return _error->Errno("read",_("Failed to read while computing MD5"));
 	 NewFileSize += Res;
 	 NewFileSize += Res;
 	 OldMD5.Add(Buffer,Res);
 	 OldMD5.Add(Buffer,Res);
       }
       }
@@ -471,7 +472,7 @@ bool MultiCompress::Child(int FD)
 	 {
 	 {
 	    I->TmpFile.Close();
 	    I->TmpFile.Close();
 	    if (unlink(I->TmpFile.Name().c_str()) != 0)
 	    if (unlink(I->TmpFile.Name().c_str()) != 0)
-	       _error->Errno("unlink","Problem unlinking %s",
+	       _error->Errno("unlink",_("Problem unlinking %s"),
 			     I->TmpFile.Name().c_str());
 			     I->TmpFile.Name().c_str());
 	 }
 	 }
 	 return !_error->PendingError();
 	 return !_error->PendingError();
@@ -486,7 +487,7 @@ bool MultiCompress::Child(int FD)
       fchmod(I->TmpFile.Fd(),Permissions);
       fchmod(I->TmpFile.Fd(),Permissions);
       
       
       if (rename(I->TmpFile.Name().c_str(),I->Output.c_str()) != 0)
       if (rename(I->TmpFile.Name().c_str(),I->Output.c_str()) != 0)
-	 _error->Errno("rename","Failed to rename %s to %s",
+	 _error->Errno("rename",_("Failed to rename %s to %s"),
 		       I->TmpFile.Name().c_str(),I->Output.c_str());
 		       I->TmpFile.Name().c_str(),I->Output.c_str());
       I->TmpFile.Close();
       I->TmpFile.Close();
    }
    }

+ 12 - 11
ftparchive/override.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: override.cc,v 1.3 2001/06/26 02:50:27 jgg Exp $
+// $Id: override.cc,v 1.4 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Override
    Override
@@ -16,6 +16,7 @@
 
 
 #include "override.h"
 #include "override.h"
     
     
+#include <apti18n.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 
 
@@ -34,7 +35,7 @@ bool Override::ReadOverride(string File,bool Source)
    
    
    FILE *F = fopen(File.c_str(),"r");
    FILE *F = fopen(File.c_str(),"r");
    if (F == 0)
    if (F == 0)
-      return _error->Errno("fopen","Unable to open %s",File.c_str());
+      return _error->Errno("fopen",_("Unable to open %s"),File.c_str());
    
    
    char Line[500];
    char Line[500];
    unsigned long Counter = 0;
    unsigned long Counter = 0;
@@ -60,7 +61,7 @@ bool Override::ReadOverride(string File,bool Source)
       for (; isspace(*End) == 0 && *End != 0; End++);
       for (; isspace(*End) == 0 && *End != 0; End++);
       if (*End == 0)
       if (*End == 0)
       {
       {
-	 _error->Warning("Malformed override %s line %lu #1",File.c_str(),
+	 _error->Warning(_("Malformed override %s line %lu #1"),File.c_str(),
 			 Counter);
 			 Counter);
 	 continue;
 	 continue;
       }      
       }      
@@ -74,7 +75,7 @@ bool Override::ReadOverride(string File,bool Source)
 	 for (; isspace(*End) == 0 && *End != 0; End++);
 	 for (; isspace(*End) == 0 && *End != 0; End++);
 	 if (*End == 0)
 	 if (*End == 0)
 	 {
 	 {
-	    _error->Warning("Malformed override %s line %lu #2",File.c_str(),
+	    _error->Warning(_("Malformed override %s line %lu #2"),File.c_str(),
 			    Counter);
 			    Counter);
 	    continue;
 	    continue;
 	 }
 	 }
@@ -88,7 +89,7 @@ bool Override::ReadOverride(string File,bool Source)
       for (; isspace(*End) == 0 && *End != 0; End++);
       for (; isspace(*End) == 0 && *End != 0; End++);
       if (*End == 0)
       if (*End == 0)
       {
       {
-	 _error->Warning("Malformed override %s line %lu #3",File.c_str(),
+	 _error->Warning(_("Malformed override %s line %lu #3"),File.c_str(),
 			 Counter);
 			 Counter);
 	 continue;
 	 continue;
       }      
       }      
@@ -127,7 +128,7 @@ bool Override::ReadOverride(string File,bool Source)
    }
    }
 
 
    if (ferror(F))
    if (ferror(F))
-      _error->Errno("fgets","Failed to read the override file %s",File.c_str());
+      _error->Errno("fgets",_("Failed to read the override file %s"),File.c_str());
    fclose(F);
    fclose(F);
    return true;
    return true;
 }
 }
@@ -142,7 +143,7 @@ bool Override::ReadExtraOverride(string File,bool Source)
    
    
    FILE *F = fopen(File.c_str(),"r");
    FILE *F = fopen(File.c_str(),"r");
    if (F == 0)
    if (F == 0)
-      return _error->Errno("fopen","Unable to open %s",File.c_str());
+      return _error->Errno("fopen",_("Unable to open %s"),File.c_str());
   
   
    char Line[500];
    char Line[500];
    unsigned long Counter = 0;
    unsigned long Counter = 0;
@@ -166,7 +167,7 @@ bool Override::ReadExtraOverride(string File,bool Source)
       for (; isspace(*End) == 0 && *End != 0; End++);
       for (; isspace(*End) == 0 && *End != 0; End++);
       if (*End == 0)
       if (*End == 0)
       {
       {
-	 _error->Warning("Malformed override %s line %lu #1",File.c_str(),
+	 _error->Warning(_("Malformed override %s line %lu #1"),File.c_str(),
 			 Counter);
 			 Counter);
 	 continue;
 	 continue;
       }      
       }      
@@ -178,7 +179,7 @@ bool Override::ReadExtraOverride(string File,bool Source)
       for (; isspace(*End) == 0 && *End != 0; End++);
       for (; isspace(*End) == 0 && *End != 0; End++);
       if (*End == 0)
       if (*End == 0)
       {
       {
-	 _error->Warning("Malformed override %s line %lu #2",File.c_str(),
+	 _error->Warning(_("Malformed override %s line %lu #2"),File.c_str(),
 			 Counter);
 			 Counter);
 	 continue;
 	 continue;
       }
       }
@@ -191,7 +192,7 @@ bool Override::ReadExtraOverride(string File,bool Source)
       for (; isspace(*(End-1)) && End > Value; End--);
       for (; isspace(*(End-1)) && End > Value; End--);
       if (End == Value)
       if (End == Value)
       {
       {
-	 _error->Warning("Malformed override %s line %lu #3",File.c_str(),
+	 _error->Warning(_("Malformed override %s line %lu #3"),File.c_str(),
 			 Counter);
 			 Counter);
 	 continue;
 	 continue;
       }      
       }      
@@ -201,7 +202,7 @@ bool Override::ReadExtraOverride(string File,bool Source)
    }
    }
 
 
    if (ferror(F))
    if (ferror(F))
-      _error->Errno("fgets","Failed to read the override file %s",File.c_str());
+      _error->Errno("fgets",_("Failed to read the override file %s"),File.c_str());
    fclose(F);
    fclose(F);
    return true;
    return true;
 }
 }

+ 26 - 26
ftparchive/writer.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: writer.cc,v 1.6 2002/11/11 04:27:51 doogie Exp $
+// $Id: writer.cc,v 1.7 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Writer 
    Writer 
@@ -17,6 +17,7 @@
 
 
 #include "writer.h"
 #include "writer.h"
     
     
+#include <apti18n.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
@@ -74,12 +75,12 @@ int FTWScanner::Scanner(const char *File,const struct stat *sb,int Flag)
    if (Flag == FTW_DNR)
    if (Flag == FTW_DNR)
    {
    {
       Owner->NewLine(1);
       Owner->NewLine(1);
-      c1out << "W: Unable to read directory " << File << endl;
+      ioprintf(c1out, _("W: Unable to read directory %s\n"), File);
    }   
    }   
    if (Flag == FTW_NS)
    if (Flag == FTW_NS)
    {
    {
       Owner->NewLine(1);
       Owner->NewLine(1);
-      c1out << "W: Unable to stat " << File << endl;
+      ioprintf(c1out, _("W: Unable to stat %s\n"), File);
    }   
    }   
    if (Flag != FTW_F)
    if (Flag != FTW_F)
       return 0;
       return 0;
@@ -118,16 +119,16 @@ int FTWScanner::Scanner(const char *File,const struct stat *sb,int Flag)
 	 
 	 
 	 bool Type = _error->PopMessage(Err);
 	 bool Type = _error->PopMessage(Err);
 	 if (Type == true)
 	 if (Type == true)
-	    cerr << "E: " << Err << endl;
+	    cerr << _("E: ") << Err << endl;
 	 else
 	 else
-	    cerr << "W: " << Err << endl;
+	    cerr << _("W: ") << Err << endl;
 	 
 	 
 	 if (Err.find(File) != string::npos)
 	 if (Err.find(File) != string::npos)
 	    SeenPath = true;
 	    SeenPath = true;
       }      
       }      
       
       
       if (SeenPath == false)
       if (SeenPath == false)
-	 cerr << "E: Errors apply to file '" << File << "'" << endl;
+	 cerr << _("E: Errors apply to file ") << "'" << File << "'" << endl;
       return 0;
       return 0;
    }
    }
    
    
@@ -144,7 +145,7 @@ bool FTWScanner::RecursiveScan(string Dir)
    if (InternalPrefix.empty() == true)
    if (InternalPrefix.empty() == true)
    {
    {
       if (realpath(Dir.c_str(),RealPath) == 0)
       if (realpath(Dir.c_str(),RealPath) == 0)
-	 return _error->Errno("realpath","Failed to resolve %s",Dir.c_str());
+	 return _error->Errno("realpath",_("Failed to resolve %s"),Dir.c_str());
       InternalPrefix = RealPath;      
       InternalPrefix = RealPath;      
    }
    }
    
    
@@ -156,7 +157,7 @@ bool FTWScanner::RecursiveScan(string Dir)
    if (Res != 0)
    if (Res != 0)
    {
    {
       if (_error->PendingError() == false)
       if (_error->PendingError() == false)
-	 _error->Errno("ftw","Tree walking failed");
+	 _error->Errno("ftw",_("Tree walking failed"));
       return false;
       return false;
    }
    }
    
    
@@ -174,14 +175,14 @@ bool FTWScanner::LoadFileList(string Dir,string File)
    if (InternalPrefix.empty() == true)
    if (InternalPrefix.empty() == true)
    {
    {
       if (realpath(Dir.c_str(),RealPath) == 0)
       if (realpath(Dir.c_str(),RealPath) == 0)
-	 return _error->Errno("realpath","Failed to resolve %s",Dir.c_str());
+	 return _error->Errno("realpath",_("Failed to resolve %s"),Dir.c_str());
       InternalPrefix = RealPath;      
       InternalPrefix = RealPath;      
    }
    }
    
    
    Owner = this;
    Owner = this;
    FILE *List = fopen(File.c_str(),"r");
    FILE *List = fopen(File.c_str(),"r");
    if (List == 0)
    if (List == 0)
-      return _error->Errno("fopen","Failed to open %s",File.c_str());
+      return _error->Errno("fopen",_("Failed to open %s"),File.c_str());
    
    
    /* We are a tad tricky here.. We prefix the buffer with the directory
    /* We are a tad tricky here.. We prefix the buffer with the directory
       name, that way if we need a full path with just use line.. Sneaky and
       name, that way if we need a full path with just use line.. Sneaky and
@@ -238,25 +239,26 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
 	    cout << endl;
 	    cout << endl;
 	 
 	 
 	 NewLine(1);
 	 NewLine(1);
-	 c1out << " DeLink " << (OriginalPath + InternalPrefix.length())
-	    << " [" << SizeToStr(St.st_size) << "B]" << endl << flush;
+	 ioprintf(c1out, _(" DeLink %s [%s]\n"), (OriginalPath + InternalPrefix.length()),
+		    SizeToStr(St.st_size).c_str());
+	 c1out << flush;
 	 
 	 
 	 if (NoLinkAct == false)
 	 if (NoLinkAct == false)
 	 {
 	 {
 	    char OldLink[400];
 	    char OldLink[400];
 	    if (readlink(OriginalPath,OldLink,sizeof(OldLink)) == -1)
 	    if (readlink(OriginalPath,OldLink,sizeof(OldLink)) == -1)
-	       _error->Errno("readlink","Failed to readlink %s",OriginalPath);
+	       _error->Errno("readlink",_("Failed to readlink %s"),OriginalPath);
 	    else
 	    else
 	    {
 	    {
 	       if (unlink(OriginalPath) != 0)
 	       if (unlink(OriginalPath) != 0)
-		  _error->Errno("unlink","Failed to unlink %s",OriginalPath);
+		  _error->Errno("unlink",_("Failed to unlink %s"),OriginalPath);
 	       else
 	       else
 	       {
 	       {
 		  if (link(FileName.c_str(),OriginalPath) != 0)
 		  if (link(FileName.c_str(),OriginalPath) != 0)
 		  {
 		  {
 		     // Panic! Restore the symlink
 		     // Panic! Restore the symlink
 		     symlink(OldLink,OriginalPath);
 		     symlink(OldLink,OriginalPath);
-		     return _error->Errno("link","*** Failed to link %s to %s",
+		     return _error->Errno("link",_("*** Failed to link %s to %s"),
 					  FileName.c_str(),
 					  FileName.c_str(),
 					  OriginalPath);
 					  OriginalPath);
 		  }	       
 		  }	       
@@ -266,7 +268,7 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
 	 
 	 
 	 DeLinkBytes += St.st_size;
 	 DeLinkBytes += St.st_size;
 	 if (DeLinkBytes/1024 >= DeLinkLimit)
 	 if (DeLinkBytes/1024 >= DeLinkLimit)
-	    c1out << " DeLink limit of " << SizeToStr(DeLinkBytes) << "B hit." << endl;      
+	    ioprintf(c1out, _(" DeLink limit of %sB hit.\n"), SizeToStr(DeLinkBytes).c_str());      
       }
       }
       
       
       FileName = OriginalPath;
       FileName = OriginalPath;
@@ -333,7 +335,7 @@ bool PackagesWriter::DoPackage(string FileName)
    // Stat the file for later
    // Stat the file for later
    struct stat St;
    struct stat St;
    if (fstat(F.Fd(),&St) != 0)
    if (fstat(F.Fd(),&St) != 0)
-      return _error->Errno("fstat","Failed to stat %s",FileName.c_str());
+      return _error->Errno("fstat",_("Failed to stat %s"),FileName.c_str());
 
 
    // Pull all the data we need form the DB
    // Pull all the data we need form the DB
    string MD5Res;
    string MD5Res;
@@ -353,7 +355,7 @@ bool PackagesWriter::DoPackage(string FileName)
    Override::Item *OverItem = Over.GetItem(Package);
    Override::Item *OverItem = Over.GetItem(Package);
    
    
    if (Package.empty() == true)
    if (Package.empty() == true)
-      return _error->Error("Archive had no package field");
+      return _error->Error(_("Archive had no package field"));
    
    
    // If we need to do any rewriting of the header do it now..
    // If we need to do any rewriting of the header do it now..
    if (OverItem == 0)
    if (OverItem == 0)
@@ -361,7 +363,7 @@ bool PackagesWriter::DoPackage(string FileName)
       if (NoOverride == false)
       if (NoOverride == false)
       {
       {
 	 NewLine(1);
 	 NewLine(1);
-	 c1out << "  " << Package << " has no override entry" << endl;
+	 ioprintf(c1out, _("  %s has no override entry\n"), Package.c_str());
       }
       }
       
       
       OverItem = &Tmp;
       OverItem = &Tmp;
@@ -404,9 +406,8 @@ bool PackagesWriter::DoPackage(string FileName)
       if (NoOverride == false)
       if (NoOverride == false)
       {
       {
 	 NewLine(1);
 	 NewLine(1);
-	 c1out << "  " << Package << " maintainer is " <<
-	       Tags.FindS("Maintainer") << " not " <<
-  	       OverItem->OldMaint << endl;
+	 ioprintf(c1out, _("  %s maintainer is %s not %s\n"),
+	       Package.c_str(), Tags.FindS("Maintainer").c_str(), OverItem->OldMaint.c_str());
       }      
       }      
    }
    }
    
    
@@ -572,7 +573,7 @@ bool SourcesWriter::DoPackage(string FileName)
       if (NoOverride == false)
       if (NoOverride == false)
       {
       {
 	 NewLine(1);	 
 	 NewLine(1);	 
-	 c1out << "  " << Tags.FindS("Source") << " has no override entry" << endl;
+	 ioprintf(c1out, _("  %s has no override entry\n"), Tags.FindS("Source").c_str());
       }
       }
       
       
       OverItem = &Tmp;
       OverItem = &Tmp;
@@ -654,9 +655,8 @@ bool SourcesWriter::DoPackage(string FileName)
       if (NoOverride == false)
       if (NoOverride == false)
       {
       {
 	 NewLine(1);	 
 	 NewLine(1);	 
-	 c1out << "  " << Package << " maintainer is " <<
-	       Tags.FindS("Maintainer") << " not " <<
-  	       OverItem->OldMaint << endl;
+	 ioprintf(c1out, _("  %s maintainer is %s not %s\n"), Package.c_str(),
+	       Tags.FindS("Maintainer").c_str(), OverItem->OldMaint.c_str());
       }      
       }      
    }
    }
    if (NewMaint.empty() == false)
    if (NewMaint.empty() == false)

+ 9 - 8
methods/cdrom.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: cdrom.cc,v 1.19 2002/11/22 07:26:10 doogie Exp $
+// $Id: cdrom.cc,v 1.20 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    CDROM URI method for APT
    CDROM URI method for APT
@@ -8,6 +8,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/cdromutl.h>
 #include <apt-pkg/cdromutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
@@ -109,7 +110,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
       if (FileExists(DFile) == true)
       if (FileExists(DFile) == true)
       {
       {
 	 if (ReadConfigFile(Database,DFile) == false)
 	 if (ReadConfigFile(Database,DFile) == false)
-	    return _error->Error("Unable to read the cdrom database %s",
+	    return _error->Error(_("Unable to read the cdrom database %s"),
 			  DFile.c_str());
 			  DFile.c_str());
       }
       }
       DatabaseLoaded = true;
       DatabaseLoaded = true;
@@ -118,15 +119,15 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
    // All non IMS queries for package files fail.
    // All non IMS queries for package files fail.
    if (Itm->IndexFile == true || GetID(Get.Host).empty() == true)
    if (Itm->IndexFile == true || GetID(Get.Host).empty() == true)
    {
    {
-      Fail("Please use apt-cdrom to make this CD recognized by APT."
-	   " apt-get update cannot be used to add new CDs");
+      Fail(_("Please use apt-cdrom to make this CD recognized by APT."
+	   " apt-get update cannot be used to add new CDs"));
       return true;
       return true;
    }
    }
 
 
    // We already have a CD inserted, but it is the wrong one
    // We already have a CD inserted, but it is the wrong one
    if (CurrentID.empty() == false && Database.Find("CD::" + CurrentID) != Get.Host)
    if (CurrentID.empty() == false && Database.Find("CD::" + CurrentID) != Get.Host)
    {
    {
-      Fail("Wrong CD",true);
+      Fail(_("Wrong CD"),true);
       return true;
       return true;
    }
    }
    
    
@@ -159,12 +160,12 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
 	 
 	 
       // I suppose this should prompt somehow?
       // I suppose this should prompt somehow?
       if (UnmountCdrom(CDROM) == false)
       if (UnmountCdrom(CDROM) == false)
-	 return _error->Error("Unable to unmount the CD-ROM in %s, it may still be in use.",
+	 return _error->Error(_("Unable to unmount the CD-ROM in %s, it may still be in use."),
 			      CDROM.c_str());
 			      CDROM.c_str());
       if (MediaFail(Get.Host,CDROM) == false)
       if (MediaFail(Get.Host,CDROM) == false)
       {
       {
 	 CurrentID = "FAIL";
 	 CurrentID = "FAIL";
-	 Fail("Wrong CD",true);
+	 Fail(_("Wrong CD"),true);
 	 return true;
 	 return true;
       }
       }
    }
    }
@@ -173,7 +174,7 @@ bool CDROMMethod::Fetch(FetchItem *Itm)
    Res.Filename = CDROM + File;
    Res.Filename = CDROM + File;
    struct stat Buf;
    struct stat Buf;
    if (stat(Res.Filename.c_str(),&Buf) != 0)
    if (stat(Res.Filename.c_str(),&Buf) != 0)
-      return _error->Error("File not found");
+      return _error->Error(_("File not found"));
    
    
    if (NewID.empty() == false)
    if (NewID.empty() == false)
       CurrentID = NewID;
       CurrentID = NewID;

+ 16 - 15
methods/connect.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: connect.cc,v 1.9 2002/09/14 05:28:38 jgg Exp $
+// $Id: connect.cc,v 1.10 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Connect - Replacement connect call
    Connect - Replacement connect call
@@ -11,6 +11,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include "connect.h"
 #include "connect.h"
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
@@ -60,14 +61,14 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    getnameinfo(Addr->ai_addr,Addr->ai_addrlen,
    getnameinfo(Addr->ai_addr,Addr->ai_addrlen,
 	       Name,sizeof(Name),Service,sizeof(Service),
 	       Name,sizeof(Name),Service,sizeof(Service),
 	       NI_NUMERICHOST|NI_NUMERICSERV);
 	       NI_NUMERICHOST|NI_NUMERICSERV);
-   Owner->Status("Connecting to %s (%s)",Host.c_str(),Name);
+   Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name);
 
 
    /* If this is an IP rotation store the IP we are using.. If something goes
    /* If this is an IP rotation store the IP we are using.. If something goes
       wrong this will get tacked onto the end of the error message */
       wrong this will get tacked onto the end of the error message */
    if (LastHostAddr->ai_next != 0)
    if (LastHostAddr->ai_next != 0)
    {
    {
       char Name2[NI_MAXHOST + NI_MAXSERV + 10];
       char Name2[NI_MAXHOST + NI_MAXSERV + 10];
-      snprintf(Name2,sizeof(Name2),"[IP: %s %s]",Name,Service);
+      snprintf(Name2,sizeof(Name2),_("[IP: %s %s]"),Name,Service);
       Owner->SetFailExtraMsg(string(Name2));
       Owner->SetFailExtraMsg(string(Name2));
    }   
    }   
    else
    else
@@ -76,31 +77,31 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    // Get a socket
    // Get a socket
    if ((Fd = socket(Addr->ai_family,Addr->ai_socktype,
    if ((Fd = socket(Addr->ai_family,Addr->ai_socktype,
 		    Addr->ai_protocol)) < 0)
 		    Addr->ai_protocol)) < 0)
-      return _error->Errno("socket","Could not create a socket for %s (f=%u t=%u p=%u)",
+      return _error->Errno("socket",_("Could not create a socket for %s (f=%u t=%u p=%u)"),
 			   Name,Addr->ai_family,Addr->ai_socktype,Addr->ai_protocol);
 			   Name,Addr->ai_family,Addr->ai_socktype,Addr->ai_protocol);
    
    
    SetNonBlock(Fd,true);
    SetNonBlock(Fd,true);
    if (connect(Fd,Addr->ai_addr,Addr->ai_addrlen) < 0 &&
    if (connect(Fd,Addr->ai_addr,Addr->ai_addrlen) < 0 &&
        errno != EINPROGRESS)
        errno != EINPROGRESS)
-      return _error->Errno("connect","Cannot initiate the connection "
-			   "to %s:%s (%s).",Host.c_str(),Service,Name);
+      return _error->Errno("connect",_("Cannot initiate the connection "
+			   "to %s:%s (%s)."),Host.c_str(),Service,Name);
    
    
    /* This implements a timeout for connect by opening the connection
    /* This implements a timeout for connect by opening the connection
       nonblocking */
       nonblocking */
    if (WaitFd(Fd,true,TimeOut) == false)
    if (WaitFd(Fd,true,TimeOut) == false)
-      return _error->Error("Could not connect to %s:%s (%s), "
-			   "connection timed out",Host.c_str(),Service,Name);
+      return _error->Error(_("Could not connect to %s:%s (%s), "
+			   "connection timed out"),Host.c_str(),Service,Name);
 
 
    // Check the socket for an error condition
    // Check the socket for an error condition
    unsigned int Err;
    unsigned int Err;
    unsigned int Len = sizeof(Err);
    unsigned int Len = sizeof(Err);
    if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
    if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
-      return _error->Errno("getsockopt","Failed");
+      return _error->Errno("getsockopt",_("Failed"));
    
    
    if (Err != 0)
    if (Err != 0)
    {
    {
       errno = Err;
       errno = Err;
-      return _error->Errno("connect","Could not connect to %s:%s (%s).",Host.c_str(),
+      return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
 			   Service,Name);
 			   Service,Name);
    }
    }
    
    
@@ -128,7 +129,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
       sensible */
       sensible */
    if (LastHost != Host || LastPort != Port)
    if (LastHost != Host || LastPort != Port)
    {
    {
-      Owner->Status("Connecting to %s",Host.c_str());
+      Owner->Status(_("Connecting to %s"),Host.c_str());
 
 
       // Free the old address structure
       // Free the old address structure
       if (LastHostAddr != 0)
       if (LastHostAddr != 0)
@@ -159,13 +160,13 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
 		  DefPort = 0;
 		  DefPort = 0;
 		  continue;
 		  continue;
 	       }
 	       }
-	       return _error->Error("Could not resolve '%s'",Host.c_str());
+	       return _error->Error(_("Could not resolve '%s'"),Host.c_str());
 	    }
 	    }
 	    
 	    
 	    if (Res == EAI_AGAIN)
 	    if (Res == EAI_AGAIN)
-	       return _error->Error("Temporary failure resolving '%s'",
+	       return _error->Error(_("Temporary failure resolving '%s'"),
 				    Host.c_str());
 				    Host.c_str());
-	    return _error->Error("Something wicked happened resolving '%s:%s' (%i)",
+	    return _error->Error(_("Something wicked happened resolving '%s:%s' (%i)"),
 				 Host.c_str(),ServStr,Res);
 				 Host.c_str(),ServStr,Res);
 	 }
 	 }
 	 break;
 	 break;
@@ -212,6 +213,6 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
 
 
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)
       return false;   
       return false;   
-   return _error->Error("Unable to connect to %s %s:",Host.c_str(),ServStr);
+   return _error->Error(_("Unable to connect to %s %s:"),Host.c_str(),ServStr);
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 4 - 3
methods/copy.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: copy.cc,v 1.6 1999/01/20 04:36:43 jgg Exp $
+// $Id: copy.cc,v 1.7 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Copy URI - This method takes a uri like a file: uri and copies it
    Copy URI - This method takes a uri like a file: uri and copies it
@@ -9,6 +9,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
@@ -38,7 +39,7 @@ bool CopyMethod::Fetch(FetchItem *Itm)
    // Stat the file and send a start message
    // Stat the file and send a start message
    struct stat Buf;
    struct stat Buf;
    if (stat(File.c_str(),&Buf) != 0)
    if (stat(File.c_str(),&Buf) != 0)
-      return _error->Errno("stat","Failed to stat");
+      return _error->Errno("stat",_("Failed to stat"));
 
 
    // Forumulate a result and send a start message
    // Forumulate a result and send a start message
    FetchResult Res;
    FetchResult Res;
@@ -75,7 +76,7 @@ bool CopyMethod::Fetch(FetchItem *Itm)
    if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
    if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
    {
    {
       To.OpFail();
       To.OpFail();
-      return _error->Errno("utime","Failed to set modification time");
+      return _error->Errno("utime",_("Failed to set modification time"));
    }
    }
    
    
    URIDone(Res);
    URIDone(Res);

+ 4 - 3
methods/file.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: file.cc,v 1.8 2000/01/27 04:15:10 jgg Exp $
+// $Id: file.cc,v 1.9 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    File URI method for APT
    File URI method for APT
@@ -13,6 +13,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 
 
@@ -38,7 +39,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
    string File = Get.Path;
    string File = Get.Path;
    FetchResult Res;
    FetchResult Res;
    if (Get.Host.empty() == false)
    if (Get.Host.empty() == false)
-      return _error->Error("Invalid URI, local URIS must not start with //");
+      return _error->Error(_("Invalid URI, local URIS must not start with //"));
 
 
    // See if the file exists
    // See if the file exists
    struct stat Buf;
    struct stat Buf;
@@ -73,7 +74,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
    }
    }
    
    
    if (Res.Filename.empty() == true)
    if (Res.Filename.empty() == true)
-      return _error->Error("File not found");
+      return _error->Error(_("File not found"));
    
    
    URIDone(Res);
    URIDone(Res);
    return true;
    return true;

+ 43 - 41
methods/ftp.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: ftp.cc,v 1.29 2002/04/24 05:35:13 jgg Exp $
+// $Id: ftp.cc,v 1.30 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    FTP Aquire Method - This is the FTP aquire method for APT.
    FTP Aquire Method - This is the FTP aquire method for APT.
@@ -15,6 +15,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
@@ -158,18 +159,18 @@ bool FTPConn::Open(pkgAcqMethod *Owner)
       return false;
       return false;
 
 
    // Login must be before getpeername otherwise dante won't work.
    // Login must be before getpeername otherwise dante won't work.
-   Owner->Status("Logging in");
+   Owner->Status(_("Logging in"));
    bool Res = Login();
    bool Res = Login();
    
    
    // Get the remote server's address
    // Get the remote server's address
    PeerAddrLen = sizeof(PeerAddr);
    PeerAddrLen = sizeof(PeerAddr);
    if (getpeername(ServerFd,(sockaddr *)&PeerAddr,&PeerAddrLen) != 0)
    if (getpeername(ServerFd,(sockaddr *)&PeerAddr,&PeerAddrLen) != 0)
-      return _error->Errno("getpeername","Unable to determine the peer name");
+      return _error->Errno("getpeername",_("Unable to determine the peer name"));
    
    
    // Get the local machine's address
    // Get the local machine's address
    ServerAddrLen = sizeof(ServerAddr);
    ServerAddrLen = sizeof(ServerAddr);
    if (getsockname(ServerFd,(sockaddr *)&ServerAddr,&ServerAddrLen) != 0)
    if (getsockname(ServerFd,(sockaddr *)&ServerAddr,&ServerAddrLen) != 0)
-      return _error->Errno("getsockname","Unable to determine the local name");
+      return _error->Errno("getsockname",_("Unable to determine the local name"));
    
    
    return Res;
    return Res;
 }
 }
@@ -200,19 +201,19 @@ bool FTPConn::Login()
       if (ReadResp(Tag,Msg) == false)
       if (ReadResp(Tag,Msg) == false)
 	 return false;
 	 return false;
       if (Tag >= 400)
       if (Tag >= 400)
-	 return _error->Error("Server refused our connection and said: %s",Msg.c_str());
+	 return _error->Error(_("Server refused our connection and said: %s"),Msg.c_str());
       
       
       // Send the user
       // Send the user
       if (WriteMsg(Tag,Msg,"USER %s",User.c_str()) == false)
       if (WriteMsg(Tag,Msg,"USER %s",User.c_str()) == false)
 	 return false;
 	 return false;
       if (Tag >= 400)
       if (Tag >= 400)
-	 return _error->Error("USER failed, server said: %s",Msg.c_str());
+	 return _error->Error(_("USER failed, server said: %s"),Msg.c_str());
       
       
       // Send the Password
       // Send the Password
       if (WriteMsg(Tag,Msg,"PASS %s",Pass.c_str()) == false)
       if (WriteMsg(Tag,Msg,"PASS %s",Pass.c_str()) == false)
 	 return false;
 	 return false;
       if (Tag >= 400)
       if (Tag >= 400)
-	 return _error->Error("PASS failed, server said: %s",Msg.c_str());
+	 return _error->Error(_("PASS failed, server said: %s"),Msg.c_str());
       
       
       // Enter passive mode
       // Enter passive mode
       if (_config->Exists("Acquire::FTP::Passive::" + ServerName.Host) == true)
       if (_config->Exists("Acquire::FTP::Passive::" + ServerName.Host) == true)
@@ -226,13 +227,13 @@ bool FTPConn::Login()
       if (ReadResp(Tag,Msg) == false)
       if (ReadResp(Tag,Msg) == false)
 	 return false;
 	 return false;
       if (Tag >= 400)
       if (Tag >= 400)
-	 return _error->Error("Server refused our connection and said: %s",Msg.c_str());
+	 return _error->Error(_("Server refused our connection and said: %s"),Msg.c_str());
       
       
       // Perform proxy script execution
       // Perform proxy script execution
       Configuration::Item const *Opts = _config->Tree("Acquire::ftp::ProxyLogin");
       Configuration::Item const *Opts = _config->Tree("Acquire::ftp::ProxyLogin");
       if (Opts == 0 || Opts->Child == 0)
       if (Opts == 0 || Opts->Child == 0)
-	 return _error->Error("A proxy server was specified but no login "
-			      "script, Acquire::ftp::ProxyLogin is empty.");
+	 return _error->Error(_("A proxy server was specified but no login "
+			      "script, Acquire::ftp::ProxyLogin is empty."));
       Opts = Opts->Child;
       Opts = Opts->Child;
 
 
       // Iterate over the entire login script
       // Iterate over the entire login script
@@ -259,7 +260,7 @@ bool FTPConn::Login()
 	 if (WriteMsg(Tag,Msg,"%s",Tmp.c_str()) == false)
 	 if (WriteMsg(Tag,Msg,"%s",Tmp.c_str()) == false)
 	    return false;
 	    return false;
 	 if (Tag >= 400)
 	 if (Tag >= 400)
-	    return _error->Error("Login script command '%s' failed, server said: %s",Tmp.c_str(),Msg.c_str());	 
+	    return _error->Error(_("Login script command '%s' failed, server said: %s"),Tmp.c_str(),Msg.c_str());	 
       }
       }
       
       
       // Enter passive mode
       // Enter passive mode
@@ -285,7 +286,7 @@ bool FTPConn::Login()
    if (WriteMsg(Tag,Msg,"TYPE I") == false)
    if (WriteMsg(Tag,Msg,"TYPE I") == false)
       return false;
       return false;
    if (Tag >= 400)
    if (Tag >= 400)
-      return _error->Error("TYPE failed, server said: %s",Msg.c_str());
+      return _error->Error(_("TYPE failed, server said: %s"),Msg.c_str());
    
    
    return true;
    return true;
 }
 }
@@ -323,23 +324,23 @@ bool FTPConn::ReadLine(string &Text)
       if (WaitFd(ServerFd,false,TimeOut) == false)
       if (WaitFd(ServerFd,false,TimeOut) == false)
       {
       {
 	 Close();
 	 Close();
-	 return _error->Error("Connection timeout");
+	 return _error->Error(_("Connection timeout"));
       }
       }
       
       
       // Suck it back
       // Suck it back
       int Res = read(ServerFd,Buffer + Len,sizeof(Buffer) - Len);
       int Res = read(ServerFd,Buffer + Len,sizeof(Buffer) - Len);
       if (Res == 0)
       if (Res == 0)
-	 _error->Error("Server closed the connection");
+	 _error->Error(_("Server closed the connection"));
       if (Res <= 0)
       if (Res <= 0)
       {
       {
-	 _error->Errno("read","Read error");
+	 _error->Errno("read",_("Read error"));
 	 Close();
 	 Close();
 	 return false;
 	 return false;
       }      
       }      
       Len += Res;
       Len += Res;
    }
    }
 
 
-   return _error->Error("A response overflowed the buffer.");
+   return _error->Error(_("A response overflowed the buffer."));
 }
 }
 									/*}}}*/
 									/*}}}*/
 // FTPConn::ReadResp - Read a full response from the server		/*{{{*/
 // FTPConn::ReadResp - Read a full response from the server		/*{{{*/
@@ -356,7 +357,7 @@ bool FTPConn::ReadResp(unsigned int &Ret,string &Text)
    char *End;   
    char *End;   
    Ret = strtol(Msg.c_str(),&End,10);
    Ret = strtol(Msg.c_str(),&End,10);
    if (End - Msg.c_str() != 3)
    if (End - Msg.c_str() != 3)
-      return _error->Error("Protocol corruption");
+      return _error->Error(_("Protocol corruption"));
 
 
    // All done ?
    // All done ?
    Text = Msg.c_str()+4;
    Text = Msg.c_str()+4;
@@ -368,7 +369,7 @@ bool FTPConn::ReadResp(unsigned int &Ret,string &Text)
    }
    }
    
    
    if (*End != '-')
    if (*End != '-')
-      return _error->Error("Protocol corruption");
+      return _error->Error(_("Protocol corruption"));
    
    
    /* Okay, here we do the continued message trick. This is foolish, but
    /* Okay, here we do the continued message trick. This is foolish, but
       proftpd follows the protocol as specified and wu-ftpd doesn't, so 
       proftpd follows the protocol as specified and wu-ftpd doesn't, so 
@@ -434,13 +435,13 @@ bool FTPConn::WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...)
       if (WaitFd(ServerFd,true,TimeOut) == false)
       if (WaitFd(ServerFd,true,TimeOut) == false)
       {
       {
 	 Close();
 	 Close();
-	 return _error->Error("Connection timeout");
+	 return _error->Error(_("Connection timeout"));
       }
       }
       
       
       int Res = write(ServerFd,S + Start,Len);
       int Res = write(ServerFd,S + Start,Len);
       if (Res <= 0)
       if (Res <= 0)
       {
       {
-	 _error->Errno("write","Write Error");
+	 _error->Errno("write",_("Write Error"));
 	 Close();
 	 Close();
 	 return false;
 	 return false;
       }
       }
@@ -681,24 +682,24 @@ bool FTPConn::CreateDataFd()
       // Get a socket
       // Get a socket
       if ((DataFd = socket(PasvAddr->ai_family,PasvAddr->ai_socktype,
       if ((DataFd = socket(PasvAddr->ai_family,PasvAddr->ai_socktype,
 			   PasvAddr->ai_protocol)) < 0)
 			   PasvAddr->ai_protocol)) < 0)
-	 return _error->Errno("socket","Could not create a socket");
+	 return _error->Errno("socket",_("Could not create a socket"));
       
       
       // Connect to the server
       // Connect to the server
       SetNonBlock(DataFd,true);
       SetNonBlock(DataFd,true);
       if (connect(DataFd,PasvAddr->ai_addr,PasvAddr->ai_addrlen) < 0 &&
       if (connect(DataFd,PasvAddr->ai_addr,PasvAddr->ai_addrlen) < 0 &&
 	  errno != EINPROGRESS)
 	  errno != EINPROGRESS)
-	 return _error->Errno("socket","Could not create a socket");
+	 return _error->Errno("socket",_("Could not create a socket"));
    
    
       /* This implements a timeout for connect by opening the connection
       /* This implements a timeout for connect by opening the connection
          nonblocking */
          nonblocking */
       if (WaitFd(DataFd,true,TimeOut) == false)
       if (WaitFd(DataFd,true,TimeOut) == false)
-	 return _error->Error("Could not connect data socket, connection timed out");
+	 return _error->Error(_("Could not connect data socket, connection timed out"));
       unsigned int Err;
       unsigned int Err;
       unsigned int Len = sizeof(Err);
       unsigned int Len = sizeof(Err);
       if (getsockopt(DataFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
       if (getsockopt(DataFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
-	 return _error->Errno("getsockopt","Failed");
+	 return _error->Errno("getsockopt",_("Failed"));
       if (Err != 0)
       if (Err != 0)
-	 return _error->Error("Could not connect passive socket.");
+	 return _error->Error(_("Could not connect passive socket."));
 
 
       return true;
       return true;
    }
    }
@@ -716,32 +717,33 @@ bool FTPConn::CreateDataFd()
    Hints.ai_family = ((struct sockaddr *)&ServerAddr)->sa_family;
    Hints.ai_family = ((struct sockaddr *)&ServerAddr)->sa_family;
    int Res;
    int Res;
    if ((Res = getaddrinfo(0,"0",&Hints,&BindAddr)) != 0)
    if ((Res = getaddrinfo(0,"0",&Hints,&BindAddr)) != 0)
-      return _error->Error("getaddrinfo was unable to get a listening socket");
+      return _error->Error(_("getaddrinfo was unable to get a listening socket"));
    
    
    // Construct the socket
    // Construct the socket
    if ((DataListenFd = socket(BindAddr->ai_family,BindAddr->ai_socktype,
    if ((DataListenFd = socket(BindAddr->ai_family,BindAddr->ai_socktype,
 			      BindAddr->ai_protocol)) < 0)
 			      BindAddr->ai_protocol)) < 0)
    {
    {
       freeaddrinfo(BindAddr);
       freeaddrinfo(BindAddr);
-      return _error->Errno("socket","Could not create a socket");
+      return _error->Errno("socket",_("Could not create a socket"));
    }
    }
    
    
    // Bind and listen
    // Bind and listen
    if (bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
    if (bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
    {
    {
       freeaddrinfo(BindAddr);
       freeaddrinfo(BindAddr);
-      return _error->Errno("bind","Could not bind a socket");
+      return _error->Errno("bind",_("Could not bind a socket"));
    }
    }
    freeaddrinfo(BindAddr);   
    freeaddrinfo(BindAddr);   
    if (listen(DataListenFd,1) < 0)
    if (listen(DataListenFd,1) < 0)
-      return _error->Errno("listen","Could not listen on the socket");
+      return _error->Errno("listen",_("Could not listen on the socket"));
    SetNonBlock(DataListenFd,true);
    SetNonBlock(DataListenFd,true);
    
    
    // Determine the name to send to the remote
    // Determine the name to send to the remote
    struct sockaddr_storage Addr;
    struct sockaddr_storage Addr;
    socklen_t AddrLen = sizeof(Addr);
    socklen_t AddrLen = sizeof(Addr);
    if (getsockname(DataListenFd,(sockaddr *)&Addr,&AddrLen) < 0)
    if (getsockname(DataListenFd,(sockaddr *)&Addr,&AddrLen) < 0)
-      return _error->Errno("getsockname","Could not determine the socket's name");
+      return _error->Errno("getsockname",_("Could not determine the socket's name"));
+
 
 
    // Reverse the address. We need the server address and the data port.
    // Reverse the address. We need the server address and the data port.
    char Name[NI_MAXHOST];
    char Name[NI_MAXHOST];
@@ -772,7 +774,7 @@ bool FTPConn::CreateDataFd()
 		   (int)(Port >> 8) & 0xff, (int)(Port & 0xff)) == false)
 		   (int)(Port >> 8) & 0xff, (int)(Port & 0xff)) == false)
 	 return false;
 	 return false;
       if (Tag >= 400)
       if (Tag >= 400)
-	 return _error->Error("Unable to send PORT command");
+	 return _error->Error(_("Unable to send PORT command"));
       return true;
       return true;
    }
    }
 
 
@@ -782,7 +784,7 @@ bool FTPConn::CreateDataFd()
       if (AFMap[J].Family == ((struct sockaddr *)&Addr)->sa_family)
       if (AFMap[J].Family == ((struct sockaddr *)&Addr)->sa_family)
 	 Proto = AFMap[J].IETFFamily;
 	 Proto = AFMap[J].IETFFamily;
    if (Proto == 0)
    if (Proto == 0)
-      return _error->Error("Unkonwn address family %u (AF_*)",
+      return _error->Error(_("Unknown address family %u (AF_*)"),
 			   ((struct sockaddr *)&Addr)->sa_family);
 			   ((struct sockaddr *)&Addr)->sa_family);
    
    
    // Send the EPRT command
    // Send the EPRT command
@@ -791,7 +793,7 @@ bool FTPConn::CreateDataFd()
    if (WriteMsg(Tag,Msg,"EPRT |%u|%s|%s|",Proto,Name,Service) == false)
    if (WriteMsg(Tag,Msg,"EPRT |%u|%s|%s|",Proto,Name,Service) == false)
       return false;
       return false;
    if (Tag >= 400)
    if (Tag >= 400)
-      return _error->Error("EPRT failed, server said: %s",Msg.c_str());
+      return _error->Error(_("EPRT failed, server said: %s"),Msg.c_str());
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -811,14 +813,14 @@ bool FTPConn::Finalize()
    
    
    // Wait for someone to connect..
    // Wait for someone to connect..
    if (WaitFd(DataListenFd,false,TimeOut) == false)
    if (WaitFd(DataListenFd,false,TimeOut) == false)
-      return _error->Error("Data socket connect timed out");
+      return _error->Error(_("Data socket connect timed out"));
       
       
    // Accept the connection
    // Accept the connection
    struct sockaddr_in Addr;
    struct sockaddr_in Addr;
    socklen_t Len = sizeof(Addr);
    socklen_t Len = sizeof(Addr);
    DataFd = accept(DataListenFd,(struct sockaddr *)&Addr,&Len);
    DataFd = accept(DataListenFd,(struct sockaddr *)&Addr,&Len);
    if (DataFd < 0)
    if (DataFd < 0)
-      return _error->Errno("accept","Unable to accept connection");
+      return _error->Errno("accept",_("Unable to accept connection"));
 
 
    close(DataListenFd);
    close(DataListenFd);
    DataListenFd = -1;
    DataListenFd = -1;
@@ -857,7 +859,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume,
    {
    {
       if (Hash.AddFD(To.Fd(),Resume) == false)
       if (Hash.AddFD(To.Fd(),Resume) == false)
       {
       {
-	 _error->Errno("read","Problem hashing file");
+	 _error->Errno("read",_("Problem hashing file"));
 	 return false;
 	 return false;
       }
       }
    }
    }
@@ -870,7 +872,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume,
    {
    {
       if (Tag == 550)
       if (Tag == 550)
 	 Missing = true;
 	 Missing = true;
-      return _error->Error("Unable to fetch file, server said '%s'",Msg.c_str());
+      return _error->Error(_("Unable to fetch file, server said '%s'"),Msg.c_str());
    }
    }
    
    
    // Finish off the data connection
    // Finish off the data connection
@@ -885,7 +887,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume,
       if (WaitFd(DataFd,false,TimeOut) == false)
       if (WaitFd(DataFd,false,TimeOut) == false)
       {
       {
 	 Close();
 	 Close();
-	 return _error->Error("Data socket timed out");
+	 return _error->Error(_("Data socket timed out"));
       }
       }
       
       
       // Read the data..
       // Read the data..
@@ -915,7 +917,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long Resume,
    if (ReadResp(Tag,Msg) == false)
    if (ReadResp(Tag,Msg) == false)
       return false;
       return false;
    if (Tag >= 400)
    if (Tag >= 400)
-      return _error->Error("Data transfer failed, server said '%s'",Msg.c_str());
+      return _error->Error(_("Data transfer failed, server said '%s'"),Msg.c_str());
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -990,7 +992,7 @@ bool FtpMethod::Fetch(FetchItem *Itm)
    }
    }
    
    
    // Get the files information
    // Get the files information
-   Status("Query");
+   Status(_("Query"));
    unsigned long Size;
    unsigned long Size;
    if (Server->Size(File,Size) == false ||
    if (Server->Size(File,Size) == false ||
        Server->ModTime(File,FailTime) == false)
        Server->ModTime(File,FailTime) == false)
@@ -1097,7 +1099,7 @@ int main(int argc,const char *argv[])
 	 // Run the http method
 	 // Run the http method
 	 string Path = flNotFile(argv[0]) + "http";
 	 string Path = flNotFile(argv[0]) + "http";
 	 execl(Path.c_str(),Path.c_str(),0);
 	 execl(Path.c_str(),Path.c_str(),0);
-	 cerr << "Unable to invoke " << Path << endl;
+	 cerr << _("Unable to invoke ") << Path << endl;
 	 exit(100);
 	 exit(100);
       }      
       }      
    }
    }

+ 7 - 6
methods/gzip.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: gzip.cc,v 1.16 2001/05/27 04:29:30 jgg Exp $
+// $Id: gzip.cc,v 1.17 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    GZip method - Take a file URI in and decompress it into the target 
    GZip method - Take a file URI in and decompress it into the target 
@@ -9,6 +9,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
@@ -53,7 +54,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
 
 
    int GzOut[2];   
    int GzOut[2];   
    if (pipe(GzOut) < 0)
    if (pipe(GzOut) < 0)
-      return _error->Errno("pipe","Couldn't open pipe for %s",Prog);
+      return _error->Errno("pipe",_("Couldn't open pipe for %s"),Prog);
 
 
    // Fork gzip
    // Fork gzip
    int Process = ExecFork();
    int Process = ExecFork();
@@ -98,7 +99,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
       
       
       if (Count < 0)
       if (Count < 0)
       {
       {
-	 _error->Errno("read", "Read error from %s process",Prog);
+	 _error->Errno("read", _("Read error from %s process"),Prog);
 	 Failed = true;
 	 Failed = true;
 	 break;
 	 break;
       }
       }
@@ -129,16 +130,16 @@ bool GzipMethod::Fetch(FetchItem *Itm)
    // Transfer the modification times
    // Transfer the modification times
    struct stat Buf;
    struct stat Buf;
    if (stat(Path.c_str(),&Buf) != 0)
    if (stat(Path.c_str(),&Buf) != 0)
-      return _error->Errno("stat","Failed to stat");
+      return _error->Errno("stat",_("Failed to stat"));
 
 
    struct utimbuf TimeBuf;
    struct utimbuf TimeBuf;
    TimeBuf.actime = Buf.st_atime;
    TimeBuf.actime = Buf.st_atime;
    TimeBuf.modtime = Buf.st_mtime;
    TimeBuf.modtime = Buf.st_mtime;
    if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
    if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
-      return _error->Errno("utime","Failed to set modification time");
+      return _error->Errno("utime",_("Failed to set modification time"));
 
 
    if (stat(Itm->DestFile.c_str(),&Buf) != 0)
    if (stat(Itm->DestFile.c_str(),&Buf) != 0)
-      return _error->Errno("stat","Failed to stat");
+      return _error->Errno("stat",_("Failed to stat"));
    
    
    // Return a Done response
    // Return a Done response
    Res.LastModified = Buf.st_mtime;
    Res.LastModified = Buf.st_mtime;

+ 22 - 21
methods/http.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: http.cc,v 1.54 2002/04/18 05:09:38 jgg Exp $
+// $Id: http.cc,v 1.55 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -25,6 +25,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
@@ -336,7 +337,7 @@ int ServerState::RunHeaders()
 {
 {
    State = Header;
    State = Header;
    
    
-   Owner->Status("Waiting for file");
+   Owner->Status(_("Waiting for file"));
 
 
    Major = 0; 
    Major = 0; 
    Minor = 0; 
    Minor = 0; 
@@ -482,7 +483,7 @@ bool ServerState::HeaderLine(string Line)
 
 
    // The http server might be trying to do something evil.
    // The http server might be trying to do something evil.
    if (Line.length() >= MAXLEN)
    if (Line.length() >= MAXLEN)
-      return _error->Error("Got a single header line over %u chars",MAXLEN);
+      return _error->Error(_("Got a single header line over %u chars"),MAXLEN);
 
 
    string::size_type Pos = Line.find(' ');
    string::size_type Pos = Line.find(' ');
    if (Pos == string::npos || Pos+1 > Line.length())
    if (Pos == string::npos || Pos+1 > Line.length())
@@ -490,7 +491,7 @@ bool ServerState::HeaderLine(string Line)
       // Blah, some servers use "connection:closes", evil.
       // Blah, some servers use "connection:closes", evil.
       Pos = Line.find(':');
       Pos = Line.find(':');
       if (Pos == string::npos || Pos + 2 > Line.length())
       if (Pos == string::npos || Pos + 2 > Line.length())
-	 return _error->Error("Bad header line");
+	 return _error->Error(_("Bad header line"));
       Pos++;
       Pos++;
    }
    }
 
 
@@ -509,14 +510,14 @@ bool ServerState::HeaderLine(string Line)
       {
       {
 	 if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor,
 	 if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor,
 		    &Result,Code) != 4)
 		    &Result,Code) != 4)
-	    return _error->Error("The http server sent an invalid reply header");
+	    return _error->Error(_("The http server sent an invalid reply header"));
       }
       }
       else
       else
       {
       {
 	 Major = 0;
 	 Major = 0;
 	 Minor = 9;
 	 Minor = 9;
 	 if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2)
 	 if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2)
-	    return _error->Error("The http server sent an invalid reply header");
+	    return _error->Error(_("The http server sent an invalid reply header"));
       }
       }
 
 
       /* Check the HTTP response header to get the default persistance
       /* Check the HTTP response header to get the default persistance
@@ -545,7 +546,7 @@ bool ServerState::HeaderLine(string Line)
 	 return true;
 	 return true;
       
       
       if (sscanf(Val.c_str(),"%lu",&Size) != 1)
       if (sscanf(Val.c_str(),"%lu",&Size) != 1)
-	 return _error->Error("The http server sent an invalid Content-Length header");
+	 return _error->Error(_("The http server sent an invalid Content-Length header"));
       return true;
       return true;
    }
    }
 
 
@@ -560,9 +561,9 @@ bool ServerState::HeaderLine(string Line)
       HaveContent = true;
       HaveContent = true;
       
       
       if (sscanf(Val.c_str(),"bytes %lu-%*u/%lu",&StartPos,&Size) != 2)
       if (sscanf(Val.c_str(),"bytes %lu-%*u/%lu",&StartPos,&Size) != 2)
-	 return _error->Error("The http server sent an invalid Content-Range header");
+	 return _error->Error(_("The http server sent an invalid Content-Range header"));
       if ((unsigned)StartPos > Size)
       if ((unsigned)StartPos > Size)
-	 return _error->Error("This http server has broken range support");
+	 return _error->Error(_("This http server has broken range support"));
       return true;
       return true;
    }
    }
    
    
@@ -586,7 +587,7 @@ bool ServerState::HeaderLine(string Line)
    if (stringcasecmp(Tag,"Last-Modified:") == 0)
    if (stringcasecmp(Tag,"Last-Modified:") == 0)
    {
    {
       if (StrToTime(Val,Date) == false)
       if (StrToTime(Val,Date) == false)
-	 return _error->Error("Unknown date format");
+	 return _error->Error(_("Unknown date format"));
       return true;
       return true;
    }
    }
 
 
@@ -729,12 +730,12 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
    {
    {
       if (errno == EINTR)
       if (errno == EINTR)
 	 return true;
 	 return true;
-      return _error->Errno("select","Select failed");
+      return _error->Errno("select",_("Select failed"));
    }
    }
    
    
    if (Res == 0)
    if (Res == 0)
    {
    {
-      _error->Error("Connection timed out");
+      _error->Error(_("Connection timed out"));
       return ServerDie(Srv);
       return ServerDie(Srv);
    }
    }
    
    
@@ -757,7 +758,7 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
    if (FileFD != -1 && FD_ISSET(FileFD,&wfds))
    if (FileFD != -1 && FD_ISSET(FileFD,&wfds))
    {
    {
       if (Srv->In.Write(FileFD) == false)
       if (Srv->In.Write(FileFD) == false)
-	 return _error->Errno("write","Error writing to output file");
+	 return _error->Errno("write",_("Error writing to output file"));
    }
    }
 
 
    // Handle commands from APT
    // Handle commands from APT
@@ -785,7 +786,7 @@ bool HttpMethod::Flush(ServerState *Srv)
       while (Srv->In.WriteSpace() == true)
       while (Srv->In.WriteSpace() == true)
       {
       {
 	 if (Srv->In.Write(File->Fd()) == false)
 	 if (Srv->In.Write(File->Fd()) == false)
-	    return _error->Errno("write","Error writing to file");
+	    return _error->Errno("write",_("Error writing to file"));
 	 if (Srv->In.IsLimit() == true)
 	 if (Srv->In.IsLimit() == true)
 	    return true;
 	    return true;
       }
       }
@@ -810,7 +811,7 @@ bool HttpMethod::ServerDie(ServerState *Srv)
       while (Srv->In.WriteSpace() == true)
       while (Srv->In.WriteSpace() == true)
       {
       {
 	 if (Srv->In.Write(File->Fd()) == false)
 	 if (Srv->In.Write(File->Fd()) == false)
-	    return _error->Errno("write","Error writing to the file");
+	    return _error->Errno("write",_("Error writing to the file"));
 
 
 	 // Done
 	 // Done
 	 if (Srv->In.IsLimit() == true)
 	 if (Srv->In.IsLimit() == true)
@@ -824,9 +825,9 @@ bool HttpMethod::ServerDie(ServerState *Srv)
    {
    {
       Srv->Close();
       Srv->Close();
       if (LErrno == 0)
       if (LErrno == 0)
-	 return _error->Error("Error reading from server Remote end closed connection");
+	 return _error->Error(_("Error reading from server Remote end closed connection"));
       errno = LErrno;
       errno = LErrno;
-      return _error->Errno("read","Error reading from server");
+      return _error->Errno("read",_("Error reading from server"));
    }
    }
    else
    else
    {
    {
@@ -908,7 +909,7 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
       lseek(File->Fd(),0,SEEK_SET);
       lseek(File->Fd(),0,SEEK_SET);
       if (Srv->In.Hash->AddFD(File->Fd(),Srv->StartPos) == false)
       if (Srv->In.Hash->AddFD(File->Fd(),Srv->StartPos) == false)
       {
       {
-	 _error->Errno("read","Problem hashing file");
+	 _error->Errno("read",_("Problem hashing file"));
 	 return 5;
 	 return 5;
       }
       }
       lseek(File->Fd(),0,SEEK_END);
       lseek(File->Fd(),0,SEEK_END);
@@ -1057,7 +1058,7 @@ int HttpMethod::Loop()
 	 // The header data is bad
 	 // The header data is bad
 	 case 2:
 	 case 2:
 	 {
 	 {
-	    _error->Error("Bad header Data");
+	    _error->Error(_("Bad header Data"));
 	    Fail(true);
 	    Fail(true);
 	    RotateDNS();
 	    RotateDNS();
 	    continue;
 	    continue;
@@ -1074,7 +1075,7 @@ int HttpMethod::Loop()
 	    
 	    
 	    if (FailCounter >= 2)
 	    if (FailCounter >= 2)
 	    {
 	    {
-	       Fail("Connection failed",true);
+	       Fail(_("Connection failed"),true);
 	       FailCounter = 0;
 	       FailCounter = 0;
 	    }
 	    }
 	    
 	    
@@ -1165,7 +1166,7 @@ int HttpMethod::Loop()
 	 }
 	 }
 	 
 	 
 	 default:
 	 default:
-	 Fail("Internal error");
+	 Fail(_("Internal error"));
 	 break;
 	 break;
       }
       }
       
       

+ 14 - 13
methods/rsh.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: rsh.cc,v 1.5 2002/11/09 23:33:26 doogie Exp $
+// $Id: rsh.cc,v 1.6 2003/02/10 07:34:41 doogie Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    RSH method - Transfer files via rsh compatible program
    RSH method - Transfer files via rsh compatible program
@@ -11,6 +11,7 @@
    ##################################################################### */
    ##################################################################### */
 									/*}}}*/
 									/*}}}*/
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
+#include <apti18n.h>
 #include "rsh.h"
 #include "rsh.h"
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 
 
@@ -87,7 +88,7 @@ bool RSHConn::Connect(string Host, string User)
    int Pipes[4] = {-1,-1,-1,-1};
    int Pipes[4] = {-1,-1,-1,-1};
    if (pipe(Pipes) != 0 || pipe(Pipes+2) != 0)
    if (pipe(Pipes) != 0 || pipe(Pipes+2) != 0)
    {
    {
-      _error->Errno("pipe","Failed to create IPC pipe to subprocess");
+      _error->Errno("pipe",_("Failed to create IPC pipe to subprocess"));
       for (int I = 0; I != 4; I++)
       for (int I = 0; I != 4; I++)
 	 close(Pipes[I]);
 	 close(Pipes[I]);
       return false;
       return false;
@@ -179,21 +180,21 @@ bool RSHConn::ReadLine(string &Text)
       if (WaitFd(ReadFd,false,TimeOut) == false)
       if (WaitFd(ReadFd,false,TimeOut) == false)
       {
       {
          Close();
          Close();
-         return _error->Error("Connection timeout");
+         return _error->Error(_("Connection timeout"));
       }
       }
 
 
       // Suck it back
       // Suck it back
       int Res = read(ReadFd,Buffer + Len,sizeof(Buffer) - Len);
       int Res = read(ReadFd,Buffer + Len,sizeof(Buffer) - Len);
       if (Res <= 0)
       if (Res <= 0)
       {
       {
-         _error->Errno("read","Read error");
+         _error->Errno("read",_("Read error"));
          Close();
          Close();
          return false;
          return false;
       }
       }
       Len += Res;
       Len += Res;
    }
    }
 
 
-   return _error->Error("A response overflowed the buffer.");
+   return _error->Error(_("A response overflowed the buffer."));
 }
 }
 									/*}}}*/
 									/*}}}*/
 // RSHConn::WriteMsg - Send a message with optional remote sync.	/*{{{*/
 // RSHConn::WriteMsg - Send a message with optional remote sync.	/*{{{*/
@@ -222,13 +223,13 @@ bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...)
       {
       {
 	 
 	 
 	 Close();
 	 Close();
-	 return _error->Error("Connection timeout");
+	 return _error->Error(_("Connection timeout"));
       }      
       }      
       
       
       int Res = write(WriteFd,S + Start,Len);
       int Res = write(WriteFd,S + Start,Len);
       if (Res <= 0)
       if (Res <= 0)
       {
       {
-         _error->Errno("write","Write Error");
+         _error->Errno("write",_("Write Error"));
          Close();
          Close();
          return false;
          return false;
       }
       }
@@ -260,7 +261,7 @@ bool RSHConn::Size(const char *Path,unsigned long &Size)
    char *End;
    char *End;
    Size = strtoul(Msg.c_str(),&End,10);
    Size = strtoul(Msg.c_str(),&End,10);
    if (End == Msg.c_str())
    if (End == Msg.c_str())
-      return _error->Error("File Not Found");
+      return _error->Error(_("File Not Found"));
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -299,7 +300,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
 
 
    if (Resume != 0) {
    if (Resume != 0) {
       if (Hash.AddFD(To.Fd(),Resume) == false) {
       if (Hash.AddFD(To.Fd(),Resume) == false) {
-	 _error->Errno("read","Problem hashing file");
+	 _error->Errno("read",_("Problem hashing file"));
 	 return false;
 	 return false;
       }
       }
    }
    }
@@ -318,7 +319,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
       if (WaitFd(ReadFd,false,TimeOut) == false)
       if (WaitFd(ReadFd,false,TimeOut) == false)
       {
       {
          Close();
          Close();
-         return _error->Error("Data socket timed out");
+         return _error->Error(_("Data socket timed out"));
       }
       }
 
 
       // Read the data..
       // Read the data..
@@ -326,7 +327,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
       if (Res == 0)
       if (Res == 0)
       {
       {
 	 Close();
 	 Close();
-	 return _error->Error("Connection closed prematurely");
+	 return _error->Error(_("Connection closed prematurely"));
       }
       }
       
       
       if (Res < 0)
       if (Res < 0)
@@ -421,7 +422,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
 
 
    // We say this mainly because the pause here is for the
    // We say this mainly because the pause here is for the
    // ssh connection that is still going
    // ssh connection that is still going
-   Status("Connecting to %s", Get.Host.c_str());
+   Status(_("Connecting to %s"), Get.Host.c_str());
 
 
    // Get the files information
    // Get the files information
    unsigned long Size;
    unsigned long Size;
@@ -429,7 +430,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
        Server->ModTime(File,FailTime) == false)
        Server->ModTime(File,FailTime) == false)
    {
    {
       //Fail(true);
       //Fail(true);
-      //_error->Error("File Not Found"); // Will be handled by Size
+      //_error->Error(_("File Not Found")); // Will be handled by Size
       return false;
       return false;
    }
    }
    Res.Size = Size;
    Res.Size = Size;

+ 602 - 20
po/apt-all.pot

@@ -6,7 +6,7 @@
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-02-09 18:37-0600\n"
+"POT-Creation-Date: 2003-02-09 21:51-0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -158,7 +158,7 @@ msgid ""
 "cache files, and query information from them\n"
 "cache files, and query information from them\n"
 "\n"
 "\n"
 "Commands:\n"
 "Commands:\n"
-"   add - Add an package file to the source cache\n"
+"   add - Add a package file to the source cache\n"
 "   gencaches - Build both the package and source cache\n"
 "   gencaches - Build both the package and source cache\n"
 "   showpkg - Show some general information for a single package\n"
 "   showpkg - Show some general information for a single package\n"
 "   showsrc - Show source records\n"
 "   showsrc - Show source records\n"
@@ -232,6 +232,274 @@ msgstr ""
 msgid "Cannot get debconf version. Is debconf installed?"
 msgid "Cannot get debconf version. Is debconf installed?"
 msgstr ""
 msgstr ""
 
 
+#: ftparchive/apt-ftparchive.cc:163 ftparchive/apt-ftparchive.cc:336
+msgid "Package extension list is too long"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:165 ftparchive/apt-ftparchive.cc:179
+#: ftparchive/apt-ftparchive.cc:202 ftparchive/apt-ftparchive.cc:251
+#: ftparchive/apt-ftparchive.cc:265 ftparchive/apt-ftparchive.cc:287
+#, c-format
+msgid "Error Processing directory %s"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:249
+msgid "Source extension list is too long"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:366
+msgid "Error writing header to contents file"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:396
+#, c-format
+msgid "Error Processing Contents %s"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:550
+msgid ""
+"Usage: apt-ftparchive [options] command\n"
+"Commands: packges binarypath [overridefile [pathprefix]]\n"
+"          sources srcpath [overridefile [pathprefix]]\n"
+"          contents path\n"
+"          generate config [groups]\n"
+"          clean config\n"
+"\n"
+"apt-ftparchive generates index files for Debian archives. It supports\n"
+"many styles of generation from fully automated to functional replacements\n"
+"for dpkg-scanpackages and dpkg-scansources\n"
+"\n"
+"apt-ftparchive generates Package files from a tree of .debs. The\n"
+"Package file contains the contents of all the control fields from\n"
+"each package as well as the MD5 hash and filesize. An override file\n"
+"is supported to force the value of Priority and Section.\n"
+"\n"
+"Similarly apt-ftparchive generates Sources files from a tree of .dscs.\n"
+"The --source-override option can be used to specify a src override file\n"
+"\n"
+"The 'packages' and 'sources' command should be run in the root of the\n"
+"tree. BinaryPath should point to the base of the recursive search and \n"
+"override file should contian the override flags. Pathprefix is\n"
+"appended to the filename fields if present. Example usage from the \n"
+"debian archive:\n"
+"   apt-ftparchive packages dists/potato/main/binary-i386/ > \\\n"
+"               dists/potato/main/binary-i386/Packages\n"
+"\n"
+"Options:\n"
+"  -h    This help text\n"
+"  --md5 Control MD5 generation\n"
+"  -s=?  Source override file\n"
+"  -q    Quiet\n"
+"  -d=?  Select the optional caching database\n"
+"  --no-delink Enable delinking debug mode\n"
+"  --contents  Control contents file generation\n"
+"  -c=?  Read this configuration file\n"
+"  -o=?  Set an arbitary configuration option"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:731
+msgid "No selections matched"
+msgstr ""
+
+#: ftparchive/apt-ftparchive.cc:804
+#, c-format
+msgid "Some files are missing in the package file group `%s'"
+msgstr ""
+
+#: ftparchive/cachedb.cc:43
+#, c-format
+msgid "DB was corrupted, file renamed to %s.old"
+msgstr ""
+
+#: ftparchive/cachedb.cc:59
+#, c-format
+msgid "Unable to open DB2 file %s"
+msgstr ""
+
+#: ftparchive/cachedb.cc:99
+#, c-format
+msgid "File date has changed %s"
+msgstr ""
+
+#: ftparchive/cachedb.cc:140
+msgid "Archive has no control record"
+msgstr ""
+
+#: ftparchive/cachedb.cc:253 ftparchive/cachedb.cc:257
+msgid "Unable to get a cursor"
+msgstr ""
+
+#: ftparchive/writer.cc:78
+#, c-format
+msgid "W: Unable to read directory %s\n"
+msgstr ""
+
+#: ftparchive/writer.cc:83
+#, c-format
+msgid "W: Unable to stat %s\n"
+msgstr ""
+
+#: ftparchive/writer.cc:122
+msgid "E: "
+msgstr ""
+
+#: ftparchive/writer.cc:124
+msgid "W: "
+msgstr ""
+
+#: ftparchive/writer.cc:131
+msgid "E: Errors apply to file "
+msgstr ""
+
+#: ftparchive/writer.cc:148 ftparchive/writer.cc:178
+#, c-format
+msgid "Failed to resolve %s"
+msgstr ""
+
+#: ftparchive/writer.cc:160
+msgid "Tree walking failed"
+msgstr ""
+
+#: ftparchive/writer.cc:185
+#, c-format
+msgid "Failed to open %s"
+msgstr ""
+
+#: ftparchive/writer.cc:242
+#, c-format
+msgid " DeLink %s [%s]\n"
+msgstr ""
+
+#: ftparchive/writer.cc:250
+#, c-format
+msgid "Failed to readlink %s"
+msgstr ""
+
+#: ftparchive/writer.cc:254
+#, c-format
+msgid "Failed to unlink %s"
+msgstr ""
+
+#: ftparchive/writer.cc:261
+#, c-format
+msgid "*** Failed to link %s to %s"
+msgstr ""
+
+#: ftparchive/writer.cc:271
+#, c-format
+msgid " DeLink limit of %sB hit.\n"
+msgstr ""
+
+#: ftparchive/writer.cc:338 apt-inst/extract.cc:181 apt-inst/extract.cc:193
+#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121
+#, c-format
+msgid "Failed to stat %s"
+msgstr ""
+
+#: ftparchive/writer.cc:358
+msgid "Archive had no package field"
+msgstr ""
+
+#: ftparchive/writer.cc:366 ftparchive/writer.cc:576
+#, c-format
+msgid "  %s has no override entry\n"
+msgstr ""
+
+#: ftparchive/writer.cc:409 ftparchive/writer.cc:658
+#, c-format
+msgid "  %s maintainer is %s not %s\n"
+msgstr ""
+
+#: ftparchive/contents.cc:346 ftparchive/contents.cc:377
+msgid "realloc - Failed to allocate memory"
+msgstr ""
+
+#: ftparchive/override.cc:38 ftparchive/override.cc:146
+#, c-format
+msgid "Unable to open %s"
+msgstr ""
+
+#: ftparchive/override.cc:64 ftparchive/override.cc:170
+#, c-format
+msgid "Malformed override %s line %lu #1"
+msgstr ""
+
+#: ftparchive/override.cc:78 ftparchive/override.cc:182
+#, c-format
+msgid "Malformed override %s line %lu #2"
+msgstr ""
+
+#: ftparchive/override.cc:92 ftparchive/override.cc:195
+#, c-format
+msgid "Malformed override %s line %lu #3"
+msgstr ""
+
+#: ftparchive/override.cc:131 ftparchive/override.cc:205
+#, c-format
+msgid "Failed to read the override file %s"
+msgstr ""
+
+#: ftparchive/multicompress.cc:75
+#, c-format
+msgid "Unknown Compresison Algorithm '%s'"
+msgstr ""
+
+#: ftparchive/multicompress.cc:105
+#, c-format
+msgid "Compressed output %s needs a compression set"
+msgstr ""
+
+#: ftparchive/multicompress.cc:172 methods/rsh.cc:91
+msgid "Failed to create IPC pipe to subprocess"
+msgstr ""
+
+#: ftparchive/multicompress.cc:198
+msgid "Failed to create FILE*"
+msgstr ""
+
+#: ftparchive/multicompress.cc:201
+msgid "Failed to fork"
+msgstr ""
+
+#: ftparchive/multicompress.cc:215
+msgid "Compress Child"
+msgstr ""
+
+#: ftparchive/multicompress.cc:238
+#, c-format
+msgid "Internal Error, Failed to create %s"
+msgstr ""
+
+#: ftparchive/multicompress.cc:289
+msgid "Failed to create subprocess IPC"
+msgstr ""
+
+#: ftparchive/multicompress.cc:324
+msgid "Failed to exec compressor "
+msgstr ""
+
+#: ftparchive/multicompress.cc:363
+msgid "decompressor"
+msgstr ""
+
+#: ftparchive/multicompress.cc:406
+msgid "IO to subprocess/file failed"
+msgstr ""
+
+#: ftparchive/multicompress.cc:458
+msgid "Failed to read while computing MD5"
+msgstr ""
+
+#: ftparchive/multicompress.cc:475
+#, c-format
+msgid "Problem unlinking %s"
+msgstr ""
+
+#: ftparchive/multicompress.cc:490 apt-inst/extract.cc:188
+#, c-format
+msgid "Failed to rename %s to %s"
+msgstr ""
+
 #. This needs to be a capital
 #. This needs to be a capital
 #: cmdline/apt-get.cc:116
 #: cmdline/apt-get.cc:116
 msgid "Y"
 msgid "Y"
@@ -601,7 +869,7 @@ msgstr ""
 msgid "Calculating Upgrade... "
 msgid "Calculating Upgrade... "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1476
+#: cmdline/apt-get.cc:1476 methods/ftp.cc:700 methods/connect.cc:99
 msgid "Failed"
 msgid "Failed"
 msgstr ""
 msgstr ""
 
 
@@ -900,17 +1168,6 @@ msgstr ""
 msgid "The diversion path is too long"
 msgid "The diversion path is too long"
 msgstr ""
 msgstr ""
 
 
-#: apt-inst/extract.cc:181 apt-inst/extract.cc:193 apt-inst/extract.cc:210
-#: apt-inst/deb/dpkgdb.cc:121
-#, c-format
-msgid "Failed to stat %s"
-msgstr ""
-
-#: apt-inst/extract.cc:188
-#, c-format
-msgid "Failed to rename %s to %s"
-msgstr ""
-
 #: apt-inst/extract.cc:243
 #: apt-inst/extract.cc:243
 #, c-format
 #, c-format
 msgid "The directory %s is being replaced by a non-directory"
 msgid "The directory %s is being replaced by a non-directory"
@@ -1101,6 +1358,327 @@ msgstr ""
 msgid "Merging Available information"
 msgid "Merging Available information"
 msgstr ""
 msgstr ""
 
 
+#: methods/cdrom.cc:113
+#, c-format
+msgid "Unable to read the cdrom database %s"
+msgstr ""
+
+#: methods/cdrom.cc:122
+msgid ""
+"Please use apt-cdrom to make this CD recognized by APT. apt-get update "
+"cannot be used to add new CDs"
+msgstr ""
+
+#: methods/cdrom.cc:130 methods/cdrom.cc:168
+msgid "Wrong CD"
+msgstr ""
+
+#: methods/cdrom.cc:163
+#, c-format
+msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
+msgstr ""
+
+#: methods/cdrom.cc:177 methods/file.cc:77
+msgid "File not found"
+msgstr ""
+
+#: methods/copy.cc:42 methods/gzip.cc:133 methods/gzip.cc:142
+msgid "Failed to stat"
+msgstr ""
+
+#: methods/copy.cc:79 methods/gzip.cc:139
+msgid "Failed to set modification time"
+msgstr ""
+
+#: methods/file.cc:42
+msgid "Invalid URI, local URIS must not start with //"
+msgstr ""
+
+#. Login must be before getpeername otherwise dante won't work.
+#: methods/ftp.cc:162
+msgid "Logging in"
+msgstr ""
+
+#: methods/ftp.cc:168
+msgid "Unable to determine the peer name"
+msgstr ""
+
+#: methods/ftp.cc:173
+msgid "Unable to determine the local name"
+msgstr ""
+
+#: methods/ftp.cc:204 methods/ftp.cc:230
+#, c-format
+msgid "Server refused our connection and said: %s"
+msgstr ""
+
+#: methods/ftp.cc:210
+#, c-format
+msgid "USER failed, server said: %s"
+msgstr ""
+
+#: methods/ftp.cc:216
+#, c-format
+msgid "PASS failed, server said: %s"
+msgstr ""
+
+#: methods/ftp.cc:235
+msgid ""
+"A proxy server was specified but no login script, Acquire::ftp::ProxyLogin "
+"is empty."
+msgstr ""
+
+#: methods/ftp.cc:263
+#, c-format
+msgid "Login script command '%s' failed, server said: %s"
+msgstr ""
+
+#: methods/ftp.cc:289
+#, c-format
+msgid "TYPE failed, server said: %s"
+msgstr ""
+
+#: methods/ftp.cc:327 methods/ftp.cc:438 methods/rsh.cc:183 methods/rsh.cc:226
+msgid "Connection timeout"
+msgstr ""
+
+#: methods/ftp.cc:333
+msgid "Server closed the connection"
+msgstr ""
+
+#: methods/ftp.cc:336 apt-pkg/contrib/fileutl.cc:452 methods/rsh.cc:190
+msgid "Read error"
+msgstr ""
+
+#: methods/ftp.cc:343 methods/rsh.cc:197
+msgid "A response overflowed the buffer."
+msgstr ""
+
+#: methods/ftp.cc:360 methods/ftp.cc:372
+msgid "Protocol corruption"
+msgstr ""
+
+#: methods/ftp.cc:444 methods/rsh.cc:232
+msgid "Write Error"
+msgstr ""
+
+#: methods/ftp.cc:685 methods/ftp.cc:691 methods/ftp.cc:727
+msgid "Could not create a socket"
+msgstr ""
+
+#: methods/ftp.cc:696
+msgid "Could not connect data socket, connection timed out"
+msgstr ""
+
+#: methods/ftp.cc:702
+msgid "Could not connect passive socket."
+msgstr ""
+
+#: methods/ftp.cc:720
+msgid "getaddrinfo was unable to get a listening socket"
+msgstr ""
+
+#: methods/ftp.cc:734
+msgid "Could not bind a socket"
+msgstr ""
+
+#: methods/ftp.cc:738
+msgid "Could not listen on the socket"
+msgstr ""
+
+#: methods/ftp.cc:745
+msgid "Could not determine the socket's name"
+msgstr ""
+
+#: methods/ftp.cc:777
+msgid "Unable to send PORT command"
+msgstr ""
+
+#: methods/ftp.cc:787
+#, c-format
+msgid "Unknown address family %u (AF_*)"
+msgstr ""
+
+#: methods/ftp.cc:796
+#, c-format
+msgid "EPRT failed, server said: %s"
+msgstr ""
+
+#: methods/ftp.cc:816
+msgid "Data socket connect timed out"
+msgstr ""
+
+#: methods/ftp.cc:823
+msgid "Unable to accept connection"
+msgstr ""
+
+#: methods/ftp.cc:862 methods/http.cc:912 methods/rsh.cc:303
+msgid "Problem hashing file"
+msgstr ""
+
+#: methods/ftp.cc:875
+#, c-format
+msgid "Unable to fetch file, server said '%s'"
+msgstr ""
+
+#: methods/ftp.cc:890 methods/rsh.cc:322
+msgid "Data socket timed out"
+msgstr ""
+
+#: methods/ftp.cc:920
+#, c-format
+msgid "Data transfer failed, server said '%s'"
+msgstr ""
+
+#. Get the files information
+#: methods/ftp.cc:995
+msgid "Query"
+msgstr ""
+
+#: methods/ftp.cc:1102
+msgid "Unable to invoke "
+msgstr ""
+
+#: methods/connect.cc:64
+#, c-format
+msgid "Connecting to %s (%s)"
+msgstr ""
+
+#: methods/connect.cc:71
+#, c-format
+msgid "[IP: %s %s]"
+msgstr ""
+
+#: methods/connect.cc:80
+#, c-format
+msgid "Could not create a socket for %s (f=%u t=%u p=%u)"
+msgstr ""
+
+#: methods/connect.cc:86
+#, c-format
+msgid "Cannot initiate the connection to %s:%s (%s)."
+msgstr ""
+
+#: methods/connect.cc:92
+#, c-format
+msgid "Could not connect to %s:%s (%s), connection timed out"
+msgstr ""
+
+#: methods/connect.cc:104
+#, c-format
+msgid "Could not connect to %s:%s (%s)."
+msgstr ""
+
+#. We say this mainly because the pause here is for the
+#. ssh connection that is still going
+#: methods/connect.cc:132 methods/rsh.cc:425
+#, c-format
+msgid "Connecting to %s"
+msgstr ""
+
+#: methods/connect.cc:163
+#, c-format
+msgid "Could not resolve '%s'"
+msgstr ""
+
+#: methods/connect.cc:167
+#, c-format
+msgid "Temporary failure resolving '%s'"
+msgstr ""
+
+#: methods/connect.cc:169
+#, c-format
+msgid "Something wicked happened resolving '%s:%s' (%i)"
+msgstr ""
+
+#: methods/connect.cc:216
+#, c-format
+msgid "Unable to connect to %s %s:"
+msgstr ""
+
+#: methods/gzip.cc:57
+#, c-format
+msgid "Couldn't open pipe for %s"
+msgstr ""
+
+#: methods/gzip.cc:102
+#, c-format
+msgid "Read error from %s process"
+msgstr ""
+
+#: methods/http.cc:340
+msgid "Waiting for file"
+msgstr ""
+
+#: methods/http.cc:486
+#, c-format
+msgid "Got a single header line over %u chars"
+msgstr ""
+
+#: methods/http.cc:494
+msgid "Bad header line"
+msgstr ""
+
+#: methods/http.cc:513 methods/http.cc:520
+msgid "The http server sent an invalid reply header"
+msgstr ""
+
+#: methods/http.cc:549
+msgid "The http server sent an invalid Content-Length header"
+msgstr ""
+
+#: methods/http.cc:564
+msgid "The http server sent an invalid Content-Range header"
+msgstr ""
+
+#: methods/http.cc:566
+msgid "This http server has broken range support"
+msgstr ""
+
+#: methods/http.cc:590
+msgid "Unknown date format"
+msgstr ""
+
+#: methods/http.cc:733
+msgid "Select failed"
+msgstr ""
+
+#: methods/http.cc:738
+msgid "Connection timed out"
+msgstr ""
+
+#: methods/http.cc:761
+msgid "Error writing to output file"
+msgstr ""
+
+#: methods/http.cc:789
+msgid "Error writing to file"
+msgstr ""
+
+#: methods/http.cc:814
+msgid "Error writing to the file"
+msgstr ""
+
+#: methods/http.cc:828
+msgid "Error reading from server Remote end closed connection"
+msgstr ""
+
+#: methods/http.cc:830
+msgid "Error reading from server"
+msgstr ""
+
+#: methods/http.cc:1061
+msgid "Bad header Data"
+msgstr ""
+
+#: methods/http.cc:1078
+msgid "Connection failed"
+msgstr ""
+
+#: methods/http.cc:1169
+msgid "Internal error"
+msgstr ""
+
 #: apt-pkg/contrib/mmap.cc:82
 #: apt-pkg/contrib/mmap.cc:82
 msgid "Can't mmap an empty file"
 msgid "Can't mmap an empty file"
 msgstr ""
 msgstr ""
@@ -1193,7 +1771,7 @@ msgstr ""
 
 
 #: apt-pkg/contrib/cmndline.cc:201 apt-pkg/contrib/cmndline.cc:207
 #: apt-pkg/contrib/cmndline.cc:201 apt-pkg/contrib/cmndline.cc:207
 #, c-format
 #, c-format
-msgid "Option %s: Configuration item sepecification must have an =<val>."
+msgid "Option %s: Configuration item specification must have an =<val>."
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/contrib/cmndline.cc:237
 #: apt-pkg/contrib/cmndline.cc:237
@@ -1275,10 +1853,6 @@ msgstr ""
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:452
-msgid "Read error"
-msgstr ""
-
 #: apt-pkg/contrib/fileutl.cc:473
 #: apt-pkg/contrib/fileutl.cc:473
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
@@ -1323,7 +1897,7 @@ msgid "This APT does not support the Versioning System '%s'"
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/pkgcache.cc:147
 #: apt-pkg/pkgcache.cc:147
-msgid "The package cache was build for a different architecture"
+msgid "The package cache was built for a different architecture"
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/pkgcache.cc:218
 #: apt-pkg/pkgcache.cc:218
@@ -1651,3 +2225,11 @@ msgstr ""
 #: apt-pkg/acquire-item.cc:511
 #: apt-pkg/acquire-item.cc:511
 msgid "MD5Sum mismatch"
 msgid "MD5Sum mismatch"
 msgstr ""
 msgstr ""
+
+#: methods/rsh.cc:264
+msgid "File Not Found"
+msgstr ""
+
+#: methods/rsh.cc:330
+msgid "Connection closed prematurely"
+msgstr ""

Fichier diff supprimé car celui-ci est trop grand
+ 1002 - 653
po/da.po


Fichier diff supprimé car celui-ci est trop grand
+ 985 - 550
po/de.po


Fichier diff supprimé car celui-ci est trop grand
+ 969 - 164
po/en_GB.po


Fichier diff supprimé car celui-ci est trop grand
+ 1502 - 910
po/es.po


Fichier diff supprimé car celui-ci est trop grand
+ 1171 - 813
po/fr.po


Fichier diff supprimé car celui-ci est trop grand
+ 1438 - 894
po/hu.po


Fichier diff supprimé car celui-ci est trop grand
+ 1125 - 787
po/it.po


+ 1 - 1
po/makefile

@@ -60,7 +60,7 @@ $(MOFILES) : $(PO_DOMAINS)/%.mo : $(PO_DOMAINS)/%.po
 	cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo
 	cp $@ $(LOCALE)/$(notdir $*)/LC_MESSAGES/$(call GETDOMAIN,$*).mo
 
 
 stats:
 stats:
-	for i in *.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
+	for i in *.pot *.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
 
 
 binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES)
 binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES)
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 1500 - 622
po/nl.po


Fichier diff supprimé car celui-ci est trop grand
+ 1070 - 347
po/no_NO.po


Fichier diff supprimé car celui-ci est trop grand
+ 1068 - 338
po/pl.po


Fichier diff supprimé car celui-ci est trop grand
+ 1075 - 344
po/pt_BR.po


Fichier diff supprimé car celui-ci est trop grand
+ 1124 - 734
po/ru.po


Fichier diff supprimé car celui-ci est trop grand
+ 1074 - 344
po/sv.po


Fichier diff supprimé car celui-ci est trop grand
+ 983 - 232
po/zh_TW.po