Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

將鼠鬚管就簡體輸入法與繁體輸入法分類各自分為一個輸入法副本。 #648

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 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>
ShikiSuen marked this conversation as resolved.
Show resolved Hide resolved
<string>im.rime.inputmethod.Squirrel.Rime</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand All @@ -24,18 +26,42 @@
<dict>
<key>tsInputModeListKey</key>
<dict>
<key>im.rime.inputmethod.Squirrel</key>
ShikiSuen marked this conversation as resolved.
Show resolved Hide resolved
<key>im.rime.inputmethod.Squirrel.Rime.Hans</key>
<dict>
<key>TISInputSourceID</key>
<string>im.rime.inputmethod.Squirrel.Rime</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.Rime.Hant</key>
<dict>
<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 +81,8 @@
</dict>
<key>tsVisibleInputModeOrderedArrayKey</key>
<array>
<string>im.rime.inputmethod.Squirrel.Rime</string>
ShikiSuen marked this conversation as resolved.
Show resolved Hide resolved
<string>im.rime.inputmethod.Squirrel.Rime.Hans</string>
<string>im.rime.inputmethod.Squirrel.Rime.Hant</string>
</array>
</dict>
<key>InputMethodConnectionName</key>
Expand All @@ -82,8 +109,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
Expand Up @@ -2,7 +2,9 @@

NSHumanReadableCopyright = "Copyleft 2017, RIME Developers";

im.rime.inputmethod.Squirrel = "Squirrel";
im.rime.inputmethod.Squirrel.Rime = "Squirrel";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's simplify im.rime.inputmethod.Squirrel.Rime to im.rime.inputmethod.Squirrel, drop .Rime everywhere in the IDs. because im.rime.inputmethod.Squirrel is also the bundle identifier, so this string can also serve as localized app name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take this in merging code.

im.rime.inputmethod.Squirrel.Rime.Hans = "Squirrel-Hans";
im.rime.inputmethod.Squirrel.Rime.Hant = "Squirrel-Hant";

CFBundleName = "Squirrel";
CFBundleDisplayName = "Squirrel";
4 changes: 2 additions & 2 deletions input_source.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
static const unsigned char kInstallLocation[] =
"/Library/Input Methods/Squirrel.app";
static NSString *const kSourceID =
@"im.rime.inputmethod.Squirrel";
static NSString *const kInputModeID =
@"im.rime.inputmethod.Squirrel.Rime";
static NSString *const kInputModeID =
@"im.rime.inputmethod.Squirrel.Rime.Hans";
ShikiSuen marked this conversation as resolved.
Show resolved Hide resolved

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
Expand Up @@ -2,7 +2,9 @@

NSHumanReadableCopyright = "Copyleft 2017, 式恕堂";

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

CFBundleName = "鼠须管";
CFBundleDisplayName = "鼠须管";
4 changes: 3 additions & 1 deletion zh-Hant.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

NSHumanReadableCopyright = "Copyleft 2017, 式恕堂";

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

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