[gnome-boxes] Fix translation, config.h inclusion order



commit 3b5f3c0c68a304bbb5e26b0d4ded5cb371772969
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Wed Oct 5 23:59:54 2011 +0200

    Fix translation, config.h inclusion order

 src/Makefile.am  |    1 +
 src/app.vala     |    3 ---
 src/box.vala     |    2 +-
 src/main.vala    |    3 ---
 src/sidebar.vala |   16 ++++++++--------
 src/topbar.vala  |    2 +-
 6 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4452fe5..64895c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
 NULL =
 
 AM_CPPFLAGS =						\
+	-include config.h				\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"	\
 	$(DISABLE_DEPRECATED)				\
 	$(NULL)
diff --git a/src/app.vala b/src/app.vala
index ed7db6f..d98e63c 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -6,9 +6,6 @@ using GtkClutter;
 using Clutter;
 using GVir;
 
-// FIXME: vala includes header incorrectly, this will make sure config.h comes on top...
-static const string foo = GNOMELOCALEDIR;
-
 private enum Boxes.UIState {
     COLLECTION,
     CREDS,
diff --git a/src/box.vala b/src/box.vala
index 3fcc5ce..bc021c7 100644
--- a/src/box.vala
+++ b/src/box.vala
@@ -239,7 +239,7 @@ private class Boxes.BoxActor: Boxes.UI {
         vbox.add (label);
         entry = new Gtk.Entry ();
         entry.set_visibility (false);
-        entry.set_placeholder_text ("Password"); // TODO: i18n stupid vala...
+        entry.set_placeholder_text (_("Password")); // TODO: i18n stupid vala...
         vbox.add (entry);
 
         vbox.show_all ();
diff --git a/src/main.vala b/src/main.vala
index 3a4dafa..9ce31db 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -2,9 +2,6 @@
 using Config;
 using Posix;
 
-// FIXME: vala includes header incorrectly, this will make sure config.h comes on top...
-static const string foo_ = GNOMELOCALEDIR;
-
 private static bool version;
 
 private const OptionEntry[] options = {
diff --git a/src/sidebar.vala b/src/sidebar.vala
index 035a5ae..af71961 100644
--- a/src/sidebar.vala
+++ b/src/sidebar.vala
@@ -102,17 +102,17 @@ private class Boxes.Sidebar: Boxes.UI {
         var renderer = new CellRendererText ();
         tree_view.insert_column_with_attributes (-1, "", renderer, "text", 0, "height", 1, "sensitive", 2);
 
-        list_append (listmodel, new Category ("New and Recent"));
+        list_append (listmodel, new Category (_("New and Recent")));
         selection.select_path (new Gtk.TreePath.from_string ("0"));
-        list_append (listmodel, new Category ("Favorites"), "emblem-favorite-symbolic");
-        list_append (listmodel, new Category ("Private"), "channel-secure-symbolic");
-        list_append (listmodel, new Category ("Shared with you"), "emblem-shared-symbolic");
-        list_append (listmodel, new Category ("Collections"), null, 40, false);
+        list_append (listmodel, new Category (_("Favorites")), "emblem-favorite-symbolic");
+        list_append (listmodel, new Category (_("Private")), "channel-secure-symbolic");
+        list_append (listmodel, new Category (_("Shared with you")), "emblem-shared-symbolic");
+        list_append (listmodel, new Category (_("Collections")), null, 40, false);
         // TODO: make it dynamic
-        list_append (listmodel, new Category ("Work"));
-        list_append (listmodel, new Category ("Game"));
+        list_append (listmodel, new Category (_("Work")));
+        list_append (listmodel, new Category (_("Game")));
 
-        var create = new Gtk.Button.with_label ("Create");
+        var create = new Gtk.Button.with_label (_("Create"));
         create.margin = 5;
         vbox.pack_end (create, false, false, 0);
         create.show ();
diff --git a/src/topbar.vala b/src/topbar.vala
index 691d90d..32bbe8b 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -53,7 +53,7 @@ private class Boxes.Topbar: Boxes.UI {
         toolbar_start.set_show_arrow (false);
         hbox.pack_start (toolbar_start, false, false, 0);
 
-        label = new Gtk.Label ("New and Recent");
+        label = new Gtk.Label (_("New and Recent"));
         label.name = "TopbarLabel";
         label.set_halign (Gtk.Align.START);
         hbox.pack_start (label, true, true, 0);



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