[gnome-video-arcade] Add gettext markers to some g_messages.



commit da82b588a709001ad8fec0c4f7fdff63624ceec6
Author: Jordi Mallach <jordi sindominio net>
Date:   Thu May 12 02:58:19 2011 +0200

    Add gettext markers to some g_messages.
    
    Some messages related to database rebuilding were lacking i18n.
    However, at least one of them needs fixing to avoid concatenating strings,
    which makes the sentence untranslatable to many languages.

 po/POTFILES.in    |    2 ++
 src/gva-db.c      |   19 ++++++++++---------
 src/gva-process.c |    2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 54b5367..c23696e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,6 +5,7 @@
 data/gnome-video-arcade.desktop.in
 data/org.gnome.VideoArcade.gschema.xml.in
 src/gva-audit.c
+src/gva-db.c
 src/gva-categories.c
 src/gva-column-manager.c
 src/gva-columns.c
@@ -19,6 +20,7 @@ src/gva-music-button.c
 src/gva-mute-button.c
 src/gva-nplayers.c
 src/gva-play-back.c
+src/gva-process.c
 src/gva-properties.c
 src/gva-tree-view.c
 src/gva-ui.c
diff --git a/src/gva-db.c b/src/gva-db.c
index 275af3e..00abef6 100644
--- a/src/gva-db.c
+++ b/src/gva-db.c
@@ -1566,7 +1566,7 @@ db_parser_exit (GvaProcess *process,
                 gva_process_get_time_elapsed (process, &time_elapsed);
 
                 g_message (
-                        "Database built in %ld.%ld seconds.",
+                        _("Database built in %ld.%ld seconds."),
                         time_elapsed.tv_sec, time_elapsed.tv_usec / 100000);
         }
         else
@@ -2171,28 +2171,29 @@ gva_db_needs_rebuilt (void)
         /* Begin test cases for rebuilding the games database.
          * The macro tests whether the database SHOULD be rebuilt. */
 
-        reason = "the user requested it";
+        reason = N_("the user requested it");
         TEST_CASE (opt_build_database);
 
-        reason = PACKAGE_NAME "'s version changed";
+        /* FIXME: string concatenation makes this untranslatable */
+        reason = PACKAGE_NAME N_("'s version changed");
         TEST_CASE (gva_get_last_version () == NULL);
         TEST_CASE (strcmp (gva_get_last_version (), PACKAGE_VERSION) != 0);
 
-        reason = "the database does not have a build ID";
+        reason = N_("the database does not have a build ID");
         gva_db_get_build (&db_build_id, &error);
         gva_error_handle (&error);
         TEST_CASE (db_build_id == NULL);
 
-        reason = "the MAME version could not be determined";
+        reason = N_("the MAME version could not be determined");
         mame_version = gva_mame_get_version (&error);
         gva_error_handle (&error);
         TEST_CASE (mame_version == NULL);
 
-        reason = "the database build ID does not match the MAME version";
+        reason = N_("the database build ID does not match the MAME version");
         TEST_CASE (strstr (mame_version, db_build_id) == NULL);
 
 #ifdef CATEGORY_FILE
-        reason = "the category file changed";
+        reason = N_("the category file changed");
         TEST_CASE (gva_db_is_older_than (CATEGORY_FILE));
 #endif
 
@@ -2202,9 +2203,9 @@ gva_db_needs_rebuilt (void)
 
 exit:
         if (rebuild)
-                g_message ("Building database because %s.", reason);
+                g_message (_("Building database because %s."), reason);
         else
-                g_message ("Database seems up-to-date; no rebuild necessary.");
+                g_message (_("Database seems up-to-date; no rebuild necessary."));
 
         g_free (db_build_id);
         g_free (mame_version);
diff --git a/src/gva-process.c b/src/gva-process.c
index 7f3333e..1d61295 100644
--- a/src/gva-process.c
+++ b/src/gva-process.c
@@ -1017,7 +1017,7 @@ gva_process_kill (GvaProcess *process)
          *     after a reasonable duration, SIGKILL. */
 
         pid = process->priv->pid;
-        g_message ("Sending KILL signal to process %d.", pid);
+        g_message (_("Sending KILL signal to process %d."), pid);
         if (kill (pid, SIGKILL) < 0)
                 g_warning ("%s", g_strerror (errno));
 }



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