Commit graph

27982 commits

Author SHA1 Message Date
Darcy Wong
ff91d9d7d9
Merge pull request #4588 from keymanapp/fix/android/toast-locale
fix(android): Localize Toast notifications
2021-03-05 08:57:13 +07:00
Marc Durdin
fe2c1cd187 fix(windows): incxstr could run over buffer with malformed data
Fixes #4591.

I fixed incxstr in 4 places:

1. Common/Core: kmx_xstring.cpp
2. Engine: xstring.cpp
3. Test project importkeyboard importkeyboard.cpp
4. Test project m-to-p m-to-p.cpp

I updated mcompile to remove its own copy of incxstr (identical to that
in xstring.cpp) to reduce WETness but opted not to do so for the test
apps, which are pretty much throwaway anyway.

I note that there is more work we could do here; we need to check every
character as we increment so we don't miss a `U+0000` end of string with
malformed data. But I would like to tackle that as a separate job at
some point in the future after Core integration.
2021-03-05 12:50:29 +11:00
Darcy Wong
4068127196 fix(android/engine): Allow formatted strings in Toast 2021-03-05 08:42:38 +07:00
Marc Durdin
690a7fd787
Merge pull request #4586 from keymanapp/feat/developer/2241-caps-controlled-keys
feat(developer): &CasedKeys system store
2021-03-05 11:41:16 +11:00
Darcy Wong
51e8dd19e4
Merge pull request #4531 from keymanapp/fix/android/welcome-hangs
fix(android/app): Fix welcome.htm responsiveness
2021-03-05 06:54:51 +07:00
Marc Durdin
bc47b53a9b fix(windows): PreservedKeyMap::MapUSCharToVK line order bug
I discovered this while working on #4586. The code in question was
updating `*puKey` and then trying to dereference the array on the basis
of its new value, which (a) would give the wrong result, and (b) could
be reading off the end of the array (although not crashing it seems),
e.g. for `"` -> `VK_QUOTE`, which has a value of `0xDE`.

I am guessing that the reason we have not seen any bug reports on this
is that the keystroke handler falls back to an alternate code path, so
in the vast majority of cases, keyboards would continue to work
correctly. Furthermore, the test was just for truthiness of the `BOOL`
so probably at least 50% of the time we'd have been okay anyway. Or
something. Anyway, I reckon this is better.
2021-03-05 06:55:14 +11:00
Marc Durdin
6a247cd081 fix(developer): tidy up expansions tests 2021-03-05 06:49:13 +11:00
Eberhard Beilharz
78ecbea855
Update linux/scripts/reconf.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-03-04 20:33:48 +01:00
Keyman Server
2920c319c3
Merge pull request #4590 from keymanapp/auto/version-beta-14.0.253
auto: increment beta version to 14.0.253
2021-03-05 05:03:35 +11:00
Keyman Build Agent
e39ee5294c auto: increment beta version to 14.0.253 2021-03-04 13:02:44 -05:00
Eberhard Beilharz
63cefab0eb
chore(linux): Improve Sentry environment setting
When running from source we set the environment to `local` when
reporting to Sentry. This change also adds the package version and
the tier as additional Sentry tags.

This is a follow-up of PR #4581.
2021-03-04 16:01:52 +01:00
Eberhard Beilharz
96c688551d
Merge pull request #4581 from keymanapp/chore/linux/sentry
chore(linux): Don't report to Sentry in dev environment
2021-03-04 15:57:08 +01:00
Eberhard Beilharz
cb9b3ead07
Merge pull request #4582 from keymanapp/fix/linux/4579-version
fix(linux): Improve version number
2021-03-04 11:01:49 +01:00
Joshua Horton
7e82ba629e
Merge pull request #4587 from keymanapp/fix/common/models/post-bksp-suggestions
fix(common/models): fixes application of suggestions immediately after a backspace
2021-03-04 15:57:08 +07:00
Darcy Wong
9b5826375a fix(android): Migrate Toasts to BaseActivity.makeToast 2021-03-04 14:59:53 +07:00
Darcy Wong
8a176dcb8f fix(android/engine): Add help method to localize Toast notifications 2021-03-04 14:57:58 +07:00
Darcy Wong
bdb4755ed9 chore(android/engine): Remove unused string
Cleaning up unused string failed_to_access_downloaded_file
2021-03-04 14:57:12 +07:00
Joshua Horton
7748abde9d
Merge pull request #4572 from keymanapp/fix/web/3950-underlying-key-display
fix(web): fixes lack of respect for underlying-key display settings
2021-03-04 13:23:22 +07:00
jahorton
2e55dced98 feat(common/models): adds some suggestion unit tests 2021-03-04 13:19:24 +07:00
jahorton
978eea2204 change(common/models): a bit of tidy-up 2021-03-04 12:44:08 +07:00
jahorton
35ee5828da fix(common/models): fixes incorrect deleteLeft prop for post-bksp suggestions 2021-03-04 12:36:39 +07:00
Marc Durdin
103e46c0d5
Merge pull request #4584 from keymanapp/feat/developer/2241-expansions
feat(developer): Range expansions
2021-03-04 15:05:32 +11:00
Marc Durdin
b7765483ec
Merge pull request #4576 from keymanapp/feat/developer/4314-open-containing-folder-options
feat(developer): Add different Open Containing Folder buttons
2021-03-04 15:05:19 +11:00
Marc Durdin
d536345a20
Merge pull request #4574 from keymanapp/fix/developer/2789-support-all-fonts-keyboard-fonts-dialog
fix(developer): Support all fonts in Keyboard Fonts dialog
2021-03-04 15:05:10 +11:00
Marc Durdin
0cbd053cda
Merge pull request #4571 from keymanapp/fix/developer/4278-improve-cef-location-search-stability
fix(developer): improve CEF location search stability
2021-03-04 15:05:02 +11:00
Joshua Horton
633c1a4efa
Merge pull request #4585 from keymanapp/feat/ios/l10n-update
feat(ios): enables de, fr, and km localizations
2021-03-04 10:56:29 +07:00
jahorton
bd8f7a1c04 change(common/core/web): default mobile layouts follow KDU (desktop) setting 2021-03-04 10:39:24 +07:00
jahorton
51f9bdc9a7 docs(ios): about the ios l10n updating process 2021-03-04 10:26:03 +07:00
jahorton
d20bb5d37d fix(ios): ResourceInfoView.strings l10n mapping correction 2021-03-04 09:50:22 +07:00
Marc Durdin
e9e4e7bcb6 feat(developer): &CasedKeys system store
Fixes #2241.

The `&CasedKeys` system store is a compiler feature that reduces the
repetitive nature of keyboard rules for `CAPS` and `NCAPS`. The
`&CasedKeys` system store defines a list of virtual keys for which
'normal' Caps Lock rules apply. This store has no default value, for
backward compatibility.

Once this store is defined, then you can define just the unshifted and
shifted versions of a rule, and Keyman Developer will synthesize the
`CAPS` and `NCAPS` versions of the rule. For example, you may have the
following rules:

```
store(&CasedKeys) [K_A]
+ [K_A] > 'α'
+ [SHIFT K_A] > 'Α'
```

These would be replaced by the compiler with:

```
store(&CasedKeys) [K_A]
+ [NCAPS K_A] > 'α'
+ [SHIFT CAPS K_A] > 'α'
+ [CAPS K_A] > 'Α'
+ [SHIFT NCAPS K_A] > 'Α'
```

You can also use this functionality with characters in the key part of
the rule:

```
store(&CasedKeys) 'a'..'c'
+ 'a' > 'α'
+ 'A' > 'Α'
```

and the compiled expansion would be similar:

```
store(&CasedKeys) [K_A] [K_B] [K_C]
+ [NCAPS K_A] > 'α'
+ [SHIFT CAPS K_A] > 'α'
+ [CAPS K_A] > 'Α'
+ [SHIFT NCAPS K_A] > 'Α'
```

This feature is backwardly compatible with Keyman 6.0, as it is entirely
implemented in the compiler.

This feature is not compatible with mnemonic layouts, and the keys
defined in the `&CasedKeys` store must be the unshifted base keys as
found on a US English keyboard, or you can use ISO9995 identifiers if
you prefer.

If you define a rule where you specify either `NCAPS` or `CAPS`, for a
key found in the store, then no change will be made to that rule. You
can also continue to define rules which use `NCAPS` or `CAPS` for keys
not found in the store.

As a side-benefit, this allows the visual designer to be used and
support Caps Lock, although at this stage, the `&CasedKeys` store is not
surfaced in the visual designer.
2021-03-04 13:41:04 +11:00
Joshua Horton
14eace1f17
Merge pull request #4577 from keymanapp/fix/ios/unlocalized-error-strings
fix(ios): adds i18n for some error alerts
2021-03-04 09:38:14 +07:00
jahorton
7f0a872b6b feat(ios): enables de, fr, and km localizations 2021-03-04 09:35:58 +07:00
jahorton
aba0a53b4e chore(ios): because xcode's encoding converter is broken 2021-03-04 09:07:41 +07:00
jahorton
00515dee8e change(ios): attempt at changing file encoding of localizable.strings 2021-03-04 08:56:35 +07:00
Marc Durdin
49131de2c6 chore: fixup encoding 2021-03-04 10:15:53 +11:00
Marc Durdin
7e424aaa62 chore(developer): tweak expansion test 2021-03-04 10:12:24 +11:00
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