aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/cache
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/cache')
-rw-r--r--camel/providers/cache/camel-cache-map.c16
-rw-r--r--camel/providers/cache/camel-cache-provider.c5
-rw-r--r--camel/providers/cache/camel-cache-store.c6
3 files changed, 18 insertions, 9 deletions
diff --git a/camel/providers/cache/camel-cache-map.c b/camel/providers/cache/camel-cache-map.c
index d3cece6f60..a826dfe157 100644
--- a/camel/providers/cache/camel-cache-map.c
+++ b/camel/providers/cache/camel-cache-map.c
@@ -23,8 +23,9 @@
* USA
*/
-#include "camel-cache-map.h"
-#include <camel/camel-exception.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <errno.h>
#include <fcntl.h>
@@ -33,6 +34,9 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "camel-cache-map.h"
+#include <camel/camel-exception.h>
+
/**
* camel_cache_map_new:
*
@@ -192,7 +196,7 @@ camel_cache_map_write (CamelCacheMap *map, const char *file,
if (fd == -1) {
g_free (tmpfile);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create cache map file: %s",
+ _("Could not create cache map file: %s"),
g_strerror (errno));
return;
}
@@ -202,7 +206,7 @@ camel_cache_map_write (CamelCacheMap *map, const char *file,
if (close (fd) == -1 ||
rename (tmpfile, file) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not save cache map file: %s",
+ _("Could not save cache map file: %s"),
g_strerror (errno));
unlink (tmpfile);
}
@@ -231,7 +235,7 @@ camel_cache_map_read (CamelCacheMap *map, const char *file, CamelException *ex)
f = fopen (file, "r");
if (!f) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open cache map file: %s",
+ _("Could not open cache map file: %s"),
g_strerror (errno));
return;
}
@@ -242,7 +246,7 @@ camel_cache_map_read (CamelCacheMap *map, const char *file, CamelException *ex)
q = strchr (buf, '\n');
if (!p || !q) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- "Bad cache file.");
+ _("Bad cache file."));
return;
}
*p++ = *q = '\0';
diff --git a/camel/providers/cache/camel-cache-provider.c b/camel/providers/cache/camel-cache-provider.c
index 217f06816a..ac2f329d7c 100644
--- a/camel/providers/cache/camel-cache-provider.c
+++ b/camel/providers/cache/camel-cache-provider.c
@@ -23,7 +23,10 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-cache-store.h"
#include "camel-provider.h"
#include "camel-session.h"
diff --git a/camel/providers/cache/camel-cache-store.c b/camel/providers/cache/camel-cache-store.c
index 544cca69a1..ae076e47d2 100644
--- a/camel/providers/cache/camel-cache-store.c
+++ b/camel/providers/cache/camel-cache-store.c
@@ -23,7 +23,9 @@
* USA
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <sys/types.h>
#include <sys/socket.h>
@@ -177,7 +179,7 @@ get_folder (CamelStore *store, const char *folder_name,
if (!lf) {
camel_object_unref (CAMEL_OBJECT (rf));
camel_exception_setv (ex, camel_exception_get_id (ex),
- "Could not create cache folder:\n%s",
+ _("Could not create cache folder:\n%s"),
camel_exception_get_description (ex));
return NULL;
}