Commit graph

107 commits

Author SHA1 Message Date
Marc Durdin
ed73d5667b chore: add variable docs 2021-07-30 15:27:12 +10:00
Marc Durdin
5f2caba964 fix(developer): compiler use and match behavior for Web should be same as Core
Fixes #5440.

Currently, the behavior of `use()` and `match` for KeymanWeb compiled
keyboards is not identical to the Windows (or Core) behavior. The
example keyboard in #5440 generates 'foo' instead of 'abc' on web.

This fixes that by ensuring that `match` is not called when `use()` is
found in a group rule match.
2021-07-30 14:46:13 +10:00
jahorton
92a17542ab refactor(web): special char defn site; used only by keys 2021-06-16 08:47:40 +07:00
Marc Durdin
071bfd9011 fix(developer): requote font names
Fixes #4810.
2021-03-29 20:53:12 +11:00
Marc Durdin
de74fddbc2 chore(developer): upgrade bcp 47 canonicalisation to warning
This does not trigger a build failure; validation warnings currently always pass.
Info messages are currently suppressed with -s which also suppresses the banner,
which is more plumbing than we should change just now.
2021-03-16 20:07:27 +11:00
Marc Durdin
4c82c2b545 fix(developer): validate keyboard_info should give info on non-canonical bcp47 2021-03-16 13:44:23 +11:00
Marc Durdin
c966f297cb
Merge branch 'beta' into feat/developer/improve-bcp47-canonicalization 2021-02-09 07:03:28 +11:00
Marc Durdin
70e6aa9f4e chore(windows): rename variable per review 2021-02-08 20:12:24 +11:00
Marc Durdin
558c8013ee feat(developer): improve BCP 47 canonicalization
Ensures we get a canonical tag per langtags.json as far as we possibly
can. This is a breaking change for the compiler as tags which were
formerly regarded as canonical are no longer regarded that way. This
mostly relates to script subtag but a secondary bug meant that some
other tags would have lost data in the canonicalization process
(because we did a lookup based only on the language subtag previously,
which is a no-no).

See keymanapp/keyboards#1452 for related work.
2021-02-05 16:56:21 +11:00
Marc Durdin
171b6fac54 fix(developer): debug information with unicode identifiers
Fixes #4250.

This implements @jahorton's suggestion of including the original name
in a comment alongside the munged name, as well as appending the unique
integer identifier of each symbol.

Note: the error reporting code needed a massage to support Unicode error
strings; in the future we should update the C++ compiler to emit
Unicode error strings also.
2021-02-03 10:54:20 +11:00
Marc Durdin
48a3d0c9fa
Update windows/src/developer/TIKE/compile/CompileKeymanWeb.pas
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2020-11-25 12:50:45 +11:00
Marc Durdin
0b62095726 feat(developer): improve downlevel support for new special labels 2020-11-23 06:23:47 +11:00
Marc Durdin
c6f25b1484 chore: tweak comment 2020-11-18 09:11:40 +11:00
Marc Durdin
83325e878c feat(developer): add new touch layout special tags
Fixes #3863.

This adds the new `*RTLEnter*` and other tags introduced in #3851 to
the touch layout editor, and adds validation for use in 14.0 keyboards.

Due to a limitation in the compiler architecture, use of these tags
will not trigger the automatic keyboard versioning functionality; the
keyboard developer must explicitly specify `store(&VERSION) '14.0'`.

Also:

* synchronised error codes between .h and .pas.
* synchronised touch layout tags between Developer and KeymanWeb, and
  cleaned up builder.js usage thereof.
* added support for KeymanwebOsk font override when special tags are
  identified.
* added basic tests to ensure that the compiler is catching use of these
  tags as needed.
* updated keymanweb-osk.ttf font in Developer.
2020-11-18 08:58:57 +11:00
Marc Durdin
5deb799e33 chore: address review comments 2020-11-06 17:59:06 +11:00
Marc Durdin
d8e70bea77 fix(developer): support for notany() and context()
This is part 1 of 2 of a fix for #917. This adds in version 14.0
targeting and a new function `KNO` which is used in one specific place:
when a context() statement references a notany() statement. This
minimizes any risk in this change because existing supported patterns
should compile identically.

If the compiler finds this pattern, it will enforce 14.0 minimum version
for web targets.
2020-11-04 13:49:48 +11:00
Marc Durdin
6d5ccbd719 fix(windows): add tests and improve canonical options 2020-09-01 09:41:33 +10:00
Marc Durdin
84f0219541 fix(windows): canonicalization
Reworks the BCP 47 tag canonicalization algorithm.
2020-09-01 08:42:56 +10:00
Marc Durdin
1bcb91e048 fix(developer/compilers): normalise touch layout on compile
Works around #119 on the compiler side. This normalises the touch layout file in the
compile phase, fixing integers which should be strings, etc. This means that
we no longer need to correct the issue in the Engine; a rebuild of affected
keyboards is sufficient (although of course we'll need a version bump in order
for them to be distributed.
2020-06-03 14:07:19 +10:00
Marc Durdin
6d0caaf3d2 feat(developer): allow use of ISO9995 in key ids
ISO9995 describes keys by positions, where E00 is 5th (top) row,
left-most key. This feature allows keyboard developers to use
clearly positional identifiers in place of K_ identifiers.
2020-02-26 23:25:08 +07:00
Marc Durdin
f2f269545a fix(developer/compiler): merge reports touch badly
Fixes #2498.

The .keyboard_info merge was incorrectly assuming the presence of a .js
in the .kmp file if the source .kmn file asserted support for touch
platforms, when testing the .kmx files. Now, platform support for
Android and iOS will only be added if the package actually includes the
.js file that makes that possible.
2020-02-11 11:01:56 +11:00
Marc Durdin
4645f2e253 feat(developer): complete 64-bit support 2019-11-28 18:39:56 +11:00
Marc Durdin
773ed6224b fix(developer): keyboard_info merge mobile wrong
The .keyboard_info merge of `platformSupport` would not always give the
right result, for .js keyboards. We have a certain lack of information
in the .js which makes it a little tricky to determine precisely what
the set of supported platforms are. Thus, if we find a .js within a
.kmp, we'll assume it supports mobile; if we find a .js by itself,
we'll assume it supports web. (Thus, a keyboard that builds a .js
is assumed to always support web -- but not necessarily mobile now).

Some keyboards that have incorrectly added a .js into a package, e.g.
sil_cipher_music, will be marked as supporting mobile even though they
don't. The correct fix here is to remove the .js from the package for
that keyboard.
2019-11-13 13:23:55 +11:00
Marc Durdin
a36b6d3557 fix(developer): nul in context caused incorrect deletion for 10.0 2019-11-06 07:00:03 +11:00
Marc Durdin
9c5e30d82a [Windows] Update build scripts, compiler conditionals, and address hints arising with move to Delphi 10.3.2 2019-10-24 20:43:17 +07:00
Marc Durdin
fd302b0197 [Developer] Cleanup logging and support colour messages in kmcomp. Fixes #2016. 2019-09-24 15:41:40 +10:00
Marc Durdin
c55097ab2a [Developer] Only apply fix is the LadderLength registry value != 0 2019-04-02 16:56:22 +11:00
Marc Durdin
cf1cde65fa [Developer] Fix mismatch of shift/key state for grouping rules 2019-04-01 10:36:54 +11:00
Marc Durdin
ebc2263a0b [Developer] Simplify rule construction in web compiler to avoid errors in emitted javascript 2019-04-01 10:25:35 +11:00
Marc Durdin
30a30d1ab0 [Windows] Fix incorrect assumption around rule order 2019-03-31 08:34:40 +11:00
Marc Durdin
abb1cbabbb [Developer] Regression testing just paid for itself. 2019-03-29 17:22:50 +11:00
Marc Durdin
e8d0210da0 [Developer] Cleanup and address review comments 2019-01-31 09:25:11 -06:00
Marc Durdin
8b1199b4fb [Developer] Fix hints 2019-01-30 16:41:18 -06:00
Marc Durdin
95cdd73fdc [Developer] Fixes #183 - workaround for Chrome ladder limitation 2019-01-30 15:54:10 -06:00
Marc Durdin
5f81681458 [Web] [Developer] Fixes #1117. displayUnderlying flag is now separate for different platforms. 2019-01-15 15:01:35 +11:00
Darcy Wong
52f9bc0589 More cleanup for review comments 2018-12-17 12:04:38 +07:00
Darcy Wong
e8ba0944ea Update languages objects to add subtag names 2018-12-17 09:58:07 +07:00
Darcy Wong
f55a9477e3 Address review comments
Cleanup and fixes null pointer exception
2018-12-17 09:00:00 +07:00
Darcy Wong
7ceb1f175f Add Script/Region back 2018-12-15 22:12:12 +07:00
Darcy Wong
846c05693b Tweak Free 2018-12-15 22:09:07 +07:00
Darcy Wong
03ac003f47 Fix check for scriptName / regionName 2018-12-15 21:01:37 +07:00
Darcy Wong
abb1b9f7bd Try to fix NPE 2018-12-14 23:33:52 +07:00
Darcy Wong
56cf43f210 clean up unused var 2018-12-14 16:30:37 +07:00
Darcy Wong
c31c180610 Start writing subtag names 2018-12-14 16:17:28 +07:00
Darcy Wong
430ff3ecf4 Revert ValidateKeyboardInfo 2018-12-14 12:52:12 +07:00
Darcy Wong
a9e1c59274 Move migration code to MergeKeyboardInfo 2018-12-14 12:49:36 +07:00
Darcy Wong
2e5fd959c1 Staged the wrong file 2018-12-13 23:34:44 +07:00
Darcy Wong
50a5e091ea Start trying to generate displayName and languageName 2018-12-13 21:00:05 +07:00
Darcy Wong
7563cbedce Add MigrateLanguagesArray function 2018-12-13 15:58:23 +07:00
Darcy Wong
4a8b645e97 Add "-add-help-link" parameter to kmcomp
Cherrypick of #1346
2018-11-27 15:51:28 +07:00