[Xfce4-commits] <midori:master> Localize Vala extensions and mark strings for translation

Christian Dywan noreply at xfce.org
Sun Jul 4 10:56:02 CEST 2010


Updating branch refs/heads/master
         to c3e145f540c4b602bbb6f9f3852df42ca4f7a952 (commit)
       from 9aebc6d37462f55c3a6380cb2e4cffa2f01e2834 (commit)

commit c3e145f540c4b602bbb6f9f3852df42ca4f7a952
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Jul 4 10:45:35 2010 +0200

    Localize Vala extensions and mark strings for translation
    
    The -include switch is passed to the compiler to work around
    Vala failing to include gi18n.h first. This works for
    clang and gcc at least.

 extensions/external-applications.vala |    4 ++--
 extensions/history-list.vala          |   10 ++++++----
 midori/midori.h                       |    2 +-
 po/POTFILES.in                        |    2 ++
 wscript                               |    2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/extensions/external-applications.vala b/extensions/external-applications.vala
index f56b3c4..f606a73 100644
--- a/extensions/external-applications.vala
+++ b/extensions/external-applications.vala
@@ -90,8 +90,8 @@ public class ExternalApplications : Midori.Extension {
         }
     }
     internal ExternalApplications () {
-        GLib.Object (name: "External Applications",
-                     description: "Associate URL schemes with external commands",
+        GLib.Object (name: _("External Applications"),
+                     description: _("Associate URL schemes with external commands"),
                      version: "0.1",
                      authors: "Christian Dywan <christian at twotoasts.de>");
         activate.connect (activated);
diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index b111a9f..721ed25 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -171,7 +171,8 @@ private class HistoryList : Midori.Extension {
         Gtk.Action action;
 
         action = new Gtk.Action ("HistoryListNextTab",
-            "Next Tab (HistoryList)", "Next tab from history", null);
+            _("Next Tab (History List)"),
+            _("Next tab from history"), null);
         action.activate.connect ((a) => {
             this.walk (a, browser, typeof (TabWindow), 1);
         });
@@ -180,7 +181,8 @@ private class HistoryList : Midori.Extension {
         action.connect_accelerator ();
 
         action = new Gtk.Action ("HistoryListPreviousTab",
-            "Previous Tab (HistoryList)", "Previous tab from history", null);
+            _("Previous Tab (History List)"),
+            _("Previous tab from history"), null);
         action.activate.connect ((a) => {
             this.walk (a, browser, typeof (TabWindow), -1);
         });
@@ -240,8 +242,8 @@ private class HistoryList : Midori.Extension {
         app.add_browser.disconnect (browser_added);
     }
     internal HistoryList () {
-        GLib.Object (name: "History List",
-                     description: "Allows to switch tabs by choosing from a list sorted by last usage",
+        GLib.Object (name: _("History List"),
+                     description: _("Allows to switch tabs by choosing from a list sorted by last usage"),
                      version: "0.2",
                      authors: "André Stösel <Midori-Plugin at PyIT.de>");
         activate.connect (activated);
diff --git a/midori/midori.h b/midori/midori.h
index 44c4782..84a13d5 100644
--- a/midori/midori.h
+++ b/midori/midori.h
@@ -26,7 +26,7 @@
 #include "midori-websettings.h"
 
 /* For convenience, include localization header */
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #define MIDORI_CHECK_VERSION(major, minor, micro) \
   (MIDORI_MAJOR_VERSION > (major) || \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 686fb1d..4577c18 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -33,12 +33,14 @@ extensions/cookie-manager/cookie-manager.c
 extensions/cookie-manager/cookie-manager-page.c
 extensions/cookie-manager/main.c
 extensions/copy-tabs.c
+extensions/external-applications.vala
 extensions/feed-panel/feed-atom.c
 extensions/feed-panel/feed-panel.c
 extensions/feed-panel/feed-parse.c
 extensions/feed-panel/feed-rss.c
 extensions/feed-panel/main.c
 extensions/formhistory.c
+extensions/history-list.vala
 extensions/mouse-gestures.c
 extensions/page-holder.c
 extensions/shortcuts.c
diff --git a/wscript b/wscript
index e8cbf74..c21dc80 100644
--- a/wscript
+++ b/wscript
@@ -282,7 +282,7 @@ def configure (conf):
     conf.define ('MIDORI_MICRO_VERSION', micro)
 
     conf.write_config_header ('config.h')
-    conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')
+    conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H -include config.h'.split ())
     debug_level = Options.options.debug_level
     compiler = conf.env['CC_NAME']
     if debug_level != '' and compiler != 'gcc':



More information about the Xfce4-commits mailing list