Skip to content

Commit

Permalink
update layouts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Apr 11, 2024
1 parent 3754b2b commit d3ddf8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ Some special key labels will be implemented, most are already working in the (cu
* `[extra_keys]` are typically keys shown in the default layout of the language. This is currently only used for latin layouts to avoid duplicating layouts for just adding few keys on the right side. The layout name need to end with `+`, but the `+` is removed when looking up the actual layout.
* If you add a new language for which Android does not have a display name, it will be displayed using the language tag
* Avoiding this currently is more complicated than necessary: add the language tag to [LocaleUtils.getLocaleDisplayNameInSystemLocale](/app/src/main/java/helium314/keyboard/latin/common/LocaleUtils.kt#L181) to have an exception, and add a string named `subtype_<langage tag, but with _ instead of ->` to [`strings.xml`](/app/src/main/res/values/strings.xml). Further you may need to add a `subtype_in_root_locale_<language tag>` to [donottranslate.xml](/app/src/main/res/values/donottranslate.xml), and add the language tag to `subtype_locale_exception_keys` and `subtype_locale_displayed_in_root_locale`.
* If a newly added language does not use latin script, please update the default scripts method `Locale.script` in [ScriptUtils](app/src/main/java/helium314/keyboard/latin/utils/ScriptUtils.kt)

0 comments on commit d3ddf8d

Please sign in to comment.