Skip to content

Commit 3991704

Browse files
committed
reenable zh-Hans
1 parent 1d4b909 commit 3991704

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

assets/en.lproj/InfoPlist.strings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CFBundleName = "Fcitx5";
22
CFBundleDisplayName = "Fcitx5";
33
org.fcitx.inputmethod.fcitx5 = "Fcitx5";
4+
org.fcitx.inputmethod.zhHans = "Fcitx5";

assets/update.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,28 @@ cd "$RESOURCES_DIR"
2323
su -m "$user" -c "./switch_im com.apple.keylayout.ABC"
2424
su -m "$user" -c "./switch_im com.apple.keylayout.US"
2525
killall Fcitx5
26+
27+
# This input source ID comes from Carbon API:
28+
# import Carbon
29+
30+
# let bundleId = "org.fcitx.inputmethod.Fcitx5"
31+
# let conditions = NSMutableDictionary()
32+
# conditions.setValue(bundleId, forKey: kTISPropertyBundleID as String)
33+
# if let array = TISCreateInputSourceList(conditions, true)?.takeRetainedValue()
34+
# as? [TISInputSource]
35+
# {
36+
# for inputSource in array {
37+
# if let ptr = TISGetInputSourceProperty(inputSource, kTISPropertyInputSourceID) {
38+
# let inputSourceID = Unmanaged<CFString>.fromOpaque(ptr).takeUnretainedValue() as String
39+
# print(inputSourceID)
40+
# }
41+
# }
42+
# }
43+
44+
# The rule to construct seems:
45+
# org.fcitx.inputmethod.Fcitx5 is our CFBundleIdentifier;
46+
# The rest is the keys under tsInputModeListKey trimming the org.fcitx.inputmethod.
47+
48+
# Not sure which one so try both.
2649
su -m "$user" -c "./switch_im org.fcitx.inputmethod.Fcitx5.fcitx5"
50+
su -m "$user" -c "./switch_im org.fcitx.inputmethod.Fcitx5.zhHans"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CFBundleName = "小企鹅";
22
CFBundleDisplayName = "小企鹅";
33
org.fcitx.inputmethod.fcitx5 = "小企鹅";
4+
org.fcitx.inputmethod.zhHans = "小企鹅";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CFBundleName = "小企鵝";
22
CFBundleDisplayName = "小企鵝";
33
org.fcitx.inputmethod.fcitx5 = "小企鵝";
4+
org.fcitx.inputmethod.zhHans = "小企鵝";

cmake/MacOSXBundleInfo.plist.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
<dict>
3434
<key>org.fcitx.inputmethod.fcitx5</key>
3535
<dict>
36+
<!-- register as English to enable on browser password field/Terminal sudo password input -->
37+
<key>tsInputModeMenuIconFileKey</key>
38+
<string>menu_icon.pdf</string>
39+
<key>tsInputModeAlternateMenuIconFileKey</key>
40+
<string>menu_icon.pdf</string>
41+
<key>tsInputModePaletteIconFileKey</key>
42+
<string>menu_icon.pdf</string>
43+
</dict>
44+
<key>org.fcitx.inputmethod.zhHans</key>
45+
<dict>
46+
<!-- register as Chinese to disable on browser password field/Terminal sudo password input -->
47+
<key>TISIntendedLanguage</key>
48+
<string>zh-Hans</string>
3649
<key>tsInputModeMenuIconFileKey</key>
3750
<string>menu_icon.pdf</string>
3851
<key>tsInputModeAlternateMenuIconFileKey</key>

0 commit comments

Comments
 (0)