gnome-shell/js/misc
Florian Müllner 1deb13e1aa extensionUtils: Add gettext convenience helpers
We have initTranslations() for binding an extension's
gettext domain, but nothing to help with using gettext
from an extension.

Such help would be useful though, as an extension that
calls textdomain() like a normal application would
inadvertently changes the default domain for the whole
gnome-shell process.

Instead, extensions have to use domain-specific versions
of the gettext functions:

```js
const Gettext = imports.gettext.domain('my-extension');
const _ = Gettext.gettext;
```

Make this a bit easier by adding those functions directly
to the extensions object when initTranslations() is called,
then expose helper functions for calling them.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2594

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
2021-08-14 18:45:25 +00:00
..
config.js.in networkAgent: Drop VPN plugin cache 2020-03-17 14:07:15 +00:00
extensionUtils.js extensionUtils: Add gettext convenience helpers 2021-08-14 18:45:25 +00:00
fileUtils.js Move screencasting into a separate service process 2020-07-31 10:51:12 +02:00
gnomeSession.js endSessionDialog: Only show logout inhibiting apps 2021-02-24 15:31:03 +00:00
history.js history: Trim input and ignore if empty 2021-02-13 08:58:20 +00:00
ibusManager.js ibusManager: Fix the panel after porting to Promises 2020-05-03 23:26:39 +08:00
inputMethod.js js: Promisify async operations 2020-03-31 05:43:40 +00:00
introspect.js introspect: Allowlist GNOME portal 2021-06-21 16:32:50 -03:00
jsParse.js cleanup: Remove empty leading/trailing lines in blocks 2020-11-16 18:04:23 +00:00
keyboardManager.js keyboard: Fix display keyboard layout crash with some input methods 2021-03-29 09:33:45 +00:00
loginManager.js LoginManager: Add canRebootToBootLoaderMenu and setRebootToBootLoaderMenu methods 2020-08-06 15:14:42 +02:00
meson.build networkAgent: Drop VPN plugin cache 2020-03-17 14:07:15 +00:00
modemManager.js cleanup: Define GObject accessors in camelCase 2021-02-03 20:19:29 +01:00
objectManager.js js: Promisify async operations 2020-03-31 05:43:40 +00:00
params.js cleanup: Only omit braces for single-line blocks 2019-11-11 19:25:14 +00:00
parentalControlsManager.js cleanup: remove controversial naming 2020-08-04 13:24:50 +02:00
permissionStore.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
smartcardManager.js cleanup: Remove empty leading/trailing lines in blocks 2020-11-16 18:04:23 +00:00
systemActions.js cleanup: Define GObject accessors in camelCase 2021-02-03 20:19:29 +01:00
util.js util: Use fade_margins in ensureActorVisibleInScrollView function 2021-04-10 15:20:43 +02:00
weather.js Update links to use HEAD instead of master 2021-07-18 21:45:46 +00:00