aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mh
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/mh')
-rw-r--r--camel/providers/mh/camel-mh-folder.c8
-rw-r--r--camel/providers/mh/camel-mh-provider.c4
-rw-r--r--camel/providers/mh/camel-mh-store.c29
3 files changed, 22 insertions, 19 deletions
diff --git a/camel/providers/mh/camel-mh-folder.c b/camel/providers/mh/camel-mh-folder.c
index ccd9d717e9..5b5c6688d7 100644
--- a/camel/providers/mh/camel-mh-folder.c
+++ b/camel/providers/mh/camel-mh-folder.c
@@ -208,7 +208,7 @@ camel_mh_folder_new(CamelStore *parent_store, const char *full_name, guint32 fla
if (camel_mh_summary_load(mh_folder->summary, forceindex) == -1) {
camel_exception_set(ex, CAMEL_EXCEPTION_FOLDER_INVALID, /* FIXME: right error code */
- "Could not load or create summary");
+ _("Could not load or create summary"));
camel_object_unref (CAMEL_OBJECT (folder));
return NULL;
}
@@ -327,10 +327,10 @@ static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message,
fail:
if (camel_exception_is_set(ex)) {
camel_exception_setv(ex, camel_exception_get_id(ex),
- "Cannot append message to mh file: %s", camel_exception_get_description(ex));
+ _("Cannot append message to mh folder: %s"), camel_exception_get_description(ex));
} else {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot append message to mh file: %s", g_strerror(errno));
+ _("Cannot append message to mh folder: %s"), g_strerror(errno));
}
if (output_stream)
camel_object_unref(CAMEL_OBJECT(output_stream));
@@ -396,7 +396,7 @@ static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid,
return message;
fail:
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, "Cannot get message: %s\n %s",
+ camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
name, g_strerror(errno));
if (message_stream)
diff --git a/camel/providers/mh/camel-mh-provider.c b/camel/providers/mh/camel-mh-provider.c
index 58e97eed30..25a3522678 100644
--- a/camel/providers/mh/camel-mh-provider.c
+++ b/camel/providers/mh/camel-mh-provider.c
@@ -31,9 +31,9 @@
static CamelProvider mh_provider = {
"mh",
- "UNIX mh-format mail files",
+ N_("UNIX MH-format mail directories"),
- "For reading mail delivered by the local system, and for " "storing mail on local disk.",
+ N_("For storing local mail in MH-like mail directories"),
"mail",
diff --git a/camel/providers/mh/camel-mh-store.c b/camel/providers/mh/camel-mh-store.c
index ead6e4f340..65b1005b85 100644
--- a/camel/providers/mh/camel-mh-store.c
+++ b/camel/providers/mh/camel-mh-store.c
@@ -109,18 +109,17 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guin
name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
- printf("getting folder: %s\n", name);
if (stat(name, &st) == -1) {
- printf("doesn't exist ...\n");
if (errno != ENOENT) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open folder `%s':" "\n%s", folder_name, g_strerror(errno));
+ _("Could not open folder `%s':\n%s"),
+ folder_name, g_strerror(errno));
g_free (name);
return NULL;
}
if ((flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- "Folder `%s' does not exist.", folder_name);
+ _("Folder `%s' does not exist."), folder_name);
g_free (name);
return NULL;
}
@@ -128,14 +127,16 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guin
if (mkdir(name, 0700) != 0) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create folder `%s':" "\n%s", folder_name, g_strerror(errno));
+ _("Could not create folder `%s':\n%s"),
+ folder_name, g_strerror(errno));
g_free (name);
return NULL;
}
printf("created ok?\n");
} else if (!S_ISDIR(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, "`%s' is not a directory.", name);
+ camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
+ _("`%s' is not a directory."), name);
g_free (name);
return NULL;
}
@@ -154,7 +155,8 @@ static void delete_folder(CamelStore * store, const char *folder_name, CamelExce
if (stat(name, &st) == -1) {
if (errno != ENOENT)
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not delete folder `%s': %s", folder_name, strerror(errno));
+ _("Could not delete folder `%s': %s"),
+ folder_name, strerror(errno));
} else {
/* this will 'fail' if there are still messages in the directory -
but only the metadata is lost */
@@ -166,7 +168,8 @@ static void delete_folder(CamelStore * store, const char *folder_name, CamelExce
g_free(str);
if (rmdir(name) == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not delete folder `%s': %s", folder_name, strerror(errno));
+ _("Could not delete folder `%s': %s"),
+ folder_name, strerror(errno));
}
}
g_free(name);
@@ -183,15 +186,15 @@ static void rename_folder (CamelStore *store, const char *old_name, const char *
if (stat(old, &st) == 0 && S_ISDIR(st.st_mode)) {
if (rename(old, new) != 0) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not rename folder `%s': %s", old_name, strerror(errno));
+ _("Could not rename folder `%s': %s"), old_name, strerror(errno));
}
} else {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not rename folder `%s': %s", old_name, strerror(errno));
+ _("Could not rename folder `%s': %s"), old_name, strerror(errno));
}
} else {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not rename folder `%s': %s exists", old_name, new_name);
+ _("Could not rename folder `%s': %s exists"), old_name, new_name);
}
}
@@ -199,7 +202,7 @@ static char *get_folder_name(CamelStore * store, const char *folder_name, CamelE
{
/* For now, we don't allow hieararchy. FIXME. */
if (strchr(folder_name + 1, '/')) {
- camel_exception_set(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, "Mh folders may not be nested.");
+ camel_exception_set(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, _("MH folders may not be nested."));
return NULL;
}
@@ -211,7 +214,7 @@ static char *get_name(CamelService * service, gboolean brief)
if (brief)
return g_strdup(service->url->path);
else
- return g_strdup_printf("Local mail file %s", service->url->path);
+ return g_strdup_printf(_("Local mail directory %s"), service->url->path);
}