]> spindle.queued.net Git - midori/commitdiff
Localize Vala extensions and mark strings for translation
authorChristian Dywan <christian@twotoasts.de>
Sun, 4 Jul 2010 08:45:35 +0000 (10:45 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 4 Jul 2010 08:53:21 +0000 (10:53 +0200)
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
extensions/history-list.vala
midori/midori.h
po/POTFILES.in
wscript

index f56b3c4bad06d5d321dce95f035b3a7efef02f9b..f606a73f4b2e4841fba76e827a16bf496e086c32 100644 (file)
@@ -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@twotoasts.de>");
         activate.connect (activated);
index b111a9f4c9c27e7dddaa046b16eef75f3fb80243..721ed2586fa45d194e2966dc52ebfae436905a29 100644 (file)
@@ -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@PyIT.de>");
         activate.connect (activated);
index 44c47821704015f839a1fe2e80465e96153c7268..84a13d5caaef4494e89dbffae7140babadaadec1 100644 (file)
@@ -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) || \
index 686fb1dacc4c2a12d8bec029bf58098707a817a6..4577c1841048a030e18ca96390908e1b0c0c75cc 100644 (file)
@@ -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 e8cbf743a10a74fa77de7b4aad05d85770a97e7b..c21dc807f5c1e2d6f3413374c959cb85a4ab3692 100644 (file)
--- 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':