More translatable header names in UI strings.
authorwwp <wwp@free.fr>
Wed, 21 Dec 2016 14:52:41 +0000 (15:52 +0100)
committerwwp <wwp@free.fr>
Wed, 21 Dec 2016 14:52:41 +0000 (15:52 +0100)
src/compose.c
src/messageview.c
src/plugins/address_keeper/address_keeper_prefs.c
src/prefs_compose_writing.c

index 4ed8e21..0be7a59 100644 (file)
@@ -5032,12 +5032,16 @@ static gboolean compose_check_for_set_recipients(Compose *compose)
                }
                if (!found_other) {
                        AlertValue aval;
+                       gchar *text;
                        if (compose->batch) {
                                gtk_widget_show_all(compose->window);
                        }
+                       text = g_strdup_printf(_("The only recipient is the default '%s' address. Send anyway?"),
+                                          prefs_common_translated_header_name("Cc"));
                        aval = alertpanel(_("Send"),
-                                         _("The only recipient is the default 'Cc' address. Send anyway?"),
+                                         text,
                                          GTK_STOCK_CANCEL, g_strconcat("+", _("_Send"), NULL), NULL);
+                       g_free(text);
                        if (aval != G_ALERTALTERNATE)
                                return FALSE;
                }
@@ -5064,12 +5068,16 @@ static gboolean compose_check_for_set_recipients(Compose *compose)
                }
                if (!found_other) {
                        AlertValue aval;
+                       gchar *text;
                        if (compose->batch) {
                                gtk_widget_show_all(compose->window);
                        }
+                       text = g_strdup_printf(_("The only recipient is the default '%s' address. Send anyway?"),
+                                          prefs_common_translated_header_name("Bcc"));
                        aval = alertpanel(_("Send"),
-                                         _("The only recipient is the default 'Bcc' address. Send anyway?"),
+                                         text,
                                          GTK_STOCK_CANCEL, g_strconcat("+", _("_Send"), NULL), NULL);
+                       g_free(text);
                        if (aval != G_ALERTALTERNATE)
                                return FALSE;
                }
index 05bf956..b07813e 100644 (file)
@@ -863,12 +863,17 @@ static gint disposition_notification_send(MsgInfo *msginfo)
        ac_list = account_find_all_from_address(ac_list, msginfo->cc);
 
        if (ac_list == NULL) {
-               AlertValue val = 
-               alertpanel_full(_("Warning"),
+               AlertValue val;
+               gchar *text;
+               text = g_strdup_printf(
                  _("This message is asking for a return receipt notification\n"
-                   "but according to its 'To' and 'Cc' headers it was not\n"
+                   "but according to its '%s' and '%s' headers it was not\n"
                    "officially addressed to you.\n"
                    "It is advised to not send the return receipt."),
+                 prefs_common_translated_header_name("To"),
+                 prefs_common_translated_header_name("Cc"));
+               val = alertpanel_full(_("Warning"),
+                 text,
                  _("_Don't Send"), _("_Send"), NULL, FALSE,
                  NULL, ALERT_WARNING, G_ALERTDEFAULT);
                if (val != G_ALERTALTERNATE)
index 5291b51..93a39f1 100644 (file)
@@ -99,6 +99,7 @@ static void addkeeper_prefs_create_widget_func(PrefsPage * _page,
        GtkWidget *blocked_scrolledwin;
        GtkWidget *vbox;
        GtkTextBuffer *buffer;
+       gchar *text;
 
        vbox = gtk_vbox_new(FALSE, 6);
 
@@ -137,29 +138,38 @@ static void addkeeper_prefs_create_widget_func(PrefsPage * _page,
                _("Fields to keep addresses from"));
        gtk_container_set_border_width(GTK_CONTAINER(keep_frame), 6);
 
-       keep_to_checkbox = gtk_check_button_new_with_label(_("To"));
+       keep_to_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("To"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_to_checkbox), addkeeperprefs.keep_to_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_to_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_to_checkbox);
-       CLAWS_SET_TIP(keep_to_checkbox, _("Keep addresses which appear in 'To' headers"));
+       text = g_strdup_printf(_("Keep addresses which appear in '%s' headers"),
+                       prefs_common_translated_header_name("To"));
+       CLAWS_SET_TIP(keep_to_checkbox, text);
+       g_free(text);
        gtk_widget_show(keep_to_checkbox);
 
        page->keep_to_addrs_check = keep_to_checkbox;
 
-       keep_cc_checkbox = gtk_check_button_new_with_label(_("Cc"));
+       keep_cc_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("Cc"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_cc_checkbox), addkeeperprefs.keep_cc_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_cc_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_cc_checkbox);
-       CLAWS_SET_TIP(keep_cc_checkbox, _("Keep addresses which appear in 'Cc' headers"));
+       text = g_strdup_printf(_("Keep addresses which appear in '%s' headers"),
+                       prefs_common_translated_header_name("Cc"));
+       CLAWS_SET_TIP(keep_cc_checkbox, text);
+       g_free(text);
        gtk_widget_show(keep_cc_checkbox);
 
        page->keep_cc_addrs_check = keep_cc_checkbox;
 
-       keep_bcc_checkbox = gtk_check_button_new_with_label(_("Bcc"));
+       keep_bcc_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("Bcc"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_bcc_checkbox), addkeeperprefs.keep_bcc_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_bcc_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_bcc_checkbox);
-       CLAWS_SET_TIP(keep_bcc_checkbox, _("Keep addresses which appear in 'Bcc' headers"));
+       text = g_strdup_printf(_("Keep addresses which appear in '%s' headers"),
+                       prefs_common_translated_header_name("Bcc"));
+       CLAWS_SET_TIP(keep_bcc_checkbox, text);
+       g_free(text);
        gtk_widget_show(keep_bcc_checkbox);
 
        page->keep_bcc_addrs_check = keep_bcc_checkbox;
index 46dd621..2f5aff2 100644 (file)
@@ -116,6 +116,7 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
        GtkWidget *optmenu_dnd_insert_or_attach;
        GtkListStore *menu;
        GtkTreeIter iter;
+       gchar *text;
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -226,8 +227,10 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
        PACK_CHECK_BUTTON (vbox2, checkbtn_forward_as_attachment,
                           _("Forward as attachment"));
 
-       PACK_CHECK_BUTTON (vbox2, checkbtn_redirect_keep_from,
-                          _("Keep the original 'From' header when redirecting"));
+       text = g_strdup_printf(_("Keep the original '%s' header when redirecting"),
+                       prefs_common_translated_header_name("From"));
+       PACK_CHECK_BUTTON (vbox2, checkbtn_redirect_keep_from, text);
+       g_free(text);
 
        /* dnd insert or attach */
        label_dnd_insert_or_attach = gtk_label_new (_("When dropping files into the Compose window"));