This change improves the way we detect if we're running a Gnome based
UI that needs it's keyboards installed under
`org.gnome.desktop.input-sources`. We use the environment variable
`XDG_CURRENT_DESKTOP` and check if it contains the word `gnome`.
Additionally this change renames `is_gnome_shell()` to
`is_gnome_desktop()`.
Fixes#11225.
- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
saving the list
Closes#8598.
- Introduce `InstallKmp` class
- Remove unused `list_files` method
- Extract common method that `install_kmp_shared` and
`install_kmp_user` use
- Make internal methods protected
This improves the implementation for normalizing language tags
when installing a keyboard. Based on the Windows implementation
in `Keyman.System.CanonicalLanguageCodeUtils.pas`.
One difference to the Windows implementation is that the mapping of
3- to 2-letter tags is based on `langtags.json` instead of
`iso639-3.tab`.
Closes#3399.
When installing a keyboard with a bcp47 tag we now look up the
language tag in the keyboard kmp.json file. This fixes#3399 in
case a script subtag is required for the language and will cause
the keyboard to properly show up in the Linux keyboard selection
list.