]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/indexrecords.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 Dec 2008 05:59:56 +0000 (06:59 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 Dec 2008 05:59:56 +0000 (06:59 +0100)
  - fix some i18n issues
* apt-pkg/contrib/strutl.h:
  - add new strprintf() function to make i18n strings easier
* apt-pkg/dev/debsystem.cc:
  - add missing apti18n.h header

.bzr-builddeb/default.conf [new file with mode: 0644]
apt-pkg/contrib/strutl.cc
apt-pkg/contrib/strutl.h
apt-pkg/indexrecords.cc
configure.in
debian/changelog
debian/copyright

diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf
new file mode 100644 (file)
index 0000000..3a08d60
--- /dev/null
@@ -0,0 +1,2 @@
+[BUILDDEB]
+native = True
index bd374fd1e74ad47974c6949161d2af3a95827fcb..cdd88827b5f21a2acd245d8c7e3310b7caed2058 100644 (file)
@@ -1032,6 +1032,21 @@ void ioprintf(ostream &out,const char *format,...)
    out << S;
 }
                                                                        /*}}}*/
+// strprintf - C format string outputter to C++ strings                /*{{{*/
+// ---------------------------------------------------------------------
+/* This is used to make the internationalization strings easier to translate
+   and to allow reordering of parameters */
+void strprintf(string &out,const char *format,...) 
+{
+   va_list args;
+   va_start(args,format);
+   
+   // sprintf the description
+   char S[1024];
+   vsnprintf(S,sizeof(S),format,args);
+   out = string(S);
+}
+                                                                       /*}}}*/
 // safe_snprintf - Safer snprintf                                      /*{{{*/
 // ---------------------------------------------------------------------
 /* This is a snprintf that will never (ever) go past 'End' and returns a
index 53146ced7a9e6c71d293e01f851aa51ca703390c..d9972abf43a3035c55cff20ffebd992a5fc5c025 100644 (file)
@@ -59,6 +59,7 @@ bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length);
 bool TokSplitString(char Tok,char *Input,char **List,
                    unsigned long ListMax);
 void ioprintf(ostream &out,const char *format,...) APT_FORMAT2;
+void strprintf(string &out,const char *format,...) APT_FORMAT2;
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3;
 bool CheckDomainList(const string &Host, const string &List);
 
index 502f454a8f21d7948a5acfe59bfbb948a71a7580..ab208e246ebf6afe92c6747681d916e3c58579a1 100644 (file)
@@ -37,14 +37,14 @@ bool indexRecords::Load(const string Filename)
    pkgTagFile TagFile(&Fd, Fd.Size() + 256); // XXX
    if (_error->PendingError() == true)
    {
-      ErrorText = _(("Unable to parse Release file " + Filename).c_str());
+      strprintf(ErrorText, _("Unable to parse Release file %s"),Filename.c_str());
       return false;
    }
 
    pkgTagSection Section;
    if (TagFile.Step(Section) == false)
    {
-      ErrorText = _(("No sections in Release file " + Filename).c_str());
+      strprintf(ErrorText, _("No sections in Release file %s"), Filename.c_str());
       return false;
    }
 
@@ -78,7 +78,7 @@ bool indexRecords::Load(const string Filename)
 
    if(HashString::SupportedHashes()[i] == NULL)
    {
-      ErrorText = _(("No Hash entry in Release file " + Filename).c_str());
+      strprintf(ErrorText, _("No Hash entry in Release file %s"), Filename.c_str());
       return false;
    }  
 
index f3210d425c319e7016b60e08bb93a332eee8ae52..d8de01565c55809ab29b9f0c849ae6fb5da4bc3e 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.7.19ubuntu1")
+AC_DEFINE_UNQUOTED(VERSION,"0.7.19ubuntu2")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 8c69f4b344fb3368e68a4f92269123e48a5cbf81..6abba009666be83cffb6e80ef479fb254f0019ad 100644 (file)
@@ -6,13 +6,19 @@ apt (0.7.19ubuntu2) jaunty; urgency=low
   * cmdline/apt-get.cc:
     - fix "apt-get source pkg=ver" if binary name != source name
       (LP: #202219)
+  * apt-pkg/indexrecords.cc:
+    - fix some i18n issues
+  * apt-pkg/contrib/strutl.h:
+    - add new strprintf() function to make i18n strings easier
+  * apt-pkg/dev/debsystem.cc:
+    - add missing apti18n.h header
 
   [ Ian Weisser ]
   * /apt-pkg/deb/debsystem.cc:
     - add 'sudo' to the error message to "run 'dpkg --configure -a'"
       (LP: #52697)
 
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 16 Dec 2008 06:59:17 +0100
 
 apt (0.7.19ubuntu1) jaunty; urgency=low
 
index 9e277e57d0ff5389239356d76abb4b131cd1923a..3baf9ac5a5ef187edcdcc3c93ee319468c3f1332 100644 (file)
@@ -1,6 +1,6 @@
 Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others.
 
-Apt is licened under the terms of the GNU General Public License (GPL),
+Apt is licensed under the terms of the GNU General Public License (GPL),
 version 2.0 or later, as published by the Free Software Foundation.  See
 the file COPYING.GPL [included], /usr/share/common-licenses/GPL, or
 <http://www.gnu.org/copyleft/gpl.txt> for the terms of the latest version