X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=b99895277c5278526d7f8b63a85dec67d6f79a13;hp=02ff9cc4078a7d2f546ae3aea8f04bc605f2e7f9;hb=ba18a46855a9001c57688f1b2aa087887ef11e63;hpb=f26bfbe154a21ab3482010919af7d394c0d2dd9c diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 02ff9cc..b998952 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -905,14 +905,30 @@ modest_ui_actions_msg_retrieval_check (ModestMailOperation *mail_op, if (error && ((error->code == TNY_SERVICE_ERROR_NO_SUCH_MESSAGE) || error->code == TNY_SERVICE_ERROR_MESSAGE_NOT_AVAILABLE)) { - gchar *subject, *msg; + gchar *subject, *msg, *format = NULL; + TnyAccount *account; subject = tny_header_dup_subject (header); if (!subject) - subject = g_strdup (_("mail_va_no_subject"));; - msg = g_strdup_printf (_("emev_ni_ui_imap_message_not_available_in_server"), - subject); + subject = g_strdup (_("mail_va_no_subject")); + + account = modest_mail_operation_get_account (mail_op); + if (account) { + ModestProtocol *protocol; + ModestProtocolType proto; + proto = modest_tny_account_get_protocol_type (account); + protocol = modest_protocol_registry_get_protocol_by_type (modest_runtime_get_protocol_registry (), proto); + if (protocol) + format = modest_protocol_get_translation (protocol, MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE); + g_object_unref (account); + } + + if (!format) + format = g_strdup (_("emev_ni_ui_imap_message_not_available_in_server")); + + msg = g_strdup_printf (format, subject); modest_platform_run_information_dialog (NULL, msg, FALSE); g_free (msg); + g_free (format); g_free (subject); }