Commit graph

3486 commits

Author SHA1 Message Date
Darcy Wong
fa72dc5506 chore(common): Update some more strings 2021-04-28 23:15:59 +07:00
Darcy Wong
ab7e7f7ff1 chorre(common): Check in crowdin files for Azerbaijani 2021-04-28 15:17:25 +07:00
Marc Durdin
a1066f13a1
chore(windows): review comments
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2021-04-28 11:06:22 +10:00
Marc Durdin
94b6e1a00f fix(windows): handle errors starting keymanx64
Fixes #4988.
Fixes KEYMAN-WINDOWS-3F.

This relates to #4976 and is a stop-gap until we implement that. It will
reduce the number of reported errors (both to us and the end user) but
does not address the core issue, which requires a more significant
refactor.
2021-04-28 10:37:47 +10:00
Marc Durdin
3a59175465 fix(windows): avoid error if keyman32.dll renamed
Fixes #4939.
Fixes KEYMAN-WINDOWS-70.
Fixes KEYMAN-WINDOWS-71.
Fixes KEYMAN-WINDOWS-BR.
Fixes KEYMAN-WINDOWS-6J.

I am speculating a little here, because the root cause is not visible in
the crash report, but it appears that if keyman32.dll is renamed, that
the UnregisterControllerWindows function attempts to reload keyman32.dll
which means that (a) it no longer has a list of registered controllers,
and (b) it may fail to reload.

Instead of throwing an exception, we now only log this error in
development mode. The error is not likely to cause significant trouble
for end users as they are shutting down Keyman anyway at this point.

The resolution if there is any uncertainty during an upgrade is to
restart Windows. This is less than ideal but avoids file locks and
problems with in-memory DLLs. (Future versions of Keyman will schedule
upgrades to happen automatically after a restart before Keyman has been
started, in an effort to avoid this kind of trauma.)
2021-04-21 14:21:17 +10:00
Marc Durdin
30c64f34aa
Merge pull request #4934 from keymanapp/fix/developer/4803-chiral-warning-is-disruptive
fix(developer): chiral mismatch warning is disruptive
2021-04-21 11:27:07 +10:00
Marc Durdin
58b1f926fa
Merge pull request #4918 from keymanapp/fix/developer/4917-crash-on-malformed-kpj-user-file
fix(developer): avoid crash if .kpj.user file is malformed
2021-04-21 10:24:44 +10:00
Marc Durdin
a19b7019da
Merge pull request #4922 from keymanapp/fix/windows/4874-help-contents-broken-from-tray-menu
fix(windows): help contents broken from tray menu
2021-04-21 10:22:00 +10:00
Marc Durdin
32524601f9
Merge pull request #4920 from keymanapp/fix/windows/4848-access-violation-closing-text-editor
fix(windows): access violation closing text editor
2021-04-21 10:21:48 +10:00
Marc Durdin
a8ddf018c1
Merge pull request #4899 from keymanapp/chore/windows/4893-disable-profile-repair
chore(windows): disable profile repair
2021-04-21 10:21:34 +10:00
Marc Durdin
19a8ddcc6e
Merge pull request #4890 from keymanapp/fix/windows/4889-crash-when-installing-tip
fix(windows): crash when installing TIP in some rare situations
2021-04-21 10:21:25 +10:00
Marc Durdin
1822590261
Merge pull request #4887 from keymanapp/fix/windows/4886-install-crashes-on-invalid-and-legacy-package-names
fix(windows): handle invalid package names during install
2021-04-21 10:21:09 +10:00
Marc Durdin
355eba3514 fix(developer): chiral mismatch warning is disruptive
Fixes #4803.

This fixes part of #4803 - namely the obtrusive warning flagging that
there are mismatched modifier types in the keyboard. Instead of making
the change during tab switching, it simply shows a warning message in
the design view of the keyboard, which the developer can choose to
ignore.

This does not address the removal of comments or the switch of character
formats which is part of that conversion routine. That is a more complex
change to the parser.
2021-04-21 10:07:33 +10:00
Marc Durdin
568e4b2e7e fix(windows): help contents broken from tray menu
Fixes #4874.

Opening product help from the tray menu would end up at a broken page.

Given the title of the link is "Help Contents", I have opted to open at
the help contents... (rather than the alternative of context/tray-menu).
2021-04-20 12:54:10 +10:00
Marc Durdin
a1cf52579e fix(windows): access violation closing text editor
Fixes #4848.

This error arose because the form was destroyed after kmshell.dpr
completes, which meant that sentry had already been destroyed. The
sentry call was simply to record a breadcrumb of the form being closed.

The fix is to move the lifecycle of the form into the `OpenTextEditor`
function. `OpenTextEditor` is used only by `initprog.RunKMCOM` and so it
is safe to remove the ApplicationRunning path of the code, which
simplifies the lifecycle of the form.
2021-04-20 12:42:10 +10:00
Marc Durdin
4fcc23eb40
Update initprog.pas 2021-04-20 12:28:58 +10:00
Marc Durdin
3da6a28d79 fix(developer): avoid crash if .kpj.user file is malformed
Fixes #4917.

This updates `TProjectLoader` to use the same exception handling pattern
for loading the .kpj.user file as we use for the .kpj file.
2021-04-20 10:50:16 +10:00
Darcy Wong
8e8190664d
Merge pull request #4829 from keymanapp/chore/android/crowdin-id
chore(android,windows): Check in crowdin for Indonesian
2021-04-19 15:10:37 +07:00
Marc Durdin
7915429cf6 chore(windows): disable profile repair
Fixes #4893.
Fixes KEYMAN-WINDOWS-50.
Fixes KEYMAN-WINDOWS-4Z.

Profile repair was using legacy code for re-establishing Keyman TIP
profiles after they had been modified by a third party app or Windows.
However, with Keyman 14's new profile registration pattern, this is both
less likely to occur and also easier to resolve (just disabling and
re-enabling the keyboard should do it).

Thus, I have opted to disable the profile repair code as, with the way
it stands at present, it may well make things worse, even aside from the
crash, because of disparities between user and admin TSF settings.
2021-04-19 15:52:07 +10:00
Darcy Wong
5e66918f0b chore(common): Update crowdin for French 2021-04-19 10:12:58 +07:00
Marc Durdin
e86704b702 fix(windows): crash when installing TIP in some rare situations
May fix #4889.

In some situations, Keyman is unable to precisely match the user's
default language with its own keyboard settings. In this situation,
Keyman may crash when attempting to install the TIP, or may give a
spurious error such as "Too many transient languages" or similar.

I have been unable to reproduce the crash described in #4889 on my
machines so this is an attempted fix.

This does fix a bug with default languages in any case so is a good fix
to include: if the user's default language is not found in Keyman's LCID
table, then Keyman would fail to install the TIP when the keyboard is
installed and would return an error message (but not crash).
2021-04-19 10:39:49 +10:00
Marc Durdin
35c82ea128 fix(windows): handle invalid package names during install
Fixes #4886.

This patch includes 5 separate fixes for the various scenarios we
encountered during package installation.

1. RunTools.pas: don't attempt to install TIPs if package is not also
   being installed.

2. Keyman.Setup.System.OnlineResourceCheck.pas, OnlineUpdateCheck.pas:
   handle online update check for packages with spaces or periods in the
   id (legacy packages only).

3. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `(n)` and `[n]` patterns as well as the current
   ` (n)` pattern.

4. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `_n` pattern. See code comments for details.

5. Keyman.Configuration.System.TIPMaintenance.pas: Avoid crashing if
   `kmshell -install-tips-for-packages` is passed an invalid package
   name.

The crash is actually fixed in point 5 above, but the root causes are
addressed in the other points.
2021-04-19 08:25:31 +10:00
Darcy Wong
eaabf2bfa8 chore(windows): Check in crowdin for "id" 2021-04-07 08:35:38 +07:00
Darcy Wong
d9e8a72597 fix(developer): Reduce non-canonical BCP 47 tag warning
In PackageInfoRefreshLexicalModels.ps. reduce non-canonical BCP 47 tag warning to "info" so they do not block the build.
2021-04-05 11:06:13 +07:00
Darcy Wong
41745a7b0d chore(common): Check in crowdin for Fulah 2021-04-01 09:12:31 +07:00
Marc Durdin
d1dd8b022e fix(developer): buffer size for range expansions
Fixes #4830.

There remain some additional buffer size checks we should be doing in
`GetXString` but this will address the current issue by using the
standard maximum buffer size.
2021-03-31 19:10:12 +11:00
Marc Durdin
3d943c7f1c
Merge pull request #4814 from keymanapp/fix/developer/4810-requote-font-names
fix(developer): requote font names
2021-03-30 13:30:45 +11:00
Marc Durdin
071bfd9011 fix(developer): requote font names
Fixes #4810.
2021-03-29 20:53:12 +11:00
Marc Durdin
e9e98010af fix(developer): open containing folder was not opening correct folder
Fixes #4773.
2021-03-25 06:44:22 +11:00
Marc Durdin
2563189bfa fix(windows): Change TLangSwitchRefreshWatcher ownership
Fixes #4751.
Fixes KEYMAN-WINDOWS-76.
Fixes KEYMAN-WINDOWS-79.
Fixes KEYMAN-WINDOWS-7B.
Fixes KEYMAN-WINDOWS-7E.
Fixes KEYMAN-WINDOWS-7F.
Fixes KEYMAN-WINDOWS-7K.
Fixes KEYMAN-WINDOWS-7N.
Fixes KEYMAN-WINDOWS-80.

This resolves an issue where the TLangSwitchRefreshWatcher thread would
terminate early on Win7 (as it had no work to do), and free itself, but
then the main form would reference it post-free. Responsibility for free
has been moved to the main form.

This would result in various exceptions as state is corrupted at this
point.
2021-03-23 08:57:24 +11:00
Marc Durdin
bec6be0329
Merge pull request #4726 from keymanapp/fix/windows/4724-avoid-double-start-during-setup
fix(windows): Avoid double start during setup
2021-03-19 20:57:58 +11:00
Marc Durdin
4e518f660d fix(windows): backup start with windows value during setup
The value is not restored for upgrades unless we back it up, because
Setup does not change these settings if they are not present :)
2021-03-19 14:40:16 +11:00
Marc Durdin
1f3d71611f fix(windows): ensure profiles are reinstalled during setup
Fixes #4725.
2021-03-19 14:26:36 +11:00
Marc Durdin
b97fc4c82c fix(windows): Avoid double start during setup
Fixes #4724.
2021-03-19 14:24:55 +11:00
Marc Durdin
7b032aff26
Merge pull request #4717 from keymanapp/chore/windows/finalize-help
chore(windows): finalize help
2021-03-18 18:50:50 +11:00
Marc Durdin
7c67ffd93c chore(windows): finalize help 2021-03-18 16:39:24 +11:00
Marc Durdin
96939521b1 fix(windows): Download keyboard dialog TLS protocol support
Fixes #4709.
2021-03-18 14:24:44 +11:00
Marc Durdin
5eb0aec0e8
Merge pull request #4691 from keymanapp/fix/developer/named-code-constants-end-of-line-test
fix(developer): support named character codes at end of line
2021-03-16 23:26:03 +11:00
Marc Durdin
9ae541940a
Merge pull request #4699 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
chore(developer): upgrade bcp 47 canonicalisation to warning
2021-03-16 23:25:28 +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
aa8538a8d9
Merge pull request #4689 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
fix(developer): validate keyboard_info should give info on non-canonical bcp47
2021-03-16 19:32:36 +11:00
Marc Durdin
5ec0dbff3b
Merge pull request #4690 from keymanapp/fix/developer/mnemoniclayout-and-casedkeys-not-compatible
fix(developer): &CasedKeys and &MnemonicLayout are not compatible together
2021-03-16 17:19:47 +11:00
Marc Durdin
eeeda6195b
Merge pull request #4681 from keymanapp/fix/windows/4520-setup-start-keyman-only-if-not-running
fix(windows): start Keyman after setup only if not running
2021-03-16 17:17:38 +11:00
Marc Durdin
a01000ba4b chore(developer): update tests 2021-03-16 16:56:43 +11:00
Marc Durdin
12184f1857 fix(developer): support named character codes at end of line
If a named character code was followed by a `\n`, it would not be
recognised.
2021-03-16 13:49:55 +11:00
Marc Durdin
4f958985a0 fix(developer): &CasedKeys and &MnemonicLayout are not compatible together
The test for `&mnemoniclayout` was incorrectly failing to check the
actual state of `&casedkeys`, which broke all mnemonic layouts.
2021-03-16 13:46:34 +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
aebfdecf7a chore(windows): breadcrumbs
Some of our Sentry reports are difficult to track down. Adding user
interaction breadcrumbs to Keyman Configuration (to start with) may
simplify this. I may add more breadcrumbs to other projects now that
this is available.
2021-03-16 06:57:57 +11:00
Marc Durdin
bd4f5b5c67 fix(windows): start Keyman after setup only if not running
Fixes #4520.

Start Keyman after Setup finishes only if Keyman is not already running.

The pattern in this code change is found in a few places. It would be
nice to centralise that in a unit somewhere but I don't want to do
that much refactoring at this point in beta.
2021-03-16 05:32:34 +11:00
Marc Durdin
49f4514b1a
Merge pull request #4663 from keymanapp/fix/windows/4447-trigger-language-sync
fix(windows): Trigger language sync after changes
2021-03-16 05:20:29 +11:00