[gnome-shell] extensionPrefs: Initialize gettext
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionPrefs: Initialize gettext
- Date: Thu, 19 Mar 2020 20:54:33 +0000 (UTC)
commit f8886468cebc4dc565060077c252e56eb13abea0
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Mar 19 20:38:16 2020 +0100
extensionPrefs: Initialize gettext
I misremembered that imports.package.start() would set up the correct
gettext domain, but the module only provides a convenience method
for doing that.
Use it to bring back translations in the Extensions app, whoops.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1108
js/extensionPrefs/js/main.js | 6 +++---
lint/eslintrc-shell.yml | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/js/extensionPrefs/js/main.js b/js/extensionPrefs/js/main.js
index aa325ea92e..9dab3c3928 100644
--- a/js/extensionPrefs/js/main.js
+++ b/js/extensionPrefs/js/main.js
@@ -2,12 +2,11 @@
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.Gtk = '3.0';
-imports.package.initFormat();
-
const Gettext = imports.gettext;
+const Package = imports.package;
const { Gdk, GLib, Gio, GObject, Gtk } = imports.gi;
-const _ = Gettext.gettext;
+Package.initFormat();
const ExtensionUtils = imports.misc.extensionUtils;
@@ -782,6 +781,7 @@ function initEnvironment() {
function main(argv) {
initEnvironment();
+ Package.initGettext();
new Application().run(argv);
}
diff --git a/lint/eslintrc-shell.yml b/lint/eslintrc-shell.yml
index 77e0bd5f29..14617a8103 100644
--- a/lint/eslintrc-shell.yml
+++ b/lint/eslintrc-shell.yml
@@ -17,7 +17,6 @@ rules:
overrides:
- files: js/**
excludedFiles:
- - js/extensionPrefs/**
- js/portalHelper/*
globals:
global: readonly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]