Commit graph

717 commits

Author SHA1 Message Date
Darcy Wong
7773cdfe22 chore(common): Add crowdin strings for Polish 2022-05-09 12:41:36 +07:00
Darcy Wong
384f8befcb chore(common): Add crowdin strings for Italian 2022-05-09 11:04:12 +07:00
Darcy Wong
04985017ab
Merge pull request #6562 from keymanapp/chore/common/crowdin-ff-2
chore(common): Update Crowdin strings for Fula
2022-04-29 14:15:08 +07:00
Eberhard Beilharz
2d09619d51
fix(linux): Fix shared keyboard (un-)installation in Bionic
Ubuntu 18.04 Bionic comes with an older Python version (3.6) that
doesn't support the `capture_output` parameter on `subprocess.run`
which leads to a crash when installing or uninstalling keyboads to
the shared area. This change works around the problem by calling
a different method on Bionic.

Fixes #6564.
2022-04-25 18:04:30 +02:00
Darcy Wong
e3e8e63a27 chore(common): Update Crowdin strings for Fula 2022-04-25 14:34:44 +07:00
Eberhard Beilharz
1cb0d48671
Merge pull request #6529 from keymanapp/chore/linux/l10n
chore(linux): Fix l10n language mappings
2022-04-14 09:13:02 +02:00
Darcy Wong
1e42d360c6
Merge pull request #6509 from keymanapp/chore/common/crowdin-pt
chore(common): Add Crowdin strings for Portuguese (pt-PT)
2022-04-14 06:11:02 +07:00
Eberhard Beilharz
6388afadce
chore(linux): Fix l10n language mappings
Also rename the .po files to match the new mappings:

- `bwr_NT.po` -> `brw_NG.po`: the language shows up as `bwr-ng` in
  Crowdin, and there's no `NT` country code.
- `ha_HG.po` -> `ha.po`: the language shows up as `ha` in Crowdin and
  there's no `HG` country code.
- `shu_latn.po` -> `shu@latin.po`: the convention seems to be to put
  the script after `@` sign.
2022-04-13 11:44:06 +02:00
Eberhard Beilharz
5eb82d70a2
Merge pull request #6522 from keymanapp/fix/linux/6256-fileVersion
fix(linux): test fileVersion during package install
2022-04-13 10:10:02 +02:00
Eberhard Beilharz
4c1f6e7be2
fix(linux): Refactor and fix tests
- patch `is_fcitx_running()` so that tests will work without X11
- move common test code to methods
- move some tests to subtests
2022-04-12 12:09:55 +02:00
Eberhard Beilharz
ad2a6b713f
fix(linux): test fileVersion during package install
Fixes #6256
2022-04-11 18:22:46 +02:00
Eberhard Beilharz
3eb4b58a58
fix(linux): Remove tab completion warning
This is done by replacing the deprecated `imp` module.

Fixes #6227.
2022-04-11 16:30:22 +02:00
Darcy Wong
6b2a71a76e
Merge pull request #6501 from keymanapp/chore/common/crowdin-km-spacebar
chore(common): Update km strings
2022-04-11 15:12:19 +07:00
Darcy Wong
f0e41833c4 chore(common): Add Crowdin strings for Portuguese 2022-04-08 11:36:18 +07:00
Darcy Wong
8770c705cb chore(common): Update Crowding strings for Azerbaijani 2022-04-08 10:01:23 +07:00
Darcy Wong
45ca87dae1 chore(common): Update km strings 2022-04-07 21:58:07 +07:00
Darcy Wong
5bcac1b1bf chore(common): Update crowdin strings for km 2022-03-31 20:59:07 +07:00
Darcy Wong
2d52719a00 chore(common): Update Hausa strings 2022-03-18 08:24:55 +07:00
Eberhard Beilharz
27c7ed025f
Merge pull request #6283 from keymanapp/fix/linux/6237-ibus
fix(linux): Don't start ibus-daemon multiple times 🚌
2022-03-15 18:55:28 +01:00
Eberhard Beilharz
0c78e44eda
chore(linux): Remove debug output 2022-03-15 17:53:46 +01:00
Eberhard Beilharz
cc0317af2c
fix(linux): Don't use restart option of exit()
Instead of trying to restart ibus by passing True to bus.exit()
we now exit ibus and then let verify_ibus_daemon() start it again.
Also added additional checks to verify that we're not running
multiple ibus-daemons at the start of km-config and before
restarting.
2022-03-11 18:14:02 +01:00
Eberhard Beilharz
412a9ea2fc
chore(linux): Fix another lintian warning 2022-03-11 09:24:38 +01:00
Eberhard Beilharz
4cad24cac3
chore(linux): Fix lintian warnings 2022-03-10 20:30:44 +01:00
Eberhard Beilharz
e6cf0327b7
chore(linux): Small improvements
- output error if more than one ibus-daemon is running
- log Keyman version after starting km-config
2022-03-09 18:37:59 +01:00
Eberhard Beilharz
92395ec1f6
fix(linux): Add some debug output 2022-03-08 17:43:19 +01:00
Eberhard Beilharz
e30c00733a
fix(linux): Don't start ibus-daemon multiple times
This change adds a 1s sleep after restarting ibus before checking
that it actually runs. Hopefully this will solve the problem. Since
this bug is hard to reproduce, we also log a critical error for the
other code path this could happen.

Fixes #6237.
2022-03-07 18:22:06 +01:00
Marc Durdin
19d8faa077
Merge pull request #6287 from keymanapp/fix/linux/6285-makedirs
fix(linux): Gracefully handle makedirs failures
2022-03-02 09:02:09 +11:00
Eberhard Beilharz
e5b9b81806
fix(linux): Gracefully handle makedirs failures
This change catches the exception we're getting if we try to create
a directory but e.g. there is already a file with that name. In this
case we now output an error message. This change also gracefully
handles failures when linking files.

Fixes #6285.
2022-02-24 18:13:03 +01:00
Eberhard Beilharz
3c8983037d
fix(linux): Gracefully handle keyboard download failure
In the past we already gracefully handled keyboard download failures
when the user triggered the download from the km-config UI. This
change deals with the command line side of things, most often when
the user clicks on the "Install keyboard" button on keyman.com. If
the download fails we already output an error message and now don't
try to install the non-existing .kmp file.

Fixes #6284.
2022-02-24 17:38:23 +01:00
Eberhard Beilharz
e47ff34587
chore(linux): Improve message when updating to a newer version
When trying to install a keyboard with `km-package-install` and
the same version was already installed or a newer version was
available and would be installed we now output a simple message
instead of an error.
2022-02-23 17:03:00 +01:00
Eberhard Beilharz
96ae4387ef
fix(linux): Properly compare versions in km-package-install
This change will fix a bug with comparing version numbers with more
than two sections (e.g. '1.2.3').

Fixes #6182.
2022-02-22 20:03:49 +01:00
Eberhard Beilharz
f22dfe608b
Merge pull request #6241 from keymanapp/fix/linux/6240-man
fix(linux): Fix stray `[-vv]` in man pages
2022-02-21 15:46:20 +07:00
Eberhard Beilharz
31170e8f94 fix(linux): Fix stray [-vv] in man pages
Additionally, don't print the date in the footer. This often overlaps
with the program name and version.

Also print usage in addition to error if wrong arguments are given.

Fixes #6240.
2022-02-18 14:15:17 +07:00
Darcy Wong
3237a4c6ae chore(common): Update French strings 2022-02-18 10:06:33 +07:00
Eberhard Beilharz
6cac869d0b
feat(linux): Try to start ibus if not running
When we try to restart ibus and that fails and ibus isn't running
afterwards we directly try to start ibus-daemon.

On Ubuntu 21.10 Impish there are two `ibus-daemon` processes
running for the current user. One of them has the `--xim` flag
and is the one we care about. This change improves the detection
that ibus is running after installing a keyboard.
2022-02-07 16:44:26 +01:00
Eberhard Beilharz
9cae5a4ab4
Merge pull request #6159 from keymanapp/fix/linux/6158-install-in-wasta
fix(linux): Don't crash when installing keyboards in Wasta
2022-02-02 09:27:56 +01:00
Eberhard Beilharz
85d33cefcf
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-01-31 16:21:49 +01:00
Eberhard Beilharz
0b8e628812
chore(linux): Improve robustness
Don't crash if we encounter a corrupt file.
2022-01-28 18:37:55 +01:00
Eberhard Beilharz
685eaa6ffc
fix(linux): Don't crash if we lack permissions
Also deal with other file I/O related exceptions and report them
as warnings.

This fixes #6171.
2022-01-28 18:37:54 +01:00
Eberhard Beilharz
c42a623f38
fix(linux): Don't crash when installing keyboards in Wasta
Fixes #6158. This bug got introduced in #6015.
2022-01-27 17:22:02 +01:00
Eberhard Beilharz
072481198e
chore(linux): Add comment for clarification of code behaviour 2022-01-24 11:55:45 +01:00
Darcy Wong
24364dc5af
Merge pull request #6048 from keymanapp/chore/common/crowdin-ckl
chore(common): Check in crowdin strings for Kibaku 📜
2022-01-17 10:28:54 +07:00
Darcy Wong
c5178649e6
Merge pull request #6050 from keymanapp/chore/common/crowdin-hia
chore(common): Check in crowdin strings for Waha 📜
2022-01-14 12:48:41 +07:00
Darcy Wong
9eb2916d51
Merge pull request #6049 from keymanapp/chore/common/crowdin-mrt
chore(common): Check in crowdin strings for Marghi 📜
2022-01-13 15:04:34 +07:00
Darcy Wong
065fdbc434
Merge pull request #6047 from keymanapp/chore/common/crowdin-kr
chore(common): Check in crowdin strings for Kanuri 📜
2022-01-12 09:42:07 +07:00
Eberhard Beilharz
88ef184cc2
Merge pull request #6086 from keymanapp/fix/linux/issue-6085-requests_cache
fix(linux): Fix attribute error
2022-01-11 08:23:05 +01:00
Eberhard Beilharz
4876497fe8
Merge pull request #6070 from keymanapp/feat/linux/sentry
feat(linux): Don't create Sentry events for errors
2022-01-11 08:22:36 +01:00
Eberhard Beilharz
c269d12ec7
Merge pull request #6015 from keymanapp/fix/linux/issue-5311-sharedinstall
fix(linux): Fix installation of shared packages
2022-01-10 18:16:57 +01:00
Eberhard Beilharz
254ceabe78
fix(linux): Fix attribute error
Newer versions of requests-cache (>= 0.6) restructure some code so
that the _core_ namespace is no longer available. However, it turns
out that we don't need to specify that namespace at all, so this
change will work with both older and newer versions of
requests-cache.

This will fix #6085.
2022-01-07 17:22:53 +01:00
Eberhard Beilharz
79244650b1
feat(linux): Don't create Sentry critical events for handled errors
We don't want to send events to Sentry for errors that we handled.
2022-01-06 18:43:28 +01:00