diff options
author | Milan Crha <mcrha@redhat.com> | 2010-04-02 02:00:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-04-02 02:00:36 +0800 |
commit | 125573b8fd62f4d0d38907c95c70168ca984d3c4 (patch) | |
tree | 709ea2df6889f4aa66c17a6eba795096424bae1c /mail/mail-autofilter.c | |
parent | 0d66851bd58f75b21f30942c05a96fa7c4bf5817 (diff) | |
download | gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar.gz gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar.bz2 gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar.lz gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar.xz gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.tar.zst gsoc2013-evolution-125573b8fd62f4d0d38907c95c70168ca984d3c4.zip |
Bug #302742 - The mail error messages is difficult to understand/translate
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r-- | mail/mail-autofilter.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 8117bfca6a..dd6e64afac 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -424,18 +424,39 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri) if (deleted) { GtkWidget *dialog; GString *s; + guint s_count; + gchar *info; GList *l; s = g_string_new(""); - l = deleted; - while (l) { - g_string_append_printf (s, " %s\n", (gchar *)l->data); - l = l->next; + s_count = 0; + for (l = deleted; l; l = l->next) { + const gchar *name = (const gchar *)l->data; + + if (s_count == 0) { + g_string_append (s, name); + } else { + if (s_count == 1) { + g_string_prepend (s, " "); + g_string_append (s, "\n"); + } + g_string_append_printf (s, " %s\n", name); + } + s_count++; } - dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", s->str, euri, NULL); - g_string_free(s, TRUE); + info = g_strdup_printf (ngettext ( + /* Translators: The first %s is name of the affected filter rule(s), + the second %s is uri of the removed folder. For more than one filter + rule is each of them on a separate line, with four spaces in front + of its name, without quotes. */ + "The filter rule \"%s\" has been updated, because it used just removed folder\n\"%s\".", + "The following filter rules\n%s have been updated, because they used just removed folder\n\"%s\".", + s_count), s->str, euri); + dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", info, NULL); em_utils_show_info_silent (dialog); + g_string_free (s, TRUE); + g_free (info); d(printf("Folder delete/rename '%s' changed filters, resaving\n", euri)); if (e_rule_context_save ((ERuleContext *) fc, user) == -1) |