[balsa/gtk4: 233/312] Various: Mark error message as translatable




commit e8d5584e264489ae01a87ac6f2db7ba99e91be71
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Oct 23 11:12:10 2020 -0400

    Various: Mark error message as translatable
    
    "Unknown error" is often used but not always marked.
    
    modified:   libbalsa/html.c
    modified:   src/ab-window.c
    modified:   src/balsa-message.c
    modified:   src/balsa-mime-widget-callbacks.c
    modified:   src/balsa-mime-widget-crypto.c
    modified:   src/balsa-mime-widget-message.c
    modified:   src/balsa-mime-widget-text.c
    modified:   src/balsa-mime-widget.c
    modified:   src/sendmsg-window.c

 libbalsa/html.c                   | 4 ++--
 src/ab-window.c                   | 2 +-
 src/balsa-message.c               | 2 +-
 src/balsa-mime-widget-callbacks.c | 6 +++---
 src/balsa-mime-widget-crypto.c    | 6 +++---
 src/balsa-mime-widget-message.c   | 2 +-
 src/balsa-mime-widget-text.c      | 2 +-
 src/balsa-mime-widget.c           | 4 ++--
 src/sendmsg-window.c              | 6 +++---
 9 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 6c425728b..281ca8f0c 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -77,7 +77,7 @@ lbh_get_body_content(LibBalsaMessageBody * body, gchar ** buf)
     if (len < 0) {
         libbalsa_information(LIBBALSA_INFORMATION_ERROR,
                              _("Could not get an HTML part: %s"),
-                             err ? err->message : "Unknown error");
+                             err ? err->message : _("Unknown error"));
         g_error_free(err);
         return len;
     }
@@ -135,7 +135,7 @@ html2text(gchar ** text, gsize len)
     if (err != NULL) {
         libbalsa_information(LIBBALSA_INFORMATION_ERROR,
                              _("Could not convert HTML part to text: %s"),
-                             err ? err->message : "Unknown error");
+                             err ? err->message : _("Unknown error"));
         g_error_free(err);
     }
 }
diff --git a/src/ab-window.c b/src/ab-window.c
index 5ea8930b6..494ff7442 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -431,7 +431,7 @@ balsa_ab_window_run_editor(GtkWidget * widget, gpointer data)
                        NULL, NULL, NULL, &err))
         balsa_information(LIBBALSA_INFORMATION_WARNING,
                           _("Could not launch %s: %s"), argv[0],
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
     g_clear_error(&err);
 }
 
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 679e25d8a..2c7d5a548 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -749,7 +749,7 @@ save_selected_to_folder_response(GtkDialog *dump_dialog,
                                       _("Could not save %s: %s"),
                                       libbalsa_vfs_get_uri_utf8(save_uri),
                                       err != NULL && err->message != NULL ?
-                                      err->message : "Unknown error");
+                                      err->message : _("Unknown error"));
                 g_clear_error(&err);
                 g_object_unref(save_uri);
             }
diff --git a/src/balsa-mime-widget-callbacks.c b/src/balsa-mime-widget-callbacks.c
index 597d68be2..27fa13cb6 100644
--- a/src/balsa-mime-widget-callbacks.c
+++ b/src/balsa-mime-widget-callbacks.c
@@ -50,7 +50,7 @@ balsa_mime_widget_ctx_menu_launch_app(const gchar         *app_name,
     if (!result)
         balsa_information(LIBBALSA_INFORMATION_WARNING,
                           _("Could not launch application: %s"),
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
     g_clear_error(&err);
 }
 
@@ -145,7 +145,7 @@ ctx_menu_thread(gpointer user_data)
            if (libbalsa_vfs_file_unlink(data->save_file, &err) != 0) {
                 balsa_information(LIBBALSA_INFORMATION_ERROR,
                                   _("Unlink %s: %s"),
-                                  data->file_uri, err != NULL ? err->message : "Unknown error");
+                                  data->file_uri, err != NULL ? err->message : _("Unknown error"));
                 g_clear_error(&err);
             }
         }
@@ -163,7 +163,7 @@ ctx_menu_thread(gpointer user_data)
                                             &err)) {
            balsa_information(LIBBALSA_INFORMATION_ERROR,
                              _("Could not save %s: %s"),
-                             data->file_uri, err != NULL ? err->message : "Unknown error");
+                             data->file_uri, err != NULL ? err->message : _("Unknown error"));
             g_clear_error(&err);
         }
     }
diff --git a/src/balsa-mime-widget-crypto.c b/src/balsa-mime-widget-crypto.c
index 54c0a57f7..bea35e7a9 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -75,13 +75,13 @@ balsa_mime_widget_new_pgpkey(BalsaMessage        *bm,
     body_size = libbalsa_message_body_get_content(mime_body, &body_buf, &err);
     if (body_size < 0) {
         balsa_information(LIBBALSA_INFORMATION_ERROR, _("Could not save a text part: %s"),
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
         g_clear_error(&err);
     } else {
         mw = g_object_new(BALSA_TYPE_MIME_WIDGET, NULL);
         if (!create_import_keys_widget(mw, body_buf, &err)) {
             balsa_information(LIBBALSA_INFORMATION_ERROR, _("Could not process GnuPG keys: %s"),
-                              err ? err->message : "Unknown error");
+                              err ? err->message : _("Unknown error"));
             g_clear_error(&err);
             g_object_unref(mw);
             mw = NULL;
@@ -321,7 +321,7 @@ on_key_import_button(GtkButton *button,
                        GTK_DIALOG_DESTROY_WITH_PARENT | libbalsa_dialog_flags(),
                        GTK_MESSAGE_ERROR,
                        GTK_BUTTONS_CLOSE,
-                       _("Error importing key data: %s"), (error != NULL) ? error->message : _("unknown 
error"));
+                       _("Error importing key data: %s"), (error != NULL) ? error->message : _("Unknown 
error"));
                g_clear_error(&error);
        }
        g_free(import_info);
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index 8ca067f4f..572c79e3d 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -367,7 +367,7 @@ extbody_send_mail(GtkWidget * button, LibBalsaMessageBody * mime_body)
     if(libbalsa_message_body_get_content(mime_body, &data, &err)<0) {
         balsa_information(LIBBALSA_INFORMATION_ERROR,
                           _("Could not get a part: %s"),
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
         g_clear_error(&err);
     }
 
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index f29346f83..ca0ae1b9b 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -252,7 +252,7 @@ balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
     if (alloced < 0) {
         balsa_information(LIBBALSA_INFORMATION_ERROR,
                           _("Could not save a text part: %s"),
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
         g_clear_error(&err);
         return NULL;
     }
diff --git a/src/balsa-mime-widget.c b/src/balsa-mime-widget.c
index 58edc071e..b3ed5ab79 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -214,12 +214,12 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
         g_ascii_strcasecmp(content_type, "application/octet-stream") == 0)
        && LIBBALSA_IS_MAILBOX_LOCAL(libbalsa_message_get_mailbox(mime_body->message))) {
         GError *err = NULL;
-       GMimeStream *stream = 
+       GMimeStream *stream =
             libbalsa_message_body_get_stream(mime_body, &err);
         if(!stream) {
             libbalsa_information(LIBBALSA_INFORMATION_ERROR,
                              _("Error reading message part: %s"),
-                             err ? err->message : "Unknown error");
+                             err ? err->message : _("Unknown error"));
             g_clear_error(&err);
             use_content_type = g_strdup(content_type);
         } else {
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 564ceeded..41546d37d 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -1385,7 +1385,7 @@ launch_app_activated(GSimpleAction *action,
     if (!result)
         balsa_information(LIBBALSA_INFORMATION_WARNING,
                           _("Could not launch application: %s"),
-                          err ? err->message : "Unknown error");
+                          err ? err->message : _("Unknown error"));
     g_clear_error(&err);
 
     if (GTK_IS_POPOVER(info->popup_menu))
@@ -1690,7 +1690,7 @@ add_attachment(BalsaSendmsg * bsmsg, const gchar *filename,
         balsa_information_parented(GTK_WINDOW(bsmsg->window),
                                    LIBBALSA_INFORMATION_ERROR,
                                    "%s: %s", filename,
-                                   err && err->message ? err->message : _("unknown error"));
+                                   err && err->message ? err->message : _("Unknown error"));
        g_error_free(err);
        g_object_unref(file_uri);
        return FALSE;
@@ -2965,7 +2965,7 @@ add_file_attachment(BalsaSendmsg        *bsmsg,
         balsa_information_parented(GTK_WINDOW(bsmsg->window),
                                    LIBBALSA_INFORMATION_ERROR,
                                    _("Could not save attachment: %s"),
-                                   err ? err->message : "Unknown error");
+                                   err ? err->message : _("Unknown error"));
         g_clear_error(&err);
         /* FIXME: do not try any further? */
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]