[gnome-software: 1/3] install-appstream: Properly internationalize "%s: %s" strings




commit 54996c04fa908974ef9dc04db335a589e09a008a
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jun 23 16:54:29 2021 +0200

    install-appstream: 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.

 gs-install-appstream/gs-install-appstream.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gs-install-appstream/gs-install-appstream.c b/gs-install-appstream/gs-install-appstream.c
index fb0d8fa67..c28e1e921 100644
--- a/gs-install-appstream/gs-install-appstream.c
+++ b/gs-install-appstream/gs-install-appstream.c
@@ -162,7 +162,8 @@ main (int argc, char *argv[])
        file = g_file_new_for_path (argv[1]);
        if (!gs_install_appstream_check_content_type (file, &error)) {
                /* TRANSLATORS: error details */
-               g_print ("%s: %s\n", _("Failed to validate content type"), error->message);
+               g_print (_("Failed to validate content type: %s"), error->message);
+               g_print ("\n");
                return EXIT_FAILURE;
        }
 
@@ -172,7 +173,8 @@ main (int argc, char *argv[])
        /* do the copy */
        if (!gs_install_appstream_copy_file (file, &error)) {
                /* TRANSLATORS: error details */
-               g_print ("%s: %s\n", _("Failed to copy"), error->message);
+               g_print (_("Failed to copy: %s"), error->message);
+               g_print ("\n");
                return EXIT_FAILURE;
        }
 


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