Commit graph

27982 commits

Author SHA1 Message Date
Marc Durdin
914208d728
Merge pull request #7201 from keymanapp/feat/developer/kmldmlc-vkey-support
feat(developer): add vkey support 🙀
2022-09-07 11:28:21 +10:00
Marc Durdin
f48727a126
Merge pull request #7200 from keymanapp/feat/developer/kmldmlc-name-tests
feat(developer): add unit tests for 'name' compiler 🙀
2022-09-07 11:28:15 +10:00
Marc Durdin
d9e21b1db9
Merge pull request #7199 from keymanapp/refactor/developer/kmldmlc-rename-errors-to-messages
refactor(developer): kmldmlc - rename `CompilerErrors` to `CompilerMessages` 🙀
2022-09-07 11:28:08 +10:00
Marc Durdin
452ada49e3
Merge pull request #7198 from keymanapp/feat/developer/kmldmlc-ldml-clean-loca-report
feat(developer): add compiler hint for non-minimal loca 🙀
2022-09-07 11:28:01 +10:00
Marc Durdin
2e7aef39e7
Merge pull request #7197 from keymanapp/chore/core/section-order
chore(core): order sections according to binary format 🙀
2022-09-07 11:27:54 +10:00
Marc Durdin
5e1d898527
Merge pull request #7196 from keymanapp/feat/core/ldml-name-section
feat(core): add 'name' section 🙀
2022-09-07 11:27:46 +10:00
Marc Durdin
9e3eff37c9
Merge pull request #7194 from keymanapp/feat/common/hextobin-index-command
feat(common): hextobin `index` command 🙀
2022-09-07 11:27:38 +10:00
Marc Durdin
f1b2be168f
Merge pull request #7193 from keymanapp/chore/core/kmxplus-zero-length-string
chore(core): define zero length string vs null string for kmxplus 🙀
2022-09-07 11:27:30 +10:00
Marc Durdin
423debfef7
Merge pull request #7187 from keymanapp/feat/core/ldml-add-meta-version
feat(core): add version field to meta 🙀
2022-09-07 11:27:20 +10:00
Marc Durdin
c171a79915
Merge pull request #7186 from keymanapp/feat/common/hextobin-calculate-size-and-offset
feat(common): add size and offset calculators to hextobin 🙀
2022-09-07 11:27:12 +10:00
Marc Durdin
3307dc63a7
Merge pull request #7184 from keymanapp/feat/developer/7181-use-json-schema-to-verify-source-file
feat(developer): use json schema to verify source file 🙀
2022-09-07 11:27:04 +10:00
Marc Durdin
716b19b810
Merge pull request #7183 from keymanapp/feat/developer/7180-add-kmldmlc-test-to-developer-test-build
feat(developer): add kmlmc and kmldmlc to `make test` 🙀
2022-09-07 11:26:54 +10:00
Marc Durdin
f96e3493af fix(developer): hide key-sizes when in desktop layout in touch layout editor
Fixes #7028.

Note that the desktop layout is not currently used by KeymanWeb. The
designer has a number of additional issues, as the .keyman-touch-layout
format is not well suited to describing a fixed hardware layout, but
fixing this is outside the scope of this issue.
2022-09-07 11:13:22 +10:00
Marc Durdin
8678a0d35b chore(core): mark unused parameters 2022-09-07 10:36:35 +10:00
Marc Durdin
5104914672 feat(core): add km_kbp_event API endpoint
Adds infrastructure required to support caps lock control on keyboard
activation per #5822.

Keyboardprocessor implementation is currently a stub, and engines will
need corresponding updates to support the new API.
2022-09-07 10:24:01 +10:00
Darcy Wong
bad8806c27
Merge pull request #7156 from keymanapp/fix/android/longpress-backspace
fix(android/engine): Fix Backspace key to delete without errant subkeys
2022-09-07 06:26:14 +07:00
Marc Durdin
690290bdfe
chore(core): add comment for KMXPLUS_STR
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2022-09-07 08:14:23 +10:00
Marc Durdin
c98fb89b86 fix(developer): suppress repeated warnings about unreachable code
Fixes #7216.

The warning message 0x209A 'The rule will never be matched because its
key code is never fired.' was being generated multiple times for a
single line because the `JavaScript_Key` function it is generated by is
used for various purposes.

This PR keeps a cache of reported key rules to ensure that the message
is reported only once for a given key rule, and also improves the
reporting to clarify which specific key is unreachable, which makes it
easier to diagnose when using `any(k)` style messages, for example:

```
lao_phonetic.kmn (237): Warning: 209A The rule will never be matched for key 'ñ' because its key code is never fired.
```

This also reduces the warning to a hint, as this should not be a
blocking issue for a keyboard, rather just a place the keyboard author
can tidy up.
2022-09-07 06:02:46 +10:00
Sabine
c3be2ba6da Merge branch 'refactor/developer/6026-kmcompx-compiler-cross-platform-part-2-NEW_VERSION' of https://github.com/keymanapp/keyman into refactor/developer/6026-kmcompx-compiler-cross-platform-part-2-NEW_VERSION
# Conflicts:
#	developer/src/kmcmpdll/CheckFilenameConsistency.cpp
#	developer/src/kmcmpdll/CheckFilenameConsistency.h
chore(developer): solved conflicts
2022-09-06 18:46:40 +02:00
Sabine
2c6726974a chore(developer): Win-functions in FileNameConsistency 2022-09-06 17:44:18 +02:00
Sabine
143ad3f206 chore(developer): Win-functions in FileNameConsistency 2022-09-06 17:23:09 +02:00
Joshua A. Horton
91448c344f feat(web): more default-breaker unit tests 2022-09-06 14:52:16 +07:00
Joshua A. Horton
9be8839685 fix(common/models): undefined != 0 2022-09-06 10:47:51 +07:00
Joshua A. Horton
413e88daa2 chore(web): where'd that extra indentation come from? 2022-09-06 10:10:33 +07:00
Joshua A. Horton
a09cc5d822 fix(common/models): models/templates unit tests 2022-09-06 09:48:52 +07:00
Joshua A. Horton
9634c76353 chore(common/models): suggested tweak from review 2022-09-06 08:57:56 +07:00
Joshua A. Horton
a6e65333c5 fix(common/models): wordbreaker test require paths 2022-09-06 08:54:56 +07:00
Marc Durdin
447b9afead feat(developer): add nyc for test coverage to kmldmlc 2022-09-06 11:52:22 +10:00
Marc Durdin
8e5ce35f4d feat(developer): kmldmlc compiler and tests for transforms
Adds compilers and minimal unit tests for transform sections bksp,
finl, ordr, and tran, and cleans up problems in the corresponding
builders.

Adds a utility script for building test fixtures for manual analysis:
  ./build.sh build-fixtures

Refactors constants to give us design-time type safety once more.
2022-09-06 10:15:31 +10:00
Keyman Server
1480359eea
Merge pull request #7210 from keymanapp/auto/version-master-16.0.57
auto: increment master version to 16.0.57
2022-09-06 04:02:07 +10:00
Keyman Build Agent
eddec014ee auto: increment master version to 16.0.57 2022-09-05 14:01:31 -04:00
Joshua A. Horton
26c5150977 fix(web): context-tracker newFlag management for new contexts 2022-09-05 14:02:55 +07:00
Eberhard Beilharz
369ef3d152
Merge pull request #7192 from keymanapp/chore/linux/postinst
chore(linux): Fix ibus-keyman.postinst script
2022-09-05 08:45:39 +02:00
Marc Durdin
14cbab10a2 feat(developer): add builders for transform sections
Note: basic.txt changed becuase I fixed the build order for sections.
2022-09-05 16:13:15 +10:00
Joshua A. Horton
b47596a803 fix(common/models): context token .isNew maintenance 2022-09-05 12:35:11 +07:00
Joshua A. Horton
57ce30e068 fix(web): post-suggestion-apply error 2022-09-05 12:17:17 +07:00
Joshua A. Horton
d33a9f05bf docs(web): fixes missed doc update 2022-09-05 11:41:42 +07:00
Joshua A. Horton
0a237f800f chore(web): test name tweak 2022-09-05 11:31:57 +07:00
Joshua A. Horton
b0184ec98b fix(web): adds unit test targeting issue, handler for edge case 2022-09-05 11:30:50 +07:00
Marc Durdin
917b39e7da refactor(developer): split kmxplus builder functions into separate files
This refactor work simply splits the existing functions into separate
files to prevent kmx-plus-builder.ts getting too big.

The functions now have no side-effects. Some of them mutate input
parameters, but they are fairly self-contained, which should make
unit tests simpler. Note that `alloc_string` is used extensively, but
works on the input parameter `sect_strs`.
2022-09-05 14:02:04 +10:00
Joshua A. Horton
be562b3022 fix(web): missed method references 2022-09-05 10:37:50 +07:00
Joshua A. Horton
ad8c30c6c0 fix(web): pred-text context tracking when wordbreak not caused by whitespace 2022-09-05 10:26:31 +07:00
Marc Durdin
9f5f8e976e feat(core): ldml keyboard transform elements
Adds definitions for LDML keyboard transform elements `transforms`,
`backspaces`, and `reorders`, and the binary format sections `bksp`,
`elem`, `finl`, `ordr`, and `tran`.

Minimally updates the compiler so that it will build, but no other
changes to the compiler.

Compiler and Typescript updates to support building these sections will
come in the next PR.
2022-09-05 13:11:51 +10:00
Marc Durdin
a708b2f85d chore(developer): add test for compiler messages and cleanup e2e test
The purpose of these tests is to ensure that our slightly WET constant
definitions for compiler errors are consistent in their usage:

  * that names are consistent between the message functions and
    constants
  * that constants have unique codes
  * that constants have the right error mask for their type

This means we don't have to worry about DRYing out the constants, which
would probably require us to have a preprocessing step, which has its
own negatives.

Also, added more reporting to e2e test in case of failures.
2022-09-05 10:43:01 +10:00
Marc Durdin
93551c36b7 chore: fixup import 2022-09-05 10:39:32 +10:00
Marc Durdin
645bca194a refactor(developer): cleanup virtual key constants
Uses our `K_xxx` constants for the CLDR VKey Enum mapping. Renames
us-virtual-keys to virtual-key-constants, better reflecting its purpose,
and adds a unit test to verify that the codes in the CLDR VKey Enum
mapping correspond to our expected Keyman virtual key codes.
2022-09-05 10:35:09 +10:00
Marc Durdin
3524b41b04
Update developer/src/kmldmlc/test/fixtures/sections/vkey/redundant.xml 2022-09-05 10:23:40 +10:00
Marc Durdin
cc0ddffd61 feat(developer): add vkey support
vkeyMaps table compiler, unit test, and fixes to json schema. Adds a
vkeyMaps entry to the basic e2e test.

us-virtual-keys.ts has a new mapping for CLDR VKey Enums, but I will
tweak this in an upcoming commit to use constants instead of hard-coded
values.
2022-09-05 10:14:10 +10:00
Marc Durdin
c08dbfbf9f feat(developer): add unit tests for 'name' compiler 2022-09-04 12:40:02 +10:00
Marc Durdin
b2b62733e6 refactor(developer): kmldmlc - rename CompilerErrors to CompilerMessages
Just wanted to rename this to make it clearer. Also added a prefix to
each message generator to indicate the type of message, as otherwise it
is not obvious within the compiler which messages are going to cause the
compiler to fail.

Note that the message generator function prefixes are Title Cased
whereas the message identifier constant prefixes are CAPS. I guess this
could be confusing but I think it works okay in practice.
2022-09-04 12:28:25 +10:00