Keep l7n local (#40)

Keep l7n local, fixing issue issue #37
This commit is contained in:
Jürgen Spitzmüller 2017-11-20 22:56:44 +01:00 committed by oleid
parent 2d2fc839fa
commit 907fab139e
3 changed files with 6 additions and 8 deletions

View File

@ -20,7 +20,7 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Panel = imports.ui.panel;
const Gettext = imports.gettext;
const Gettext = imports.gettext.domain('TeaTime');
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Utils = Me.imports.utils;
@ -420,4 +420,4 @@ function enable() {
function disable() {
if (_TeaTime._idleTimeout != null) Mainloop.source_remove(_TeaTime._idleTimeout);
_TeaTime.destroy();
};
};

View File

@ -13,7 +13,7 @@ const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;
const Gettext = imports.gettext;
const Gettext = imports.gettext.domain('TeaTime');
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Utils = Me.imports.utils;
@ -320,4 +320,4 @@ function buildPrefsWidget() {
widget.show_all();
return widget;
}
}

View File

@ -5,7 +5,6 @@
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Gettext = imports.gettext;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Config = imports.misc.config;
@ -44,8 +43,7 @@ function initTranslations(domain) {
domain = domain || extension.metadata['gettext-domain'];
Gettext.textdomain(domain);
Gettext.bindtextdomain(domain, getExtensionLocaleDir());
imports.gettext.bindtextdomain(domain, getExtensionLocaleDir());
}
@ -129,4 +127,4 @@ function playSound(uri) {
function setCairoColorFromClutter(cr, c) {
let s = 1.0 / 255;
cr.setSourceRGBA(s * c.red, s * c.green, s * c.blue, s * c.alpha);
}
}