abouttreesummaryrefslogcommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorJules Aguillon2023-06-25 16:48:18 +0200
committerJules Aguillon2023-06-25 16:48:18 +0200
commitde6c3b024d9879fffc608126d974756624d6eec7 (patch)
tree55cfd1781493272f7571025da05f58577a217fbb /CONTRIBUTING.md
parent15c608b8cd663bf9267ade94d689164762c40ed9 (diff)
downloadunexpected-keyboard-de6c3b024d9879fffc608126d974756624d6eec7.tar.gz
unexpected-keyboard-de6c3b024d9879fffc608126d974756624d6eec7.zip
Update guidelines about adding layouts
to reflect the recent changes. Also, change `gen_layouts.py` to not generate warnings for file that are known not to be layouts.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md18
1 files changed, 12 insertions, 6 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3ad2bf9..c32282f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -77,16 +77,22 @@ make installd
### Adding a layout
-Layouts are defined in XML, see `res/xml/qwerty.xml`.
+Layouts are defined in XML, see `res/xml/latn_qwerty_us.xml`.
An online tool for editing layout files written by @Lixquid is available
[here](https://unexpected-keyboard-layout-editor.lixquid.com/).
-An entry must be added to the layout option in `res/values/arrays.xml`, to both
-`pref_layout_values` (correspond to the file name) and `pref_layout_entries`
-(display name).
+Makes sure to specify the `name` attribute like in `latn_qwerty_us.xml`,
+otherwise the layout won't be added to the app.
-The layout must also be referenced in `srcs/juloo.keyboard2/Config.java` in
-`layout_of_string`.
+The layout file must be placed in the `res/xml/` directory and named according to:
+- script (`latn` for latin, etc..)
+- layout name (eg. the name of a standard)
+- country code (or language code if more adequate)
+
+Then, run `make gen_layouts` to add the layout to the app.
+
+The last step will update the file `res/values/layouts.xml`, that you should
+not edit directly.
Run `make check_layouts` to check some properties about your layout. This will
change the file `check_layout.output`, which you should commit.