[balsa/gtk4: 221/288] Various: Mark error message as translatable




commit 3021b07a442d18886575e68c1e2c626ea595c9a1
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 79773af50..4a8cac200 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -74,7 +74,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;
     }
@@ -132,7 +132,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 b1be9c65f..a9d6ada75 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 232f4fea7..97718df80 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;
@@ -315,7 +315,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 61ee3e946..cb3ce0b3b 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 767bae6e0..95dd38f36 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))
@@ -1687,7 +1687,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;
@@ -2962,7 +2962,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]