Commit graph

33096 commits

Author SHA1 Message Date
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
Marc Durdin
2c4e3e109a feat(developer): add compiler hint for non-minimal loca
If a loca entry is either formatted wrongly (e.g. wrong case), or is
not minimal, then the compiler will now report a hint.
2022-09-04 12:21:15 +10:00
Marc Durdin
878287ef46 chore(developer): reorder functions for clarity 2022-09-04 06:20:07 +10:00
Marc Durdin
0222ed308a chore: remove extra files 2022-09-04 06:14:53 +10:00
Marc Durdin
ea6bd8f09f chore(core): order sections according to binary format
Just reorders all work around the various sections to match the binary
format order -- that is, 'sect' first, then all other sections
alphabetically.

This also means the compiler now emits the sections in the expected
order.

No other changes to functionality.
2022-09-04 06:10:34 +10:00
Marc Durdin
b17805df3a feat(core): add 'name' section
Updates compiler, headers and documentation for the 'name' section,
which will always be present as the LDML keyboard spec requires at least
one name in the `<names>` element.
2022-09-04 05:45:43 +10:00
Keyman Server
6cd79e0c81
Merge pull request #7195 from keymanapp/auto/version-master-16.0.56
auto: increment master version to 16.0.56
2022-09-04 04:02:33 +10:00
Keyman Build Agent
830ccf2438 auto: increment master version to 16.0.56 2022-09-03 14:01:55 -04:00
Darcy Wong
e9e4467109
Merge pull request #7178 from keymanapp/chore/android/reduce-toast-notifications
chore(android): Reduce Toast notification noise
2022-09-03 08:22:28 +07:00
Marc Durdin
ab999ea0ba chore(common): cleanup basic.txt a bit more
Also uses `index()` to get count of strings automatically.

Reformat basic.txt to make it more readable as it will get less
'basic' over time!
2022-09-03 06:36:41 +10:00
Marc Durdin
738401cdb5 feat(common): hextobin index command
Adds an `index` command as suggested by #7186.

> Future enhancement suggestion: include ... index() for block indices
> within these repeated blocks. Would be very useful for string tables
> in the example ref.
2022-09-03 06:28:22 +10:00
Marc Durdin
a274a44979 chore(core): wrap text on C7043_ldml.md 2022-09-03 06:12:36 +10:00
Marc Durdin
aef38f12df chore(core): define zero length string vs null string for kmxplus 2022-09-03 06:11:24 +10:00
Eberhard Beilharz
9d1004b9ec
chore(linux): Fix ibus-keyman.postinst script
When installing ibus-keyman it could happen that we got an (ignored)
error "user name does not exist". This change tries to work around
this problem.
2022-09-02 18:05:52 +02:00
Joshua A. Horton
6f887f6974 feat(web): a few more segment-construction tests 2022-09-02 14:54:25 +07:00
Joshua A. Horton
2a3c36e0a9 feat(web): segment constructor unit tests 2022-09-02 14:23:58 +07:00
Marc Durdin
75139ed919 fix(developer): compiler mismatch on currentLine
Fixes #7122.

The compiler was updating currentLine when checking for unreachable
rules, but not restoring it afterwards. This led to mismatches in the
debugger and in compiler warnings.
2022-09-02 17:15:27 +10:00
Marc Durdin
bc2bcef96f
chore: Update common/tools/hextobin/package.json 2022-09-02 15:06:02 +10:00
Marc Durdin
702db90a71 feat(core): add version field to meta
Also adds semver package for validating the version field.
2022-09-02 14:13:10 +10:00
Marc Durdin
d141274aed chore(core): update hextobin files with new format 2022-09-02 14:06:26 +10:00
Darcy Wong
b81f3795d0 chore(android/engine): Apply suggestion for refactor 2022-09-02 11:00:03 +07:00
Joshua A. Horton
0a65e36f19 change(web): test suite naming 2022-09-02 10:37:51 +07:00
Darcy Wong
d57d77670c
Update android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-09-02 09:30:01 +07:00
Joshua A. Horton
3ce59b23e6 feat(web): path-stats unit tests 2022-09-02 09:25:09 +07:00
Marc Durdin
17371c3801 feat(common): add size and offset calculators to hextobin
This makes it easier to write a binary file which contains offsets and
size values. Using this for unit tests for the LDML keyboard compiler.

Example kmldmlc basic.txt is updated and included.

Future enhancement suggestion: include count() for repeated blocks and
index() for block indices within these repeated blocks. Would be very
useful for string tables in the example ref.
2022-09-02 11:37:59 +10:00
Joshua A. Horton
4549f46769 feat(web): enhances a couple of recording-based seg tests 2022-09-02 08:18:07 +07:00
Marc Durdin
918d261f99 feat(developer): add conformsTo validity unit test
This is reasonably random, but wanted to add another test for content
rather than structure, just to verify that the DTD-XSD-jsonschema
translation is doing the right thing according to what we expect.

Looking good.
2022-09-02 08:01:48 +10:00
Joshua A. Horton
7dcc8e4509 feat(web): trackedPath-integration recording-based test 2022-09-01 15:28:52 +07:00
Joshua A. Horton
5c93f516f0 feat(web): more recording-based seg tests 2022-09-01 15:19:22 +07:00
Joshua A. Horton
038f57cefd fix(web): missed nit from prior commit 2022-09-01 14:47:17 +07:00
Joshua A. Horton
7de4f5c4d2 feat(web): prep types for recording-based segment unit tests 2022-09-01 14:43:40 +07:00
Marc Durdin
25b2d255aa feat(developer): use json schema to verify source file
As we do not appear to have access to a good DTD validation library in
Node.js, we will instead convert the DTD to a JSON schema file and use
that for validation.

I have not verified every aspect of the JSON schema at this point, but
will incrementally do so as I implement further aspects of the compiler.

This updates all the testing to use the schema. As the schema validation
is slow, I have increased the 'normal' time for tests.
2022-09-01 16:56:50 +10:00
Joshua A. Horton
ba568bef40 feat(web): first segmentation test based on test-recording 2022-09-01 13:36:58 +07:00
Joshua A. Horton
c2dcffc043 fix(web): clear of pending subsegment should refresh segment stats 2022-09-01 13:36:56 +07:00
Joshua A. Horton
2e970140ee refactor(web): mini-module resource for timedPromise 2022-09-01 13:36:55 +07:00
Joshua A. Horton
128b8ed132 chore(web): relocates test sequence recordings used for receiver testing 2022-09-01 13:36:54 +07:00
Joshua A. Horton
44de7f13e5 feat(web): some polish, idealized 'move' segment unit test 2022-09-01 13:36:53 +07:00