From: Christian Dywan Date: Sun, 4 Jul 2010 08:45:35 +0000 (+0200) Subject: Localize Vala extensions and mark strings for translation X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3e145f540c4b602bbb6f9f3852df42ca4f7a952;p=midori 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. --- diff --git a/extensions/external-applications.vala b/extensions/external-applications.vala index f56b3c4b..f606a73f 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 "); activate.connect (activated); diff --git a/extensions/history-list.vala b/extensions/history-list.vala index b111a9f4..721ed258 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 "); activate.connect (activated); diff --git a/midori/midori.h b/midori/midori.h index 44c47821..84a13d5c 100644 --- a/midori/midori.h +++ b/midori/midori.h @@ -26,7 +26,7 @@ #include "midori-websettings.h" /* For convenience, include localization header */ -#include +#include #define MIDORI_CHECK_VERSION(major, minor, micro) \ (MIDORI_MAJOR_VERSION > (major) || \ diff --git a/po/POTFILES.in b/po/POTFILES.in index 686fb1da..4577c184 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 e8cbf743..c21dc807 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':