diff --git a/js/dbusServices/org.gnome.Shell.Extensions.src.gresource.xml b/js/dbusServices/org.gnome.Shell.Extensions.src.gresource.xml
index 51042f933..55be1d199 100644
--- a/js/dbusServices/org.gnome.Shell.Extensions.src.gresource.xml
+++ b/js/dbusServices/org.gnome.Shell.Extensions.src.gresource.xml
@@ -7,6 +7,7 @@
dbusService.js
extensions/sharedInternals.js
+ extensions/prefs.js
misc/config.js
misc/extensionUtils.js
diff --git a/js/extensions/extension.js b/js/extensions/extension.js
new file mode 100644
index 000000000..125b7a350
--- /dev/null
+++ b/js/extensions/extension.js
@@ -0,0 +1,28 @@
+import {getCurrentExtension} from './sharedInternals.js';
+
+export {
+ getSettings,
+ initTranslations,
+ gettext,
+ ngettext,
+ pgettext
+} from './sharedInternals.js';
+
+/**
+ * Open the preference dialog of the current extension
+ */
+export function openPrefs() {
+ const extension = getCurrentExtension();
+
+ if (!extension)
+ throw new Error('openPrefs() can only be called from extensions');
+
+ try {
+ const extensionManager = imports.ui.main.extensionManager;
+ extensionManager.openExtensionPrefs(extension.uuid, '', {});
+ } catch (e) {
+ if (e.name === 'ImportError')
+ throw new Error('openPrefs() cannot be called from preferences');
+ logError(e, 'Failed to open extension preferences');
+ }
+}
diff --git a/js/extensions/prefs.js b/js/extensions/prefs.js
new file mode 100644
index 000000000..405b8614e
--- /dev/null
+++ b/js/extensions/prefs.js
@@ -0,0 +1,7 @@
+export {
+ getSettings,
+ initTranslations,
+ gettext,
+ ngettext,
+ pgettext
+} from './sharedInternals.js';
diff --git a/js/extensions/sharedInternals.js b/js/extensions/sharedInternals.js
index 0be5dfb55..c2133936c 100644
--- a/js/extensions/sharedInternals.js
+++ b/js/extensions/sharedInternals.js
@@ -177,22 +177,3 @@ export function getSettings(schema) {
return new Gio.Settings({settings_schema: schemaObj});
}
-
-/**
- * Open the preference dialog of the current extension
- */
-export function openPrefs() {
- const extension = getCurrentExtension();
-
- if (!extension)
- throw new Error('openPrefs() can only be called from extensions');
-
- try {
- const extensionManager = imports.ui.main.extensionManager;
- extensionManager.openExtensionPrefs(extension.uuid, '', {});
- } catch (e) {
- if (e.name === 'ImportError')
- throw new Error('openPrefs() cannot be called from preferences');
- logError(e, 'Failed to open extension preferences');
- }
-}
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
index 419ca024f..93d612cc5 100644
--- a/js/js-resources.gresource.xml
+++ b/js/js-resources.gresource.xml
@@ -12,6 +12,7 @@
gdm/util.js
extensions/sharedInternals.js
+ extensions/extension.js
misc/animationUtils.js
misc/config.js