Commit Graph

7 Commits

Author SHA1 Message Date
Evan Welsh
9ebde6ca2d ci: Switch ESLint rule eqeqeq to smart mode
This allows comparisons like != null and == null while still erroring
on other usages of == and !=.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2363>
2022-07-06 13:40:44 -04:00
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
Florian Müllner
39e6375aff extensions-app: Move Extensions app to new subproject
The Extensions app code is now independent enough from the rest of the code
base to move it to its own subprojects, like we did for the extensions-tool.

This allows for stand-alone builds of the app, which we are about to use
for distributing it as flatpak.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
f8886468ce 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
2020-03-19 20:53:40 +00:00
Florian Müllner
c8a4a91681 extensionPrefs: Move data/sources into subdirectories
As we will eventually move the code to a subproject, start arranging
it like a top-level srcdir.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1081
2020-03-19 14:27:35 +00:00
Florian Müllner
0483c78dd1 lint: Sync configuration with gjs
gjs updates its configuration to a much more complete and
thorough set, follow suite.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818
2019-11-11 23:51:17 +00:00
Florian Müllner
abc7cc9a26 lint: Convert eslint JSON to YAML
gjs has changed its configuration to YAML, so switch to that format
to keep syncing possible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818
2019-11-11 23:51:17 +00:00