fix(extension): i18n setup breaks localization on systems #84

Merged
kiyui merged 2 commits from breaks-i18n into main 10 months ago
  1. 2
      meson.build
  2. 3
      src/extension.js
  3. 3
      src/prefs.js

2
meson.build

@ -1,5 +1,5 @@
project('night-light-slider.timur@linux.com',
version: '18',
version: '19',
license: 'GPL2+',
meson_version: '>= 0.50.0')

3
src/extension.js

@ -33,7 +33,7 @@ const Me = ExtensionUtils.getCurrentExtension();
const {debounce, setInterval} = Me.imports.convenience;
// i18n
const Gettext = imports.gettext;
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
const _ = Gettext.gettext;
// GSettings schema
@ -327,7 +327,6 @@ class Extension {
}
function init() {
Gettext.textdomain(Me.metadata['gettext-domain']);
ExtensionUtils.initTranslations();
return new Extension();
}

3
src/prefs.js

@ -26,7 +26,7 @@ const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
// i18n
const Gettext = imports.gettext;
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
const _ = Gettext.gettext;
// Register resources
@ -126,7 +126,6 @@ function buildPrefsWidget() {
}
function init() {
Gettext.textdomain(Me.metadata['gettext-domain']);
ExtensionUtils.initTranslations();
Gtk.init(null);
Handy.init(null);

Loading…
Cancel
Save