Commit graph

33096 commits

Author SHA1 Message Date
Marc Durdin
fe5de67c1f feat(developer): Range expansions
Relates to #2241.

Range expansions are a new language feature that reduce verbosity in
Keyman Keyboard Language (.kmn) files by making it possible to collapse
sequential ranges with a new `..` operator. It is envisioned that these
will be used primarily in stores.

Two kinds of expansions are available: character ranges, and virtual key
ranges.

The syntax is:

```
char '..' char
vkey '..' vkey
```

Where the `char` terminator is a single normal character, and the `vkey`
terminator is a single virtual key. `outs` is permissible for
terminators but no other statement is allowed. Whitespace is per normal
Keyman keyboard language syntax.

Character ranges will replace the range with the set of characters
between the terminators, based on the Unicode value of the terminators.

Examples:

```
store(alphabet) 'a' .. 'z'
store(alpha_not_bq) 'ac'..'pr'..'z'
store(capitals) U+0041 .. U+005A
```

Virtual key ranges work in a similar fashion, but with virtual keys. The
starting and terminating virtual key must have the same shift state.
This will be most useful for character and numeric virtual keys, as the
ranges are based on the numeric value of the virtual key as defined by
Windows, not its position on the keyboard.

Examples:

```
store(alphakeys) [K_A] .. [K_Z]
store(numkeys) [K_0] .. [K_9]
```

Ranges must be positive, that is, you cannot use `'z' .. 'a'`.

While this expansion is not expected to be very useful in rules, it is
still permitted. `context()` and other offsets are calculated on the
expanded form, not the collapsed form. Similarly, `any()`/`index()`
offsets are calculated on the expanded form.

'a' .. 'z' > context(3)  c this produces 'c', not 'z'

Because ranges are expanded at compile time, ranges that are overly
long will result in an error, so you cannot use, for example:

```
store(AllUnicode) U+0020 .. U+10FFFF
```

The precise maximum length of a range is dependent on the context where
it is used.

The changes are entirely compiler-based; no change is made to the .kmx
file format or to the Keyman apps.
2021-03-04 09:43:30 +11:00
Eberhard Beilharz
33bf5750b0
fix(linux): Improve version number
This change modifies the reported version number for km-config:
if km-config is installed from a debian package, the package
version will be output as well, e.g.:
`km-config version 14.0.252-beta (package version 14.0.252-1+bionic1)`

Otherwise the output will be identical to before:
`km-config version 14.0.252-beta-local`.

This change also modifies the script that sets the version number so
that builds on Jenkins are now detected in addition to TC.

This fixes #4579.
2021-03-03 20:01:34 +01:00
Eberhard Beilharz
0158e17636
chore(linux): Don't report to Sentry in dev environment
When the environment variable KEYMAN_NOSENTRY is set we'll skip
reporting to Sentry. This is helpful on development machines.
2021-03-03 19:37:27 +01:00
Keyman Server
194b6cd054
Merge pull request #4580 from keymanapp/auto/version-beta-14.0.252
auto: increment beta version to 14.0.252
2021-03-04 05:03:42 +11:00
Keyman Build Agent
08257cf633 auto: increment beta version to 14.0.252 2021-03-03 13:02:52 -05:00
Eberhard Beilharz
a5d0e7cdae
Merge pull request #4569 from keymanapp/feat/linux/issue-4542
chore(common/core/desktop): write debug output to console
2021-03-03 14:54:59 +01:00
Darcy Wong
d1e21fca7c
Merge pull request #4578 from keymanapp/common/crowdin-de
chore(common): Update crowdin files for `de`
2021-03-03 16:38:24 +07:00
Darcy Wong
f442dee615 chore(windows): Check in crowdin files for de 2021-03-03 14:47:43 +07:00
Darcy Wong
2c6bff4f43 chore(linux): Check in crowdin files for de 2021-03-03 14:47:16 +07:00
Darcy Wong
f1133d0fc9 chore(android): Check in crowdin files for de 2021-03-03 14:45:53 +07:00
Joshua Horton
4ab75cef6d
Merge pull request #4573 from keymanapp/chore/ios/4339-progress-feedback
chore(ios): better visual feedback for keyboard search during poor internet connectivity
2021-03-03 14:35:25 +07:00
jahorton
a78d1d76cf fix(ios): adds i18n for some error alerts 2021-03-03 14:24:37 +07:00
jahorton
d2a7012716 fix(ios): handling of cases with no welcome.htm 2021-03-03 13:21:49 +07:00
jahorton
0f7f2739f5 fix(ios): better ux for net-delayed package installations, kbd display mgmt 2021-03-03 13:01:49 +07:00
Darcy Wong
77c333da52 fix(android/engine): Cleanup KMHelpFileActivity 2021-03-03 11:41:45 +07:00
Marc Durdin
c595767e39 feat(developer): Add different Open Containing Folder buttons
Fixes #4314.

Adds 'Open Source Folder', 'Open Build Folder', and
'Open Project Folder' actions to various parts of Keyman Developer.
2021-03-03 15:36:11 +11:00
Marc Durdin
49f05e879d fix(developer): Support all fonts in Keyboard Fonts dialog
Fixes #2789.

The Keyboard Fonts dialog skipped some fonts which it did not recognise
as valid TrueType fonts. As a bonus, I've rewritten a few parts of it to
make it significantly faster to load.

I also turned off the font formatting for the list, as it was not very
helpful and hurt performance considerably.
2021-03-03 14:24:59 +11:00
jahorton
39064e1935 feat(ios): adds a progress bar to search during page loads 2021-03-03 10:17:15 +07:00
jahorton
399c7fb6b4 fix(web): fixes lack of respect for underlying-key display settings 2021-03-03 08:55:37 +07:00
Marc Durdin
6180b01a31
Merge pull request #4562 from keymanapp/fix/developer/3337-track-modified-state-wordlist-editor
fix(developer): track modified state in wordlist editor better
2021-03-03 10:48:21 +11:00
Marc Durdin
726e93bcc3
Merge pull request #4559 from keymanapp/feat/developer/2556-isRTL-support-for-lexical-models
feat(developer): isRTL support for lexical model editor
2021-03-03 10:47:34 +11:00
Marc Durdin
290d21f4c6 chore(developer): address review feedback 2021-03-03 10:45:52 +11:00
Marc Durdin
9ffc378fef chore(developer): fixup wxs path 2021-03-03 10:42:35 +11:00
Marc Durdin
2e61cb8e32 fix(developer): improve CEF location search stability
Fixes #4278.

When Keyman Developer is installed without Keyman for Windows, the
program silently crashes, because it is looking for libcef.dll in the
Keyman Desktop install folder rather than using its own copy of it.

This improves the search for libcef.dll and kmbrowserhost.exe, and
includes kmbrowserhost.exe with the Keyman Developer installation.

In the future, we could consider moving kmbrowserhost.exe into a common
folder (perhaps when we split Keyman for Windows and Keyman Developer
projects in 15.0).

I threw in a one-liner addressing a deprecated function warning in the
Developer build.
2021-03-03 10:05:04 +11:00
Marc Durdin
e4d09ece72
Merge pull request #4564 from keymanapp/fix/developer/3011-osk-import-avoid-blank-keys
fix(developer): Avoid blank keys when importing KMX to KVKS
2021-03-03 09:28:29 +11:00
Marc Durdin
16e5b9c358
Merge pull request #4563 from keymanapp/fix/developer/2998-package-compile-require-langugae-tag
fix(developer): require language tag when compiling keyboard package
2021-03-03 09:28:07 +11:00
Marc Durdin
a0734f153b
Merge pull request #4552 from keymanapp/fix/developer/2740-touch-editor-importing-osk-right-alt-layer
fix(developer): touch layout osk import handling of multiple modifiers
2021-03-03 09:27:11 +11:00
Marc Durdin
7856932e2b
Merge pull request #4548 from keymanapp/fix/developer/3199-model-package-compiler-schema-conformance
fix(developer): schema conformance for model package compiler
2021-03-03 09:26:28 +11:00
Marc Durdin
ef0961fd1c
Merge pull request #4547 from keymanapp/fix/developer/4423-named-constants-cleanup
fix(developer): Improve stability of named code constants
2021-03-03 09:26:17 +11:00
Eberhard Beilharz
958fb3ac1f
docs(common): More readme improvements 2021-03-02 19:16:19 +01:00
Keyman Server
c4d74d8fdb
Merge pull request #4570 from keymanapp/auto/version-beta-14.0.251
auto: increment beta version to 14.0.251
2021-03-03 05:01:55 +11:00
Keyman Build Agent
2f5c001c61 auto: increment beta version to 14.0.251 2021-03-02 13:01:09 -05:00
Eberhard Beilharz
268a42cba4
chore(common): Fix Windows build 2021-03-02 17:37:31 +01:00
Eberhard Beilharz
2421af506e
chore(common): write debug output to console
We have a `g_debug_ToConsole` variable. However, so far this was
always set to true and output to `syslog`. This change modifies
the default to `false`, and in that case logs to `syslog`. If
`g_debug_ToConsole` is true we no output to the console.

When running the KMX unit tests we set `g_debug_ToConsole` to true.
2021-03-02 16:55:22 +01:00
Eberhard Beilharz
2593c7873f
docs(common): Add readme for unit tests 2021-03-02 16:55:22 +01:00
Eberhard Beilharz
64f9f9297a
chore(linux): Improve readme
Also ignore some more generated files.
2021-03-02 16:55:22 +01:00
Darcy Wong
e18e3b5d00 change(android/engine): Refactor webview cleanup 2021-03-02 15:23:05 +07:00
jahorton
9847e553a5 fix(ios): fixes kbd display over welcome.htm 2021-03-02 15:18:52 +07:00
jahorton
55e39b8413 fix(ios): app browser kmp downloads 2021-03-02 14:33:38 +07:00
Darcy Wong
0801d69bbc
Merge pull request #4565 from keymanapp/fix/ios-help-path
fix(common/resources): Fix help.keyman.com path for CI
2021-03-02 09:58:28 +07:00
jahorton
00c9571db9 fix(ios): workaround pt 1 - package request shunted to Safari 2021-03-02 09:30:57 +07:00
Marc Durdin
84c0202d85 chore(developer): tweak casing 2021-03-02 13:27:17 +11:00
Marc Durdin
85b9e04345 chore(developer): address review comment 2021-03-02 13:26:40 +11:00
Darcy Wong
b10ae8b0d4 fix(common/resources): Fix help.keyman.com path for CI 2021-03-02 08:41:44 +07:00
Marc Durdin
36f5788651 fix(developer): Avoid blank keys when importing KMX to KVKS
Fixes #3011.

Keys that have only whitespace will no longer generate separate key data
for the on screen keyboard, as they have no visual presentation anyway.
2021-03-02 12:16:09 +11:00
Marc Durdin
1f87c7608c fix(developer): require language tag when compiling keyboard package
Fixes #2998.

Three parts to this:

* The package compiler will now give a warning if a keyboard in a
  package does not contain any language metadata.

* Removed old canonicalization check during compile which is now handled
  better in `TPackageInfoRefreshKeyboards`.

* Reduced non-canonical BCP 47 tag warnings in
  `TPackageInfoRefreshKeyboards` to "info" so they do not block the
  build.

Point 3 above is one part of the outcome of our BCP 47 discussion at:
https://docs.google.com/document/d/1N5CkTX7tlLlmUB9Mbd-LblY1ch1e642XxlTasC_WE_Q/edit#heading=h.fiy983iliay5
2021-03-02 11:59:12 +11:00
Marc Durdin
7ea7ba0e11 fix(developer): track modified state in wordlist editor better
Fixes #3337.

In some situations, the wordlist editor was not tracking modified state
100% correctly, which meant that edits could be lost. This resolves that
by simplifying the modification state tracking.
2021-03-02 09:27:18 +11:00
Keyman Server
6bb00124ee
Merge pull request #4561 from keymanapp/auto/version-beta-14.0.250
auto: increment beta version to 14.0.250
2021-03-02 05:02:12 +11:00
Keyman Build Agent
3a2e4741bb auto: increment beta version to 14.0.250 2021-03-01 13:01:24 -05:00
Marc Durdin
eb713ec274 feat(developer): isRTL support for lexical model editor
Fixes #2556.

This adds support for `isRTL`, `insertAfterWord`, and
`quotesForKeepSuggestions` punctuation options for lexical models, both
in the parsing and in the user interface. A number of options are
presented to the user for the quotes and word breaking characters.

The parser continues to be a regex-based typescriptish parser. Expect it
to be gross. It's too big a job to do properly right now, so it is
somewhat limited and will bail if it finds structures it can't
understand.

I would hope to use something a bit smarter in the future to interface
with the editor. Probably when we are actually fully web-based and can
depend on a Typescript compiler directly.

Please don't get mad at me! 😟😟😟
2021-03-01 21:46:51 +11:00