[evolution-data-server] Bug 625083 - Gettext can't parse GLib's printf format constants
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 625083 - Gettext can't parse GLib's printf format constants
- Date: Wed, 28 Jul 2010 19:35:02 +0000 (UTC)
commit e4df08b184b099eda78d66ae6904c0885b9c5ae1
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jul 28 15:34:05 2010 -0400
Bug 625083 - Gettext can't parse GLib's printf format constants
camel/providers/local/camel-mbox-summary.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 2367cc1..39a15e5 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -519,10 +519,20 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
info = camel_folder_summary_add_from_parser(s, mp);
if (info == NULL) {
+ gchar *pos_str;
+
+ /* XXX Gettext does not understand G_GINT64_FORMAT
+ * when used directly in a translatable string,
+ * so we have to pre-format the position value
+ * for use in the error message. */
+ pos_str = g_strdup_printf (
+ "%" G_GINT64_FORMAT, (gint64)
+ camel_mime_parser_tell (mp));
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
- _("Fatal mail parser error near position %" G_GINT64_FORMAT " in folder %s"),
- (gint64) camel_mime_parser_tell(mp), cls->folder_path);
+ _("Fatal mail parser error near position %s "
+ "in folder %s"), pos_str, cls->folder_path);
+ g_free (pos_str);
ok = -1;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]