summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-12-16 06:59:56 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2008-12-16 06:59:56 +0100
commit616c8327a7b57dc4fedf5d1952a2b14559002fd8 (patch)
tree07b72ff008151f65ea3caa2900fe438017a449c6
parentbb3ac2f648764e7ee2a8cdc7739d56de6311c88f (diff)
* 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
-rw-r--r--.bzr-builddeb/default.conf2
-rw-r--r--apt-pkg/contrib/strutl.cc15
-rw-r--r--apt-pkg/contrib/strutl.h1
-rw-r--r--apt-pkg/indexrecords.cc6
-rw-r--r--configure.in2
-rw-r--r--debian/changelog8
-rw-r--r--debian/copyright2
7 files changed, 30 insertions, 6 deletions
diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf
new file mode 100644
index 000000000..3a08d6070
--- /dev/null
+++ b/.bzr-builddeb/default.conf
@@ -0,0 +1,2 @@
+[BUILDDEB]
+native = True
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index bd374fd1e..cdd88827b 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -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
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 53146ced7..d9972abf4 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -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);
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 502f454a8..ab208e246 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -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;
}
diff --git a/configure.in b/configure.in
index f3210d425..d8de01565 100644
--- a/configure.in
+++ b/configure.in
@@ -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)
diff --git a/debian/changelog b/debian/changelog
index 8c69f4b34..6abba0096 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/debian/copyright b/debian/copyright
index 9e277e57d..3baf9ac5a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -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