aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-09-24 12:23:29 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-09-24 12:23:29 +0800
commitd362be429cf05a0e7aaa0582d55dbd97c4616256 (patch)
tree734c86a9b728163ac4bde7fede92e6789068245b /mail
parent6ce4413006e2ebd82c9e03d90bfa707c2ed371ee (diff)
downloadgsoc2013-evolution-d362be429cf05a0e7aaa0582d55dbd97c4616256.tar.gz
gsoc2013-evolution-d362be429cf05a0e7aaa0582d55dbd97c4616256.tar.zst
gsoc2013-evolution-d362be429cf05a0e7aaa0582d55dbd97c4616256.zip
** See bug #65329.
2004-09-20 Not Zed <NotZed@Ximian.com> ** See bug #65329. * em-folder-tree-model.c (emft_is_special_local_folder): added helper for finding local folders for translation. (em_folder_tree_model_set_folder_info): translate the special local folder names. * mail-component.c: mark standard folder names for translation. svn path=/trunk/; revision=27359
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-folder-tree-model.c19
-rw-r--r--mail/mail-component.c9
3 files changed, 33 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4f371628a5..1d1bc0f896 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2004-09-20 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #65329.
+
+ * em-folder-tree-model.c (emft_is_special_local_folder): added
+ helper for finding local folders for translation.
+ (em_folder_tree_model_set_folder_info): translate the special
+ local folder names.
+
+ * mail-component.c: mark standard folder names for translation.
+
2004-09-23 Not Zed <NotZed@Ximian.com>
** See bug #65058 (again again).
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 15be6d5cfb..da31fd4c12 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -414,6 +414,15 @@ account_removed (EAccountList *accounts, EAccount *account, gpointer user_data)
em_folder_tree_model_remove_store (model, si->store);
}
+/* NB: more-or-less copied from em-folder-tree.c */
+static gboolean
+emft_is_special_local_folder(CamelStore *store, const char *name)
+{
+ /* Bit of a hack to translate local mailbox names */
+ return store == mail_component_peek_local_store(NULL)
+ && (!strcmp (name, "Drafts") || !strcmp (name, "Inbox")
+ || !strcmp (name, "Outbox") || !strcmp (name, "Sent"));
+}
void
em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
@@ -427,6 +436,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
gboolean load = FALSE;
struct _CamelFolder *folder;
gboolean emitted = FALSE;
+ const char *name;
if (!fully_loaded)
load = fi->child == NULL && !(fi->flags & (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS));
@@ -457,9 +467,14 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
}
camel_object_unref(folder);
}
-
+
+ if (emft_is_special_local_folder(si->store, fi->full_name))
+ name = _(fi->name);
+ else
+ name = fi->name;
+
gtk_tree_store_set ((GtkTreeStore *) model, iter,
- COL_STRING_DISPLAY_NAME, fi->name,
+ COL_STRING_DISPLAY_NAME, name,
COL_POINTER_CAMEL_STORE, si->store,
COL_STRING_FULL_NAME, fi->full_name,
COL_STRING_URI, fi->uri,
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 4ac09c0ce3..6bd8c9d123 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -132,10 +132,11 @@ static struct {
char *uri;
CamelFolder *folder;
} mc_default_folders[] = {
- { "Inbox", },
- { "Drafts", },
- { "Outbox", },
- { "Sent", },
+ /* translators: standard local mailbox names */
+ { N_("Inbox"), },
+ { N_("Drafts"), },
+ { N_("Outbox"), },
+ { N_("Sent"), },
{ "Inbox", }, /* 'always local' inbox */
};