[balsa] translate “unknown error”



commit 1725d542c5c5eef667f258d9c9de3913d1a21e1a
Author: Albrecht Dreß <albrecht dress netcologne de>
Date:   Fri Jan 21 18:01:29 2022 +0100

    translate “unknown error”
    
    always mark the fallback string “unknown error” (used iff a GError is
    NULL) as translatable.
    
    Signed-off-by: Albrecht Dreß <albrecht dress netcologne de>

 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    | 4 ++--
 src/balsa-mime-widget-message.c   | 2 +-
 src/balsa-mime-widget-text.c      | 2 +-
 src/balsa-mime-widget.c           | 2 +-
 src/sendmsg-window.c              | 4 ++--
 9 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/libbalsa/html.c b/libbalsa/html.c
index e5bc2b06b..546b744a4 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -92,7 +92,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;
     }
@@ -150,7 +150,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 af57a1e8c..ca9183018 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -436,7 +436,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 a024f8639..ea8d26d28 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -1821,7 +1821,7 @@ part_context_dump_all_cb(GtkWidget * menu_item, GList * info_list)
                                  _("Could not save %s: %s"),
                                  libbalsa_vfs_get_uri_utf8(save_uri),
                                   err && err->message ?
-                                  err->message : "Unknown error");
+                                  err->message : _("Unknown error"));
             g_clear_error(&err);
            g_object_unref(save_uri);
            info_list = g_list_next(info_list);
diff --git a/src/balsa-mime-widget-callbacks.c b/src/balsa-mime-widget-callbacks.c
index f4803475b..1ec29fc86 100644
--- a/src/balsa-mime-widget-callbacks.c
+++ b/src/balsa-mime-widget-callbacks.c
@@ -50,7 +50,7 @@ balsa_mime_widget_ctx_menu_cb(GtkWidget * menu_item,
     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);
 }
 
@@ -149,7 +149,7 @@ balsa_mime_widget_ctx_menu_save(GtkWidget * parent_widget,
            if (libbalsa_vfs_file_unlink(save_file, &err) != 0) {
                 balsa_information(LIBBALSA_INFORMATION_ERROR,
                                   _("Unlink %s: %s"),
-                                  file_uri, err ? err->message : "Unknown error");
+                                  file_uri, err ? err->message : _("Unknown error"));
                 g_clear_error(&err);
                 do_save = FALSE;
             }
@@ -165,7 +165,7 @@ balsa_mime_widget_ctx_menu_save(GtkWidget * parent_widget,
                                             &err)) {
            balsa_information(LIBBALSA_INFORMATION_ERROR,
                              _("Could not save %s: %s"),
-                             file_uri, err ? err->message : "Unknown error");
+                             file_uri, err ? 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 fd12095e8..e1053441b 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -74,13 +74,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(GTK_BOX(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;
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index 79812591e..2c6d6483a 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -360,7 +360,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 cdf2ed9a5..6788c1047 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 65ea90d6f..b0e3d4344 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -220,7 +220,7 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
         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 55a875f47..b60d08ce6 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -1400,7 +1400,7 @@ attachment_menu_vfs_cb(GtkWidget * menu_item, BalsaAttachInfo * info)
     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);
 }
 
@@ -2935,7 +2935,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]