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.
This commit is contained in:
parent
9aebc6d374
commit
c3e145f540
5 changed files with 12 additions and 8 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) || \
|
||||
|
|
|
@ -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
|
||||
|
|
2
wscript
2
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':
|
||||
|
|
Loading…
Reference in a new issue