diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:54:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:54:43 +0000 |
commit | e4283f6d48b98e764b988b43bbc86b9d52e6ec94 (patch) | |
tree | c8f7f7a6c2f5faa2942d27cefc6fd46cca492656 /data/cldr2json/README.md | |
parent | Initial commit. (diff) | |
download | gnome-shell-e4283f6d48b98e764b988b43bbc86b9d52e6ec94.tar.xz gnome-shell-e4283f6d48b98e764b988b43bbc86b9d52e6ec94.zip |
Adding upstream version 43.9.upstream/43.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | data/cldr2json/README.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/data/cldr2json/README.md b/data/cldr2json/README.md new file mode 100644 index 0000000..0eb54bc --- /dev/null +++ b/data/cldr2json/README.md @@ -0,0 +1,40 @@ +cldr2json +========= + +This script converts Unicode CLDR android keyboard layouts to JSON usable by +GNOME Shell. + +CLDR keyboard layouts can be found at +<http://www.unicode.org/Public/cldr/latest/keyboards.zip> + + +Usage +===== + + ./cldr2json <input file or directory> <output directory> + +example: + + ./cldr2json cldr/keyboards/android/ json_layouts/ + + +Keyboard layout mapping +======================= + +Unicode CLDR layout identifiers are language codes, while XKB layout +identifiers are... something else. The mapping between the two currently uses +heuristic based on the layout descriptions, in this order: + +- if the CLDR layout description matches an XKB layout description, chose its + XKB identifier +- if one word of the CLDR layout description matches an XKB layout + description, chose its XKB identifier +- if the CLDR layout description matches one word of an XKB layout description, + chose its XKB identifier + +That doesn't always work. For instance it fails for "en" language, that should +match "us" XKB identifier. For such cases, there is a mapping in +LOCALE_TO_XKB_OVERRIDES at the top of the script. If you discover a weird +mapping of if you get a "failed to find XKB mapping for <locale>" warning then +please consider adding an override there. + |