[gnome-software: 2/3] extras-page: Properly internationalize "%s: %s" strings




commit 055b0d3ac5454c6f2be73f42cd524637e112c4fc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jun 23 16:54:57 2021 +0200

    extras-page: Properly internationalize "%s: %s" strings
    
    Don't assume "%s: %s" is right in all locales (e.g. in French there must
    be a non-breaking space before the colon) and let translation teams
    do their job. This also give them more context on how the string is
    used.

 src/gs-extras-page.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 1998930d4..eb595a32e 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -557,7 +557,7 @@ search_files_cb (GObject *source_object,
                        return;
                }
                g_warning ("failed to find any search results: %s", error->message);
-               str = g_strdup_printf ("%s: %s", _("Failed to find any search results"), error->message);
+               str = g_strdup_printf (_("Failed to find any search results: %s"), error->message);
                gtk_label_set_label (GTK_LABEL (self->label_failed), str);
                gs_extras_page_set_state (self, GS_EXTRAS_PAGE_STATE_FAILED);
                return;
@@ -613,7 +613,7 @@ file_to_app_cb (GObject *source_object,
                        g_autofree gchar *str = NULL;
 
                        g_warning ("failed to find any search results: %s", error->message);
-                       str = g_strdup_printf ("%s: %s", _("Failed to find any search results"), 
error->message);
+                       str = g_strdup_printf (_("Failed to find any search results: %s"), error->message);
                        gtk_label_set_label (GTK_LABEL (self->label_failed), str);
                        gs_extras_page_set_state (self, GS_EXTRAS_PAGE_STATE_FAILED);
                        return;
@@ -652,7 +652,7 @@ get_search_what_provides_cb (GObject *source_object,
                        return;
                }
                g_warning ("failed to find any search results: %s", error->message);
-               str = g_strdup_printf ("%s: %s", _("Failed to find any search results"), error->message);
+               str = g_strdup_printf (_("Failed to find any search results: %s"), error->message);
                gtk_label_set_label (GTK_LABEL (self->label_failed), str);
                gs_extras_page_set_state (self, GS_EXTRAS_PAGE_STATE_FAILED);
                return;


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