Skip to content

Commit

Permalink
feat: 將鼠鬚管分別註冊到簡體中文和繁體中文輸入法之列
Browse files Browse the repository at this point in the history
Closes #648

Squashed commit of the following:

commit 7badb6e
Author: ShikiSuen <shikisuen@outlook.com>
Date:   Mon Jul 25 22:30:40 2022 +0800

    Repo // Fix input source ID mistakes.

commit fb37e2b
Author: ShikiSuen <shikisuen@outlook.com>
Date:   Thu Jul 7 21:06:42 2022 +0800

    IMK // Attempt to only register Squirrel-Hans during installation.

commit 07ed7b0
Author: ShikiSuen <shikisuen@outlook.com>
Date:   Tue Jun 28 23:42:39 2022 +0800

    Info.plist // Apply Lotem's naming for instances.

commit d6f3e6c
Author: ShikiSuen <shikisuen@outlook.com>
Date:   Tue Jun 28 14:06:24 2022 +0800

    Info.plist // Set both CHS and CHT instances of Squirrel.
  • Loading branch information
ShikiSuen authored and lotem committed Jul 25, 2022
1 parent f4d7210 commit 5b981dc
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 12 deletions.
48 changes: 40 additions & 8 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>TISInputSourceID</key>
<string>im.rime.inputmethod.Squirrel</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -24,18 +26,46 @@
<dict>
<key>tsInputModeListKey</key>
<dict>
<key>im.rime.inputmethod.Squirrel</key>
<key>im.rime.inputmethod.Squirrel.Hans</key>
<dict>
<key>TISInputSourceID</key>
<string>im.rime.inputmethod.Squirrel.Rime</string>
<string>im.rime.inputmethod.Squirrel.Hans</string>
<key>TISIntendedLanguage</key>
<string>zh</string>
<string>zh-Hans</string>
<key>tsInputModeAlternateMenuIconFileKey</key>
<string>rime.pdf</string>
<key>tsInputModeCharacterRepertoireKey</key>
<array>
<string>zh-Hans</string>
<string>zh-Hant</string>
<string>Hans</string>
<string>Han</string>
</array>
<key>tsInputModeDefaultStateKey</key>
<true/>
<key>tsInputModeIsVisibleKey</key>
<true/>
<key>tsInputModeKeyEquivalentModifiersKey</key>
<integer>4608</integer>
<key>tsInputModeMenuIconFileKey</key>
<string>rime.pdf</string>
<key>tsInputModePaletteIconFileKey</key>
<string>rime.pdf</string>
<key>tsInputModePrimaryInScriptKey</key>
<true/>
<key>tsInputModeScriptKey</key>
<string>smUnicodeScript</string>
</dict>
<key>im.rime.inputmethod.Squirrel.Hant</key>
<dict>
<key>TISInputSourceID</key>
<string>im.rime.inputmethod.Squirrel.Hant</string>
<key>TISIntendedLanguage</key>
<string>zh-Hant</string>
<key>tsInputModeAlternateMenuIconFileKey</key>
<string>rime.pdf</string>
<key>tsInputModeCharacterRepertoireKey</key>
<array>
<string>Hant</string>
<string>Han</string>
</array>
<key>tsInputModeDefaultStateKey</key>
<true/>
Expand All @@ -55,7 +85,8 @@
</dict>
<key>tsVisibleInputModeOrderedArrayKey</key>
<array>
<string>im.rime.inputmethod.Squirrel.Rime</string>
<string>im.rime.inputmethod.Squirrel.Hans</string>
<string>im.rime.inputmethod.Squirrel.Hant</string>
</array>
</dict>
<key>InputMethodConnectionName</key>
Expand All @@ -82,8 +113,9 @@
<true/>
<key>tsInputMethodCharacterRepertoireKey</key>
<array>
<string>zh-Hans</string>
<string>zh-Hant</string>
<string>Hans</string>
<string>Hant</string>
<string>Han</string>
</array>
<key>tsInputMethodIconFileKey</key>
<string>rime.pdf</string>
Expand Down
4 changes: 3 additions & 1 deletion en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* Localized versions of Info.plist keys */

NSHumanReadableCopyright = "Copyleft 2017, RIME Developers";
NSHumanReadableCopyright = "Copyleft, RIME Developers";

im.rime.inputmethod.Squirrel = "Squirrel";
im.rime.inputmethod.Squirrel.Hans = "Squirrel - Simplified";
im.rime.inputmethod.Squirrel.Hant = "Squirrel - Traditional";

CFBundleName = "Squirrel";
CFBundleDisplayName = "Squirrel";
2 changes: 1 addition & 1 deletion input_source.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
static NSString *const kSourceID =
@"im.rime.inputmethod.Squirrel";
static NSString *const kInputModeID =
@"im.rime.inputmethod.Squirrel.Rime";
@"im.rime.inputmethod.Squirrel.Hans";

void RegisterInputSource() {
CFURLRef installedLocationURL = CFURLCreateFromFileSystemRepresentation(
Expand Down
4 changes: 3 additions & 1 deletion zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* Localized versions of Info.plist keys */

NSHumanReadableCopyright = "Copyleft 2017, 式恕堂";
NSHumanReadableCopyright = "式恕堂 版权所无";

im.rime.inputmethod.Squirrel = "鼠须管";
im.rime.inputmethod.Squirrel.Hans = "鼠须管";
im.rime.inputmethod.Squirrel.Hant = "鼠鬚管";

CFBundleName = "鼠须管";
CFBundleDisplayName = "鼠须管";
4 changes: 3 additions & 1 deletion zh-Hant.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* Localized versions of Info.plist keys */

NSHumanReadableCopyright = "Copyleft 2017, 式恕堂";
NSHumanReadableCopyright = "式恕堂 版權所無";

im.rime.inputmethod.Squirrel = "鼠鬚管";
im.rime.inputmethod.Squirrel.Hans = "鼠须管";
im.rime.inputmethod.Squirrel.Hant = "鼠鬚管";

CFBundleName = "鼠鬚管";
CFBundleDisplayName = "鼠鬚管";

0 comments on commit 5b981dc

Please sign in to comment.