Commit graph

245 commits

Author SHA1 Message Date
Shawn Schantz
f97edc7d2c
Merge pull request #6088 from keymanapp/fix/mac/6081-localize-keyboard-info
fix(mac): externalize strings for package info window localization
2022-01-17 10:44:02 +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
sgschantz
fe6edeef39 add new Khmer strings, fix comments for localization 2022-01-10 13:22:13 +07:00
sgschantz
60c32cff22 externalize package info strings and rename a few elements 2022-01-08 12:46:40 +07:00
Darcy Wong
be64b53518
Merge pull request #6040 from keymanapp/chore/common/crowdin-update-am-mac
chore(common): Update crowdin strings for Amharic 📜
2022-01-05 16:32:52 +07:00
sgschantz
b4a608e9a0 updated Mac project to use Amharic localization strings 2021-12-17 13:43:38 +07:00
Darcy Wong
c5238f026e chore(common): Check in crowdin strings for Waha 2021-12-15 15:57:26 +07:00
Darcy Wong
2a2ed6c01a chore(common): Update crowdin strings for Amharic 2021-12-13 13:38:00 +07:00
sgschantz
80059d9f5a keyboard list only comes from meta data, fix reading of keyboards from .inf file 2021-12-09 13:56:07 +07:00
sgschantz
0bff16a643 merge in changes from master 2021-12-09 12:25:08 +07:00
sgschantz
589471e72e updated for review comments, fixed issue with keyboard info not loading from json data 2021-12-08 16:07:10 +07:00
sgschantz
1b27d2b09a moved package reading out of app delegate to separate class KMPackageReader, conformed to code style guidelines 2021-12-07 15:24:17 +07:00
sgschantz
4e5213aa64 added builders for package and keyboard value objects 2021-12-01 13:21:38 +07:00
sgschantz
d2ed35ac20 displaying fonts, getting package name from json.kmp first, then kmp.inf 2021-11-30 14:54:51 +07:00
sgschantz
5642b02d35 displaying all package info in info window, except fonts 2021-11-26 16:25:54 +07:00
sgschantz
96c78752b5 load Keyman Package information from kmp.json file and store in new PackageInfo object rather than in existing Dictionary hierarchy 2021-11-25 17:09:01 +07:00
Shawn Schantz
7ee95bced2
Merge pull request #5869 from keymanapp/feat/mac/i18n
feat(mac): i18n, support localization of Keyman for Mac
2021-11-22 12:44:33 +07:00
Marc Durdin
450f9e74c3 chore: move ocmock dependency to tests 2021-11-18 14:43:28 +11:00
Marc Durdin
f070bfbea6 fix(mac): use xcframework to support m1 2021-11-18 12:03:52 +11:00
sgschantz
0c152a3b29 updated localization string comments from generated defaults to provide context to translators 2021-11-16 13:24:53 +07:00
sgschantz
d442e9613b removed a few strings not necessary for localization 2021-11-11 13:00:29 +07:00
sgschantz
3dca46263b remove < and > from help buttons and capitalize Download Keyboard button 2021-11-01 15:44:25 +07:00
sgschantz
fec69e6bd8 deleted unused localization string for Keyman in About window 2021-11-01 15:16:28 +07:00
sgschantz
2c5ff2b62a renamed method that gets package name from inf file 2021-11-01 12:01:11 +07:00
sgschantz
19e3fef47b changed layout of About window to use StackView so that text will adjust based on size 2021-10-28 15:23:03 +07:00
sgschantz
9c59ee0de6 updated strings for About and Help windows 2021-10-27 16:51:41 +07:00
Shawn Schantz
534dc8c8e1 added Khmer localization, changed English to en, added help and info view localizations 2021-10-27 11:08:22 +07:00
Shawn Schantz
0f8a0a8216 project change for Localizable.strings 2021-10-14 16:10:22 +07:00
Shawn Schantz
bcefd63716 set localizable.strings to be localizable 2021-10-14 16:07:51 +07:00
Shawn Schantz
0b16eeff80 externalize strings for alerts and download status 2021-10-14 14:28:45 +07:00
Shawn Schantz
163446be06 enabled support for i18n and externalized alert strings 2021-10-13 14:31:30 +07:00
Marc Durdin
3219b44624 chore: sentry.io dsn 2021-10-04 15:01:36 +11:00
Marc Durdin
f56beba185 fix(mac): kmp.inf is windows-1252
Relates to #5316.

Keyman for mac is still reading from kmp.inf, but was treating it as
UTF-8. However, it is windows-1252 encoding. This was stopping Keyman
from loading the file due to the presence of a (C) symbol.

Keyman for mac *should* be loading kmp.json. This needs to be addressed
as a separate issues.
2021-06-22 07:08:08 +10:00
Marc Durdin
5fac633fb6 fix(common): build script help param
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
2021-05-28 09:50:40 +10:00
Marc Durdin
647c20ebc7 chore: support for xcode 12
Fixes #4994.
2021-04-29 14:30:10 +10:00
Marc Durdin
eeb8153252 fix(mac): prevent duplicate keyboards in list
Fixes #4058.
Fixes #4528.

Prevents duplicate keyboards from appearing in the list. If there are
already duplicates in the list, they will be cleaned up the next time a
keyboard is added or removed in Configuration.
2021-03-15 20:14:56 +11:00
Marc Durdin
2e4d19be99
Merge pull request #4673 from keymanapp/fix/mac/3979-local-help
fix(mac): show local help in app
2021-03-15 20:12:42 +11:00
Marc Durdin
637cc064da fix(mac): show local help in app
Fixes #3979.

Instead of loading help.keyman.com in the support frame, we now load a
local copy of the help. External links within the help will open in the
user's browser. This avoids issues of navigation to keyboard download
and other sites which won't work well.

Also, adds Back, Forward and Home buttons to the window so the user can
navigate more easily with mouse.

Finally, this means that the local help will always be synchronised with
the app version and brings the macOS help in line with the other
platforms.
2021-03-15 17:21:19 +11:00
Marc Durdin
3ba46ad07a chore(mac): missed about window 2021-03-15 16:26:34 +11:00
Marc Durdin
0f655f99b3 chore(mac): tweak close notification 2021-03-15 16:24:53 +11:00
Marc Durdin
f8e40182fe fix(mac): release window resources on close
Fixes #3972.

Ensure that window controllers are released when we close the window, so
that we are starting again when we want to use the window again in the
future.

There are a number of ugly patterns in this code, but fixing those is
outside scope for the beta.
2021-03-15 16:05:26 +11:00
Marc Durdin
0c01f7c41d fix(mac): register configuration window on load
Fixes #3945.

When the configuration window is opened via `showPreferences`, we were
not aware that the configuration window had been opened, so subsequent
references to it would recreate it.
2021-03-15 14:59:30 +11:00
Marc Durdin
be544f49a7 fix(mac): Handle duplicate filenames for packages
If multiple copies of a package are saved by a browser, the browser will
typically append a ` (#)` to the filename, where `#` is a number. This
should be stripped off before installation to prevent duplicates of the
package being installed.

Fixes #2488.
2020-11-26 14:44:38 +11:00
Marc Durdin
01b192796a feat(mac): user-controllable legacy app list
Fixes #1953.

Makes it possible to specify additional apps that need 'legacy' handling
without requiring an updated build of Keyman for Mac. The list should be
stored in user defaults under the `KMLegacyApps` key. It can be viewed
with the command:

```
defaults read keyman.inputmethod.Keyman KMLegacyApps
```

And updated with

```
defaults write keyman.inputmethod.Keyman KMLegacyApps -array value1 value2 ...
defaults write keyman.inputmethod.Keyman KMLegacyApps -array-add value1 value2 ...
```

Each entry should be a regex that matches the client app id.

For example:

```
defaults write keyman.inputmethod.Keyman KMLegacyApps -array com.microsoft.Word '^com.github.atom$'
```

(Note for purity, the `.` should be escaped in the regex but it'll
actually be fine without...)

This commit also adds the `keymanDataPath` method on
`KMInputMethodAppDelegate`, so we can place additional configuration
data there in the future (as opposed to in the shared config which is
less easy for users to edit.)
2020-11-25 16:56:52 +11:00
Marc Durdin
daff70bebf fix(mac): arrow keys now reset context
Fixes #3939.

Arrow keys, function keys and a handful of other keys should trigger a
context reload (for legacy apps, that means a context flush). This means
that deadkeys are also flushed when any of these keys are pressed, in
the same way as a Command key or a mouse click already did.
2020-11-25 13:15:12 +11:00
Marc Durdin
6a4038497b
Merge pull request #3944 from keymanapp/fix/mac/3935-legacy-mode-for-java
fix(mac): turn on legacy mode for Java apps
2020-11-25 12:50:03 +11:00
Marc Durdin
044631cd54 fix(mac): turn on legacy mode for Java apps
Relates to #3935.

This switches Java apps into legacy mode. However, Java itself will need
patching to support Keyman, as it makes assumptions about input methods,
including matching specific input methods by name, before enabling its
complex text support.

I am in process of submitting a bug report and may try and submit a
patch (although the process seems a little convoluted). It requires a
change to a single file, AWTView.m, with the following diff (against
JDK 16.0):

diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
index 3e80b5a6cf3..2ae1f4f3f12 100644
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
@@ -263,6 +263,16 @@ - (void) keyDown: (NSEvent *)event {
     fProcessingKeystroke = YES;
     fKeyEventsNeeded = YES;

+    if([(NSString *)kbdLayout containsString:@"keyman"]) {
+        // Keyman handles all key events; none should be
+        // passed through as default before Keyman processes them
+        fKeyEventsNeeded = NO;
+    }
     // Allow TSM to look at the event and potentially send back NSTextInputClient messages.
     [self interpretKeyEvents:[NSArray arrayWithObject:event]];

@@ -960,7 +989,9 @@ - (void) insertText:(id)aString replacementRange:(NSRange)replacementRange

     if ((utf16Length > 2) ||
         ((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) ||
-        ((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) {
+        ((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"])) ||
+        ([(NSString *)kbdLayout containsString:@"keyman"])
+        ) {
         aStringIsComplex = YES;
     }
2020-11-25 09:59:10 +11:00
Marc Durdin
258fed6511 fix: wrong variable type 2020-11-24 08:04:30 +11:00
Marc Durdin
e41df6f838 fix(mac): re-sign files post plist update
Cleans up a bunch of bits and pieces around the build process and makes
sure that files are re-signed after we update the Info.plist file.
2020-11-24 08:02:16 +11:00
Marc Durdin
e1627260f3 chore(mac): use new keyboard install page
Fixes #3898.

This reworks the keyboard download window to use the new keyboard
install page and url pattern. Some refactoring of the downloadKeyboard
method was required to handle the new download patterns.
2020-11-20 13:39:12 +11:00