File: dev-notes.md

package info (click to toggle)
gspell 1.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,296 kB
  • sloc: ansic: 8,063; xml: 120; sh: 39; makefile: 12
file content (42 lines) | stat: -rw-r--r-- 1,447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
gspell - dev notes
==================

Flatpak support
---------------

At the time of writing, gspell is not installed as part of the GNOME runtime, so
it needs to be bundled with the app.

hunspell and hunspell dictionaries are installed by the Flatpak freedesktop.org
runtime, they are not shared with the host OS. See the
[freedesktop-sdk](https://gitlab.com/freedesktop-sdk/freedesktop-sdk/)
repository (`git grep -in hunspell`).

Adding words to the personal dictionary works, but each Flatpak app has a
different personal dictionary. For example for Polari the personal dictionary
is stored in:

```
~/.var/app/org.gnome.Polari/config/enchant/
```

It works thanks to the `XDG_CONFIG_HOME` environment variable (Enchant calls the
`g_get_user_config_dir()` GLib function).

To share personal dictionaries between Flatpak apps, maybe a good solution is to
set the `ENCHANT_CONFIG_DIR` environment variable to a common path (if set, it
has a higher priority than `XDG_CONFIG_HOME`).

Using hunspell directly instead of Enchant?
-------------------------------------------

- https://rrthomas.github.io/enchant/
- https://fedoraproject.org/wiki/Releases/FeatureDictionary
- https://wiki.ubuntu.com/ConsolidateSpellingLibs

Various links
-------------

- GNOME: [Platform-wide Spell Checking](https://wiki.gnome.org/Initiatives/SpellChecking),
  predates the creation of gspell.
- https://zverok.github.io/blog/2021-05-06-how-to-spellcheck.html