diff options
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/em-account-editor.c | 16 | ||||
-rw-r--r-- | mail/em-folder-properties.c | 11 |
3 files changed, 34 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a5761ba422..d17da724d4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2006-01-01 Changwoo Ryu <cwryu@debian.org> + + * em-folder-properties.c (emfp_dialog_got_folder): translate + the labels of emfp_items. + + * em-account-editor.c (em_account_editor_construct): translate + the labels of emae_{editor,druid}_items. + 2006-01-01 Harish Krishnaswamy <kharish@novell.com> diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 59f18fa9e4..4dda9a9f05 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2338,6 +2338,7 @@ static EMConfigItem emae_editor_items[] = { /* table not vbox: { E_CONFIG_SECTION, "50.security/10.smime", "smime_table", emae_widget_glade }, */ { 0 }, }; +static gboolean emae_editor_items_translated = FALSE; static GtkWidget * emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) @@ -2424,6 +2425,7 @@ static EMConfigItem emae_druid_items[] = { { E_CONFIG_PAGE_FINISH, "999.end", "finish_page", emae_widget_druid_glade }, { 0 }, }; +static gboolean emae_druid_items_translated = FALSE; static void emae_free(EConfig *ec, GSList *items, void *data) @@ -2675,9 +2677,23 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account if (type == EMAE_NOTEBOOK) { ec = em_config_new(E_CONFIG_BOOK, id); items = emae_editor_items; + if (!emae_editor_items_translated) { + for (i=0;items[i].path;i++) { + if (items[i].label) + items[i].label = gettext(items[i].label); + } + emae_editor_items_translated = TRUE; + } } else { ec = em_config_new(E_CONFIG_DRUID, id); items = emae_druid_items; + if (!emae_druid_items_translated) { + for (i=0;items[i].path;i++) { + if (items[i].label) + items[i].label = _(items[i].label); + } + emae_druid_items_translated = TRUE; + } } emae->config = gui->config = ec; diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index d172a23515..98ada5a740 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -218,6 +218,7 @@ static EMConfigItem emfp_items[] = { { E_CONFIG_SECTION, "00.general/00.folder", NULL /* set by code */ }, { E_CONFIG_ITEM, "00.general/00.folder/00.info", NULL, emfp_get_folder_item }, }; +static gboolean emfp_items_translated = FALSE; static void emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data) @@ -245,8 +246,16 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data) && (!strcmp(prop_data->name, "Drafts") || !strcmp(prop_data->name, "Inbox") || !strcmp(prop_data->name, "Outbox") - || !strcmp(prop_data->name, "Sent"))) + || !strcmp(prop_data->name, "Sent"))) { emfp_items[EMFP_FOLDER_SECTION].label = _(prop_data->name); + if (!emfp_items_translated) { + for (i=0;i<sizeof(emfp_items)/sizeof(emfp_items[0]);i++) { + if (emfp_items[i].label) + emfp_items[i].label = _(emfp_items[i].label); + } + emfp_items_translated = TRUE; + } + } else emfp_items[EMFP_FOLDER_SECTION].label = prop_data->name; |