[evolution] I#429 - Do not mark empty string for translation



commit 7f7e4a5dd1e8f746c126d8cd6c54418583090ea8
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 2 17:33:26 2019 +0200

    I#429 - Do not mark empty string for translation
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/429

 src/shell/main.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/shell/main.c b/src/shell/main.c
index 5eac306c03..ac3c87236b 100644
--- a/src/shell/main.c
+++ b/src/shell/main.c
@@ -282,6 +282,19 @@ handle_term_signal (gpointer data)
 }
 #endif
 
+#ifdef G_OS_WIN32
+static gboolean
+is_any_gettext_catalog_installed (void)
+{
+       gchar txt[2] = { 0, 0 };
+       gchar *text;
+
+       text = gettext (txt);
+
+       return text && strcmp (text, "") != 0;
+}
+#endif
+
 G_GNUC_NORETURN static gboolean
 option_version_cb (const gchar *option_name,
                    const gchar *option_value,
@@ -524,7 +537,7 @@ main (gint argc,
                exit (0);
        }
 
-       if (strcmp (gettext (""), "") == 0) {
+       if (!is_any_gettext_catalog_installed ()) {
                /* No message catalog installed for the current locale
                 * language, so don't bother with the localisations
                 * provided by other things then either. Reset thread


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