[gnome-maps] Use pkg.initGettext
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Use pkg.initGettext
- Date: Mon, 5 Jan 2015 09:19:17 +0000 (UTC)
commit 898a7a6a5f853420322348111109d5a4860f445e
Author: Damián Nohales <damiannohales gmail com>
Date: Mon Dec 22 17:35:15 2014 -0300
Use pkg.initGettext
This initializes gettext for us and declares "_", "C_" and "N_"
functions implicitly.
https://bugzilla.gnome.org/show_bug.cgi?id=733411
.jshintrc | 2 +-
src/application.js | 4 ----
src/checkIn.js | 1 -
src/checkInDialog.js | 1 -
src/geoclue.js | 2 --
src/main.js | 2 ++
src/mainWindow.js | 2 --
src/place.js | 2 --
src/routeService.js | 1 -
src/searchResultBubble.js | 1 -
src/sidebar.js | 1 -
src/utils.js | 1 -
12 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/.jshintrc b/.jshintrc
index cee7941..16a4753 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -78,5 +78,5 @@
"white" : false, // true: Check against strict whitespace and indentation rules
// Custom Globals
- "predef" : [ "log", "logError", "print", "printerr", "imports", "ARGV", "pkg" ]
+ "predef" : [ "log", "logError", "print", "printerr", "imports", "ARGV", "pkg", "_", "C_", "N_" ]
}
diff --git a/src/application.js b/src/application.js
index b9be224..d6e55be 100644
--- a/src/application.js
+++ b/src/application.js
@@ -23,12 +23,10 @@
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
-const Gettext = imports.gettext;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const GtkClutter = imports.gi.GtkClutter;
const Lang = imports.lang;
-const _ = imports.gettext.gettext;
const CheckIn = imports.checkIn;
const Format = imports.format;
@@ -73,8 +71,6 @@ const Application = new Lang.Class({
},
_init: function() {
- Gettext.bindtextdomain('gnome-maps', pkg.localedir);
- Gettext.textdomain('gnome-maps');
/* Translators: This is the program name. */
GLib.set_application_name(_("Maps"));
diff --git a/src/checkIn.js b/src/checkIn.js
index 42cd37e..175a54b 100644
--- a/src/checkIn.js
+++ b/src/checkIn.js
@@ -24,7 +24,6 @@ const GObject = imports.gi.GObject;
const Goa = imports.gi.Goa;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const _ = imports.gettext.gettext;
const CheckInDialog = imports.checkInDialog;
const FacebookBackend = imports.facebookBackend;
diff --git a/src/checkInDialog.js b/src/checkInDialog.js
index 71714fc..cf1689e 100644
--- a/src/checkInDialog.js
+++ b/src/checkInDialog.js
@@ -24,7 +24,6 @@ const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
-const _ = imports.gettext.gettext;
const AccountListBox = imports.accountListBox;
const Application = imports.application;
diff --git a/src/geoclue.js b/src/geoclue.js
index 92e8033..b7151f9 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -29,8 +29,6 @@ const Application = imports.application;
const Place = imports.place;
const Utils = imports.utils;
-const _ = imports.gettext.gettext;
-
const ManagerInterface = '<node> \
<interface name="org.freedesktop.GeoClue2.Manager"> \
<method name="GetClient"> \
diff --git a/src/main.js b/src/main.js
index 7f903a5..663ac8c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -24,6 +24,8 @@
const Application = imports.application;
function main(args) {
+ pkg.initGettext();
+
let application = new Application.Application();
return application.run(args);
}
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 5688499..7a67ab4 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -39,8 +39,6 @@ const Sidebar = imports.sidebar;
const Utils = imports.utils;
const ZoomControl = imports.zoomControl;
-const _ = imports.gettext.gettext;
-
const _CONFIGURE_ID_TIMEOUT = 100; // msecs
const _WINDOW_MIN_WIDTH = 600;
const _WINDOW_MIN_HEIGHT = 500;
diff --git a/src/place.js b/src/place.js
index 4979fcf..cfb6ee3 100644
--- a/src/place.js
+++ b/src/place.js
@@ -20,8 +20,6 @@
* Author: Jonas Danielsson <jonas threetimestwo org>
*/
-const _ = imports.gettext.gettext;
-
const Geocode = imports.gi.GeocodeGlib;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
diff --git a/src/routeService.js b/src/routeService.js
index df0b2e3..82aa727 100644
--- a/src/routeService.js
+++ b/src/routeService.js
@@ -24,7 +24,6 @@ const Champlain = imports.gi.Champlain;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
const Soup = imports.gi.Soup;
-const _ = imports.gettext.gettext;
const Application = imports.application;
const EPAF = imports.epaf;
diff --git a/src/searchResultBubble.js b/src/searchResultBubble.js
index 5989632..0addcf9 100644
--- a/src/searchResultBubble.js
+++ b/src/searchResultBubble.js
@@ -23,7 +23,6 @@
const Gtk = imports.gi.Gtk;
const Format = imports.format;
const Lang = imports.lang;
-const _ = imports.gettext.gettext;
const Application = imports.application;
const MapBubble = imports.mapBubble;
diff --git a/src/sidebar.js b/src/sidebar.js
index f83102e..924e43a 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -26,7 +26,6 @@ const Gdk = imports.gi.Gdk;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const _ = imports.gettext.gettext;
const Application = imports.application;
const RouteEntry = imports.routeEntry;
diff --git a/src/utils.js b/src/utils.js
index 3a7c406..651966b 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -31,7 +31,6 @@ const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Signals = imports.signals;
const Soup = imports.gi.Soup;
-const _ = imports.gettext.gettext;
const METRIC_SYSTEM = 1;
const IMPERIAL_SYSTEM = 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]