If no header available and we have to show error fetching message, show
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 11 Nov 2009 18:12:33 +0000 (19:12 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 13 Nov 2009 10:07:11 +0000 (11:07 +0100)
a different string, not requiring subject.

src/modest-protocol-registry.c
src/modest-protocol-registry.h
src/modest-ui-actions.c

index 57d2cef..2503f33 100644 (file)
@@ -457,6 +457,7 @@ modest_protocol_registry_set_to_default (ModestProtocolRegistry *self)
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR, translation_is_userdata, "emev_ni_ui_pop3_msg_connect_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_ACCOUNT_CONNECTION_ERROR, translation_is_userdata, "emev_ni_ui_pop3_msg_connect_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE, translation_is_userdata_no_param, "emev_ni_ui_pop3_msg_recv_error", NULL);
+       modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE_LOST_HEADER, translation_is_userdata, "emev_ni_ui_pop3_msg_recv_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_SSL_PROTO_NAME, translation_is_userdata_no_param, "mcen_fi_advsetup_other_security_securepop3s", NULL);
        modest_protocol_registry_add (self, protocol, 3,
                                      MODEST_PROTOCOL_REGISTRY_TRANSPORT_STORE_PROTOCOLS,
@@ -477,6 +478,7 @@ modest_protocol_registry_set_to_default (ModestProtocolRegistry *self)
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR, translation_is_userdata, "emev_ni_ui_imap_connect_server_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_ACCOUNT_CONNECTION_ERROR, translation_is_userdata, "emev_ni_ui_imap_connect_server_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE, translation_is_userdata, "emev_ni_ui_imap_message_not_available_in_server", NULL);
+       modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE_LOST_HEADER, translation_is_userdata, "emev_ni_ui_pop3_msg_recv_error", NULL);
        modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_SSL_PROTO_NAME, translation_is_userdata_no_param, "mcen_fi_advsetup_other_security_secureimap4s", NULL);
        account_options = tny_simple_list_new ();
        pair = tny_pair_new (MODEST_ACCOUNT_OPTION_USE_LSUB, "");
index f7c314c..5ee978a 100644 (file)
@@ -99,6 +99,7 @@ G_BEGIN_DECLS
 #define MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR "translation-auth-error" /* server name */
 #define MODEST_PROTOCOL_TRANSLATION_ACCOUNT_CONNECTION_ERROR "translation-account-connection-error" /* hostname */
 #define MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE "translation-msg-not-available" /* subject */
+#define MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE_LOST_HEADER "translation-msg-not-available-lost-header" /* subject */
 #define MODEST_PROTOCOL_TRANSLATION_SSL_PROTO_NAME "translation-ssl-proto-name"
 
 
index 8e5f450..8c65b6c 100644 (file)
@@ -1004,9 +1004,14 @@ modest_ui_actions_msg_retrieval_check (ModestMailOperation *mail_op,
                                if (protocol) {
                                        if (tny_account_get_connection_status (account) ==
                                            TNY_CONNECTION_STATUS_CONNECTED) {
-                                               format = modest_protocol_get_translation (protocol,
-                                                                                         MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE,
-                                                                                         subject);
+                                               if (header) {
+                                                       format = modest_protocol_get_translation (protocol,
+                                                                                                 MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE,
+                                                                                                 subject);
+                                               } else {
+                                                       format = modest_protocol_get_translation (protocol,
+                                                                                                 MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE_LOST_HEADER);
+                                               }
                                        } else {
                                                format = g_strdup_printf (_("mail_ib_backend_server_invalid"),
                                                                          tny_account_get_hostname (account));