descriptionConverts CLDR keyboard description to JSON
owneralan@boum.org
last changeSun, 3 Mar 2019 17:07:33 +0000 (3 17:07 +0000)
content tags
add:
README.mdwn

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:

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.

shortlog
2019-03-03 Florian MüllnerFix override for fr-CAmaster
2017-08-13 Carlos GarnachoGenerate all json files for the android directory in...
2017-08-02 AlanAdd convert_xml test
2017-08-02 AlanAdd level modifiers in JSON
2017-08-02 AlanRemove garbage
2017-08-02 AlanLoad mappings at module initialisation
2017-08-02 AlanAdd unit tests
2017-08-02 AlanAdd basic documentation
2017-08-02 AlanRemove useless test
2017-08-01 AlanRename script
2017-08-01 AlanOutput JSON and work on directories
2017-08-01 AlanAdd licence statement from Caribou
2017-08-01 AlanImport script from caribou source
heads
5 years ago master