aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-24 13:23:27 +0800
committerDan Winship <danw@src.gnome.org>2000-10-24 13:23:27 +0800
commit360675f54b51d53ac99409077f2d31d96284fb9b (patch)
tree265d70af032473fbdf08d04695ed2a9b3c5b4a34 /camel/providers/mbox
parentbabd37f2f7b43ea61df0d320ac7344d18debae72 (diff)
downloadgsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar.gz
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar.bz2
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar.lz
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar.xz
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.tar.zst
gsoc2013-evolution-360675f54b51d53ac99409077f2d31d96284fb9b.zip
lots of i18n fixes
svn path=/trunk/; revision=6143
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c8
-rw-r--r--camel/providers/mbox/camel-mbox-provider.c6
-rw-r--r--camel/providers/mbox/camel-mbox-store.c29
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c22
4 files changed, 31 insertions, 34 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 9f8dcce3c0..b7d97ca56b 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -217,7 +217,7 @@ camel_mbox_folder_new(CamelStore *parent_store, const char *full_name, guint32 f
mbox_folder->folder_file_path, mbox_folder->index);
if (mbox_folder->summary == NULL || camel_mbox_summary_load(mbox_folder->summary, forceindex) == -1) {
camel_exception_set(ex, CAMEL_EXCEPTION_FOLDER_INVALID, /* FIXME: right error code */
- "Could not create summary");
+ _("Could not create summary"));
camel_object_unref (CAMEL_OBJECT (folder));
return NULL;
}
@@ -380,10 +380,10 @@ mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const Camel
fail:
if (camel_exception_is_set(ex)) {
camel_exception_setv(ex, camel_exception_get_id(ex),
- "Cannot append message to mbox file: %s", camel_exception_get_description(ex));
+ _("Cannot append message to mbox file: %s"), camel_exception_get_description(ex));
} else {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot append message to mbox file: %s", g_strerror(errno));
+ _("Cannot append message to mbox file: %s"), g_strerror(errno));
}
if (filter_stream) {
/*camel_stream_close (filter_stream); */
@@ -486,7 +486,7 @@ mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex)
return message;
fail:
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, "Cannot get message: %s", g_strerror(errno));
+ camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s"), g_strerror(errno));
if (parser)
camel_object_unref(CAMEL_OBJECT(parser));
diff --git a/camel/providers/mbox/camel-mbox-provider.c b/camel/providers/mbox/camel-mbox-provider.c
index d4048e1be3..3130a3ffd9 100644
--- a/camel/providers/mbox/camel-mbox-provider.c
+++ b/camel/providers/mbox/camel-mbox-provider.c
@@ -31,10 +31,10 @@
static CamelProvider mbox_provider = {
"mbox",
- "UNIX mbox-format mail files",
+ N_("UNIX mbox-format mail files"),
- "For reading mail delivered by the local system, and for "
- "storing mail on local disk.",
+ N_("For reading mail delivered by the local system, and for "
+ "storing mail on local disk."),
"mail",
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index 2625722134..68ecfd229e 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -118,15 +118,14 @@ get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelExcep
if (errno != ENOENT) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open file `%s':"
- "\n%s", name,
- g_strerror(errno));
+ _("Could not open file `%s':\n%s"),
+ 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 `%s' does not exist."),
folder_name);
g_free(name);
return NULL;
@@ -135,9 +134,8 @@ get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelExcep
fd = open(name, O_WRONLY | O_CREAT | O_APPEND, 0600);
if (fd == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create file `%s':"
- "\n%s", name,
- g_strerror(errno));
+ _("Could not create file `%s':\n%s"),
+ name, g_strerror(errno));
g_free(name);
return NULL;
}
@@ -145,7 +143,7 @@ get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelExcep
close(fd);
} else if (!S_ISREG(st.st_mode)) {
camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- "`%s' is not a regular file.",
+ _("`%s' is not a regular file."),
name);
g_free(name);
return NULL;
@@ -171,7 +169,7 @@ delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
}
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not delete folder `%s':\n%s",
+ _("Could not delete folder `%s':\n%s"),
folder_name, g_strerror (errno));
g_free (name);
return;
@@ -179,14 +177,14 @@ delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
if (!S_ISREG (st.st_mode)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- "`%s' is not a regular file.", name);
+ _("`%s' is not a regular file."), name);
g_free (name);
return;
}
if (st.st_size != 0) {
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
- "Folder `%s' is not empty. Not deleted.",
+ _("Folder `%s' is not empty. Not deleted."),
folder_name);
g_free (name);
return;
@@ -207,7 +205,7 @@ delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
if (status == -1 && errno != ENOENT) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not delete folder `%s':\n%s",
+ _("Could not delete folder `%s':\n%s"),
folder_name, g_strerror (errno));
}
}
@@ -224,7 +222,7 @@ static int xrename(const char *oldp, const char *newp, const char *prefix, const
/* FIXME: this has races ... */
if (!(stat(new, &st) == -1 && errno==ENOENT)) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not rename folder %s to %s: destination exists",
+ _("Could not rename folder %s to %s: destination exists"),
old, new);
} else if (rename(old, new) == 0 || errno==ENOENT) {
ret = 0;
@@ -232,7 +230,6 @@ static int xrename(const char *oldp, const char *newp, const char *prefix, const
/* for nfs, check if the rename worked anyway ... */
ret = 0;
}
- printf("success = %d\n", ret);
g_free(old);
g_free(new);
@@ -263,7 +260,7 @@ get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex)
/* For now, we don't allow hieararchy. FIXME. */
if (strchr (folder_name + 1, '/')) {
camel_exception_set (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- "Mbox folders may not be nested.");
+ _("Mbox folders may not be nested."));
return NULL;
}
@@ -277,7 +274,7 @@ 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 file %s"), service->url->path);
}
static CamelFolderInfo *
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index c037b6000e..93e634084a 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -647,7 +647,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
fd = open(mbs->folder_path, O_RDWR);
if (fd == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open summary %s", mbs->folder_path);
+ _("Could not open summary %s"), mbs->folder_path);
return -1;
}
@@ -668,7 +668,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
tmpname = NULL;
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot open temporary mailbox: %s", strerror(errno));
+ _("Cannot open temporary mailbox: %s"), strerror(errno));
goto error;
}
}
@@ -712,7 +712,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (camel_mime_parser_tell_start_from (mp) != info->frompos) {
g_warning("Summary/mbox mismatch, aborting sync");
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Summary mismatch, aborting sync");
+ _("Summary mismatch, aborting sync"));
goto error;
}
@@ -732,7 +732,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (!xevok) {
g_warning("The summary told me I had an X-Evolution header, but i dont!");
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Summary mismatch, X-Evolution header missing");
+ _("Summary mismatch, X-Evolution header missing"));
goto error;
}
buffer = g_strdup_printf("X-Evolution: %s", xevnew);
@@ -754,7 +754,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (header_write(fdout, camel_mime_parser_headers_raw(mp), xevnew) == -1) {
d(printf("Error writing to tmp mailbox\n"));
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Error writing to temp mailbox: %s",
+ _("Error writing to temp mailbox: %s"),
strerror(errno));
goto error;
}
@@ -767,7 +767,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
info->info.content->endpos - info->info.content->bodypos) == -1) {
g_warning("Cannot copy data to output fd");
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot copy data to output fd: %s",
+ _("Cannot copy data to output file: %s"),
strerror (errno));
goto error;
}
@@ -785,7 +785,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
info->info.content->endpos - info->frompos) == -1) {
g_warning("Cannot copy data to output fd");
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Cannot copy data to output fd: %s",
+ _("Cannot copy data to output file: %s"),
strerror(errno));
goto error;
}
@@ -810,7 +810,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (close(fd) == -1) {
g_warning("Cannot close source folder: %s", strerror(errno));
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not close source folder %s: %s",
+ _("Could not close source folder %s: %s"),
mbs->folder_path, strerror(errno));
goto error;
}
@@ -819,7 +819,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (close(fdout) == -1) {
g_warning("Cannot close tmp folder: %s", strerror(errno));
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not close temp folder: %s",
+ _("Could not close temp folder: %s"),
strerror(errno));
goto error;
}
@@ -827,7 +827,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (rename(tmpname, mbs->folder_path) == -1) {
g_warning("Cannot rename folder: %s", strerror(errno));
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not rename folder: %s",
+ _("Could not rename folder: %s"),
strerror(errno));
goto error;
}
@@ -839,7 +839,7 @@ camel_mbox_summary_sync(CamelMboxSummary *mbs, gboolean expunge, CamelException
if (stat(mbs->folder_path, &st) == -1) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- "Unknown error: %s",
+ _("Unknown error: %s"),
strerror(errno));
goto error;
}