gnome-shell/subprojects/extensions-tool/src
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
..
templates extensionUtils: Add gettext convenience helpers 2021-08-14 18:45:25 +00:00
command-create.c extension-tool: Always print extension location after its creation 2021-05-25 18:30:25 +00:00
command-disable.c extension-tool: Use enable/disable D-Bus API if possible 2020-04-05 13:42:50 +02:00
command-enable.c extension-tool: Use enable/disable D-Bus API if possible 2020-04-05 13:42:50 +02:00
command-info.c extensions-tool: Log existing errors 2020-04-05 13:42:50 +02:00
command-install.c extensions-tool: Add common option to silence errors 2020-04-05 13:42:50 +02:00
command-list.c extensions-tool: Log existing errors 2020-04-05 13:42:50 +02:00
command-pack.c extensions-tool: Add common option to silence errors 2020-04-05 13:42:50 +02:00
command-prefs.c extensions-tool: Split out get_extension_property() helper 2020-04-05 13:42:50 +02:00
command-reset.c extensions-tool: Add common option to silence errors 2020-04-05 13:42:50 +02:00
command-uninstall.c extensions-tool/uninstall: Error out for system extensions 2020-04-05 13:42:50 +02:00
commands.h
common.h extensions-tool: Split out get_extension_property() helper 2020-04-05 13:42:50 +02:00
gnome-extensions-tool.gresource.xml extensions-tool: Add small indicator template 2020-04-07 20:27:00 +00:00
main.c extensions-tool: Split out get_extension_property() helper 2020-04-05 13:42:50 +02:00
meson.build extensions-tool: Add template metadata 2020-04-07 20:27:00 +00:00