[gnome-shell-extensions/wip/rstrode/heads-up-display: 50/62] Update desktop-icons gettext domain




commit be290bc096a04720915a6e6dca69264506e54a94
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Oct 24 01:14:44 2020 +0200

    Update desktop-icons gettext domain

 extensions/desktop-icons/createFolderDialog.js | 2 +-
 extensions/desktop-icons/desktopGrid.js        | 2 +-
 extensions/desktop-icons/fileItem.js           | 2 +-
 extensions/desktop-icons/prefs.js              | 8 +++++---
 4 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/extensions/desktop-icons/createFolderDialog.js b/extensions/desktop-icons/createFolderDialog.js
index f3e40e9..5038762 100644
--- a/extensions/desktop-icons/createFolderDialog.js
+++ b/extensions/desktop-icons/createFolderDialog.js
@@ -21,7 +21,7 @@ const { Clutter, GObject, GLib, Gio, St } = imports.gi;
 const Signals = imports.signals;
 
 const Dialog = imports.ui.dialog;
-const Gettext = imports.gettext.domain('desktop-icons');
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
 const ModalDialog = imports.ui.modalDialog;
 const ShellEntry = imports.ui.shellEntry;
 const Tweener = imports.ui.tweener;
diff --git a/extensions/desktop-icons/desktopGrid.js b/extensions/desktop-icons/desktopGrid.js
index a2d1f12..94d2dfd 100644
--- a/extensions/desktop-icons/desktopGrid.js
+++ b/extensions/desktop-icons/desktopGrid.js
@@ -44,7 +44,7 @@ const Util = imports.misc.util;
 
 const Clipboard = St.Clipboard.get_default();
 const CLIPBOARD_TYPE = St.ClipboardType.CLIPBOARD;
-const Gettext = imports.gettext.domain('desktop-icons');
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
 
 const _ = Gettext.gettext;
 
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
index 0c6a54d..d6d43c9 100644
--- a/extensions/desktop-icons/fileItem.js
+++ b/extensions/desktop-icons/fileItem.js
@@ -42,7 +42,7 @@ const Prefs = Me.imports.prefs;
 const DBusUtils = Me.imports.dbusUtils;
 const DesktopIconsUtil = Me.imports.desktopIconsUtil;
 
-const Gettext = imports.gettext.domain('desktop-icons');
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
 
 const _ = Gettext.gettext;
 
diff --git a/extensions/desktop-icons/prefs.js b/extensions/desktop-icons/prefs.js
index 4b8d986..51daf15 100644
--- a/extensions/desktop-icons/prefs.js
+++ b/extensions/desktop-icons/prefs.js
@@ -26,7 +26,7 @@ const Gettext = imports.gettext;
 
 const Config = imports.misc.config;
 
-var _ = Gettext.domain('desktop-icons').gettext;
+var _ = Gettext.domain('gnome-shell-extensions').gettext;
 
 const SCHEMA_NAUTILUS = 'org.gnome.nautilus.preferences';
 const SCHEMA_GTK = 'org.gtk.Settings.FileChooser';
@@ -51,11 +51,13 @@ var CLICK_POLICY_SINGLE = false;
 function initTranslations() {
     let extension = ExtensionUtils.getCurrentExtension();
 
+    let domain = extension.metadata['gettext-domain'] || 'desktop-icons';
+
     let localedir = extension.dir.get_child('locale');
     if (localedir.query_exists(null))
-        Gettext.bindtextdomain('desktop-icons', localedir.get_path());
+        Gettext.bindtextdomain(domain, localedir.get_path());
     else
-        Gettext.bindtextdomain('desktop-icons', Config.LOCALEDIR);
+        Gettext.bindtextdomain(domain, Config.LOCALEDIR);
 }
 
 function init() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]