[gnome-session] Consistently translate component failure message



commit a18e2a2df8d921d2b6caccde03025d6a8e7624db
Author: Colin Walters <walters verbum org>
Date:   Fri Mar 18 15:12:23 2011 -0400

    Consistently translate component failure message
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642497

 gnome-session/gsm-manager.c        |    6 ++++--
 gnome-session/gsm-process-helper.c |    7 ++++---
 po/POTFILES.in                     |    2 ++
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 840c53b..20dceca 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -255,7 +255,9 @@ on_required_app_failure (GsmManager  *manager,
                          const char  *msg)
 {
         char *full_msg;
-        full_msg = g_strdup_printf ("Component '%s': %s",
+        /* Translators: This will look like: Component 'gnome-shell.desktop': Killed by signal 9.
+         * It is admittedly mostly technical goop. */
+        full_msg = g_strdup_printf (_("Component '%s': %s"),
                                     gsm_app_peek_app_id (app),
                                     msg);
         gsm_fail_whale_dialog_we_failed (GSM_FAIL_WHALE_DIALOG_FAIL_TYPE_RECOVERABLE,
@@ -556,7 +558,7 @@ app_died (GsmApp     *app,
 
         g_warning ("Application '%s' killed by signal", gsm_app_peek_app_id (app));
         if (is_app_required (manager, app))
-                on_required_app_failure (manager, app, "Killed by signal");
+                on_required_app_failure (manager, app, _("Killed by signal"));
         /* For now, we don't do anything with crashes from non-required apps;
          * practically speaking they will be caught by ABRT/apport type
          * infrastructure, and it'd be better to pick up the crash from
diff --git a/gnome-session/gsm-process-helper.c b/gnome-session/gsm-process-helper.c
index 0a1fb97..da45800 100644
--- a/gnome-session/gsm-process-helper.c
+++ b/gnome-session/gsm-process-helper.c
@@ -25,6 +25,7 @@
 #include <signal.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "gsm-process-helper.h"
 
@@ -119,17 +120,17 @@ gsm_process_helper (const char   *command_line,
                                 g_set_error (error,
                                              G_IO_CHANNEL_ERROR,
                                              G_IO_CHANNEL_ERROR_FAILED,
-                                             "Exited with code %d", WEXITSTATUS (helper->status));
+                                             _("Exited with code %d"), WEXITSTATUS (helper->status));
                 } else if (WIFSIGNALED (helper->status)) {
                         g_set_error (error,
                                      G_IO_CHANNEL_ERROR,
                                      G_IO_CHANNEL_ERROR_FAILED,
-                                     "Killed by signal %d", WTERMSIG (helper->status));
+                                     _("Killed by signal %d"), WTERMSIG (helper->status));
                 } else if (WIFSTOPPED (helper->status)) {
                         g_set_error (error,
                                      G_IO_CHANNEL_ERROR,
                                      G_IO_CHANNEL_ERROR_FAILED,
-                                     "Stopped by signal %d", WSTOPSIG (helper->status));
+                                     _("Stopped by signal %d"), WSTOPSIG (helper->status));
                 }
         }
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1e7491d..0f52773 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,6 +15,8 @@ egg/eggsmclient.c
 gnome-session/gsm-gconf.c
 gnome-session/gsm-inhibit-dialog.c
 gnome-session/gsm-logout-dialog.c
+gnome-session/gsm-fail-whale-dialog.c
+gnome-session/gsm-process-helper.c
 gnome-session/gsm-manager.c
 gnome-session/gsm-xsmp-client.c
 gnome-session/gsm-xsmp-server.c



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