description | Converts CLDR keyboard description to JSON |
owner | alan@boum.org |
last change | Sun, 3 Mar 2019 17:07:33 +0000 (3 17:07 +0000) |
URL | git://repo.or.cz/cldr2json.git |
https://repo.or.cz/cldr2json.git | |
push URL | ssh://repo.or.cz/cldr2json.git |
https://repo.or.cz/cldr2json.git (learn more) | |
bundle info | cldr2json.git downloadable bundles |
content tags |
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>
./cldr2json <input file or directory> <output directory>
example:
./cldr2json cldr/keyboards/android/ json_layouts/
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:
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.
5 years ago | master | logtree |