Merge pull request !4 from ShikiSuen/upd/1.3.7
This commit is contained in:
ShikiSuen 2022-03-08 06:33:25 +00:00 committed by Gitee
commit b854074650
66 changed files with 2242 additions and 981 deletions

View File

@ -21,9 +21,10 @@ import Foundation
// MARK: -
fileprivate extension String {
mutating func regReplace(pattern: String, replaceWith: String = "") {
// Ref: https://stackoverflow.com/a/40993403/4162914 && https://stackoverflow.com/a/71291137/4162914
do {
let regex = try NSRegularExpression(pattern: pattern, options: .caseInsensitive)
let range = NSRange(location: 0, length: count)
let range = NSRange(location: 0, length: self.utf16.count)
self = regex.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: replaceWith)
} catch { return }
}
@ -117,16 +118,13 @@ func rawDictForPhrases(isCHS: Bool) -> [Entry] {
}
//
strRAW = strRAW.replacingOccurrences(of: " #MACOS", with: "") // macOS
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // CJKWhiteSpace (\x{3000}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // NonBreakWhiteSpace (\x{A0}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: "\t", with: " ") // Tab to ASCII Space
strRAW.regReplace(pattern: "\\f", replaceWith: "\n") // Form Feed to LF
strRAW = strRAW.replacingOccurrences(of: "\r", with: "\n") // CR to LF
strRAW.regReplace(pattern: " +", replaceWith: " ") // ASCII
// strRAW.regReplace(pattern: "\\n+", replaceWith: "\n") // LF LF
// ( Entry)
strRAW = strRAW.replacingOccurrences(of: " \n", with: "\n") //
strRAW = strRAW.replacingOccurrences(of: "\n ", with: "\n") //
// CJKWhiteSpace (\x{3000}) to ASCII Space
// NonBreakWhiteSpace (\x{A0}) to ASCII Space
// Tab to ASCII Space
// ASCII
strRAW.regReplace(pattern: #"( +| +| +|\t+)+"#, replaceWith: " ")
strRAW.regReplace(pattern: #"(\f+|\r+)+"#, replaceWith: "\n") // CR & Form Feed to LF
strRAW.regReplace(pattern: #"(\n+| \n+|\n+ )"#, replaceWith: "\n") //
if strRAW.prefix(1) == " " { //
strRAW.removeFirst()
}
@ -194,16 +192,13 @@ func rawDictForKanjis(isCHS: Bool) -> [Entry] {
}
//
strRAW = strRAW.replacingOccurrences(of: " #MACOS", with: "") // macOS
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // CJKWhiteSpace (\x{3000}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // NonBreakWhiteSpace (\x{A0}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: "\t", with: " ") // Tab to ASCII Space
strRAW.regReplace(pattern: "\\f", replaceWith: "\n") // Form Feed to LF
strRAW = strRAW.replacingOccurrences(of: "\r", with: "\n") // CR to LF
strRAW.regReplace(pattern: " +", replaceWith: " ") // ASCII
// strRAW.regReplace(pattern: "\\n+", replaceWith: "\n") // LF LF
// ( Entry)
strRAW = strRAW.replacingOccurrences(of: " \n", with: "\n") //
strRAW = strRAW.replacingOccurrences(of: "\n ", with: "\n") //
// CJKWhiteSpace (\x{3000}) to ASCII Space
// NonBreakWhiteSpace (\x{A0}) to ASCII Space
// Tab to ASCII Space
// ASCII
strRAW.regReplace(pattern: #"( +| +| +|\t+)+"#, replaceWith: " ")
strRAW.regReplace(pattern: #"(\f+|\r+)+"#, replaceWith: "\n") // CR & Form Feed to LF
strRAW.regReplace(pattern: #"(\n+| \n+|\n+ )"#, replaceWith: "\n") //
if strRAW.prefix(1) == " " { //
strRAW.removeFirst()
}
@ -276,16 +271,13 @@ func rawDictForNonKanjis(isCHS: Bool) -> [Entry] {
}
//
strRAW = strRAW.replacingOccurrences(of: " #MACOS", with: "") // macOS
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // CJKWhiteSpace (\x{3000}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: " ", with: " ") // NonBreakWhiteSpace (\x{A0}) to ASCII Space
strRAW = strRAW.replacingOccurrences(of: "\t", with: " ") // Tab to ASCII Space
strRAW.regReplace(pattern: "\\f", replaceWith: "\n") // Form Feed to LF
strRAW = strRAW.replacingOccurrences(of: "\r", with: "\n") // CR to LF
strRAW.regReplace(pattern: " +", replaceWith: " ") // ASCII
// strRAW.regReplace(pattern: "\\n+", replaceWith: "\n") // LF LF
// ( Entry)
strRAW = strRAW.replacingOccurrences(of: " \n", with: "\n") //
strRAW = strRAW.replacingOccurrences(of: "\n ", with: "\n") //
// CJKWhiteSpace (\x{3000}) to ASCII Space
// NonBreakWhiteSpace (\x{A0}) to ASCII Space
// Tab to ASCII Space
// ASCII
strRAW.regReplace(pattern: #"( +| +| +|\t+)+"#, replaceWith: " ")
strRAW.regReplace(pattern: #"(\f+|\r+)+"#, replaceWith: "\n") // CR & Form Feed to LF
strRAW.regReplace(pattern: #"(\n+| \n+|\n+ )"#, replaceWith: "\n") //
if strRAW.prefix(1) == " " { //
strRAW.removeFirst()
}
@ -343,17 +335,23 @@ func weightAndSort(_ arrStructUncalculated: [Entry], isCHS: Bool) -> [Entry] {
let fscale: Float = 2.7
var norm: Float = 0.0
for entry in arrStructUncalculated {
norm += fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * Float(entry.valCount) // Credit: MJHsieh.
if entry.valCount >= 0 {
norm += fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * Float(entry.valCount)
}
}
// norm norm
//
// 1 0 0.5
// MJHsieh MIT License
for entry in arrStructUncalculated {
let weight: Float = (entry.valCount < 1) ?
log10(fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * 0.5 / norm) // Credit: MJHsieh.
:
log10(fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * Float(entry.valCount) / norm) // Credit: MJHsieh.
var weight: Float = 0
switch entry.valCount {
case -1: //
weight = -13
case 0: //
weight = log10(fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * 0.5 / norm)
default:
weight = log10(fscale**(Float(entry.valPhrase.count) / 3.0 - 1.0) * Float(entry.valCount) / norm) // Credit: MJHsieh.
}
let weightRounded: Float = weight.rounded(toPlaces: 3) //
arrStructCalculated += [Entry.init(valPhone: entry.valPhone, valPhrase: entry.valPhrase, valWeight: weightRounded, valCount: entry.valCount)]
}

View File

@ -0,0 +1,3 @@
#!/bin/sh
killall vChewing
rm -rf ~/Library/Input\ Methods/vChewing.app

View File

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13150" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13150"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="ShareViewController" customModuleProvider="target">
<connections>
<outlet property="view" destination="1" id="2"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
<rect key="frame" x="0.0" y="0.0" width="388" height="202"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1uM-r7-H1c">
<rect key="frame" x="302" y="3" width="82" height="32"/>
<buttonCell key="cell" type="push" title="Send" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="2l4-PO-we5">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent">D</string>
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</buttonCell>
<connections>
<action selector="send:" target="-2" id="yic-EC-GGk"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NVE-vN-dkz">
<rect key="frame" x="224" y="3" width="82" height="32"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="cP1-hK-9ZX"/>
</constraints>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="6Up-t3-mwm">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="cancel:" target="-2" id="Qav-AK-DGt"/>
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aNc-0i-CWK">
<rect key="frame" x="140" y="170" width="108" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="My Service Title" id="0xp-rC-2gr">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4M6-D5-WIf">
<rect key="frame" x="110" y="170" width="22" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="22" id="BOe-aZ-Njc"/>
<constraint firstAttribute="height" constant="22" id="zLg-1a-wlZ"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="q3u-Am-ZIA"/>
</imageView>
</subviews>
<constraints>
<constraint firstItem="1uM-r7-H1c" firstAttribute="leading" secondItem="NVE-vN-dkz" secondAttribute="trailing" constant="8" id="1UO-J1-LbJ"/>
<constraint firstItem="NVE-vN-dkz" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="3N9-qo-UfS"/>
<constraint firstAttribute="bottom" secondItem="1uM-r7-H1c" secondAttribute="bottom" constant="10" id="4wH-De-nMF"/>
<constraint firstAttribute="bottom" secondItem="NVE-vN-dkz" secondAttribute="bottom" constant="10" id="USG-Gg-of3"/>
<constraint firstItem="1uM-r7-H1c" firstAttribute="leading" secondItem="NVE-vN-dkz" secondAttribute="trailing" constant="8" id="a8N-vS-Ew9"/>
<constraint firstItem="aNc-0i-CWK" firstAttribute="centerY" secondItem="4M6-D5-WIf" secondAttribute="centerY" constant="2.5" id="ilP-G0-GVG"/>
<constraint firstItem="NVE-vN-dkz" firstAttribute="width" secondItem="1uM-r7-H1c" secondAttribute="width" id="qPo-ky-Fcw"/>
<constraint firstAttribute="trailing" secondItem="1uM-r7-H1c" secondAttribute="trailing" constant="10" id="qfT-cw-QQ2"/>
<constraint firstAttribute="centerX" secondItem="aNc-0i-CWK" secondAttribute="centerX" id="uV3-Wn-RA3"/>
<constraint firstItem="aNc-0i-CWK" firstAttribute="leading" secondItem="4M6-D5-WIf" secondAttribute="trailing" constant="10" id="vFR-5i-Dvo"/>
<constraint firstItem="aNc-0i-CWK" firstAttribute="top" secondItem="1" secondAttribute="top" constant="15" id="vpR-tf-ebx"/>
</constraints>
</customView>
</objects>
</document>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-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>CFBundleIconFile</key>
<string>icon</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsText</key>
<true/>
</dict>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ShareViewController</string>
</dict>
</dict>
</plist>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-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>com.apple.security.temporary-exception.mach-register.global-name</key>
<string>org_atelierInmu_inputmethod_vChewing</string>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>

View File

@ -1,41 +0,0 @@
//
// ShareViewController.swift
// KeyboardExtension
//
// Created by ShikiSuen on 2022/2/20.
//
import Cocoa
class ShareViewController: NSViewController {
override var nibName: NSNib.Name? {
return NSNib.Name("ShareViewController")
}
override func loadView() {
super.loadView()
// Insert code here to customize the view
let item = self.extensionContext!.inputItems[0] as! NSExtensionItem
if let attachments = item.attachments {
NSLog("Attachments = %@", attachments as NSArray)
} else {
NSLog("No Attachments")
}
}
@IBAction func send(_ sender: AnyObject?) {
let outputItem = NSExtensionItem()
// Complete implementation by setting the appropriate value on the output item
let outputItems = [outputItem]
self.extensionContext!.completeRequest(returningItems: outputItems, completionHandler: nil)
}
@IBAction func cancel(_ sender: AnyObject?) {
let cancelError = NSError(domain: NSCocoaErrorDomain, code: NSUserCancelledError, userInfo: nil)
self.extensionContext!.cancelRequest(withError: cancelError)
}
}

Binary file not shown.

View File

@ -13,7 +13,7 @@
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingDachen</string>
<string>org.atelierInmu.vChewing.keyLayouts.vchewingdachen</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>
@ -22,7 +22,16 @@
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingETen</string>
<string>org.atelierInmu.vChewing.keyLayouts.vchewingeten</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>
<key>KLInfo_vChewing FakeSeigyou</key>
<dict>
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.vChewing.keyLayouts.vchewingfakeseigyou</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>
@ -31,7 +40,7 @@
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingIBM</string>
<string>org.atelierInmu.vChewing.keyLayouts.vchewingibm</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>
@ -40,16 +49,7 @@
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingMiTAC</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>
<key>KLInfo_vChewingSeigyou</key>
<dict>
<key>TICapsLockLanguageSwitchCapable</key>
<false/>
<key>TISInputSourceID</key>
<string>org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingSeigyou</string>
<string>org.atelierInmu.vChewing.keyLayouts.vchewingmitac</string>
<key>TISIntendedLanguage</key>
<string>zh-Hanb</string>
</dict>

View File

@ -1,6 +1,6 @@
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 351 on 2022-02-14 at 17:15 (GMT+8)-->
<!--Last edited by Ukelele version 351 on 2022-03-08 at 11:10 (GMT+8)-->
<keyboard group="126" id="-1524" name="vChewing Dachen" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
@ -817,6 +817,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 351 on 2022-02-14 at 17:29 (GMT+8)-->
<!--Last edited by Ukelele version 351 on 2022-03-08 at 11:10 (GMT+8)-->
<keyboard group="126" id="-2369" name="vChewing ETen" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
@ -817,6 +817,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 351 on 2022-02-14 at 17:40 (GMT+8)-->
<keyboard group="126" id="-17519" name="vChewing Seigyou" maxout="1">
<!--Last edited by Ukelele version 351 on 2022-03-08 at 13:26 (GMT+8)-->
<keyboard group="126" id="-17519" name="vChewing FakeSeigyou" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
<layout first="18" last="18" mapSet="a88" modifiers="f4"/>
@ -66,19 +66,19 @@
<key code="18" output="˙"/>
<key code="19" output="ㄅ"/>
<key code="20" output="ㄉ"/>
<key code="21" output="4"/>
<key code="21" output=""/>
<key code="22" output="ㄓ"/>
<key code="23" output="5"/>
<key code="24" output=""/>
<key code="23" output=""/>
<key code="24" output=""/>
<key code="25" output="ㄞ"/>
<key code="26" output="7"/>
<key code="27" output=""/>
<key code="26" output=""/>
<key code="27" output=""/>
<key code="28" output="ㄚ"/>
<key code="29" output="ㄢ"/>
<key code="30" output="」"/>
<key code="31" output="ㄟ"/>
<key code="32" output="ㄗ"/>
<key code="33" output=""/>
<key code="33" output=""/>
<key code="34" output="ㄛ"/>
<key code="35" output="ㄣ"/>
<key code="36" output="&#x000D;"/>
@ -492,6 +492,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>
@ -817,6 +818,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 351 on 2022-02-14 at 17:36 (GMT+8)-->
<!--Last edited by Ukelele version 351 on 2022-03-08 at 11:10 (GMT+8)-->
<keyboard group="126" id="-28630" name="vChewing IBM" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
@ -817,6 +817,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 351 on 2022-02-14 at 17:15 (GMT+8)-->
<!--Last edited by Ukelele version 351 on 2022-03-08 at 11:10 (GMT+8)-->
<keyboard group="126" id="-7969" name="vChewing MiTAC" maxout="1">
<layouts>
<layout first="0" last="17" mapSet="16c" modifiers="f4"/>
@ -817,6 +817,7 @@
<key code="7" output="x"/>
<key code="8" output="c"/>
<key code="9" output="v"/>
<key code="10" output=""/>
<key code="11" output="b"/>
<key code="12" output="q"/>
<key code="13" output="w"/>

View File

@ -22,7 +22,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include <algorithm>
#include <cctype>
namespace Taiyan {
namespace Mandarin {
class PinyinParseHelper {
@ -1034,5 +1033,5 @@ const BopomofoKeyboardLayout* BopomofoKeyboardLayout::HanyuPinyinLayout() {
}
} // namespace Mandarin
} // namespace Taiyan

View File

@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include <string>
#include <vector>
namespace Taiyan {
namespace Mandarin {
class BopomofoSyllable {
@ -471,6 +470,6 @@ protected:
std::string pinyin_sequence_;
};
} // namespace Mandarin
} // namespace Taiyan
#endif // MANDARIN_H_

@ -1 +1 @@
Subproject commit 4d01ae8b9bd650c4f501b3ef4f5294b7e217ef9a
Subproject commit 8090069bc5eefa2a58ade7dda1aaadb0d11855e9

View File

@ -198,6 +198,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega
}
ctlPrefWindowInstance?.window?.center()
ctlPrefWindowInstance?.window?.orderFrontRegardless() //
ctlPrefWindowInstance?.window?.level = .statusBar
}
// New About Window
@ -207,6 +208,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega
}
ctlAboutWindowInstance?.window?.center()
ctlAboutWindowInstance?.window?.orderFrontRegardless() //
ctlAboutWindowInstance?.window?.level = .statusBar
}
@objc(checkForUpdate)

View File

@ -25,18 +25,85 @@ import Cocoa
return true
case "com.apple.keylayout.ZhuyinEten":
return true
case "org.atelierInmu.vChewing.keyLayouts.vchewingdachen":
return true
case "org.atelierInmu.vChewing.keyLayouts.vchewingmitac":
return true
case "org.atelierInmu.vChewing.keyLayouts.vchewingibm":
return true
case "org.atelierInmu.vChewing.keyLayouts.vchewingseigyou":
return true
case "org.atelierInmu.vChewing.keyLayouts.vchewingeten":
return true
default:
return false
}
}
// Apple
// Apple
@objc class func cnvApple2ABC(_ charCode: UniChar) -> UniChar {
var charCode = charCode
// OVMandarin OVMandarin
if self.isDynamicBaseKeyboardLayoutEnabled() {
// Apple
if charCode == 45 && (Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinBopomofo") { charCode = UniChar(96) }
if charCode == 183 && (Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinEten") { charCode = UniChar(96) }
// Apple
switch Preferences.basisKeyboardLayout {
case "com.apple.keylayout.ZhuyinBopomofo": do {
if (charCode == 97) {charCode = UniChar(65)}
if (charCode == 98) {charCode = UniChar(66)}
if (charCode == 99) {charCode = UniChar(67)}
if (charCode == 100) {charCode = UniChar(68)}
if (charCode == 101) {charCode = UniChar(69)}
if (charCode == 102) {charCode = UniChar(70)}
if (charCode == 103) {charCode = UniChar(71)}
if (charCode == 104) {charCode = UniChar(72)}
if (charCode == 105) {charCode = UniChar(73)}
if (charCode == 106) {charCode = UniChar(74)}
if (charCode == 107) {charCode = UniChar(75)}
if (charCode == 108) {charCode = UniChar(76)}
if (charCode == 109) {charCode = UniChar(77)}
if (charCode == 110) {charCode = UniChar(78)}
if (charCode == 111) {charCode = UniChar(79)}
if (charCode == 112) {charCode = UniChar(80)}
if (charCode == 113) {charCode = UniChar(81)}
if (charCode == 114) {charCode = UniChar(82)}
if (charCode == 115) {charCode = UniChar(83)}
if (charCode == 116) {charCode = UniChar(84)}
if (charCode == 117) {charCode = UniChar(85)}
if (charCode == 118) {charCode = UniChar(86)}
if (charCode == 119) {charCode = UniChar(87)}
if (charCode == 120) {charCode = UniChar(88)}
if (charCode == 121) {charCode = UniChar(89)}
if (charCode == 122) {charCode = UniChar(90)}
}
case "com.apple.keylayout.ZhuyinEten": do {
if (charCode == 65345) {charCode = UniChar(65)}
if (charCode == 65346) {charCode = UniChar(66)}
if (charCode == 65347) {charCode = UniChar(67)}
if (charCode == 65348) {charCode = UniChar(68)}
if (charCode == 65349) {charCode = UniChar(69)}
if (charCode == 65350) {charCode = UniChar(70)}
if (charCode == 65351) {charCode = UniChar(71)}
if (charCode == 65352) {charCode = UniChar(72)}
if (charCode == 65353) {charCode = UniChar(73)}
if (charCode == 65354) {charCode = UniChar(74)}
if (charCode == 65355) {charCode = UniChar(75)}
if (charCode == 65356) {charCode = UniChar(76)}
if (charCode == 65357) {charCode = UniChar(77)}
if (charCode == 65358) {charCode = UniChar(78)}
if (charCode == 65359) {charCode = UniChar(79)}
if (charCode == 65360) {charCode = UniChar(80)}
if (charCode == 65361) {charCode = UniChar(81)}
if (charCode == 65362) {charCode = UniChar(82)}
if (charCode == 65363) {charCode = UniChar(83)}
if (charCode == 65364) {charCode = UniChar(84)}
if (charCode == 65365) {charCode = UniChar(85)}
if (charCode == 65366) {charCode = UniChar(86)}
if (charCode == 65367) {charCode = UniChar(87)}
if (charCode == 65368) {charCode = UniChar(88)}
if (charCode == 65369) {charCode = UniChar(89)}
if (charCode == 65370) {charCode = UniChar(90)}
}
default: break
}
//
if (charCode == 12573) {charCode = UniChar(44)}
if (charCode == 12582) {charCode = UniChar(45)}
@ -98,6 +165,14 @@ import Cocoa
if (charCode == 65290) {charCode = UniChar(42)}
if (charCode == 65288) {charCode = UniChar(40)}
if (charCode == 65289) {charCode = UniChar(41)}
// Apple
if Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinEten" {
if (charCode == 65343) {charCode = UniChar(95)}
if (charCode == 65306) {charCode = UniChar(58)}
if (charCode == 65311) {charCode = UniChar(63)}
if (charCode == 65291) {charCode = UniChar(43)}
if (charCode == 65372) {charCode = UniChar(124)}
}
}
return charCode
}
@ -105,9 +180,66 @@ import Cocoa
@objc class func cnvStringApple2ABC(_ strProcessed: String) -> String {
var strProcessed = strProcessed
if self.isDynamicBaseKeyboardLayoutEnabled() {
// Apple
if (strProcessed == "-" && Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinBopomofo") { strProcessed = "`" }
if (strProcessed == "·" && Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinEten") { strProcessed = "`" }
// Apple
switch Preferences.basisKeyboardLayout {
case "com.apple.keylayout.ZhuyinBopomofo": do {
if (strProcessed == "a") {strProcessed = "A"}
if (strProcessed == "b") {strProcessed = "B"}
if (strProcessed == "c") {strProcessed = "C"}
if (strProcessed == "d") {strProcessed = "D"}
if (strProcessed == "e") {strProcessed = "E"}
if (strProcessed == "f") {strProcessed = "F"}
if (strProcessed == "g") {strProcessed = "G"}
if (strProcessed == "h") {strProcessed = "H"}
if (strProcessed == "i") {strProcessed = "I"}
if (strProcessed == "j") {strProcessed = "J"}
if (strProcessed == "k") {strProcessed = "K"}
if (strProcessed == "l") {strProcessed = "L"}
if (strProcessed == "m") {strProcessed = "M"}
if (strProcessed == "n") {strProcessed = "N"}
if (strProcessed == "o") {strProcessed = "O"}
if (strProcessed == "p") {strProcessed = "P"}
if (strProcessed == "q") {strProcessed = "Q"}
if (strProcessed == "r") {strProcessed = "R"}
if (strProcessed == "s") {strProcessed = "S"}
if (strProcessed == "t") {strProcessed = "T"}
if (strProcessed == "u") {strProcessed = "U"}
if (strProcessed == "v") {strProcessed = "V"}
if (strProcessed == "w") {strProcessed = "W"}
if (strProcessed == "x") {strProcessed = "X"}
if (strProcessed == "y") {strProcessed = "Y"}
if (strProcessed == "z") {strProcessed = "Z"}
}
case "com.apple.keylayout.ZhuyinEten": do {
if (strProcessed == "") {strProcessed = "A"}
if (strProcessed == "") {strProcessed = "B"}
if (strProcessed == "") {strProcessed = "C"}
if (strProcessed == "") {strProcessed = "D"}
if (strProcessed == "") {strProcessed = "E"}
if (strProcessed == "") {strProcessed = "F"}
if (strProcessed == "") {strProcessed = "G"}
if (strProcessed == "") {strProcessed = "H"}
if (strProcessed == "") {strProcessed = "I"}
if (strProcessed == "") {strProcessed = "J"}
if (strProcessed == "") {strProcessed = "K"}
if (strProcessed == "") {strProcessed = "L"}
if (strProcessed == "") {strProcessed = "M"}
if (strProcessed == "") {strProcessed = "N"}
if (strProcessed == "") {strProcessed = "O"}
if (strProcessed == "") {strProcessed = "P"}
if (strProcessed == "") {strProcessed = "Q"}
if (strProcessed == "") {strProcessed = "R"}
if (strProcessed == "") {strProcessed = "S"}
if (strProcessed == "") {strProcessed = "T"}
if (strProcessed == "") {strProcessed = "U"}
if (strProcessed == "") {strProcessed = "V"}
if (strProcessed == "") {strProcessed = "W"}
if (strProcessed == "") {strProcessed = "X"}
if (strProcessed == "") {strProcessed = "Y"}
if (strProcessed == "") {strProcessed = "Z"}
}
default: break
}
//
if (strProcessed == "") {strProcessed = ","}
if (strProcessed == "") {strProcessed = "-"}
@ -169,6 +301,14 @@ import Cocoa
if (strProcessed == "") {strProcessed = "*"}
if (strProcessed == "") {strProcessed = "("}
if (strProcessed == "") {strProcessed = ")"}
// Apple
if Preferences.basisKeyboardLayout == "com.apple.keylayout.ZhuyinEten" {
if (strProcessed == "_") {strProcessed = "_"}
if (strProcessed == "") {strProcessed = ":"}
if (strProcessed == "") {strProcessed = "?"}
if (strProcessed == "") {strProcessed = "+"}
if (strProcessed == "") {strProcessed = "|"}
}
}
return strProcessed
}

View File

@ -33,7 +33,7 @@ InputMode imeModeNULL = @"org.atelierInmu.inputmethod.vChewing.IMENULL";
static const double kEpsilon = 0.000001;
static double FindHighestScore(const std::vector<Taiyan::Gramambular::NodeAnchor> &nodes, double epsilon) {
static double FindHighestScore(const std::vector<Gramambular::NodeAnchor> &nodes, double epsilon) {
double highestScore = 0.0;
for (auto ni = nodes.begin(), ne = nodes.end(); ni != ne; ++ni) {
double score = ni->node->highestUnigramScore();
@ -46,7 +46,7 @@ static double FindHighestScore(const std::vector<Taiyan::Gramambular::NodeAnchor
class NodeAnchorDescendingSorter {
public:
bool operator()(const Taiyan::Gramambular::NodeAnchor &a, const Taiyan::Gramambular::NodeAnchor &b) const
bool operator()(const Gramambular::NodeAnchor &a, const Gramambular::NodeAnchor &b) const
{
return a.node->key().length() > b.node->key().length();
}
@ -62,7 +62,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
@implementation KeyHandler
{
// the reading buffer that takes user input
Taiyan::Mandarin::BopomofoReadingBuffer *_bpmfReadingBuffer;
Mandarin::BopomofoReadingBuffer *_bpmfReadingBuffer;
// language model
vChewing::LMInstantiator *_languageModel;
@ -71,10 +71,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
vChewing::UserOverrideModel *_userOverrideModel;
// the grid (lattice) builder for the unigrams (and bigrams)
Taiyan::Gramambular::BlockReadingBuilder *_builder;
Gramambular::BlockReadingBuilder *_builder;
// latest walked path (trellis) using the Viterbi algorithm
std::vector<Taiyan::Gramambular::NodeAnchor> _walkedNodes;
std::vector<Gramambular::NodeAnchor> _walkedNodes;
NSString *_inputMode;
}
@ -111,7 +111,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
newUserOverrideModel = [mgrLangModel userOverrideModelCHT];
}
// Symchronize the Preference Setting "setPhraseReplacementEnabled" to the new LM.
// Synchronize the Preference Setting "setPhraseReplacementEnabled" to the new LM.
newLanguageModel->setPhraseReplacementEnabled(Preferences.phraseReplacementEnabled);
// Only apply the changes if the value is changed
@ -122,7 +122,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
if (_builder) {
delete _builder;
_builder = new Taiyan::Gramambular::BlockReadingBuilder(_languageModel);
_builder = new Gramambular::BlockReadingBuilder(_languageModel);
_builder->setJoinSeparator("-");
}
@ -148,15 +148,16 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
{
self = [super init];
if (self) {
_bpmfReadingBuffer = new Taiyan::Mandarin::BopomofoReadingBuffer(Taiyan::Mandarin::BopomofoKeyboardLayout::StandardLayout());
_bpmfReadingBuffer = new Mandarin::BopomofoReadingBuffer(Mandarin::BopomofoKeyboardLayout::StandardLayout());
// create the lattice builder
_languageModel = [mgrLangModel lmCHT];
_languageModel->setPhraseReplacementEnabled(Preferences.phraseReplacementEnabled);
_languageModel->setCNSEnabled(Preferences.cns11643Enabled);
_languageModel->setSymbolEnabled(Preferences.symbolInputEnabled);
_userOverrideModel = [mgrLangModel userOverrideModelCHT];
_builder = new Taiyan::Gramambular::BlockReadingBuilder(_languageModel);
_builder = new Gramambular::BlockReadingBuilder(_languageModel);
// each Mandarin syllable is separated by a hyphen
_builder->setJoinSeparator("-");
@ -170,31 +171,31 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
NSInteger layout = Preferences.keyboardLayout;
switch (layout) {
case KeyboardLayoutStandard:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::StandardLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::StandardLayout());
break;
case KeyboardLayoutEten:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::ETenLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::ETenLayout());
break;
case KeyboardLayoutHsu:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::HsuLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::HsuLayout());
break;
case KeyboardLayoutEten26:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::ETen26Layout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::ETen26Layout());
break;
case KeyboardLayoutIBM:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::IBMLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::IBMLayout());
break;
case KeyboardLayoutMiTAC:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::MiTACLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::MiTACLayout());
break;
case KeyboardLayoutFakeSeigyou:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::FakeSeigyouLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::FakeSeigyouLayout());
break;
case KeyboardLayoutHanyuPinyin:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::HanyuPinyinLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::HanyuPinyinLayout());
break;
default:
_bpmfReadingBuffer->setKeyboardLayout(Taiyan::Mandarin::BopomofoKeyboardLayout::StandardLayout());
_bpmfReadingBuffer->setKeyboardLayout(Mandarin::BopomofoKeyboardLayout::StandardLayout());
Preferences.keyboardLayout = KeyboardLayoutStandard;
}
}
@ -203,7 +204,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
{
size_t cursorIndex = [self _actualCandidateCursorIndex];
std::string stringValue(value.UTF8String);
Taiyan::Gramambular::NodeAnchor selectedNode = _builder->grid().fixNodeSelectedCandidate(cursorIndex, stringValue);
Gramambular::NodeAnchor selectedNode = _builder->grid().fixNodeSelectedCandidate(cursorIndex, stringValue);
if (!Preferences.useSCPCTypingMode) { // 不要針對逐字選字模式啟用臨時半衰記憶模型。
// If the length of the readings and the characters do not match,
// it often means it is a special symbol and it should not be stored
@ -272,29 +273,35 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return NO;
}
// Caps Lock processing : if Caps Lock is on, temporarily disable bopomofo.
// Caps Lock processing: if Caps Lock is on or Preferences.isAlphanumericalModeEnabled, temporarily disable bopomofo.
// Also: Alphanumerical mode processing.
if ([input isBackSpace] || [input isEnter] || [input isAbsorbedArrowKey] || [input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse] || [input isCursorForward] || [input isCursorBackward]) {
// do nothing if backspace is pressed -- we ignore the key
} else if ([input isCapsLockOn]) {
} else if (Preferences.isAlphanumericalModeEnabled || [input isCapsLockOn]) {
// process all possible combination, we hope.
[self clear];
InputStateEmpty *emptyState = [[InputStateEmpty alloc] init];
stateCallback(emptyState);
// first commit everything in the buffer.
// Non-Dynamic Keyboard Layouts Only: When shift is pressed, don't do further processing, since it outputs capital letter anyway.
if ((![Preferences.basisKeyboardLayout isEqual: @"com.apple.keylayout.ZhuyinBopomofo"]
&& ![Preferences.basisKeyboardLayout isEqual: @"com.apple.keylayout.ZhuyinEten"])
|| [input isCapsLockOn]){
if ([input isShiftHold]) {
return NO;
}
}
// if ASCII but not printable, don't use insertText:replacementRange: as many apps don't handle non-ASCII char insertions.
if (charCode < 0x80 && !isprint(charCode)) {
return NO;
}
// when shift is pressed, don't do further processing, since it outputs capital letter anyway.
// commit everything in the buffer.
InputStateCommitting *committingState = [[InputStateCommitting alloc] initWithPoppedText:[input.inputText lowercaseString]];
stateCallback(committingState);
stateCallback(emptyState);
return YES;
}
@ -383,7 +390,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
if (!overrideValue.empty()) {
size_t cursorIndex = [self _actualCandidateCursorIndex];
std::vector<Taiyan::Gramambular::NodeAnchor> nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex);
std::vector<Gramambular::NodeAnchor> nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex);
double highestScore = FindHighestScore(nodes, kEpsilon);
_builder->grid().overrideNodeScoreForSelectedCandidate(cursorIndex, overrideValue, static_cast<float>(highestScore));
}
@ -518,7 +525,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
// MARK: Enter
if ([input isEnter]) {
if ([input isControlHold]) {
if (ctlInputMethod.areWeUsingOurOwnPhraseEditor) {
if (ctlInputMethod.areWeUsingOurOwnPhraseEditor || [input isCommandHold]) {
return [self _handleCtrlEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback];
}
}
@ -526,7 +533,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
}
// MARK: Punctuation list
if ([input isSymbolMenuKey]) {
if ([input isSymbolMenuPhysicalKey] && ![input isShiftHold]) {
// 得在這裡先 commit buffer不然會導致「在摁 ESC 離開符號選單時會重複輸入上一次的組字區的內容」的不當行為。
// 於是這裡用「模擬一次 Enter 鍵的操作」使其代為執行這個 commit buffer 的動作。
@ -844,12 +851,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
- (BOOL)_handleCtrlEnterWithState:(InputState *)state stateCallback:(void (^)(InputState *))stateCallback errorCallback:(void (^)(void))errorCallback
{
if (![state isKindOfClass:[InputStateInputting class]]) {
return NO;
}
if (![state isKindOfClass:[InputStateInputting class]]) return NO;
NSArray *readings = [self _currentReadings];
NSString *composingBuffer = [readings componentsJoinedByString:@"-"];
NSString *composingBuffer = (ctlInputMethod.areWeUsingOurOwnPhraseEditor) ? [readings componentsJoinedByString:@"-"] : [readings componentsJoinedByString:@" "] ;
[self clear];
@ -1046,7 +1051,21 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return YES;
}
if ([input isSpace] || [input isPageDown] || input.emacsKey == vChewingEmacsKeyNextPage) {
if ([input isSpace]) {
BOOL updated =
Preferences.specifySpaceKeyBehavior?
([input isShiftHold] ? [gCurrentCandidateController highlightNextCandidate] : [gCurrentCandidateController showNextPage])
:
([input isShiftHold] ? [gCurrentCandidateController showNextPage] : [gCurrentCandidateController highlightNextCandidate])
;
if (!updated) {
[IME prtDebugIntel:@"A11C781F"];
errorCallback();
}
return YES;
}
if ([input isPageDown] || input.emacsKey == vChewingEmacsKeyNextPage) {
BOOL updated = [gCurrentCandidateController showNextPage];
if (!updated) {
[IME prtDebugIntel:@"9B691919"];
@ -1275,7 +1294,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
// we must do some Unicode codepoint counting to find the actual cursor location for the client
// i.e. we need to take UTF-16 into consideration, for which a surrogate pair takes 2 UniChars
// locations
for (std::vector<Taiyan::Gramambular::NodeAnchor>::iterator wi = _walkedNodes.begin(), we = _walkedNodes.end(); wi != we; ++wi) {
for (std::vector<Gramambular::NodeAnchor>::iterator wi = _walkedNodes.begin(), we = _walkedNodes.end(); wi != we; ++wi) {
if ((*wi).node) {
std::string nodeStr = (*wi).node->currentKeyValue().value;
NSString *valueString = [NSString stringWithUTF8String:nodeStr.c_str()];
@ -1343,7 +1362,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
// retrieve the most likely trellis, i.e. a Maximum Likelihood Estimation
// of the best possible Mandarain characters given the input syllables,
// using the Viterbi algorithm implemented in the Gramambular library
Taiyan::Gramambular::Walker walker(&_builder->grid());
Gramambular::Walker walker(&_builder->grid());
// the reverse walk traces the trellis from the end
_walkedNodes = walker.reverseWalk(_builder->grid().width());
@ -1376,7 +1395,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
if (_builder->grid().width() > (size_t) composingBufferSize) {
if (_walkedNodes.size() > 0) {
Taiyan::Gramambular::NodeAnchor &anchor = _walkedNodes[0];
Gramambular::NodeAnchor &anchor = _walkedNodes[0];
poppedText = [NSString stringWithUTF8String:anchor.node->currentKeyValue().value.c_str()];
_builder->removeHeadReadings(anchor.spanningLength);
}
@ -1391,15 +1410,15 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
NSMutableArray *candidatesArray = [[NSMutableArray alloc] init];
size_t cursorIndex = [self _actualCandidateCursorIndex];
std::vector<Taiyan::Gramambular::NodeAnchor> nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex);
std::vector<Gramambular::NodeAnchor> nodes = _builder->grid().nodesCrossingOrEndingAt(cursorIndex);
// sort the nodes, so that longer nodes (representing longer phrases) are placed at the top of the candidate list
stable_sort(nodes.begin(), nodes.end(), NodeAnchorDescendingSorter());
// then use the C++ trick to retrieve the candidates for each node at/crossing the cursor
for (std::vector<Taiyan::Gramambular::NodeAnchor>::iterator ni = nodes.begin(), ne = nodes.end(); ni != ne; ++ni) {
const std::vector<Taiyan::Gramambular::KeyValuePair> &candidates = (*ni).node->candidates();
for (std::vector<Taiyan::Gramambular::KeyValuePair>::const_iterator ci = candidates.begin(), ce = candidates.end(); ci != ce; ++ci) {
for (std::vector<Gramambular::NodeAnchor>::iterator ni = nodes.begin(), ne = nodes.end(); ni != ne; ++ni) {
const std::vector<Gramambular::KeyValuePair> &candidates = (*ni).node->candidates();
for (std::vector<Gramambular::KeyValuePair>::const_iterator ci = candidates.begin(), ce = candidates.end(); ci != ce; ++ci) {
[candidatesArray addObject:[NSString stringWithUTF8String:(*ci).value.c_str()]];
}
}
@ -1411,16 +1430,11 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
- (size_t)_actualCandidateCursorIndex
{
size_t cursorIndex = _builder->cursorIndex();
if (Preferences.selectPhraseAfterCursorAsCandidate) {
// MS Phonetics IME style, phrase is *after* the cursor, i.e. cursor is always *before* the phrase
if (cursorIndex < _builder->length()) {
if ((Preferences.selectPhraseAfterCursorAsCandidate && (cursorIndex < _builder->length()))
|| !cursorIndex) {
++cursorIndex;
}
} else {
if (!cursorIndex) {
++cursorIndex;
}
}
return cursorIndex;
}

View File

@ -21,7 +21,7 @@ import Cocoa
// Use KeyCodes as much as possible since its recognition won't be affected by macOS Base Keyboard Layouts.
// KeyCodes: https://eastmanreference.com/complete-list-of-applescript-key-codes
enum KeyCode: UInt16 {
@objc enum KeyCode: UInt16 {
case none = 0
case space = 49
case backSpace = 51
@ -38,11 +38,16 @@ enum KeyCode: UInt16 {
case home = 115
case end = 119
case delete = 117
case leftShift = 56
case rightShift = 60
case capsLock = 57
case symbolMenuPhysicalKey = 50
}
// CharCodes: https://theasciicode.com.ar/ascii-control-characters/horizontal-tab-ascii-code-9.html
enum CharCode: UInt16 {
case symbolMenuKey_ABC = 96
enum CharCode: UInt/*16*/ {
case yajuusenpai = 1145141919810893
// - CharCode is not reliable at all. KeyCode is the most accurate. KeyCode doesn't give a phuque about the character sent through macOS keyboard layouts but only focuses on which physical key is pressed.
}
class KeyHandlerInput: NSObject {
@ -51,6 +56,7 @@ class KeyHandlerInput: NSObject {
@objc private (set) var inputTextIgnoringModifiers: String?
@objc private (set) var charCode: UInt16
@objc private (set) var keyCode: UInt16
private var isFlagChanged: Bool
private var flags: NSEvent.ModifierFlags
private var cursorForwardKey: KeyCode
private var cursorBackwardKey: KeyCode
@ -68,6 +74,7 @@ class KeyHandlerInput: NSObject {
self.keyCode = keyCode
self.charCode = AppleKeyboardConverter.cnvApple2ABC(charCode)
self.flags = flags
self.isFlagChanged = false
useVerticalMode = isVerticalMode
emacsKey = EmacsKeyHelper.detect(charCode: AppleKeyboardConverter.cnvApple2ABC(charCode), flags: flags)
cursorForwardKey = useVerticalMode ? .down : .right
@ -84,6 +91,7 @@ class KeyHandlerInput: NSObject {
inputTextIgnoringModifiers = AppleKeyboardConverter.cnvStringApple2ABC(event.charactersIgnoringModifiers ?? "")
keyCode = event.keyCode
flags = event.modifierFlags
isFlagChanged = (event.type == .flagsChanged) ? true : false
useVerticalMode = isVerticalMode
let charCode: UInt16 = {
guard let inputText = event.characters, inputText.count > 0 else {
@ -225,9 +233,10 @@ class KeyHandlerInput: NSObject {
KeyCode(rawValue: keyCode) == verticalModeOnlyChooseCandidateKey
}
@objc var isSymbolMenuKey: Bool {
// CharCode
CharCode(rawValue: charCode) == CharCode.symbolMenuKey_ABC
@objc var isSymbolMenuPhysicalKey: Bool {
// KeyCode macOS Apple
// ![input isShift] 使 Shift
KeyCode(rawValue: keyCode) == KeyCode.symbolMenuPhysicalKey
}
}

View File

@ -21,10 +21,11 @@ import Cocoa
// Regex
// String private
private extension String {
// Ref: https://stackoverflow.com/a/40993403/4162914 && https://stackoverflow.com/a/71291137/4162914
mutating func regReplace(pattern: String, replaceWith: String = "") {
do {
let regex = try NSRegularExpression(pattern: pattern, options: .caseInsensitive)
let range = NSRange(location: 0, length: count)
let range = NSRange(location: 0, length: self.utf16.count)
self = regex.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: replaceWith)
} catch { return }
}

View File

@ -86,15 +86,19 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma
}
// 第一遍 for 用來統整每行內的內容。
// regex sedCJKWhiteSpace("\\x{3000}"), sedNonBreakWhiteSpace("\\x{A0}"), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // 這樣寫會導致輸入法敲不了任何字,推測 Xcode 13 支援的 cpp / objCpp 可能對某些 Regex 寫法有相容性問題。
regex sedCJKWhiteSpace(" "), sedNonBreakWhiteSpace(" "), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // RegEx 先定義好。
// regex sedCJKWhiteSpace(" "), sedNonBreakWhiteSpace(" "), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // RegEx 先定義好。
regex sedToConsolidate("( +| +| +|\t+)+"), sedToTrim("(^\\s|\\s$)");
for(int i=0;i<vecEntry.size();i++) { // 第一遍 for 用來統整每行內的內容。
if (vecEntry[i].size() != 0) { // 不要理會空行,否則給空行加上 endl 等於再加空行。
// RegEx 處理順序:先將全形空格換成西文空格,然後合併任何意義上的連續空格(包括 tab 等),最後去除每行首尾空格。
vecEntry[i] = regex_replace(vecEntry[i], sedCJKWhiteSpace, " ").c_str(); // 中日韓全形空格轉為 ASCII 空格。
vecEntry[i] = regex_replace(vecEntry[i], sedNonBreakWhiteSpace, " ").c_str(); // Non-Break 型空格轉為 ASCII 空格。
vecEntry[i] = regex_replace(vecEntry[i], sedWhiteSpace, " ").c_str(); // 所有意義上的連續的 \s 型空格都轉為單個 ASCII 空格。
vecEntry[i] = regex_replace(vecEntry[i], sedLeadingSpace, "").c_str(); // 去掉行首空格。
vecEntry[i] = regex_replace(vecEntry[i], sedTrailingSpace, "").c_str(); // 去掉行尾空格。
// vecEntry[i] = regex_replace(vecEntry[i], sedCJKWhiteSpace, " ").c_str(); // 中日韓全形空格轉為 ASCII 空格。
// vecEntry[i] = regex_replace(vecEntry[i], sedNonBreakWhiteSpace, " ").c_str(); // Non-Break 型空格轉為 ASCII 空格。
// vecEntry[i] = regex_replace(vecEntry[i], sedWhiteSpace, " ").c_str(); // 所有意義上的連續的 \s 型空格都轉為單個 ASCII 空格。
// vecEntry[i] = regex_replace(vecEntry[i], sedLeadingSpace, "").c_str(); // 去掉行首空格。
// vecEntry[i] = regex_replace(vecEntry[i], sedTrailingSpace, "").c_str(); // 去掉行尾空格。
// 上述命令分步驟執行容易產生效能問題,故濃縮為下述兩句。
vecEntry[i] = regex_replace(vecEntry[i], sedToConsolidate, " ").c_str();
vecEntry[i] = regex_replace(vecEntry[i], sedToTrim, "").c_str();
}
}
// 在第二遍 for 運算之前,針對 vecEntry 去除重複條目。

View File

@ -20,11 +20,13 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
import Cocoa
private let kIsDebugModeEnabled = "_DebugMode"
private let kIsAlphanumericalModeEnabled = "IsAlphanumericalModeEnabled"
private let kCheckUpdateAutomatically = "CheckUpdateAutomatically"
private let kKeyboardLayoutPreference = "KeyboardLayout"
private let kBasisKeyboardLayoutPreference = "BasisKeyboardLayout"
private let kFunctionKeyKeyboardLayoutPreference = "FunctionKeyKeyboardLayout"
private let kFunctionKeyKeyboardLayoutOverrideIncludeShift = "FunctionKeyKeyboardLayoutOverrideIncludeShift"
private let kShowPageButtonsInCandidateWindow = "ShowPageButtonsInCandidateWindow"
private let kCandidateListTextSize = "CandidateListTextSize"
private let kAppleLanguagesPreferences = "AppleLanguages"
private let kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles"
@ -33,12 +35,14 @@ private let kUseHorizontalCandidateListPreference = "UseHorizontalCandidateList"
private let kComposingBufferSizePreference = "ComposingBufferSize"
private let kChooseCandidateUsingSpace = "ChooseCandidateUsingSpace"
private let kCNS11643Enabled = "CNS11643Enabled"
private let kSymbolInputEnabled = "SymbolInputEnabled"
private let kChineseConversionEnabled = "ChineseConversionEnabled"
private let kShiftJISShinjitaiOutputEnabled = "ShiftJISShinjitaiOutputEnabled"
private let kHalfWidthPunctuationEnabled = "HalfWidthPunctuationEnable"
private let kMoveCursorAfterSelectingCandidate = "MoveCursorAfterSelectingCandidate"
private let kEscToCleanInputBuffer = "EscToCleanInputBuffer"
private let kSpecifyTabKeyBehavior = "SpecifyTabKeyBehavior"
private let kSpecifySpaceKeyBehavior = "SpecifySpaceKeyBehavior"
private let kUseSCPCTypingMode = "UseSCPCTypingMode"
private let kMaxCandidateLength = "MaxCandidateLength"
private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep"
@ -47,8 +51,8 @@ private let kCandidateTextFontName = "CandidateTextFontName"
private let kCandidateKeyLabelFontName = "CandidateKeyLabelFontName"
private let kCandidateKeys = "CandidateKeys"
private let kChineseConversionEngineKey = "ChineseConversionEngine"
private let kChineseConversionStyleKey = "ChineseConversionStyle"
private let kChineseConversionEngine = "ChineseConversionEngine"
private let kChineseConversionStyle = "ChineseConversionStyle"
private let kAssociatedPhrasesEnabled = "AssociatedPhrasesEnabled"
private let kPhraseReplacementEnabled = "PhraseReplacementEnabled"
@ -213,10 +217,12 @@ struct ComposingBufferSize {
@objc public class Preferences: NSObject {
static var allKeys:[String] {
[kIsDebugModeEnabled,
kIsAlphanumericalModeEnabled,
kKeyboardLayoutPreference,
kBasisKeyboardLayoutPreference,
kFunctionKeyKeyboardLayoutPreference,
kFunctionKeyKeyboardLayoutOverrideIncludeShift,
kShowPageButtonsInCandidateWindow,
kCandidateListTextSize,
kAppleLanguagesPreferences,
kShouldAutoReloadUserDataFiles,
@ -225,10 +231,12 @@ struct ComposingBufferSize {
kComposingBufferSizePreference,
kChooseCandidateUsingSpace,
kCNS11643Enabled,
kSymbolInputEnabled,
kChineseConversionEnabled,
kShiftJISShinjitaiOutputEnabled,
kHalfWidthPunctuationEnabled,
kSpecifyTabKeyBehavior,
kSpecifySpaceKeyBehavior,
kEscToCleanInputBuffer,
kCandidateTextFontName,
kCandidateKeyLabelFontName,
@ -238,8 +246,8 @@ struct ComposingBufferSize {
kUseSCPCTypingMode,
kMaxCandidateLength,
kShouldNotFartInLieuOfBeep,
kChineseConversionEngineKey,
kChineseConversionStyleKey,
kChineseConversionEngine,
kChineseConversionStyle,
kAssociatedPhrasesEnabled]
}
@ -251,11 +259,26 @@ struct ComposingBufferSize {
UserDefaults.standard.set(Preferences.isDebugModeEnabled, forKey: kIsDebugModeEnabled)
}
//
if UserDefaults.standard.object(forKey: kIsAlphanumericalModeEnabled) == nil {
UserDefaults.standard.set(Preferences.isAlphanumericalModeEnabled, forKey: kIsAlphanumericalModeEnabled)
}
//
if UserDefaults.standard.object(forKey: kCheckUpdateAutomatically) == nil {
UserDefaults.standard.set(false, forKey: kCheckUpdateAutomatically)
}
//
if UserDefaults.standard.object(forKey: kShowPageButtonsInCandidateWindow) == nil {
UserDefaults.standard.set(Preferences.showPageButtonsInCandidateWindow, forKey: kShowPageButtonsInCandidateWindow)
}
//
if UserDefaults.standard.object(forKey: kSymbolInputEnabled) == nil {
UserDefaults.standard.set(Preferences.symbolInputEnabled, forKey: kSymbolInputEnabled)
}
// 18
if UserDefaults.standard.object(forKey: kCandidateListTextSize) == nil {
UserDefaults.standard.set(Preferences.candidateListTextSize, forKey: kCandidateListTextSize)
@ -276,6 +299,11 @@ struct ComposingBufferSize {
UserDefaults.standard.set(Preferences.specifyTabKeyBehavior, forKey: kSpecifyTabKeyBehavior)
}
// Space
if UserDefaults.standard.object(forKey: kSpecifySpaceKeyBehavior) == nil {
UserDefaults.standard.set(Preferences.specifySpaceKeyBehavior, forKey: kSpecifySpaceKeyBehavior)
}
// false
if UserDefaults.standard.object(forKey: kUseSCPCTypingMode) == nil {
UserDefaults.standard.set(Preferences.useSCPCTypingMode, forKey: kUseSCPCTypingMode)
@ -332,6 +360,16 @@ struct ComposingBufferSize {
@UserDefault(key: kIsDebugModeEnabled, defaultValue: false)
@objc static var isDebugModeEnabled: Bool
@UserDefault(key: kIsAlphanumericalModeEnabled, defaultValue: false)
@objc static var isAlphanumericalModeEnabled: Bool
@objc @discardableResult static func toggleAlphanumericalModeEnabled() -> Bool {
isAlphanumericalModeEnabled = !isAlphanumericalModeEnabled
UserDefaults.standard.set(isAlphanumericalModeEnabled, forKey: kIsAlphanumericalModeEnabled)
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("Alphanumerical Input Mode", comment: ""), "\n", isAlphanumericalModeEnabled ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
return isAlphanumericalModeEnabled
}
@UserDefault(key: kAppleLanguagesPreferences, defaultValue: [])
@objc static var appleLanguages: Array<String>
@ -345,19 +383,22 @@ struct ComposingBufferSize {
@UserDefault(key: kBasisKeyboardLayoutPreference, defaultValue: "com.apple.keylayout.ZhuyinBopomofo")
@objc static var basisKeyboardLayout: String
@UserDefault(key: kFunctionKeyKeyboardLayoutPreference, defaultValue: "com.apple.keylayout.ZhuyinBopomofo")
@UserDefault(key: kFunctionKeyKeyboardLayoutPreference, defaultValue: "com.apple.keylayout.ABC")
@objc static var functionKeyboardLayout: String
@UserDefault(key: kFunctionKeyKeyboardLayoutOverrideIncludeShift, defaultValue: false)
@objc static var functionKeyKeyboardLayoutOverrideIncludeShiftKey: Bool
@UserDefault(key: kShowPageButtonsInCandidateWindow, defaultValue: true)
@objc static var showPageButtonsInCandidateWindow: Bool
@CandidateListTextSize(key: kCandidateListTextSize)
@objc static var candidateListTextSize: CGFloat
@UserDefault(key: kShouldAutoReloadUserDataFiles, defaultValue: true)
@objc static var shouldAutoReloadUserDataFiles: Bool
@UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreference, defaultValue: true)
@UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreference, defaultValue: false)
@objc static var selectPhraseAfterCursorAsCandidate: Bool
@UserDefault(key: kMoveCursorAfterSelectingCandidate, defaultValue: false)
@ -398,17 +439,31 @@ struct ComposingBufferSize {
@objc static func toggleCNS11643Enabled() -> Bool {
cns11643Enabled = !cns11643Enabled
mgrLangModel.setCNSEnabled(cns11643Enabled) //
UserDefaults.standard.set(cns11643Enabled, forKey: kCNS11643Enabled)
return cns11643Enabled
}
@UserDefault(key: kSymbolInputEnabled, defaultValue: true)
@objc static var symbolInputEnabled: Bool
@objc static func toggleSymbolInputEnabled() -> Bool {
symbolInputEnabled = !symbolInputEnabled
mgrLangModel.setSymbolEnabled(symbolInputEnabled) //
UserDefaults.standard.set(symbolInputEnabled, forKey: kSymbolInputEnabled)
return symbolInputEnabled
}
@UserDefault(key: kChineseConversionEnabled, defaultValue: false)
@objc static var chineseConversionEnabled: Bool
@objc @discardableResult static func toggleChineseConversionEnabled() -> Bool {
chineseConversionEnabled = !chineseConversionEnabled
// JIS
if chineseConversionEnabled && shiftJISShinjitaiOutputEnabled {self.toggleShiftJISShinjitaiOutputEnabled()}
if chineseConversionEnabled && shiftJISShinjitaiOutputEnabled {
self.toggleShiftJISShinjitaiOutputEnabled()
UserDefaults.standard.set(shiftJISShinjitaiOutputEnabled, forKey: kShiftJISShinjitaiOutputEnabled)
}
UserDefaults.standard.set(chineseConversionEnabled, forKey: kChineseConversionEnabled)
return chineseConversionEnabled
}
@ -435,9 +490,13 @@ struct ComposingBufferSize {
@UserDefault(key: kEscToCleanInputBuffer, defaultValue: true)
@objc static var escToCleanInputBuffer: Bool
@UserDefault(key: kSpecifyTabKeyBehavior, defaultValue: false)
@objc static var specifyTabKeyBehavior: Bool
@UserDefault(key: kSpecifySpaceKeyBehavior, defaultValue: false)
@objc static var specifySpaceKeyBehavior: Bool
// MARK: - Optional settings
@UserDefault(key: kCandidateTextFontName, defaultValue: nil)
@objc static var candidateTextFontName: String?
@ -491,7 +550,7 @@ struct ComposingBufferSize {
case .empty:
return NSLocalizedString("Candidates keys cannot be empty.", comment: "")
case .invalidCharacters:
return NSLocalizedString("Candidate keys can only contain ASCII characters like alphanumerals.", comment: "")
return NSLocalizedString("Candidate keys can only contain ASCII characters like alphanumericals.", comment: "")
case .containSpace:
return NSLocalizedString("Candidate keys cannot contain space.", comment: "")
case .duplicatedCharacters:
@ -510,6 +569,7 @@ struct ComposingBufferSize {
@objc static func togglePhraseReplacementEnabled() -> Bool {
phraseReplacementEnabled = !phraseReplacementEnabled
mgrLangModel.setPhraseReplacementEnabled(phraseReplacementEnabled)
UserDefaults.standard.set(phraseReplacementEnabled, forKey: kPhraseReplacementEnabled)
return phraseReplacementEnabled
}

View File

@ -92,9 +92,16 @@ class ctlInputMethod: IMKInputController {
userAssociatedPhrasesItem.keyEquivalentModifierMask = [.command, .control]
userAssociatedPhrasesItem.state = Preferences.associatedPhrasesEnabled.state
let alphaNumericalModeItem = menu.addItem(withTitle: NSLocalizedString("Alphanumerical Input Mode", comment: ""), action: #selector(toggleAlphanumericalModeEnabled(_:)), keyEquivalent: "I")
alphaNumericalModeItem.keyEquivalentModifierMask = [.command, .control]
alphaNumericalModeItem.state = Preferences.isAlphanumericalModeEnabled.state
if optionKeyPressed {
let phaseReplacementItem = menu.addItem(withTitle: NSLocalizedString("Use Phrase Replacement", comment: ""), action: #selector(togglePhraseReplacement(_:)), keyEquivalent: "")
phaseReplacementItem.state = Preferences.phraseReplacementEnabled.state
let toggleSymbolInputItem = menu.addItem(withTitle: NSLocalizedString("Symbol & Emoji Input", comment: ""), action: #selector(toggleSymbolEnabled(_:)), keyEquivalent: "")
toggleSymbolInputItem.state = Preferences.symbolInputEnabled.state
}
menu.addItem(NSMenuItem.separator()) // ---------------------
@ -178,6 +185,12 @@ class ctlInputMethod: IMKInputController {
}
override func handle(_ event: NSEvent!, client: Any!) -> Bool {
if (Preferences.isAlphanumericalModeEnabled) {
(client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: Preferences.functionKeyboardLayout)
return false
}
if event.type == .flagsChanged {
let functionKeyKeyboardLayoutID = Preferences.functionKeyboardLayout
let basisKeyboardLayoutID = Preferences.basisKeyboardLayout
@ -188,6 +201,15 @@ class ctlInputMethod: IMKInputController {
let includeShift = Preferences.functionKeyKeyboardLayoutOverrideIncludeShiftKey
let notShift = NSEvent.ModifierFlags(rawValue: ~(NSEvent.ModifierFlags.shift.rawValue))
// Shift Click Handling: Toggling Alphanumerical Mode. // STILL BUGGY, hence being commented out.
// if !event.modifierFlags.contains(.shift)
// && event.modifierFlags == .init(rawValue: 0)
// && !event.modifierFlags.contains(notShift)
// && (event.keyCode == KeyCode.leftShift.rawValue || event.keyCode == KeyCode.rightShift.rawValue) {
// Preferences.toggleAlphanumericalModeEnabled()
// }
if event.modifierFlags.contains(notShift) ||
(event.modifierFlags.contains(.shift) && includeShift) {
(client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: functionKeyKeyboardLayoutID)
@ -241,16 +263,23 @@ class ctlInputMethod: IMKInputController {
}
@objc func toggleCNS11643Enabled(_ sender: Any?) {
mgrLangModel.setCNSEnabled(Preferences.toggleCNS11643Enabled())
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("CNS11643 Mode", comment: ""), "\n", Preferences.cns11643Enabled ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("CNS11643 Mode", comment: ""), "\n", Preferences.toggleCNS11643Enabled() ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
}
@objc func toggleSymbolEnabled(_ sender: Any?) {
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("Symbol & Emoji Input", comment: ""), "\n", Preferences.toggleSymbolInputEnabled() ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
}
@objc func toggleAssociatedPhrasesEnabled(_ sender: Any?) {
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("Per-Char Associated Phrases", comment: ""), "\n", Preferences.toggleAssociatedPhrasesEnabled() ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
}
@objc func toggleAlphanumericalModeEnabled(_ sender: Any?) {
Preferences.toggleAlphanumericalModeEnabled()
}
@objc func togglePhraseReplacement(_ sender: Any?) {
mgrLangModel.setPhraseReplacementEnabled(Preferences.togglePhraseReplacementEnabled())
NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("Use Phrase Replacement", comment: ""), "\n", Preferences.togglePhraseReplacementEnabled() ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")))
}
@objc func selfTerminate(_ sender: Any?) {

View File

@ -32,7 +32,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
namespace vChewing {
using namespace Taiyan::Gramambular;
using namespace Gramambular;
/// LMInstantiator is a facade for managing a set of models including
/// the input method language model, user phrases and excluded phrases.
@ -56,7 +56,7 @@ using namespace Taiyan::Gramambular;
/// model while launching and to load the user phrases anytime if the custom
/// files are modified. It does not keep the reference of the data pathes but
/// you have to pass the paths when you ask it to do loading.
class LMInstantiator : public Taiyan::Gramambular::LanguageModel {
class LMInstantiator : public Gramambular::LanguageModel {
public:
LMInstantiator();
~LMInstantiator();
@ -97,11 +97,11 @@ public:
void loadPhraseReplacementMap(const char* phraseReplacementPath);
/// Not implemented since we do not have data to provide bigram function.
const std::vector<Taiyan::Gramambular::Bigram> bigramsForKeys(const std::string& preceedingKey, const std::string& key);
const std::vector<Gramambular::Bigram> bigramsForKeys(const std::string& preceedingKey, const std::string& key);
/// Returns a list of available unigram for the given key.
/// @param key A std::string represents the BPMF reading or a symbol key. For
/// example, it you pass "ㄇㄚ", it returns "嗎", "媽", and so on.
const std::vector<Taiyan::Gramambular::Unigram> unigramsForKey(const std::string& key);
const std::vector<Gramambular::Unigram> unigramsForKey(const std::string& key);
/// If the model has unigrams for the given key.
/// @param key The key.
bool hasUnigramsForKey(const std::string& key);
@ -111,6 +111,11 @@ public:
/// If phrase replacement is enabled or not.
bool phraseReplacementEnabled();
/// Enables or disables symbol input.
void setSymbolEnabled(bool enabled);
/// If symbol input is enabled or not.
bool symbolEnabled();
/// Enables or disables CNS11643 input.
void setCNSEnabled(bool enabled);
/// If CNS11643 input is enabled or not.
@ -135,7 +140,7 @@ protected:
/// @param insertedValues The values for unigrams already in the results.
/// It helps to prevent duplicated unigrams. Please note that the method
/// has a side effect that it inserts values to `insertedValues`.
const std::vector<Taiyan::Gramambular::Unigram> filterAndTransformUnigrams(const std::vector<Taiyan::Gramambular::Unigram> unigrams,
const std::vector<Gramambular::Unigram> filterAndTransformUnigrams(const std::vector<Gramambular::Unigram> unigrams,
const std::unordered_set<std::string>& excludedValues,
std::unordered_set<std::string>& insertedValues);
@ -149,6 +154,7 @@ protected:
AssociatedPhrases m_associatedPhrases;
bool m_phraseReplacementEnabled;
bool m_cnsEnabled;
bool m_symbolEnabled;
bool m_externalConverterEnabled;
std::function<std::string(std::string)> m_externalConverter;
};

View File

@ -119,16 +119,16 @@ void LMInstantiator::loadPhraseReplacementMap(const char* phraseReplacementPath)
}
}
const std::vector<Taiyan::Gramambular::Bigram> LMInstantiator::bigramsForKeys(const std::string& preceedingKey, const std::string& key)
const std::vector<Gramambular::Bigram> LMInstantiator::bigramsForKeys(const std::string& preceedingKey, const std::string& key)
{
return std::vector<Taiyan::Gramambular::Bigram>();
return std::vector<Gramambular::Bigram>();
}
const std::vector<Taiyan::Gramambular::Unigram> LMInstantiator::unigramsForKey(const std::string& key)
const std::vector<Gramambular::Unigram> LMInstantiator::unigramsForKey(const std::string& key)
{
if (key == " ") {
std::vector<Taiyan::Gramambular::Unigram> spaceUnigrams;
Taiyan::Gramambular::Unigram g;
std::vector<Gramambular::Unigram> spaceUnigrams;
Gramambular::Unigram g;
g.keyValue.key = " ";
g.keyValue.value = " ";
g.score = 0;
@ -136,24 +136,24 @@ const std::vector<Taiyan::Gramambular::Unigram> LMInstantiator::unigramsForKey(c
return spaceUnigrams;
}
std::vector<Taiyan::Gramambular::Unigram> allUnigrams;
std::vector<Taiyan::Gramambular::Unigram> miscUnigrams;
std::vector<Taiyan::Gramambular::Unigram> symbolUnigrams;
std::vector<Taiyan::Gramambular::Unigram> userUnigrams;
std::vector<Taiyan::Gramambular::Unigram> cnsUnigrams;
std::vector<Gramambular::Unigram> allUnigrams;
std::vector<Gramambular::Unigram> miscUnigrams;
std::vector<Gramambular::Unigram> symbolUnigrams;
std::vector<Gramambular::Unigram> userUnigrams;
std::vector<Gramambular::Unigram> cnsUnigrams;
std::unordered_set<std::string> excludedValues;
std::unordered_set<std::string> insertedValues;
if (m_excludedPhrases.hasUnigramsForKey(key)) {
std::vector<Taiyan::Gramambular::Unigram> excludedUnigrams = m_excludedPhrases.unigramsForKey(key);
std::vector<Gramambular::Unigram> excludedUnigrams = m_excludedPhrases.unigramsForKey(key);
transform(excludedUnigrams.begin(), excludedUnigrams.end(),
inserter(excludedValues, excludedValues.end()),
[](const Taiyan::Gramambular::Unigram& u) { return u.keyValue.value; });
[](const Gramambular::Unigram& u) { return u.keyValue.value; });
}
if (m_userPhrases.hasUnigramsForKey(key)) {
std::vector<Taiyan::Gramambular::Unigram> rawUserUnigrams = m_userPhrases.unigramsForKey(key);
std::vector<Gramambular::Unigram> rawUserUnigrams = m_userPhrases.unigramsForKey(key);
// 用這句指令讓使用者語彙檔案內的詞條優先順序隨著行數增加而逐漸增高。
// 這樣一來就可以在就地新增語彙時徹底複寫優先權。
std::reverse(rawUserUnigrams.begin(), rawUserUnigrams.end());
@ -161,22 +161,22 @@ const std::vector<Taiyan::Gramambular::Unigram> LMInstantiator::unigramsForKey(c
}
if (m_languageModel.hasUnigramsForKey(key)) {
std::vector<Taiyan::Gramambular::Unigram> rawGlobalUnigrams = m_languageModel.unigramsForKey(key);
std::vector<Gramambular::Unigram> rawGlobalUnigrams = m_languageModel.unigramsForKey(key);
allUnigrams = filterAndTransformUnigrams(rawGlobalUnigrams, excludedValues, insertedValues);
}
if (m_miscModel.hasUnigramsForKey(key)) {
std::vector<Taiyan::Gramambular::Unigram> rawMiscUnigrams = m_miscModel.unigramsForKey(key);
std::vector<Gramambular::Unigram> rawMiscUnigrams = m_miscModel.unigramsForKey(key);
miscUnigrams = filterAndTransformUnigrams(rawMiscUnigrams, excludedValues, insertedValues);
}
if (m_symbolModel.hasUnigramsForKey(key)) {
std::vector<Taiyan::Gramambular::Unigram> rawSymbolUnigrams = m_symbolModel.unigramsForKey(key);
if (m_symbolModel.hasUnigramsForKey(key) && m_symbolEnabled) {
std::vector<Gramambular::Unigram> rawSymbolUnigrams = m_symbolModel.unigramsForKey(key);
symbolUnigrams = filterAndTransformUnigrams(rawSymbolUnigrams, excludedValues, insertedValues);
}
if (m_cnsModel.hasUnigramsForKey(key) && m_cnsEnabled) {
std::vector<Taiyan::Gramambular::Unigram> rawCNSUnigrams = m_cnsModel.unigramsForKey(key);
std::vector<Gramambular::Unigram> rawCNSUnigrams = m_cnsModel.unigramsForKey(key);
cnsUnigrams = filterAndTransformUnigrams(rawCNSUnigrams, excludedValues, insertedValues);
}
@ -214,11 +214,22 @@ void LMInstantiator::setCNSEnabled(bool enabled)
{
m_cnsEnabled = enabled;
}
bool LMInstantiator::cnsEnabled()
{
return m_cnsEnabled;
}
void LMInstantiator::setSymbolEnabled(bool enabled)
{
m_symbolEnabled = enabled;
}
bool LMInstantiator::symbolEnabled()
{
return m_symbolEnabled;
}
void LMInstantiator::setExternalConverterEnabled(bool enabled)
{
m_externalConverterEnabled = enabled;
@ -234,9 +245,9 @@ void LMInstantiator::setExternalConverter(std::function<std::string(std::string)
m_externalConverter = externalConverter;
}
const std::vector<Taiyan::Gramambular::Unigram> LMInstantiator::filterAndTransformUnigrams(const std::vector<Taiyan::Gramambular::Unigram> unigrams, const std::unordered_set<std::string>& excludedValues, std::unordered_set<std::string>& insertedValues)
const std::vector<Gramambular::Unigram> LMInstantiator::filterAndTransformUnigrams(const std::vector<Gramambular::Unigram> unigrams, const std::unordered_set<std::string>& excludedValues, std::unordered_set<std::string>& insertedValues)
{
std::vector<Taiyan::Gramambular::Unigram> results;
std::vector<Gramambular::Unigram> results;
for (auto&& unigram : unigrams) {
// excludedValues filters out the unigrams with the original value.
@ -258,7 +269,7 @@ const std::vector<Taiyan::Gramambular::Unigram> LMInstantiator::filterAndTransfo
value = replacement;
}
if (insertedValues.find(value) == insertedValues.end()) {
Taiyan::Gramambular::Unigram g;
Gramambular::Unigram g;
g.keyValue.value = value;
g.keyValue.key = unigram.keyValue.key;
g.score = unigram.score;

View File

@ -31,11 +31,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
// to avoid creating new string objects; the parser is a simple DFA
using namespace std;
using namespace Taiyan::Gramambular;
using namespace Gramambular;
namespace vChewing {
class CoreLM : public Taiyan::Gramambular::LanguageModel {
class CoreLM : public Gramambular::LanguageModel {
public:
CoreLM();
~CoreLM();
@ -45,8 +45,8 @@ public:
void close();
void dump();
virtual const std::vector<Taiyan::Gramambular::Bigram> bigramsForKeys(const string& preceedingKey, const string& key);
virtual const std::vector<Taiyan::Gramambular::Unigram> unigramsForKey(const string& key);
virtual const std::vector<Gramambular::Bigram> bigramsForKeys(const string& preceedingKey, const string& key);
virtual const std::vector<Gramambular::Unigram> unigramsForKey(const string& key);
virtual bool hasUnigramsForKey(const string& key);
protected:

View File

@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include <unistd.h>
#include <syslog.h>
using namespace Taiyan::Gramambular;
using namespace Gramambular;
vChewing::CoreLM::CoreLM()
: fd(-1)
@ -292,14 +292,14 @@ void vChewing::CoreLM::dump()
}
}
const std::vector<Taiyan::Gramambular::Bigram> vChewing::CoreLM::bigramsForKeys(const string& preceedingKey, const string& key)
const std::vector<Gramambular::Bigram> vChewing::CoreLM::bigramsForKeys(const string& preceedingKey, const string& key)
{
return std::vector<Taiyan::Gramambular::Bigram>();
return std::vector<Gramambular::Bigram>();
}
const std::vector<Taiyan::Gramambular::Unigram> vChewing::CoreLM::unigramsForKey(const string& key)
const std::vector<Gramambular::Unigram> vChewing::CoreLM::unigramsForKey(const string& key)
{
std::vector<Taiyan::Gramambular::Unigram> v;
std::vector<Gramambular::Unigram> v;
map<const char *, vector<Row> >::const_iterator i = keyRowMap.find(key.c_str());
if (i != keyRowMap.end()) {

View File

@ -80,23 +80,23 @@ void vChewing::ParselessLM::close()
}
}
const std::vector<Taiyan::Gramambular::Bigram>
const std::vector<Gramambular::Bigram>
vChewing::ParselessLM::bigramsForKeys(
const std::string& preceedingKey, const std::string& key)
{
return std::vector<Taiyan::Gramambular::Bigram>();
return std::vector<Gramambular::Bigram>();
}
const std::vector<Taiyan::Gramambular::Unigram>
const std::vector<Gramambular::Unigram>
vChewing::ParselessLM::unigramsForKey(const std::string& key)
{
if (db_ == nullptr) {
return std::vector<Taiyan::Gramambular::Unigram>();
return std::vector<Gramambular::Unigram>();
}
std::vector<Taiyan::Gramambular::Unigram> results;
std::vector<Gramambular::Unigram> results;
for (const auto& row : db_->findRows(key + " ")) {
Taiyan::Gramambular::Unigram unigram;
Gramambular::Unigram unigram;
// Move ahead until we encounter the first space. This is the key.
auto it = row.begin();

View File

@ -29,7 +29,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
namespace vChewing {
class ParselessLM : public Taiyan::Gramambular::LanguageModel {
class ParselessLM : public Gramambular::LanguageModel {
public:
~ParselessLM() override;
@ -37,9 +37,9 @@ public:
bool open(const std::string_view& path);
void close();
const std::vector<Taiyan::Gramambular::Bigram> bigramsForKeys(
const std::vector<Gramambular::Bigram> bigramsForKeys(
const std::string& preceedingKey, const std::string& key) override;
const std::vector<Taiyan::Gramambular::Unigram> unigramsForKey(
const std::vector<Gramambular::Unigram> unigramsForKey(
const std::string& key) override;
bool hasUnigramsForKey(const std::string& key) override;

View File

@ -34,7 +34,7 @@ static double Score(size_t eventCount,
double timestamp,
double lambda);
static bool IsEndingPunctuation(const std::string& value);
static std::string WalkedNodesToKey(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
static std::string WalkedNodesToKey(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex);
UserOverrideModel::UserOverrideModel(size_t capacity, double decayConstant)
@ -43,7 +43,7 @@ UserOverrideModel::UserOverrideModel(size_t capacity, double decayConstant)
m_decayExponent = log(0.5) / decayConstant;
}
void UserOverrideModel::observe(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
void UserOverrideModel::observe(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex,
const std::string& candidate,
double timestamp) {
@ -76,7 +76,7 @@ void UserOverrideModel::observe(const std::vector<Taiyan::Gramambular::NodeAncho
}
}
std::string UserOverrideModel::suggest(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
std::string UserOverrideModel::suggest(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex,
double timestamp) {
std::string key = WalkedNodesToKey(walkedNodes, cursorIndex);
@ -138,12 +138,12 @@ static bool IsEndingPunctuation(const std::string& value) {
return value == "" || value == "" || value== "" || value == "" ||
value == "" || value == "" || value== "" || value == "";
}
static std::string WalkedNodesToKey(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
static std::string WalkedNodesToKey(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex) {
std::stringstream s;
std::vector<Taiyan::Gramambular::NodeAnchor> n;
std::vector<Gramambular::NodeAnchor> n;
size_t ll = 0;
for (std::vector<Taiyan::Gramambular::NodeAnchor>::const_iterator i = walkedNodes.begin();
for (std::vector<Gramambular::NodeAnchor>::const_iterator i = walkedNodes.begin();
i != walkedNodes.end();
++i) {
const auto& nn = *i;
@ -154,7 +154,7 @@ static std::string WalkedNodesToKey(const std::vector<Taiyan::Gramambular::NodeA
}
}
std::vector<Taiyan::Gramambular::NodeAnchor>::const_reverse_iterator r = n.rbegin();
std::vector<Gramambular::NodeAnchor>::const_reverse_iterator r = n.rbegin();
if (r == n.rend()) {
return "";

View File

@ -27,18 +27,18 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
namespace vChewing {
using namespace Taiyan::Gramambular;
using namespace Gramambular;
class UserOverrideModel {
public:
UserOverrideModel(size_t capacity, double decayConstant);
void observe(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
void observe(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex,
const std::string& candidate,
double timestamp);
std::string suggest(const std::vector<Taiyan::Gramambular::NodeAnchor>& walkedNodes,
std::string suggest(const std::vector<Gramambular::NodeAnchor>& walkedNodes,
size_t cursorIndex,
double timestamp);

View File

@ -27,7 +27,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
namespace vChewing {
class UserPhrasesLM : public Taiyan::Gramambular::LanguageModel
class UserPhrasesLM : public Gramambular::LanguageModel
{
public:
UserPhrasesLM();
@ -46,8 +46,8 @@ public:
return 0.0;
}
virtual const std::vector<Taiyan::Gramambular::Bigram> bigramsForKeys(const std::string& preceedingKey, const std::string& key);
virtual const std::vector<Taiyan::Gramambular::Unigram> unigramsForKey(const std::string& key);
virtual const std::vector<Gramambular::Bigram> bigramsForKeys(const std::string& preceedingKey, const std::string& key);
virtual const std::vector<Gramambular::Unigram> unigramsForKey(const std::string& key);
virtual bool hasUnigramsForKey(const std::string& key);
protected:

View File

@ -121,19 +121,19 @@ void UserPhrasesLM::dump()
}
}
const std::vector<Taiyan::Gramambular::Bigram> UserPhrasesLM::bigramsForKeys(const std::string& preceedingKey, const std::string& key)
const std::vector<Gramambular::Bigram> UserPhrasesLM::bigramsForKeys(const std::string& preceedingKey, const std::string& key)
{
return std::vector<Taiyan::Gramambular::Bigram>();
return std::vector<Gramambular::Bigram>();
}
const std::vector<Taiyan::Gramambular::Unigram> UserPhrasesLM::unigramsForKey(const std::string& key)
const std::vector<Gramambular::Unigram> UserPhrasesLM::unigramsForKey(const std::string& key)
{
std::vector<Taiyan::Gramambular::Unigram> v;
std::vector<Gramambular::Unigram> v;
auto iter = keyRowMap.find(key);
if (iter != keyRowMap.end()) {
const std::vector<Row>& rows = iter->second;
for (const auto& row : rows) {
Taiyan::Gramambular::Unigram g;
Gramambular::Unigram g;
g.keyValue.key = row.key;
g.keyValue.value = row.value;
g.score = overridedValue();

View File

@ -36,6 +36,8 @@ NS_ASSUME_NONNULL_BEGIN
+ (BOOL)writeUserPhrase:(NSString *)userPhrase inputMode:(InputMode)mode areWeDuplicating:(BOOL)areWeDuplicating;
+ (void)setPhraseReplacementEnabled:(BOOL)phraseReplacementEnabled;
+ (void)setCNSEnabled:(BOOL)cnsEnabled;
+ (void)setSymbolEnabled:(BOOL)symbolEnabled;
+ (NSString *)specifyBundleDataPath:(NSString *)filename;
+ (NSString *)userPhrasesDataPath:(InputMode)mode;
+ (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode;

View File

@ -371,4 +371,10 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
gLangModelCHS.setCNSEnabled(cnsEnabled);
}
+ (void)setSymbolEnabled:(BOOL)symbolEnabled
{
gLangModelCHT.setSymbolEnabled(symbolEnabled);
gLangModelCHS.setSymbolEnabled(symbolEnabled);
}
@end

View File

@ -24,7 +24,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "KeyValuePair.h"
namespace Taiyan {
namespace Gramambular {
class Bigram {
public:
@ -88,6 +87,6 @@ inline bool Bigram::operator<(const Bigram& another) const {
return false;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -26,7 +26,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "Grid.h"
#include "LanguageModel.h"
namespace Taiyan {
namespace Gramambular {
class BlockReadingBuilder {
@ -201,6 +200,6 @@ inline const std::string BlockReadingBuilder::Join(
return result;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -27,7 +27,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "NodeAnchor.h"
#include "Span.h"
namespace Taiyan {
namespace Gramambular {
class Grid {
@ -61,7 +60,46 @@ public:
const std::string& value,
float overridingScore);
std::string dumpDOT();
std::string dumpDOT() {
std::stringstream sst;
sst << "digraph {" << std::endl;
sst << "graph [ rankdir=LR ];" << std::endl;
sst << "BOS;" << std::endl;
for (size_t p = 0; p < m_spans.size(); p++) {
Span& span = m_spans[p];
for (size_t ni = 0; ni <= span.maximumLength(); ni++) {
Node* np = span.nodeOfLength(ni);
if (np) {
if (!p) {
sst << "BOS -> " << np->currentKeyValue().value << ";" << std::endl;
}
sst << np->currentKeyValue().value << ";" << std::endl;
if (p + ni < m_spans.size()) {
Span& dstSpan = m_spans[p + ni];
for (size_t q = 0; q <= dstSpan.maximumLength(); q++) {
Node* dn = dstSpan.nodeOfLength(q);
if (dn) {
sst << np->currentKeyValue().value << " -> "
<< dn->currentKeyValue().value << ";" << std::endl;
}
}
}
if (p + ni == m_spans.size()) {
sst << np->currentKeyValue().value << " -> "
<< "EOS;" << std::endl;
}
}
}
}
sst << "EOS;" << std::endl;
sst << "}";
return sst.str();
}
protected:
std::vector<Span> m_spans;
@ -218,6 +256,6 @@ inline void Grid::overrideNodeScoreForSelectedCandidate(
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -1,70 +0,0 @@
// Copyright (c) 2011 and onwards The OpenVanilla Project (MIT License).
// All possible vChewing-specific modifications are (c) 2021 and onwards The vChewing Project (MIT-NTL License).
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor,
except as required to fulfill notice requirements above.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "Grid.h"
#include <iostream>
#include <string>
namespace Taiyan {
namespace Gramambular {
std::string Grid::dumpDOT() {
std::stringstream sst;
sst << "digraph {" << std::endl;
sst << "graph [ rankdir=LR ];" << std::endl;
sst << "BOS;" << std::endl;
for (size_t p = 0; p < m_spans.size(); p++) {
Span& span = m_spans[p];
for (size_t ni = 0; ni <= span.maximumLength(); ni++) {
Node* np = span.nodeOfLength(ni);
if (np) {
if (!p) {
sst << "BOS -> " << np->currentKeyValue().value << ";" << std::endl;
}
sst << np->currentKeyValue().value << ";" << std::endl;
if (p + ni < m_spans.size()) {
Span& dstSpan = m_spans[p + ni];
for (size_t q = 0; q <= dstSpan.maximumLength(); q++) {
Node* dn = dstSpan.nodeOfLength(q);
if (dn) {
sst << np->currentKeyValue().value << " -> "
<< dn->currentKeyValue().value << ";" << std::endl;
}
}
}
if (p + ni == m_spans.size()) {
sst << np->currentKeyValue().value << " -> "
<< "EOS;" << std::endl;
}
}
}
}
sst << "EOS;" << std::endl;
sst << "}";
return sst.str();
}
} // namespace Gramambular
} // namespace Taiyan

View File

@ -23,7 +23,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include <ostream>
#include <string>
namespace Taiyan {
namespace Gramambular {
class KeyValuePair {
@ -54,6 +53,6 @@ inline bool KeyValuePair::operator<(const KeyValuePair& another) const {
return false;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -26,7 +26,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "Bigram.h"
#include "Unigram.h"
namespace Taiyan {
namespace Gramambular {
class LanguageModel {
@ -39,6 +38,6 @@ public:
virtual bool hasUnigramsForKey(const std::string& key) = 0;
};
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -27,7 +27,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "LanguageModel.h"
namespace Taiyan {
namespace Gramambular {
class Node {
@ -209,6 +208,6 @@ inline const KeyValuePair Node::currentKeyValue() const {
}
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -24,7 +24,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "Node.h"
namespace Taiyan {
namespace Gramambular {
struct NodeAnchor {
@ -59,6 +58,6 @@ inline std::ostream& operator<<(std::ostream& stream,
return stream;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -26,7 +26,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "Node.h"
namespace Taiyan {
namespace Gramambular {
class Span {
public:
@ -88,6 +87,6 @@ inline Node* Span::nodeOfLength(size_t length) {
inline size_t Span::maximumLength() const { return m_maximumLength; }
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -24,7 +24,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "KeyValuePair.h"
namespace Taiyan {
namespace Gramambular {
class Unigram {
@ -86,6 +85,6 @@ inline bool Unigram::ScoreCompare(const Unigram& a, const Unigram& b) {
return a.score > b.score;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -25,7 +25,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "Grid.h"
namespace Taiyan {
namespace Gramambular {
class Walker {
@ -80,6 +79,6 @@ inline const std::vector<NodeAnchor> Walker::reverseWalk(
return *result;
}
} // namespace Gramambular
} // namespace Taiyan
#endif

View File

@ -28,7 +28,7 @@
"Edit Phrase Replacement Table…" = "Edit Phrase Replacement Table…";
"Use Phrase Replacement" = "Use Phrase Replacement";
"Candidates keys cannot be empty." = "Candidates keys cannot be empty.";
"Candidate keys can only contain ASCII characters like alphanumerals." = "Candidate keys can only contain ASCII characters like alphanumerals.";
"Candidate keys can only contain ASCII characters like alphanumericals." = "Candidate keys can only contain ASCII characters like alphanumericals.";
"Candidate keys cannot contain space." = "Candidate keys cannot contain space.";
"There should not be duplicated keys." = "There should not be duplicated keys.";
"Please specify at least 4 candidate keys." = "Please specify at least 4 candidate keys.";
@ -47,8 +47,10 @@
"zh-Hans" = "Simplified Chinese";
"zh-Hant" = "Traditional Chinese";
"ja" = "Japanese";
"Alphanumerical Input Mode" = "Alphanumerical Input Mode";
"Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)";
"Apple Zhuyin Eten" = "Apple Zhuyin Eten";
"Symbol & Emoji Input" = "Symbol & Emoji Input";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "CommonSymbols";

View File

@ -28,7 +28,7 @@
"Edit Phrase Replacement Table…" = "Edit Phrase Replacement Table…";
"Use Phrase Replacement" = "Use Phrase Replacement";
"Candidates keys cannot be empty." = "Candidates keys cannot be empty.";
"Candidate keys can only contain ASCII characters like alphanumerals." = "Candidate keys can only contain ASCII characters like alphanumerals.";
"Candidate keys can only contain ASCII characters like alphanumericals." = "Candidate keys can only contain ASCII characters like alphanumericals.";
"Candidate keys cannot contain space." = "Candidate keys cannot contain space.";
"There should not be duplicated keys." = "There should not be duplicated keys.";
"Please specify at least 4 candidate keys." = "Please specify at least 4 candidate keys.";
@ -47,8 +47,10 @@
"zh-Hans" = "Simplified Chinese";
"zh-Hant" = "Traditional Chinese";
"ja" = "Japanese";
"Alphanumerical Input Mode" = "Alphanumerical Input Mode";
"Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)";
"Apple Zhuyin Eten" = "Apple Zhuyin Eten";
"Symbol & Emoji Input" = "Symbol & Emoji Input";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "CommonSymbols";

View File

@ -28,7 +28,7 @@
"Edit Phrase Replacement Table…" = "言葉置換表を編集…";
"Use Phrase Replacement" = "言葉置換機能";
"Candidates keys cannot be empty." = "言選り用キー陣列に何かキーをご登録ください。";
"Candidate keys can only contain ASCII characters like alphanumerals." = "言選り用キー陣列にはASCII文字だけをご登録ください英数など。";
"Candidate keys can only contain ASCII characters like alphanumericals." = "言選り用キー陣列にはASCII文字だけをご登録ください英数など。";
"Candidate keys cannot contain space." = "言選り用キー陣列にスペースキーは登録できません。";
"There should not be duplicated keys." = "言選り用キー陣列に同じキーの重複登録はできません。";
"Please specify at least 4 candidate keys." = "言選り用キー陣列に少なくとも4つのキーをご登録ください。";
@ -47,8 +47,10 @@
"zh-Hans" = "簡體中国語";
"zh-Hant" = "繁體中国語";
"ja" = "和語";
"Alphanumerical Input Mode" = "英数入力モード";
"Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(大千標準)";
"Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(倚天伝統)";
"Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)";
"Symbol & Emoji Input" = "符号&絵文字入力";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -28,7 +28,7 @@
"Edit Phrase Replacement Table…" = "编辑语汇置换表…";
"Use Phrase Replacement" = "使用语汇置换";
"Candidates keys cannot be empty." = "您必须指定选字键。";
"Candidate keys can only contain ASCII characters like alphanumerals." = "选字键只能是英数等 ASCII 字符。";
"Candidate keys can only contain ASCII characters like alphanumericals." = "选字键只能是英数等 ASCII 字符。";
"Candidate keys cannot contain space." = "选字键不得包含空格。";
"There should not be duplicated keys." = "选字键不得重复。";
"Please specify at least 4 candidate keys." = "请至少指定四个选字键。";
@ -47,8 +47,10 @@
"zh-Hans" = "简体中文";
"zh-Hant" = "繁体中文";
"ja" = "和文";
"Alphanumerical Input Mode" = "原生英数输入模式";
"Apple Zhuyin Bopomofo" = "Apple 标准注音键盘布局";
"Apple Zhuyin Eten" = "Apple 倚天注音键盘布局";
"Symbol & Emoji Input" = "符号&绘文字输入";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -28,7 +28,7 @@
"Edit Phrase Replacement Table…" = "編輯語彙置換表…";
"Use Phrase Replacement" = "使用語彙置換";
"Candidates keys cannot be empty." = "您必須指定選字鍵。";
"Candidate keys can only contain ASCII characters like alphanumerals." = "選字鍵只能是英數等 ASCII 字符。";
"Candidate keys can only contain ASCII characters like alphanumericals." = "選字鍵只能是英數等 ASCII 字符。";
"Candidate keys cannot contain space." = "選字鍵不得包含空格。";
"There should not be duplicated keys." = "選字鍵不得重複。";
"Please specify at least 4 candidate keys." = "請至少指定四個選字鍵。";
@ -47,8 +47,10 @@
"zh-Hans" = "簡體中文";
"zh-Hant" = "繁體中文";
"ja" = "和文";
"Alphanumerical Input Mode" = "原生英數輸入模式";
"Apple Zhuyin Bopomofo" = "Apple 標準注音鍵盤佈局";
"Apple Zhuyin Eten" = "Apple 倚天注音鍵盤佈局";
"Symbol & Emoji Input" = "符號&繪文字輸入";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -100,22 +100,11 @@ fileprivate class HorizontalCandidateView: NSView {
}
override func draw(_ dirtyRect: NSRect) {
// Give a standalone layer to the candidate list panel
self.wantsLayer = true
self.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor
self.layer?.borderWidth = 1.0
self.layer?.cornerRadius = 6.0
let bounds = self.bounds
NSColor.controlBackgroundColor.setFill() // Candidate list panel base background
NSBezierPath.fill(bounds)
if #available(macOS 10.14, *) {
NSColor.separatorColor.setStroke()
} else {
NSColor.darkGray.setStroke()
}
NSColor.systemGray.withAlphaComponent(0.75).setStroke()
NSBezierPath.strokeLine(from: NSPoint(x: bounds.size.width, y: 0.0), to: NSPoint(x: bounds.size.width, y: bounds.size.height))
@ -129,7 +118,15 @@ fileprivate class HorizontalCandidateView: NSView {
var activeCandidateIndexAttr = keyLabelAttrDict
var activeCandidateAttr = candidateAttrDict
if index == highlightedIndex {
NSColor.alternateSelectedControlColor.setFill() // The background color of the highlightened candidate
// The background color of the highlightened candidate
switch ctlInputMethod.currentKeyHandler.inputMode {
case InputMode.imeModeCHS:
NSColor.systemRed.withAlphaComponent(0.75).setFill()
case InputMode.imeModeCHT:
NSColor.systemBlue.withAlphaComponent(0.75).setFill()
default:
NSColor.alternateSelectedControlColor.setFill()
}
activeCandidateIndexAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.84) // The index text color of the highlightened candidate
activeCandidateAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor // The phrase text color of the highlightened candidate
} else {
@ -199,36 +196,50 @@ public class HorizontalCandidateController: CandidateController {
public init() {
var contentRect = NSRect(x: 128.0, y: 128.0, width: 0.0, height: 0.0)
let styleMask: NSWindow.StyleMask = [.borderless, .nonactivatingPanel]
let styleMask: NSWindow.StyleMask = [.nonactivatingPanel]
let panel = NSPanel(contentRect: contentRect, styleMask: styleMask, backing: .buffered, defer: false)
panel.level = NSWindow.Level(Int(kCGPopUpMenuWindowLevel) + 1)
panel.hasShadow = true
panel.isOpaque = false
panel.backgroundColor = NSColor.clear // Transparentify everything outside of the candidate list panel
panel.backgroundColor = NSColor.clear
contentRect.origin = NSPoint.zero
candidateView = HorizontalCandidateView(frame: contentRect)
candidateView.wantsLayer = true
candidateView.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor
candidateView.layer?.borderWidth = 1.0
if #available(macOS 10.13, *) {
candidateView.layer?.cornerRadius = 6.0
}
panel.contentView?.addSubview(candidateView)
contentRect.size = NSSize(width: 20.0, height: 15.0) // Reduce the button width
contentRect.size = NSSize(width: 20.0, height: 10.0) // Reduce the button width
let buttonAttribute: [NSAttributedString.Key : Any] = [.font : NSFont.systemFont(ofSize: 9.0)]
nextPageButton = NSButton(frame: contentRect)
nextPageButton.setButtonType(.momentaryLight)
nextPageButton.bezelStyle = .shadowlessSquare
NSColor.controlBackgroundColor.setFill()
NSBezierPath.fill(nextPageButton.bounds)
nextPageButton.wantsLayer = true
nextPageButton.layer?.masksToBounds = true
nextPageButton.layer?.borderColor = NSColor.clear.cgColor // Attempt to remove the system default layer border color - step 1
nextPageButton.layer?.borderWidth = 0.0 // Attempt to remove the system default layer border color - step 2
nextPageButton.layer?.backgroundColor = NSColor.black.cgColor // Button Background Color. Otherwise the button will be half-transparent in macOS Monterey Dark Mode.
nextPageButton.attributedTitle = NSMutableAttributedString(string: "⬇︎") // Next Page Arrow
nextPageButton.layer?.borderColor = NSColor.clear.cgColor
nextPageButton.layer?.borderWidth = 0.0
nextPageButton.setButtonType(.momentaryLight)
nextPageButton.bezelStyle = .disclosure
nextPageButton.userInterfaceLayoutDirection = .leftToRight
nextPageButton.attributedTitle = NSMutableAttributedString(string: " ", attributes: buttonAttribute) // Next Page Arrow
prevPageButton = NSButton(frame: contentRect)
prevPageButton.setButtonType(.momentaryLight)
prevPageButton.bezelStyle = .shadowlessSquare
NSColor.controlBackgroundColor.setFill()
NSBezierPath.fill(prevPageButton.bounds)
prevPageButton.wantsLayer = true
prevPageButton.layer?.masksToBounds = true
prevPageButton.layer?.borderColor = NSColor.clear.cgColor // Attempt to remove the system default layer border color - step 1
prevPageButton.layer?.borderWidth = 0.0 // Attempt to remove the system default layer border color - step 2
prevPageButton.layer?.backgroundColor = NSColor.black.cgColor // Button Background Color. Otherwise the button will be half-transparent in macOS Monterey Dark Mode.
prevPageButton.attributedTitle = NSMutableAttributedString(string: "⬆︎") // Previous Page Arrow
prevPageButton.layer?.borderColor = NSColor.clear.cgColor
prevPageButton.layer?.borderWidth = 0.0
prevPageButton.setButtonType(.momentaryLight)
prevPageButton.bezelStyle = .disclosure
prevPageButton.userInterfaceLayoutDirection = .rightToLeft
prevPageButton.attributedTitle = NSMutableAttributedString(string: " ", attributes: buttonAttribute) // Previous Page Arrow
panel.contentView?.addSubview(nextPageButton)
panel.contentView?.addSubview(prevPageButton)
@ -343,20 +354,20 @@ extension HorizontalCandidateController {
frameRect.size = newSize
candidateView.frame = frameRect
if pageCount > 1 {
if pageCount > 1 && Preferences.showPageButtonsInCandidateWindow {
var buttonRect = nextPageButton.frame
let spacing:CGFloat = 0.0
buttonRect.size.height = floor(newSize.height / 2)
let buttonOriginY = (newSize.height - (buttonRect.size.height * 2.0 + spacing)) / 2.0
buttonRect.origin = NSPoint(x: newSize.width + 8.0, y: buttonOriginY)
buttonRect.origin = NSPoint(x: newSize.width, y: buttonOriginY)
nextPageButton.frame = buttonRect
buttonRect.origin = NSPoint(x: newSize.width + 8.0, y: buttonOriginY + buttonRect.size.height + spacing)
buttonRect.origin = NSPoint(x: newSize.width, y: buttonOriginY + buttonRect.size.height + spacing)
prevPageButton.frame = buttonRect
newSize.width += 52.0
newSize.width += 20
nextPageButton.isHidden = false
prevPageButton.isHidden = false
} else {

View File

@ -69,7 +69,7 @@ fileprivate class VerticalCandidateView: NSView {
let cellWidth = rctCandidate.size.width + cellPadding
let cellHeight = rctCandidate.size.height + cellPadding
if (calculatedWindowWidth < rctCandidate.size.width) {
calculatedWindowWidth = rctCandidate.size.width
calculatedWindowWidth = rctCandidate.size.width + cellPadding
}
newWidths.append(cellWidth)
newHeights.append(cellHeight)
@ -106,22 +106,11 @@ fileprivate class VerticalCandidateView: NSView {
}
override func draw(_ dirtyRect: NSRect) {
// Give a standalone layer to the candidate list panel
self.wantsLayer = true
self.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor
self.layer?.borderWidth = 1.0
self.layer?.cornerRadius = 6.0
let bounds = self.bounds
NSColor.controlBackgroundColor.setFill() // Candidate list panel base background
NSBezierPath.fill(bounds)
if #available(macOS 10.14, *) {
NSColor.separatorColor.setStroke()
} else {
NSColor.darkGray.setStroke()
}
NSColor.systemGray.withAlphaComponent(0.75).setStroke()
NSBezierPath.strokeLine(from: NSPoint(x: bounds.size.width, y: 0.0), to: NSPoint(x: bounds.size.width, y: bounds.size.height))
@ -135,7 +124,15 @@ fileprivate class VerticalCandidateView: NSView {
var activeCandidateIndexAttr = keyLabelAttrDict
var activeCandidateAttr = candidateAttrDict
if index == highlightedIndex {
NSColor.alternateSelectedControlColor.setFill() // The background color of the highlightened candidate
// The background color of the highlightened candidate
switch ctlInputMethod.currentKeyHandler.inputMode {
case InputMode.imeModeCHS:
NSColor.systemRed.withAlphaComponent(0.75).setFill()
case InputMode.imeModeCHT:
NSColor.systemBlue.withAlphaComponent(0.75).setFill()
default:
NSColor.alternateSelectedControlColor.setFill()
}
activeCandidateIndexAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.84) // The index text color of the highlightened candidate
activeCandidateAttr[.foregroundColor] = NSColor.selectedMenuItemTextColor // The phrase text color of the highlightened candidate
} else {
@ -205,36 +202,50 @@ public class VerticalCandidateController: CandidateController {
public init() {
var contentRect = NSRect(x: 128.0, y: 128.0, width: 0.0, height: 0.0)
let styleMask: NSWindow.StyleMask = [.borderless, .nonactivatingPanel]
let styleMask: NSWindow.StyleMask = [.nonactivatingPanel]
let panel = NSPanel(contentRect: contentRect, styleMask: styleMask, backing: .buffered, defer: false)
panel.level = NSWindow.Level(Int(kCGPopUpMenuWindowLevel) + 1)
panel.hasShadow = true
panel.isOpaque = false
panel.backgroundColor = NSColor.clear // Transparentify everything outside of the candidate list panel
panel.backgroundColor = NSColor.clear
contentRect.origin = NSPoint.zero
candidateView = VerticalCandidateView(frame: contentRect)
candidateView.wantsLayer = true
candidateView.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor
candidateView.layer?.borderWidth = 1.0
if #available(macOS 10.13, *) {
candidateView.layer?.cornerRadius = 6.0
}
panel.contentView?.addSubview(candidateView)
contentRect.size = NSSize(width: 20.0, height: 15.0) // Reduce the button width
contentRect.size = NSSize(width: 20.0, height: 10.0) // Reduce the button width
let buttonAttribute: [NSAttributedString.Key : Any] = [.font : NSFont.systemFont(ofSize: 9.0)]
nextPageButton = NSButton(frame: contentRect)
nextPageButton.setButtonType(.momentaryLight)
nextPageButton.bezelStyle = .shadowlessSquare
NSColor.controlBackgroundColor.setFill()
NSBezierPath.fill(nextPageButton.bounds)
nextPageButton.wantsLayer = true
nextPageButton.layer?.masksToBounds = true
nextPageButton.layer?.borderColor = NSColor.clear.cgColor // Attempt to remove the system default layer border color - step 1
nextPageButton.layer?.borderWidth = 0.0 // Attempt to remove the system default layer border color - step 2
nextPageButton.layer?.backgroundColor = NSColor.black.cgColor // Button Background Color. Otherwise the button will be half-transparent in macOS Monterey Dark Mode.
nextPageButton.attributedTitle = NSMutableAttributedString(string: "➡︎") // Next Page Arrow
nextPageButton.layer?.borderColor = NSColor.clear.cgColor
nextPageButton.layer?.borderWidth = 0.0
nextPageButton.setButtonType(.momentaryLight)
nextPageButton.bezelStyle = .disclosure
nextPageButton.userInterfaceLayoutDirection = .leftToRight
nextPageButton.attributedTitle = NSMutableAttributedString(string: " ", attributes: buttonAttribute) // Next Page Arrow
prevPageButton = NSButton(frame: contentRect)
prevPageButton.setButtonType(.momentaryLight)
prevPageButton.bezelStyle = .shadowlessSquare
NSColor.controlBackgroundColor.setFill()
NSBezierPath.fill(prevPageButton.bounds)
prevPageButton.wantsLayer = true
prevPageButton.layer?.masksToBounds = true
prevPageButton.layer?.borderColor = NSColor.clear.cgColor // Attempt to remove the system default layer border color - step 1
prevPageButton.layer?.borderWidth = 0.0 // Attempt to remove the system default layer border color - step 2
prevPageButton.layer?.backgroundColor = NSColor.black.cgColor // Button Background Color. Otherwise the button will be half-transparent in macOS Monterey Dark Mode.
prevPageButton.attributedTitle = NSMutableAttributedString(string: "⬅︎") // Previous Page Arrow
prevPageButton.layer?.borderColor = NSColor.clear.cgColor
prevPageButton.layer?.borderWidth = 0.0
prevPageButton.setButtonType(.momentaryLight)
prevPageButton.bezelStyle = .disclosure
prevPageButton.userInterfaceLayoutDirection = .rightToLeft
prevPageButton.attributedTitle = NSMutableAttributedString(string: " ", attributes: buttonAttribute) // Previous Page Arrow
panel.contentView?.addSubview(nextPageButton)
panel.contentView?.addSubview(prevPageButton)
@ -349,20 +360,20 @@ extension VerticalCandidateController {
frameRect.size = newSize
candidateView.frame = frameRect
if pageCount > 1 {
if pageCount > 1 && Preferences.showPageButtonsInCandidateWindow {
var buttonRect = nextPageButton.frame
let spacing:CGFloat = 0.0
// buttonRect.size.height = floor(candidateTextHeight + cellPadding / 2)
let buttonOriginY = (newSize.height - (buttonRect.size.height * 2.0 + spacing)) // / 2.0
buttonRect.origin = NSPoint(x: newSize.width + 8.0, y: buttonOriginY)
buttonRect.origin = NSPoint(x: newSize.width, y: buttonOriginY)
nextPageButton.frame = buttonRect
buttonRect.origin = NSPoint(x: newSize.width + 8.0, y: buttonOriginY + buttonRect.size.height + spacing)
buttonRect.origin = NSPoint(x: newSize.width, y: buttonOriginY + buttonRect.size.height + spacing)
prevPageButton.frame = buttonRect
newSize.width += 52.0
newSize.width += 20
nextPageButton.isHidden = false
prevPageButton.isHidden = false
} else {

View File

@ -84,58 +84,44 @@ extension RangeReplaceableCollection where Element: Hashable {
menuItem_AppleZhuyinEten.representedObject = String("com.apple.keylayout.ZhuyinEten")
basisKeyboardLayoutButton.menu?.addItem(menuItem_AppleZhuyinEten)
let menuItem_vChewingDachen = NSMenuItem()
menuItem_vChewingDachen.title = String(format: NSLocalizedString("vChewing Dachen (Not Finished Yet)", comment: ""))
menuItem_vChewingDachen.representedObject = String("org.atelierInmu.keyboardlayout.vChewingKeyLayout.vChewingDachen")
basisKeyboardLayoutButton.menu?.addItem(menuItem_vChewingDachen)
let basisKeyboardLayoutID = Preferences.basisKeyboardLayout
for source in list {
func getString(_ key: CFString) -> String? {
if let ptr = TISGetInputSourceProperty(source, key) {
return String(Unmanaged<CFString>.fromOpaque(ptr).takeUnretainedValue())
}
return nil
}
func getBool(_ key: CFString) -> Bool? {
if let ptr = TISGetInputSourceProperty(source, key) {
return Unmanaged<CFBoolean>.fromOpaque(ptr).takeUnretainedValue() == kCFBooleanTrue
}
return nil
}
if let category = getString(kTISPropertyInputSourceCategory) {
if category != String(kTISCategoryKeyboardInputSource) {
if let categoryPtr = TISGetInputSourceProperty(source, kTISPropertyInputSourceCategory) {
let category = Unmanaged<CFString>.fromOpaque(categoryPtr).takeUnretainedValue()
if category != kTISCategoryKeyboardInputSource {
continue
}
} else {
continue
}
if let asciiCapable = getBool(kTISPropertyInputSourceIsASCIICapable) {
if !asciiCapable {
if let asciiCapablePtr = TISGetInputSourceProperty(source, kTISPropertyInputSourceIsASCIICapable) {
let asciiCapable = Unmanaged<CFBoolean>.fromOpaque(asciiCapablePtr).takeUnretainedValue()
if asciiCapable != kCFBooleanTrue {
continue
}
} else {
continue
}
if let sourceType = getString(kTISPropertyInputSourceType) {
if sourceType != String(kTISTypeKeyboardLayout) {
if let sourceTypePtr = TISGetInputSourceProperty(source, kTISPropertyInputSourceType) {
let sourceType = Unmanaged<CFString>.fromOpaque(sourceTypePtr).takeUnretainedValue()
if sourceType != kTISTypeKeyboardLayout {
continue
}
} else {
continue
}
guard let sourceID = getString(kTISPropertyInputSourceID),
let localizedName = getString(kTISPropertyLocalizedName) else {
guard let sourceIDPtr = TISGetInputSourceProperty(source, kTISPropertyInputSourceID),
let localizedNamePtr = TISGetInputSourceProperty(source, kTISPropertyLocalizedName) else {
continue
}
let sourceID = String(Unmanaged<CFString>.fromOpaque(sourceIDPtr).takeUnretainedValue())
let localizedName = String(Unmanaged<CFString>.fromOpaque(localizedNamePtr).takeUnretainedValue())
let menuItem = NSMenuItem()
menuItem.title = localizedName
menuItem.representedObject = sourceID
@ -154,8 +140,6 @@ extension RangeReplaceableCollection where Element: Hashable {
chosenBaseKeyboardLayoutItem = menuItem_AppleZhuyinBopomofo
case "com.apple.keylayout.ZhuyinEten":
chosenBaseKeyboardLayoutItem = menuItem_AppleZhuyinEten
case "org.atelierInmu.keyboardlayout.vChewingKeyLayout.zhuyindachen":
chosenBaseKeyboardLayoutItem = menuItem_vChewingDachen
default:
break // nothing to do
}
@ -177,6 +161,16 @@ extension RangeReplaceableCollection where Element: Hashable {
}
// CNS
//
@IBAction func toggleCNSSupport(_ sender: Any) {
mgrLangModel.setCNSEnabled(Preferences.cns11643Enabled)
}
@IBAction func toggleSymbolInputEnabled(_ sender: Any) {
mgrLangModel.setSymbolEnabled(Preferences.symbolInputEnabled)
}
@IBAction func toggleTrad2KangXiAction(_ sender: Any) {
if chkTrad2KangXi.state == .on && chkTrad2JISShinjitai.state == .on {
Preferences.toggleShiftJISShinjitaiOutputEnabled()

View File

@ -22,7 +22,7 @@
<window title="vChewing Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="1" userLabel="frmPrefWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="401" y="295" width="501" height="469"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="501" height="469"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -51,7 +51,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="28">
<rect key="frame" x="30" y="154" width="135" height="17"/>
<rect key="frame" x="30" y="155" width="135" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="MM2-Vd-p3u"/>
</constraints>
@ -62,7 +62,7 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="90">
<rect key="frame" x="167" y="147" width="86" height="26"/>
<rect key="frame" x="167" y="149" width="86" height="26"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="79" id="EV1-Xz-Wns"/>
</constraints>
@ -87,7 +87,7 @@
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="5Rz-c8-hp9">
<rect key="frame" x="18" y="127" width="306" height="15"/>
<rect key="frame" x="18" y="129" width="306" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Change user interface language (will reboot the IME)." id="ZEv-Q2-mYL">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -95,7 +95,7 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oS6-u5-7dP">
<rect key="frame" x="167" y="92" width="232" height="26"/>
<rect key="frame" x="167" y="96" width="232" height="26"/>
<popUpButtonCell key="cell" type="push" title="Auto-Select" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="GlJ-Ns-9eE" id="bft-Wv-kiJ">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
@ -114,7 +114,7 @@
</connections>
</popUpButton>
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L5M-VG-W1X">
<rect key="frame" x="42" y="99" width="123" height="17"/>
<rect key="frame" x="42" y="103" width="123" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="ghY-A7-6fH"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="119" id="u5Y-ut-0cZ"/>
@ -126,7 +126,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="Yl4-Ar-L6r">
<rect key="frame" x="18" y="70" width="314" height="17"/>
<rect key="frame" x="18" y="73" width="314" height="19"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Choose your preferred layout of the candidate window." id="xC5-yV-1W1">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -134,12 +134,9 @@
</textFieldCell>
</textField>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
<rect key="frame" x="170" y="21" width="209" height="38"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="hZi-hN-cEm"/>
</constraints>
<rect key="frame" x="169" y="49" width="210" height="17"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="209" height="18"/>
<size key="cellSize" width="103" height="17"/>
<size key="intercellSpacing" width="4" height="2"/>
<buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" inset="2" id="20">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@ -151,6 +148,8 @@
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
</column>
<column>
<buttonCell type="radio" title="Horizontal" imagePosition="left" alignment="left" controlSize="small" tag="1" inset="2" id="21">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
@ -161,8 +160,19 @@
<binding destination="32" name="selectedTag" keyPath="values.UseHorizontalCandidateList" id="105"/>
</connections>
</matrix>
<button verticalHuggingPriority="750" id="233">
<rect key="frame" x="169" y="25.5" width="245" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Show page buttons in candidate list" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="shc-Nu-UsM">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
<connections>
<binding destination="32" name="value" keyPath="values.ShowPageButtonsInCandidateWindow" id="6BK-hU-lqs"/>
</connections>
</buttonCell>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="15" y="41" width="150" height="17"/>
<rect key="frame" x="34" y="50" width="131" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Candidate List Layout:" id="24">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -172,35 +182,33 @@
</subviews>
<constraints>
<constraint firstItem="28" firstAttribute="leading" relation="lessThanOrEqual" secondItem="mUW-kr-ivL" secondAttribute="leading" constant="32" id="04F-Wm-qbD"/>
<constraint firstItem="90" firstAttribute="firstBaseline" secondItem="28" secondAttribute="baseline" constant="-1" id="1kd-0D-n8t"/>
<constraint firstItem="23" firstAttribute="top" secondItem="Yl4-Ar-L6r" secondAttribute="bottom" constant="12" id="22t-Dk-0ff"/>
<constraint firstAttribute="bottom" secondItem="19" secondAttribute="bottom" constant="21" id="2DK-FE-SdC"/>
<constraint firstItem="19" firstAttribute="leading" secondItem="23" secondAttribute="trailing" constant="7" id="2d4-2f-NLT"/>
<constraint firstItem="90" firstAttribute="firstBaseline" secondItem="28" secondAttribute="baseline" constant="-2" id="1kd-0D-n8t"/>
<constraint firstItem="23" firstAttribute="top" secondItem="Yl4-Ar-L6r" secondAttribute="bottom" constant="8" id="22t-Dk-0ff"/>
<constraint firstItem="19" firstAttribute="centerY" secondItem="23" secondAttribute="centerY" id="3BJ-BD-eNV"/>
<constraint firstItem="90" firstAttribute="leading" secondItem="28" secondAttribute="trailing" constant="7" id="3eo-YE-c0b"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Yl4-Ar-L6r" secondAttribute="trailing" constant="20" symbolic="YES" id="5dI-dv-asp"/>
<constraint firstItem="19" firstAttribute="top" secondItem="23" secondAttribute="top" constant="-1" id="6Rb-af-NYB"/>
<constraint firstItem="90" firstAttribute="leading" secondItem="oS6-u5-7dP" secondAttribute="leading" id="7L2-7K-w0G"/>
<constraint firstItem="23" firstAttribute="leading" relation="lessThanOrEqual" secondItem="mUW-kr-ivL" secondAttribute="leading" constant="17" id="8sE-nB-eSO"/>
<constraint firstItem="23" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="mUW-kr-ivL" secondAttribute="leading" constant="20" symbolic="YES" id="8sE-nB-eSO"/>
<constraint firstItem="oS6-u5-7dP" firstAttribute="trailing" secondItem="Ldp-U1-36g" secondAttribute="trailing" id="95V-NY-2xA"/>
<constraint firstItem="5Rz-c8-hp9" firstAttribute="top" secondItem="28" secondAttribute="bottom" constant="12" id="BKd-fz-Md8"/>
<constraint firstItem="5Rz-c8-hp9" firstAttribute="top" secondItem="28" secondAttribute="bottom" constant="11" id="BKd-fz-Md8"/>
<constraint firstItem="L5M-VG-W1X" firstAttribute="leading" secondItem="mUW-kr-ivL" secondAttribute="leading" constant="44" id="CIK-K1-cWF"/>
<constraint firstItem="19" firstAttribute="leading" secondItem="oS6-u5-7dP" secondAttribute="leading" id="Pu0-k2-1za"/>
<constraint firstItem="19" firstAttribute="leading" secondItem="23" secondAttribute="trailing" constant="6" id="MDH-LY-uFq"/>
<constraint firstItem="Ldp-U1-36g" firstAttribute="leading" secondItem="5Rz-c8-hp9" secondAttribute="leading" id="Q6v-ey-vwa"/>
<constraint firstItem="oS6-u5-7dP" firstAttribute="top" secondItem="5Rz-c8-hp9" secondAttribute="bottom" constant="10" id="QZ2-14-4r6"/>
<constraint firstItem="19" firstAttribute="top" secondItem="Yl4-Ar-L6r" secondAttribute="bottom" constant="11" id="Qqq-yr-wOz"/>
<constraint firstItem="oS6-u5-7dP" firstAttribute="top" secondItem="5Rz-c8-hp9" secondAttribute="bottom" constant="8" id="QZ2-14-4r6"/>
<constraint firstItem="oS6-u5-7dP" firstAttribute="centerY" secondItem="L5M-VG-W1X" secondAttribute="centerY" constant="1" id="RVA-nL-38p"/>
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="Ldp-U1-36g" secondAttribute="trailing" constant="94" id="Rnq-Id-Nco"/>
<constraint firstItem="19" firstAttribute="top" secondItem="Yl4-Ar-L6r" secondAttribute="bottom" constant="7" id="WCs-Mr-riS"/>
<constraint firstAttribute="trailing" secondItem="19" secondAttribute="trailing" constant="66" id="WOh-0S-K2a"/>
<constraint firstItem="oS6-u5-7dP" firstAttribute="leading" secondItem="L5M-VG-W1X" secondAttribute="trailing" constant="7" id="YxI-fn-Sqi"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="5Rz-c8-hp9" secondAttribute="trailing" constant="20" symbolic="YES" id="ZHb-cO-vuU"/>
<constraint firstItem="5Rz-c8-hp9" firstAttribute="leading" secondItem="Yl4-Ar-L6r" secondAttribute="leading" id="cfz-OX-xMQ"/>
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="90" secondAttribute="trailing" constant="224" id="dtX-Dy-UQr"/>
<constraint firstItem="90" firstAttribute="top" secondItem="Ldp-U1-36g" secondAttribute="bottom" constant="10" id="k9L-cq-Oex"/>
<constraint firstItem="Yl4-Ar-L6r" firstAttribute="top" secondItem="oS6-u5-7dP" secondAttribute="bottom" constant="9" id="koX-Rp-hqx"/>
<constraint firstItem="90" firstAttribute="top" secondItem="Ldp-U1-36g" secondAttribute="bottom" constant="8" id="k9L-cq-Oex"/>
<constraint firstItem="Yl4-Ar-L6r" firstAttribute="top" secondItem="oS6-u5-7dP" secondAttribute="bottom" constant="8" id="koX-Rp-hqx"/>
<constraint firstItem="Ldp-U1-36g" firstAttribute="leading" secondItem="mUW-kr-ivL" secondAttribute="leading" constant="20" symbolic="YES" id="nTy-V2-tT3"/>
<constraint firstItem="L5M-VG-W1X" firstAttribute="top" secondItem="5Rz-c8-hp9" secondAttribute="bottom" constant="11" id="nab-L1-oZG"/>
<constraint firstItem="19" firstAttribute="centerX" secondItem="90" secondAttribute="centerX" constant="65" id="tpV-4v-4jz"/>
<constraint firstItem="L5M-VG-W1X" firstAttribute="top" secondItem="5Rz-c8-hp9" secondAttribute="bottom" constant="9" id="nab-L1-oZG"/>
<constraint firstItem="5Rz-c8-hp9" firstAttribute="top" secondItem="90" secondAttribute="bottom" constant="9" id="xFG-Vm-AP8"/>
<constraint firstAttribute="bottom" secondItem="23" secondAttribute="bottom" constant="41" id="xR9-db-AOM"/>
<constraint firstAttribute="bottom" secondItem="23" secondAttribute="bottom" constant="50" id="xR9-db-AOM"/>
<constraint firstItem="Ldp-U1-36g" firstAttribute="top" secondItem="mUW-kr-ivL" secondAttribute="top" constant="15" id="zma-pr-5cd"/>
</constraints>
</view>
@ -224,7 +232,7 @@
<rect key="frame" x="3" y="3" width="445" height="134"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yaj-QY-7xV">
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yaj-QY-7xV" userLabel="chkCNSSupport">
<rect key="frame" x="19" y="104.5" width="406" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="KdE-Vd-Y50"/>
@ -234,6 +242,7 @@
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="toggleCNSSupport:" target="-2" id="mcY-ma-N0c"/>
<binding destination="32" name="value" keyPath="values.CNS11643Enabled" id="Pbx-Gt-upm"/>
</connections>
</button>
@ -259,18 +268,8 @@
<binding destination="32" name="value" keyPath="values.ShiftJISShinjitaiOutputEnabled" id="zu9-pD-86B"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mzw-F2-aAQ">
<rect key="frame" x="19" y="41.5" width="406" height="16"/>
<buttonCell key="cell" type="check" title="Emulating select-candidate-per-character mode" bezelStyle="regularSquare" imagePosition="left" controlSize="small" inset="2" id="ArK-Vk-OoT">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<binding destination="32" name="value" keyPath="values.UseSCPCTypingMode" id="PbD-wq-OsN"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pYB-E5-4Nv">
<rect key="frame" x="19" y="20.5" width="406" height="16"/>
<rect key="frame" x="19" y="41.5" width="406" height="16"/>
<buttonCell key="cell" type="check" title="Stop farting (when typed phonetic combination is invalid, etc.)" bezelStyle="regularSquare" imagePosition="left" controlSize="small" inset="2" id="62u-jY-BRh">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
@ -283,18 +282,15 @@
</subviews>
<constraints>
<constraint firstItem="Yaj-QY-7xV" firstAttribute="leading" secondItem="5IL-zZ-CL9" secondAttribute="leading" id="4Bc-Yl-MiB"/>
<constraint firstItem="pYB-E5-4Nv" firstAttribute="top" secondItem="mzw-F2-aAQ" secondAttribute="bottom" constant="6" symbolic="YES" id="4om-Rh-ywp"/>
<constraint firstItem="5IL-zZ-CL9" firstAttribute="top" secondItem="Yaj-QY-7xV" secondAttribute="bottom" constant="6" symbolic="YES" id="7iI-Gm-cGt"/>
<constraint firstItem="h4r-Sp-LBI" firstAttribute="top" secondItem="5IL-zZ-CL9" secondAttribute="bottom" constant="6" symbolic="YES" id="8Pq-i7-vK8"/>
<constraint firstItem="Yaj-QY-7xV" firstAttribute="trailing" secondItem="5IL-zZ-CL9" secondAttribute="trailing" id="8QP-dq-cfD"/>
<constraint firstItem="mzw-F2-aAQ" firstAttribute="leading" secondItem="pYB-E5-4Nv" secondAttribute="leading" id="PzO-It-L9B"/>
<constraint firstItem="pYB-E5-4Nv" firstAttribute="trailing" secondItem="h4r-Sp-LBI" secondAttribute="trailing" id="IWM-hB-AeP"/>
<constraint firstItem="Yaj-QY-7xV" firstAttribute="top" secondItem="brd-6J-saN" secondAttribute="top" constant="13.5" id="Qf7-x1-bcp"/>
<constraint firstItem="h4r-Sp-LBI" firstAttribute="leading" secondItem="mzw-F2-aAQ" secondAttribute="leading" id="aFS-pr-dqO"/>
<constraint firstItem="h4r-Sp-LBI" firstAttribute="trailing" secondItem="mzw-F2-aAQ" secondAttribute="trailing" id="b89-f7-ko6"/>
<constraint firstAttribute="trailing" secondItem="Yaj-QY-7xV" secondAttribute="trailing" constant="20" symbolic="YES" id="jqe-y8-arB"/>
<constraint firstItem="pYB-E5-4Nv" firstAttribute="leading" secondItem="h4r-Sp-LBI" secondAttribute="leading" id="jsE-BB-mo7"/>
<constraint firstItem="Yaj-QY-7xV" firstAttribute="leading" secondItem="brd-6J-saN" secondAttribute="leading" constant="20" symbolic="YES" id="mjS-PE-C1d"/>
<constraint firstItem="mzw-F2-aAQ" firstAttribute="top" secondItem="h4r-Sp-LBI" secondAttribute="bottom" constant="6" symbolic="YES" id="oJ7-yv-0qY"/>
<constraint firstItem="mzw-F2-aAQ" firstAttribute="trailing" secondItem="pYB-E5-4Nv" secondAttribute="trailing" id="tTn-wC-ycy"/>
<constraint firstItem="pYB-E5-4Nv" firstAttribute="top" secondItem="h4r-Sp-LBI" secondAttribute="bottom" constant="6" symbolic="YES" id="unl-l5-LUF"/>
<constraint firstItem="5IL-zZ-CL9" firstAttribute="leading" secondItem="h4r-Sp-LBI" secondAttribute="leading" id="v0c-Cb-FH7"/>
<constraint firstItem="5IL-zZ-CL9" firstAttribute="trailing" secondItem="h4r-Sp-LBI" secondAttribute="trailing" id="z2C-jk-sNa"/>
</constraints>
@ -332,20 +328,19 @@
</tabViewItem>
<tabViewItem label="Advanced" identifier="" id="xrE-8T-WKO">
<view key="view" id="bZr-iP-F6T">
<rect key="frame" x="10" y="33" width="464" height="424"/>
<rect key="frame" x="10" y="33" width="463" height="424"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box title="Advanced Settings" translatesAutoresizingMaskIntoConstraints="NO" id="E1l-m8-xgb">
<rect key="frame" x="6" y="117" width="452" height="302"/>
<rect key="frame" x="6" y="10" width="451" height="409"/>
<view key="contentView" id="Zaa-dP-WdF">
<rect key="frame" x="3" y="3" width="446" height="284"/>
<rect key="frame" x="3" y="3" width="445" height="391"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField autoresizesSubviews="NO" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IpX-f7-rTL">
<rect key="frame" x="18" y="253" width="410" height="16"/>
<rect key="frame" x="18" y="360" width="317" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="AH9-nI-ozD"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="406" id="xMo-mW-3aW"/>
<constraint firstAttribute="height" constant="16" id="0OB-uY-HxG"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="clipping" title="Choose which keys you prefer for selecting candidates." id="2pS-nv-te4">
<font key="font" metaFont="cellTitle"/>
@ -354,9 +349,9 @@
</textFieldCell>
</textField>
<comboBox verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uHU-aL-du7">
<rect key="frame" x="128" y="222" width="150" height="25"/>
<rect key="frame" x="128" y="329" width="150" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="147" id="aJi-ff-WnC"/>
<constraint firstAttribute="width" constant="147" id="WdR-Sg-xvh"/>
</constraints>
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="jQC-12-UuK">
<font key="font" metaFont="cellTitle"/>
@ -373,7 +368,7 @@
</connections>
</comboBox>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ETa-09-qWI">
<rect key="frame" x="31" y="227" width="91" height="15"/>
<rect key="frame" x="31" y="334" width="91" height="15"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Selection Keys:" id="FnD-oH-El5">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -381,10 +376,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="13">
<rect key="frame" x="18" y="203" width="403" height="15"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="371" id="lJN-Yf-Fka"/>
</constraints>
<rect key="frame" x="18" y="310" width="403" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Choose the cursor position where you want to list possible candidates." id="14">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -392,7 +384,7 @@
</textFieldCell>
</textField>
<matrix verticalHuggingPriority="751" tag="1" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15">
<rect key="frame" x="33" y="157" width="402" height="38"/>
<rect key="frame" x="33" y="264" width="402" height="38"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="402" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
@ -416,34 +408,22 @@
<binding destination="32" name="selectedTag" keyPath="values.SelectPhraseAfterCursorAsCandidate" id="104"/>
</connections>
</matrix>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bE0-Lq-Pj7">
<rect key="frame" x="19" y="43.5" width="266" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="2BB-Tu-KPL"/>
</constraints>
<buttonCell key="cell" type="check" title="Use ESC key to clear the entire input buffer" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="f2j-xD-4xK">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<binding destination="32" name="value" keyPath="values.EscToCleanInputBuffer" id="aLf-PK-mAS"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7z2-DD-c58">
<rect key="frame" x="19" y="22.5" width="407" height="17"/>
<rect key="frame" x="33" y="240.5" width="392" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="SEv-bA-Zgb"/>
<constraint firstAttribute="height" constant="16" id="0iq-1M-a8l"/>
</constraints>
<buttonCell key="cell" type="check" title="Push the cursor to the front of the phrase after candidate selection" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="RUG-ls-KyA">
<buttonCell key="cell" type="check" title="Push the cursor to the front of the phrase after selection" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="RUG-ls-KyA">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<binding destination="32" name="value" keyPath="values.MoveCursorAfterSelectingCandidate" id="BbO-T6-zh3"/>
<binding destination="32" name="enabled" keyPath="values.SelectPhraseAfterCursorAsCandidate" id="lfH-IT-XBO"/>
</connections>
</button>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n7q-ew-DYu">
<rect key="frame" x="33" y="89" width="386" height="38"/>
<rect key="frame" x="33" y="172" width="386" height="38"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="386" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
@ -468,16 +448,62 @@
</connections>
</matrix>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TMn-LX-3Ub">
<rect key="frame" x="18" y="134" width="376" height="15"/>
<rect key="frame" x="18" y="217" width="369" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Choose the behavior of (Shift+)Tab key in the candidate window." id="ueU-Rz-a1C">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<matrix verticalHuggingPriority="750" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YkJ-lr-EP6">
<rect key="frame" x="33" y="104" width="386" height="38"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="386" height="18"/>
<size key="intercellSpacing" width="4" height="2"/>
<buttonCell key="prototype" type="radio" title="Radio" imagePosition="left" alignment="left" controlSize="small" inset="2" id="8V2-DR-rwL">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<cells>
<column>
<buttonCell type="radio" title="Space to +cycle candidates, Shift+Space to +cycle pages" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="dIN-TZ-67g">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<buttonCell type="radio" title="Space to +cycle pages, Shift+Space to +cycle candidates" imagePosition="left" alignment="left" controlSize="small" tag="1" inset="2" id="XqL-rf-X6d">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
</column>
</cells>
<connections>
<binding destination="32" name="selectedTag" keyPath="values.SpecifySpaceKeyBehavior" id="yBI-fc-n36"/>
</connections>
</matrix>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="J0f-Aw-dxC">
<rect key="frame" x="18" y="149" width="383" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Choose the behavior of (Shift+)Space key in the candidate window." id="Pg5-G9-pY5">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bE0-Lq-Pj7">
<rect key="frame" x="19" y="57.5" width="266" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="pOO-rh-Jhh"/>
</constraints>
<buttonCell key="cell" type="check" title="Use ESC key to clear the entire input buffer" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="f2j-xD-4xK">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<binding destination="32" name="value" keyPath="values.EscToCleanInputBuffer" id="aLf-PK-mAS"/>
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="109">
<rect key="frame" x="19" y="65.5" width="288" height="17"/>
<buttonCell key="cell" type="check" title="Enable SPACE key for calling candidate window" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="110">
<rect key="frame" x="19" y="79.5" width="285" height="16"/>
<buttonCell key="cell" type="check" title="Enable Space key for calling candidate window" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="110">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
@ -485,50 +511,81 @@
<binding destination="32" name="value" keyPath="values.ChooseCandidateUsingSpace" id="NU1-DG-vUz"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mzw-F2-aAQ">
<rect key="frame" x="19" y="36.5" width="314" height="16"/>
<buttonCell key="cell" type="check" title="Emulating select-candidate-per-character mode" bezelStyle="regularSquare" imagePosition="left" controlSize="small" inset="2" id="ArK-Vk-OoT">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<binding destination="32" name="value" keyPath="values.UseSCPCTypingMode" id="PbD-wq-OsN"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="n7q-ew-DYu" firstAttribute="trailing" secondItem="13" secondAttribute="trailing" id="0h0-j4-7cc"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="top" secondItem="bE0-Lq-Pj7" secondAttribute="bottom" constant="5" id="2qc-vg-IJ1"/>
<constraint firstItem="uHU-aL-du7" firstAttribute="leading" secondItem="ETa-09-qWI" secondAttribute="trailing" constant="8" symbolic="YES" id="3KF-Tb-0Tz"/>
<constraint firstItem="15" firstAttribute="top" secondItem="13" secondAttribute="bottom" constant="8" symbolic="YES" id="3fd-BG-6Jx"/>
<constraint firstItem="15" firstAttribute="leading" secondItem="n7q-ew-DYu" secondAttribute="leading" id="5Dm-qA-qLH"/>
<constraint firstAttribute="trailing" secondItem="TMn-LX-3Ub" secondAttribute="trailing" constant="54" id="5Tp-rD-xca"/>
<constraint firstItem="15" firstAttribute="leading" secondItem="ETa-09-qWI" secondAttribute="leading" id="5k7-2k-aLK"/>
<constraint firstItem="bE0-Lq-Pj7" firstAttribute="leading" secondItem="7z2-DD-c58" secondAttribute="leading" id="8pc-8H-bgi"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="leading" secondItem="Zaa-dP-WdF" secondAttribute="leading" constant="20" symbolic="YES" id="9ed-h6-bOl"/>
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="13" secondAttribute="trailing" constant="71" id="D0Q-CG-6LS"/>
<constraint firstItem="uHU-aL-du7" firstAttribute="top" secondItem="IpX-f7-rTL" secondAttribute="bottom" constant="8" id="Di9-bm-CIq"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="leading" secondItem="13" secondAttribute="leading" id="DnS-Aj-hOl"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="IpX-f7-rTL" secondAttribute="trailing" id="Eer-u6-4rD"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="centerY" secondItem="uHU-aL-du7" secondAttribute="centerY" constant="1" id="FHZ-PV-14v"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="firstBaseline" secondItem="uHU-aL-du7" secondAttribute="firstBaseline" constant="1" id="OnR-PS-PDx"/>
<constraint firstItem="13" firstAttribute="top" secondItem="uHU-aL-du7" secondAttribute="bottom" constant="8" id="Oq3-TL-cYE"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="top" secondItem="Zaa-dP-WdF" secondAttribute="top" constant="15" id="QXa-JH-WOl"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="baseline" secondItem="uHU-aL-du7" secondAttribute="firstBaseline" constant="1" id="QzY-qa-SJw"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="109" secondAttribute="trailing" constant="20" symbolic="YES" id="YLS-EG-Wz9"/>
<constraint firstItem="109" firstAttribute="leading" secondItem="bE0-Lq-Pj7" secondAttribute="leading" id="cvg-BI-hdw"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="bE0-Lq-Pj7" secondAttribute="trailing" constant="20" symbolic="YES" id="dBh-2u-jwE"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="centerX" secondItem="Zaa-dP-WdF" secondAttribute="centerX" id="dQE-Aq-dEH"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="leading" secondItem="13" secondAttribute="leading" id="dXS-M3-fDf"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="top" secondItem="15" secondAttribute="bottom" constant="8" symbolic="YES" id="e1i-5L-zYg"/>
<constraint firstItem="bE0-Lq-Pj7" firstAttribute="top" secondItem="109" secondAttribute="bottom" constant="6" symbolic="YES" id="e3r-jQ-JVU"/>
<constraint firstItem="n7q-ew-DYu" firstAttribute="top" secondItem="TMn-LX-3Ub" secondAttribute="bottom" constant="7" id="hsj-M1-mVj"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="leading" secondItem="Zaa-dP-WdF" secondAttribute="leading" constant="33" id="jMc-w0-nTn"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="leading" secondItem="109" secondAttribute="leading" id="nMh-aU-qa9"/>
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="IpX-f7-rTL" secondAttribute="trailing" constant="36" id="pqa-tx-4pg"/>
<constraint firstAttribute="bottom" secondItem="7z2-DD-c58" secondAttribute="bottom" constant="22.5" id="qMh-n9-Sex"/>
<constraint firstItem="109" firstAttribute="top" secondItem="n7q-ew-DYu" secondAttribute="bottom" constant="7" id="rfz-Dp-TPC"/>
<constraint firstAttribute="trailing" secondItem="15" secondAttribute="trailing" constant="10" id="3Ut-Lb-g5c"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="leading" secondItem="13" secondAttribute="leading" id="68K-st-tIp"/>
<constraint firstItem="J0f-Aw-dxC" firstAttribute="leading" secondItem="109" secondAttribute="leading" id="6Qs-pM-62E"/>
<constraint firstItem="bE0-Lq-Pj7" firstAttribute="leading" secondItem="mzw-F2-aAQ" secondAttribute="leading" id="8lg-dI-ZNC"/>
<constraint firstAttribute="trailing" secondItem="7z2-DD-c58" secondAttribute="trailing" constant="20" symbolic="YES" id="Avc-pt-eoO"/>
<constraint firstItem="uHU-aL-du7" firstAttribute="top" secondItem="IpX-f7-rTL" secondAttribute="bottom" constant="8" symbolic="YES" id="DOO-LN-cUd"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="top" secondItem="Zaa-dP-WdF" secondAttribute="top" constant="15" id="EsV-t1-bC1"/>
<constraint firstItem="J0f-Aw-dxC" firstAttribute="top" secondItem="n7q-ew-DYu" secondAttribute="bottom" constant="8" symbolic="YES" id="FUN-Sk-18I"/>
<constraint firstItem="109" firstAttribute="leading" secondItem="bE0-Lq-Pj7" secondAttribute="leading" id="Inc-F1-iRQ"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="leading" secondItem="Zaa-dP-WdF" secondAttribute="leading" constant="33" id="KmP-py-Qqz"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="bE0-Lq-Pj7" secondAttribute="trailing" constant="20" symbolic="YES" id="LYR-cD-DqP"/>
<constraint firstItem="n7q-ew-DYu" firstAttribute="top" secondItem="TMn-LX-3Ub" secondAttribute="bottom" constant="7" id="MIE-v4-sXo"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="centerX" secondItem="mzw-F2-aAQ" secondAttribute="centerX" id="MeB-I9-I3J"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="top" secondItem="7z2-DD-c58" secondAttribute="bottom" constant="9" id="Nhp-Ij-CJM"/>
<constraint firstItem="n7q-ew-DYu" firstAttribute="leading" secondItem="YkJ-lr-EP6" secondAttribute="leading" id="RJq-WW-QIV"/>
<constraint firstItem="mzw-F2-aAQ" firstAttribute="top" secondItem="bE0-Lq-Pj7" secondAttribute="bottom" constant="6" symbolic="YES" id="Rfg-V4-SqR"/>
<constraint firstItem="IpX-f7-rTL" firstAttribute="leading" secondItem="Zaa-dP-WdF" secondAttribute="leading" constant="20" symbolic="YES" id="T9R-Wl-QmL"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="top" secondItem="15" secondAttribute="bottom" constant="7" id="UW2-Dc-Ev7"/>
<constraint firstItem="uHU-aL-du7" firstAttribute="baseline" secondItem="ETa-09-qWI" secondAttribute="firstBaseline" id="Up0-Zu-yer"/>
<constraint firstItem="n7q-ew-DYu" firstAttribute="trailing" secondItem="YkJ-lr-EP6" secondAttribute="trailing" id="UqO-Qb-eH0"/>
<constraint firstItem="13" firstAttribute="trailing" secondItem="n7q-ew-DYu" secondAttribute="trailing" id="W6s-pA-kti"/>
<constraint firstItem="uHU-aL-du7" firstAttribute="leading" secondItem="ETa-09-qWI" secondAttribute="trailing" constant="8" symbolic="YES" id="cPM-bP-Gwf"/>
<constraint firstItem="15" firstAttribute="leading" secondItem="n7q-ew-DYu" secondAttribute="leading" id="dTu-VM-Mex"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="13" secondAttribute="trailing" symbolic="YES" id="eFx-fp-hkw"/>
<constraint firstAttribute="trailing" secondItem="J0f-Aw-dxC" secondAttribute="trailing" constant="46" id="frg-ba-K1N"/>
<constraint firstItem="15" firstAttribute="top" secondItem="13" secondAttribute="bottom" constant="8" symbolic="YES" id="hS6-Vg-wWW"/>
<constraint firstItem="YkJ-lr-EP6" firstAttribute="top" secondItem="J0f-Aw-dxC" secondAttribute="bottom" constant="7" id="jlj-Bh-CE9"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="109" secondAttribute="trailing" constant="20" symbolic="YES" id="mZE-TB-4fR"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="mzw-F2-aAQ" secondAttribute="trailing" id="nal-v8-hEc"/>
<constraint firstItem="13" firstAttribute="leading" secondItem="TMn-LX-3Ub" secondAttribute="leading" id="pKo-EY-LzQ"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="leading" secondItem="15" secondAttribute="leading" id="pKq-I6-9MX"/>
<constraint firstItem="13" firstAttribute="top" secondItem="uHU-aL-du7" secondAttribute="bottom" constant="8" symbolic="YES" id="pXY-Vl-fF3"/>
<constraint firstItem="TMn-LX-3Ub" firstAttribute="leading" secondItem="J0f-Aw-dxC" secondAttribute="leading" id="rjf-KH-R1M"/>
<constraint firstAttribute="bottom" secondItem="mzw-F2-aAQ" secondAttribute="bottom" constant="36.5" id="rll-uD-kgj"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="TMn-LX-3Ub" secondAttribute="trailing" constant="20" symbolic="YES" id="skq-dq-2tr"/>
<constraint firstItem="bE0-Lq-Pj7" firstAttribute="top" secondItem="109" secondAttribute="bottom" constant="6" symbolic="YES" id="ss5-S5-eA2"/>
<constraint firstItem="ETa-09-qWI" firstAttribute="top" secondItem="IpX-f7-rTL" secondAttribute="bottom" constant="11" id="vc8-1e-YLx"/>
<constraint firstItem="7z2-DD-c58" firstAttribute="leading" secondItem="Zaa-dP-WdF" secondAttribute="leading" constant="34" id="wwj-Hl-v4k"/>
<constraint firstItem="109" firstAttribute="top" secondItem="YkJ-lr-EP6" secondAttribute="bottom" constant="9.5" id="yI5-hF-d78"/>
</constraints>
</view>
</box>
<box title="Dictionary Settings" translatesAutoresizingMaskIntoConstraints="NO" id="s4r-ji-vbr">
<rect key="frame" x="6" y="10" width="452" height="103"/>
<view key="contentView" id="rWB-y8-q94">
<rect key="frame" x="3" y="3" width="446" height="85"/>
</subviews>
<constraints>
<constraint firstItem="E1l-m8-xgb" firstAttribute="top" secondItem="bZr-iP-F6T" secondAttribute="top" constant="5" id="6G1-ic-qOE"/>
<constraint firstItem="E1l-m8-xgb" firstAttribute="leading" secondItem="bZr-iP-F6T" secondAttribute="leading" constant="9" id="CWs-nE-zc4"/>
<constraint firstAttribute="trailing" secondItem="E1l-m8-xgb" secondAttribute="trailing" constant="9" id="w21-Zs-a85"/>
</constraints>
</view>
</tabViewItem>
<tabViewItem label="Dictionary" identifier="" id="2iG-Ic-gbl" userLabel="Dictionary">
<view key="view" id="DCm-Zy-lr2">
<rect key="frame" x="10" y="33" width="463" height="424"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box title="Dictionary and Language Models" translatesAutoresizingMaskIntoConstraints="NO" id="cf2-se-PDO" userLabel="Dictionary and Language Models">
<rect key="frame" x="6" y="10" width="451" height="409"/>
<view key="contentView" id="cy4-aV-hhk">
<rect key="frame" x="3" y="3" width="445" height="391"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p7V-IN-OTr">
<rect key="frame" x="19" y="55.5" width="336" height="17"/>
<rect key="frame" x="19" y="356.5" width="336" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="8eX-Tw-Erk"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="234" id="yhP-XF-CQj"/>
@ -541,26 +598,38 @@
<binding destination="32" name="value" keyPath="values.ShouldAutoReloadUserDataFiles" id="XTI-ol-DVN"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O4B-Z2-XYi">
<rect key="frame" x="19" y="334.5" width="406" height="17"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="234" id="b55-tE-4Xz"/>
<constraint firstAttribute="height" constant="16" id="xK8-Au-QSC"/>
</constraints>
<buttonCell key="cell" type="check" title="Enable symbol input support (incl. certain emoji symbols)" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="hSv-LJ-Cq3" userLabel="chkSymbolEnabled">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="toggleSymbolInputEnabled:" target="-2" id="Gzj-dF-gvj"/>
<binding destination="32" name="value" keyPath="values.SymbolInputEnabled" id="XWG-G3-DRu"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="p7V-IN-OTr" firstAttribute="leading" secondItem="rWB-y8-q94" secondAttribute="leading" constant="20" symbolic="YES" id="Hv7-uF-IXh"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p7V-IN-OTr" secondAttribute="trailing" constant="20" symbolic="YES" id="MFR-05-QJN"/>
<constraint firstItem="p7V-IN-OTr" firstAttribute="top" secondItem="rWB-y8-q94" secondAttribute="top" constant="13.5" id="MTI-N4-JSK"/>
<constraint firstItem="p7V-IN-OTr" firstAttribute="top" secondItem="cy4-aV-hhk" secondAttribute="top" constant="18.5" id="GTZ-mq-8zK"/>
<constraint firstItem="O4B-Z2-XYi" firstAttribute="top" secondItem="p7V-IN-OTr" secondAttribute="bottom" constant="6" id="Vhi-Ma-ErF"/>
<constraint firstItem="p7V-IN-OTr" firstAttribute="leading" secondItem="cy4-aV-hhk" secondAttribute="leading" constant="20" id="gvI-87-PEb"/>
<constraint firstAttribute="trailing" secondItem="O4B-Z2-XYi" secondAttribute="trailing" constant="20" symbolic="YES" id="h9K-ln-6cI"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p7V-IN-OTr" secondAttribute="trailing" constant="20" symbolic="YES" id="hSy-OW-G1A"/>
<constraint firstItem="O4B-Z2-XYi" firstAttribute="leading" secondItem="p7V-IN-OTr" secondAttribute="leading" id="s7z-z0-Zhe"/>
</constraints>
</view>
<constraints>
<constraint firstAttribute="height" constant="99" id="mfq-di-Kby"/>
</constraints>
</box>
</subviews>
<constraints>
<constraint firstItem="E1l-m8-xgb" firstAttribute="top" secondItem="bZr-iP-F6T" secondAttribute="top" constant="5" id="6G1-ic-qOE"/>
<constraint firstItem="E1l-m8-xgb" firstAttribute="leading" secondItem="bZr-iP-F6T" secondAttribute="leading" constant="9" id="CWs-nE-zc4"/>
<constraint firstItem="E1l-m8-xgb" firstAttribute="leading" secondItem="s4r-ji-vbr" secondAttribute="leading" id="Nv1-U5-GTY"/>
<constraint firstAttribute="bottom" secondItem="s4r-ji-vbr" secondAttribute="bottom" constant="14" id="Qwa-dE-E7a"/>
<constraint firstItem="E1l-m8-xgb" firstAttribute="trailing" secondItem="s4r-ji-vbr" secondAttribute="trailing" id="Tci-JF-il9"/>
<constraint firstItem="s4r-ji-vbr" firstAttribute="top" secondItem="E1l-m8-xgb" secondAttribute="bottom" constant="8" symbolic="YES" id="n5U-a5-0se"/>
<constraint firstAttribute="trailing" secondItem="E1l-m8-xgb" secondAttribute="trailing" constant="9" id="w21-Zs-a85"/>
<constraint firstItem="cf2-se-PDO" firstAttribute="leading" secondItem="DCm-Zy-lr2" secondAttribute="leading" constant="9" id="5Un-SY-nZh"/>
<constraint firstAttribute="bottom" secondItem="cf2-se-PDO" secondAttribute="bottom" constant="14" id="9lO-GM-Yi7"/>
<constraint firstItem="cf2-se-PDO" firstAttribute="top" secondItem="DCm-Zy-lr2" secondAttribute="top" constant="5" id="Kob-Kd-RFt"/>
<constraint firstAttribute="trailing" secondItem="cf2-se-PDO" secondAttribute="trailing" constant="9" id="mnw-9T-EIW"/>
</constraints>
</view>
</tabViewItem>
@ -586,8 +655,26 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="hab-1o-1kS">
<rect key="frame" x="18" y="13" width="409" height="277"/>
<constraints>
<constraint firstAttribute="height" constant="277" id="DuE-Bj-q43"/>
</constraints>
<textFieldCell key="cell" selectable="YES" id="wQ9-px-b07">
<font key="font" metaFont="cellTitle"/>
<mutableString key="title">Regarding On-Screen Keyboard Viewer Support:
Since v1.3.2, vChewing supports on-screen keyboard by supporting "Apple Zhuyin Bopomofo" and "Apple Zhuyin Eten" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard.
HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.
Note that If you have chosen those "vChewing****" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices.</mutableString>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="11">
<rect key="frame" x="23" y="328" width="86" height="17"/>
<rect key="frame" x="18" y="334" width="86" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="3Lz-Gj-jiD"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="82" id="Vfj-gd-B0r"/>
@ -599,7 +686,7 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3">
<rect key="frame" x="112" y="322" width="277" height="26"/>
<rect key="frame" x="107" y="328" width="277" height="26"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="270" id="s83-aB-x7j"/>
</constraints>
@ -624,7 +711,7 @@
</popUpButtonCell>
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="124">
<rect key="frame" x="112" y="294" width="277" height="26"/>
<rect key="frame" x="107" y="300" width="277" height="26"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="MHr-9M-m65"/>
</constraints>
@ -638,49 +725,33 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="125">
<rect key="frame" x="23" y="302" width="86" height="15"/>
<rect key="frame" x="18" y="308" width="86" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Alphanumeric:" id="126">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="hab-1o-1kS">
<rect key="frame" x="18" y="41" width="409" height="235"/>
<constraints>
<constraint firstAttribute="height" constant="235" id="DuE-Bj-q43"/>
</constraints>
<textFieldCell key="cell" selectable="YES" id="wQ9-px-b07">
<font key="font" metaFont="cellTitle"/>
<string key="title">Regarding On-Screen Keyboard Viewer Support:
Since v1.3.2, vChewing supports on-screen keyboard by supporting "Apple Zhuyin Bopomofo" and "Apple Zhuyin Eten" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard.
HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="onD-QP-KPf" firstAttribute="leading" secondItem="mE9-SY-ijS" secondAttribute="leading" constant="20" symbolic="YES" id="2R9-Gu-Kmf"/>
<constraint firstItem="3" firstAttribute="trailing" secondItem="124" secondAttribute="trailing" id="3Ca-11-Otu"/>
<constraint firstItem="11" firstAttribute="leading" secondItem="125" secondAttribute="leading" id="6bP-cU-jFg"/>
<constraint firstItem="11" firstAttribute="leading" secondItem="mE9-SY-ijS" secondAttribute="leading" constant="25" id="B61-oL-3aF"/>
<constraint firstItem="11" firstAttribute="leading" secondItem="mE9-SY-ijS" secondAttribute="leading" constant="20" id="B61-oL-3aF"/>
<constraint firstItem="125" firstAttribute="baseline" secondItem="124" secondAttribute="firstBaseline" id="E65-3B-iMD"/>
<constraint firstItem="3" firstAttribute="top" secondItem="onD-QP-KPf" secondAttribute="bottom" constant="14" id="NnJ-bz-vb0"/>
<constraint firstItem="3" firstAttribute="top" secondItem="onD-QP-KPf" secondAttribute="bottom" constant="8" id="NnJ-bz-vb0"/>
<constraint firstItem="11" firstAttribute="firstBaseline" secondItem="3" secondAttribute="firstBaseline" id="QvC-vi-AqC"/>
<constraint firstItem="124" firstAttribute="leading" secondItem="125" secondAttribute="trailing" constant="8" symbolic="YES" id="Te4-sj-jbf"/>
<constraint firstItem="3" firstAttribute="leading" secondItem="124" secondAttribute="leading" id="WWj-vl-haG"/>
<constraint firstItem="onD-QP-KPf" firstAttribute="top" secondItem="mE9-SY-ijS" secondAttribute="top" constant="15" id="XSD-Vc-x52"/>
<constraint firstAttribute="trailing" secondItem="3" secondAttribute="trailing" constant="60" id="Z1E-EK-5Ts"/>
<constraint firstAttribute="trailing" secondItem="3" secondAttribute="trailing" constant="65" id="Z1E-EK-5Ts"/>
<constraint firstItem="124" firstAttribute="top" secondItem="3" secondAttribute="bottom" constant="7" id="Zl4-5d-SJ5"/>
<constraint firstItem="hab-1o-1kS" firstAttribute="leading" secondItem="onD-QP-KPf" secondAttribute="leading" id="fLo-kq-NYc"/>
<constraint firstItem="3" firstAttribute="leading" secondItem="11" secondAttribute="trailing" constant="8" symbolic="YES" id="hZ7-qC-PmJ"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="onD-QP-KPf" secondAttribute="trailing" constant="20" symbolic="YES" id="nMf-Gq-Hm1"/>
<constraint firstAttribute="trailing" secondItem="hab-1o-1kS" secondAttribute="trailing" constant="20" symbolic="YES" id="obq-hT-3AF"/>
<constraint firstItem="11" firstAttribute="centerY" secondItem="3" secondAttribute="centerY" id="t9r-zq-f68"/>
<constraint firstItem="hab-1o-1kS" firstAttribute="top" secondItem="124" secondAttribute="bottom" constant="22" id="vkh-FL-eIW"/>
<constraint firstItem="hab-1o-1kS" firstAttribute="top" secondItem="124" secondAttribute="bottom" constant="14" id="vkh-FL-eIW"/>
</constraints>
</view>
</box>
@ -705,7 +776,7 @@
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ul0-iw-Dk6" secondAttribute="centerX" id="spC-lA-Mpv"/>
</constraints>
</view>
<point key="canvasLocation" x="162.5" y="66.5"/>
<point key="canvasLocation" x="161.5" y="66.5"/>
</window>
<userDefaultsController representsSharedInstance="YES" id="32"/>
</objects>

View File

@ -47,6 +47,9 @@
/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */
"22.title" = "Vertical";
/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */
"shc-Nu-UsM.title" = "Show page buttons in candidate list";
/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */
"24.title" = "Candidate List Layout:";
@ -80,8 +83,8 @@
/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */
"101.title" = "96";
/* Class = "NSButtonCell"; title = "Enable SPACE key for calling candidate window"; ObjectID = "110"; */
"110.title" = "Enable SPACE key for calling candidate window";
/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */
"110.title" = "Enable Space key for calling candidate window";
/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */
"126.title" = "Alphanumeric:";
@ -140,8 +143,8 @@
/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */
"RQ6-MS-m4C.title" = "Choose your preferred keyboard layout.";
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after candidate selection"; ObjectID = "RUG-ls-KyA"; */
"RUG-ls-KyA.title" = "Push the cursor to the front of the phrase after candidate selection";
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */
"RUG-ls-KyA.title" = "Push the cursor to the front of the phrase after selection";
/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */
"TXr-FF-ehw.title" = "Traditional Chinese";
@ -185,8 +188,8 @@
/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */
"rVQ-Hx-cGi.title" = "Japanese";
/* Class = "NSBox"; title = "Dictionary Settings"; ObjectID = "s4r-ji-vbr"; */
"s4r-ji-vbr.title" = "Dictionary Settings";
/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */
"cf2-se-PDO.title" = "Dictionary and Language Models";
/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */
"xC5-yV-1W1.title" = "Choose your preferred layout of the candidate window.";
@ -194,8 +197,14 @@
/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */
"xrE-8T-WKO.label" = "Advanced";
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */
"2iG-Ic-gbl.label" = "Dictionary";
/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */
"wQ9-px-b07.title" = "Regarding On-Screen Keyboard Viewer Support:\n\n\tSince v1.3.2, vChewing supports on-screen keyboard by supporting \"Apple Zhuyin Bopomofo\" and \"Apple Zhuyin Eten\" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard.\n\n\tHOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.";
"wQ9-px-b07.title" = "Regarding On-Screen Keyboard Viewer Support:\n\n\tSince v1.3.2, vChewing supports on-screen keyboard by supporting \"Apple Zhuyin Bopomofo\" and \"Apple Zhuyin Eten\" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard. HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.\n\n\tAlso: If you have chosen those \"vChewing****\" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices.";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "Choose the behavior of (Shift+)Tab key in the candidate window.";
/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */
"s7u-Fm-dVg.title" = "Cycling Pages";
@ -203,5 +212,14 @@
/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */
"FVC-br-H57.title" = "Cycling Candidates";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "Choose the behavior of (Shift+)Tab key in the candidate window.";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */
"Pg5-G9-pY5.title" = "Choose the behavior of (Shift+)Space key in the candidate window.";
/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */
"XqL-rf-X6d.title" = "Space to +cycle pages, Shift+Space to +cycle candidates";
/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */
"dIN-TZ-67g.title" = "Space to +cycle candidates, Shift+Space to +cycle pages";
/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */
"hSv-LJ-Cq3.title" = "Enable symbol input support (incl. certain emoji symbols)";

View File

@ -47,6 +47,9 @@
/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */
"22.title" = "縦型陳列";
/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */
"shc-Nu-UsM.title" = "ページボタンを表示";
/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */
"24.title" = "入力候補陳列の仕様:";
@ -80,8 +83,8 @@
/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */
"101.title" = "96";
/* Class = "NSButtonCell"; title = "Enable SPACE key for calling candidate window"; ObjectID = "110"; */
"110.title" = "スペースキーで入力候補を呼び出す";
/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */
"110.title" = "Space キーで入力候補を呼び出す";
/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */
"126.title" = "英数キーボード配列:";
@ -140,7 +143,7 @@
/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */
"RQ6-MS-m4C.title" = "お好きなるキーボード配列をお選びください。";
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after candidate selection"; ObjectID = "RUG-ls-KyA"; */
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */
"RUG-ls-KyA.title" = "候補選択の直後、すぐカーソルを単語の後ろに移す";
/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */
@ -185,8 +188,8 @@
/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */
"rVQ-Hx-cGi.title" = "和語";
/* Class = "NSBox"; title = "Dictionary Settings"; ObjectID = "s4r-ji-vbr"; */
"s4r-ji-vbr.title" = "辞書設定";
/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */
"cf2-se-PDO.title" = "辞書と言語モデル";
/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */
"xC5-yV-1W1.title" = "入力候補陳列の仕様をご指定ください。";
@ -194,8 +197,14 @@
/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */
"xrE-8T-WKO.label" = "詳細";
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */
"2iG-Ic-gbl.label" = "辞書";
/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */
"wQ9-px-b07.title" = "macOS 内蔵のキーボードビューアについて:\n\n\t威注音は v1.3.2 版にて macOS 内蔵のキーボードビューアをサポートし始めたが、「Apple Zhuyin Bopomofo」と「Apple Zhuyin Eten」このつダイナミック英数キーボード配列をサポートしたためである。基本的には、この機能は全ての言語の Apple キーボードと一緒に動けるはず。macOS 内蔵の注音入力と倚天注音入力が支障なく使える限り(支障があったら Feedback Assistant.app で Apple にご報告を)、この2つダイナミック英数キーボード配列も威注音で作動できるだと考えられる。\n\n\tだが、もし、ダイナミック英数キーボード配列を起用すると、今のこの画面の上の「注音キーボード配列」を標準配列にしなければならぬこと。なぜなら、この場合、倚天などの注音配列のサポート役割は macOS である。";
"wQ9-px-b07.title" = "macOS 内蔵のキーボードビューアについて:\n\n\t威注音は v1.3.2 版にて macOS 内蔵のキーボードビューアをサポートし始めたが、「Apple Zhuyin Bopomofo」と「Apple Zhuyin Eten」このつダイナミック英数キーボード配列をサポートしたためである。基本的には、この機能は全ての言語の Apple キーボードと一緒に動けるはず。macOS 内蔵の注音入力と倚天注音入力が支障なく使える限り(支障があったら Feedback Assistant.app で Apple にご報告を)、この2つダイナミック英数キーボード配列も威注音で作動できるだと考えられる。だが、もし、ダイナミック英数キーボード配列を起用すると、今のこの画面の上の「注音キーボード配列」を標準配列にしなければならぬこと。なぜなら、この場合、倚天などの注音配列のサポート役割は macOS である。\n\n\t他に注意英数配列を「vChewing○○○○」と名付けた配列に設定した場合、注音配列も必ず一致して下さい。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。";
/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */
"s7u-Fm-dVg.title" = "ページ";
@ -203,5 +212,14 @@
/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */
"FVC-br-H57.title" = "候補文字そのもの";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */
"Pg5-G9-pY5.title" = "入力候補陳列での (Shift+)Space キーの輪番切替対象をご指定ください。";
/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */
"XqL-rf-X6d.title" = "Space で次のページ、Shift+Space で次の候補文字を";
/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */
"dIN-TZ-67g.title" = "Shift+Space で次のページ、Space で次の候補文字を";
/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */
"hSv-LJ-Cq3.title" = "僅かなる絵文字も含む符号入力サポートを起用";

View File

@ -47,6 +47,9 @@
/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */
"22.title" = "纵向布局";
/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */
"shc-Nu-UsM.title" = "在选字窗内显示翻页按钮";
/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */
"24.title" = "候选字窗布局:";
@ -80,7 +83,7 @@
/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */
"101.title" = "96";
/* Class = "NSButtonCell"; title = "Enable SPACE key for calling candidate window"; ObjectID = "110"; */
/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */
"110.title" = "敲空格键以选字";
/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */
@ -140,7 +143,7 @@
/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */
"RQ6-MS-m4C.title" = "选择您所偏好的键盘布局。";
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after candidate selection"; ObjectID = "RUG-ls-KyA"; */
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */
"RUG-ls-KyA.title" = "在选字后将光标置于该字词的前方";
/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */
@ -185,8 +188,8 @@
/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */
"rVQ-Hx-cGi.title" = "和语";
/* Class = "NSBox"; title = "Dictionary Settings"; ObjectID = "s4r-ji-vbr"; */
"s4r-ji-vbr.title" = "辞典设定";
/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */
"cf2-se-PDO.title" = "辞典&語言模型";
/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */
"xC5-yV-1W1.title" = "选择您所偏好的候选字窗布局。";
@ -194,8 +197,14 @@
/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */
"xrE-8T-WKO.label" = "进阶";
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */
"2iG-Ic-gbl.label" = "辞典";
/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */
"wQ9-px-b07.title" = "关于 macOS 内建萤幕模拟键盘支援:\n\n\t自 v1.3.2 版开始,威注音支援 macOS 内建的萤幕小键盘。该功能是借由对「Apple 标准注音键盘布局」与「Apple 倚天注音键盘布局」这两个动态英数键盘布局来完成的。理论上来讲,这两个动态英数键盘布局应该可以与所有语种的 Apple 物理键盘相容。如果有不相容的情况的话macOS 内建的注音与倚天注音输入法一定也会有相同的故障(可以借由 Feedback Assistant.app 向 Apple 反馈这种键盘布局问题)。\n\n\t然而如果您启用了这种动态英数键盘布局的话请将当前画面顶端的注音键盘布局设为「微软/大千……」,因为对诸如倚天等异种键盘的支援已经交给 macOS 系统来事先完成了。";
"wQ9-px-b07.title" = "关于 macOS 内建萤幕模拟键盘支援:\n\n\t自 v1.3.2 版开始,威注音支援 macOS 内建的萤幕小键盘。该功能是借由对「Apple 标准注音键盘布局」与「Apple 倚天注音键盘布局」这两个动态英数键盘布局来完成的。理论上来讲,这两个动态英数键盘布局应该可以与所有语种的 Apple 物理键盘相容。如果有不相容的情况的话macOS 内建的注音与倚天注音输入法一定也会有相同的故障(可以借由 Feedback Assistant.app 向 Apple 反馈这种键盘布局问题)。然而,如果您启用了这种动态英数键盘布局的话,请将当前画面顶端的注音键盘布局设为「微软/大千……」,因为对诸如倚天等异种键盘的支援已经交给 macOS 系统来事先完成了。\n\n\t另外如果您在「英数键盘布局」内选了所有以「vChewing」开头的键盘配列的话对应的「注音键盘布局」也要选成相同的配列才可以。比如说前者选「vChewing Dachen」那后者就得选「微软/大千……」、前者选「vChewing FakeSeigyou」那后者就得选「伪精业」依此类推。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "指定 (Shift+)Tab 热键在选字窗内的轮替操作对象。";
/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */
"s7u-Fm-dVg.title" = "轮替页面";
@ -203,5 +212,14 @@
/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */
"FVC-br-H57.title" = "轮替候选字";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "指定 (Shift+)Tab 热键在选字窗内的轮替操作对象。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */
"Pg5-G9-pY5.title" = "指定 (Shift+)Space 热键在选字窗内的轮替操作对象。";
/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */
"XqL-rf-X6d.title" = "Space 换下一页Shift+Space 换选下一个候选字。";
/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */
"dIN-TZ-67g.title" = "Shift+Space 换下一页Space 换选下一个候选字。";
/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */
"hSv-LJ-Cq3.title" = "启用包括少许绘文字在内的符号输入支援";

View File

@ -47,6 +47,9 @@
/* Class = "NSButtonCell"; title = "Vertical"; ObjectID = "22"; */
"22.title" = "縱向佈局";
/* Class = "NSButtonCell"; title = "Show page buttons in candidate list"; ObjectID = "shc-Nu-UsM"; */
"shc-Nu-UsM.title" = "在選字窗內顯示翻頁按鈕";
/* Class = "NSTextFieldCell"; title = "Candidate List Layout:"; ObjectID = "24"; */
"24.title" = "候選字窗佈局:";
@ -80,7 +83,7 @@
/* Class = "NSMenuItem"; title = "96"; ObjectID = "101"; */
"101.title" = "96";
/* Class = "NSButtonCell"; title = "Enable SPACE key for calling candidate window"; ObjectID = "110"; */
/* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */
"110.title" = "敲空格鍵以選字";
/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */
@ -140,7 +143,7 @@
/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */
"RQ6-MS-m4C.title" = "選擇您所偏好的鍵盤佈局。";
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after candidate selection"; ObjectID = "RUG-ls-KyA"; */
/* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */
"RUG-ls-KyA.title" = "在選字後將游標置於該字詞的前方";
/* Class = "NSMenuItem"; title = "Traditional Chinese"; ObjectID = "TXr-FF-ehw"; */
@ -185,8 +188,8 @@
/* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */
"rVQ-Hx-cGi.title" = "和語";
/* Class = "NSBox"; title = "Dictionary Settings"; ObjectID = "s4r-ji-vbr"; */
"s4r-ji-vbr.title" = "辭典設定";
/* Class = "NSBox"; title = "Dictionary and Language Models"; ObjectID = "cf2-se-PDO"; */
"cf2-se-PDO.title" = "辭典&語言模型";
/* Class = "NSTextFieldCell"; title = "Choose your preferred layout of the candidate window."; ObjectID = "xC5-yV-1W1"; */
"xC5-yV-1W1.title" = "選擇您所偏好的候選字窗佈局。";
@ -194,8 +197,14 @@
/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "xrE-8T-WKO"; */
"xrE-8T-WKO.label" = "進階";
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */
"2iG-Ic-gbl.label" = "辭典";
/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */
"wQ9-px-b07.title" = "關於 macOS 內建螢幕模擬鍵盤支援:\n\n\t自 v1.3.2 版開始,威注音支援 macOS 內建的螢幕小鍵盤。該功能是藉由對「Apple 標準注音鍵盤佈局」與「Apple 倚天注音鍵盤佈局」這兩個動態英數鍵盤佈局來完成的。理論上來講,這兩個動態英數鍵盤佈局應該可以與所有語種的 Apple 物理鍵盤相容。如果有不相容的情況的話macOS 內建的注音與倚天注音輸入法一定也會有相同的故障(可以藉由 Feedback Assistant.app 向 Apple 反饋這種鍵盤佈局問題)。\n\n\t然而如果您啟用了這種動態英數鍵盤佈局的話請將當前畫面頂端的注音鍵盤佈局設為「微軟/大千……」,因為對諸如倚天等異種鍵盤的支援已經交給 macOS 系統來事先完成了。";
"wQ9-px-b07.title" = "關於 macOS 內建螢幕模擬鍵盤支援:\n\n\t自 v1.3.2 版開始,威注音支援 macOS 內建的螢幕小鍵盤。該功能是藉由對「Apple 標準注音鍵盤佈局」與「Apple 倚天注音鍵盤佈局」這兩個動態英數鍵盤佈局來完成的。理論上來講,這兩個動態英數鍵盤佈局應該可以與所有語種的 Apple 物理鍵盤相容。如果有不相容的情況的話macOS 內建的注音與倚天注音輸入法一定也會有相同的故障(可以藉由 Feedback Assistant.app 向 Apple 反饋這種鍵盤佈局問題)。然而,如果您啟用了這種動態英數鍵盤佈局的話,請將當前畫面頂端的注音鍵盤佈局設為「微軟/大千……」,因為對諸如倚天等異種鍵盤的支援已經交給 macOS 系統來事先完成了。\n\n\t另外如果您在「英數鍵盤佈局」內選了所有以「vChewing」開頭的鍵盤配列的話對應的「注音鍵盤佈局」也要選成相同的配列才可以。比如說前者選「vChewing Dachen」那後者就得選「微軟/大千……」、前者選「vChewing FakeSeigyou」那後者就得選「偽精業」依此類推。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "指定 (Shift+)Tab 熱鍵在選字窗內的輪替操作對象。";
/* Class = "NSButtonCell"; title = "Cycling Pages"; ObjectID = "s7u-Fm-dVg"; */
"s7u-Fm-dVg.title" = "輪替頁面";
@ -203,5 +212,15 @@
/* Class = "NSButtonCell"; title = "Cycling Candidates"; ObjectID = "FVC-br-H57"; */
"FVC-br-H57.title" = "輪替候選字";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */
"ueU-Rz-a1C.title" = "指定 (Shift+)Tab 熱鍵在選字窗內的輪替操作對象。";
/* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Space key in the candidate window."; ObjectID = "Pg5-G9-pY5"; */
"Pg5-G9-pY5.title" = "指定 (Shift+)Space 熱鍵在選字窗內的輪替操作對象。";
/* Class = "NSButtonCell"; title = "Space to +cycle pages, Shift+Space to +cycle candidates"; ObjectID = "XqL-rf-X6d"; */
"XqL-rf-X6d.title" = "Space 換下一頁Shift+Space 換選下一個候選字";
/* Class = "NSButtonCell"; title = "Space to +cycle candidates, Shift+Space to +cycle pages"; ObjectID = "dIN-TZ-67g"; */
"dIN-TZ-67g.title" = "Shift+Space 換下一頁Space 換選下一個候選字";
/* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */
"hSv-LJ-Cq3.title" = "啟用包括少許繪文字在內的符號輸入支援";

View File

@ -7,8 +7,8 @@
<key>UpdateInfoSite</key>
<string>https://gitee.com/vChewing/vChewing-macOS/releases</string>
<key>CFBundleVersion</key>
<string>1925</string>
<string>1927</string>
<key>CFBundleShortVersionString</key>
<string>1.3.6</string>
<string>1.3.7</string>
</dict>
</plist>

View File

@ -41,6 +41,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
ctlAboutWindowInstance?.window?.center()
ctlAboutWindowInstance?.window?.orderFrontRegardless() //
ctlAboutWindowInstance?.window?.level = .statusBar
}
// Call the New About Window
@IBAction func about(_ sender: Any) {

View File

@ -20,9 +20,10 @@ import Foundation
extension String {
mutating func regReplace(pattern: String, replaceWith: String = "") {
// Ref: https://stackoverflow.com/a/40993403/4162914 && https://stackoverflow.com/a/71291137/4162914
do {
let regex = try NSRegularExpression(pattern: pattern, options: .caseInsensitive)
let range = NSRange(location: 0, length: count)
let range = NSRange(location: 0, length: self.utf16.count)
self = regex.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: replaceWith)
} catch { return }
}
@ -31,15 +32,13 @@ extension String {
var strProcessed = self
//
strProcessed = strProcessed.replacingOccurrences(of: " #MACOS", with: "") // macOS
strProcessed = strProcessed.replacingOccurrences(of: " ", with: " ") // CJKWhiteSpace (\x{3000}) to ASCII Space
strProcessed = strProcessed.replacingOccurrences(of: " ", with: " ") // NonBreakWhiteSpace (\x{A0}) to ASCII Space
strProcessed = strProcessed.replacingOccurrences(of: "\t", with: " ") // Tab to ASCII Space
strProcessed.regReplace(pattern: "\\f", replaceWith: "\n") // Form Feed to LF
strProcessed = strProcessed.replacingOccurrences(of: "\r", with: "\n") // CR to LF
strProcessed.regReplace(pattern: " +", replaceWith: " ") // ASCII
strProcessed.regReplace(pattern: "\\n+", replaceWith: "\n") // LF LF
strProcessed = strProcessed.replacingOccurrences(of: " \n", with: "\n") //
strProcessed = strProcessed.replacingOccurrences(of: "\n ", with: "\n") //
// CJKWhiteSpace (\x{3000}) to ASCII Space
// NonBreakWhiteSpace (\x{A0}) to ASCII Space
// Tab to ASCII Space
// ASCII
strProcessed.regReplace(pattern: #"( +| +| +|\t+)+"#, replaceWith: " ")
strProcessed.regReplace(pattern: #"(\f+|\r+)+"#, replaceWith: "\n") // CR & Form Feed to LF
strProcessed.regReplace(pattern: #"(\n+| \n+|\n+ )"#, replaceWith: "\n") //
if strProcessed.prefix(1) == " " { //
strProcessed.removeFirst()
}

1188
vChewing.pkgproj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,7 @@
5B62A35327AE89C400A19448 /* InputSourceHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B62A33127AE792F00A19448 /* InputSourceHelper.swift */; };
5B73FB5E27B2BE1300E9BF49 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B73FB6027B2BE1300E9BF49 /* InfoPlist.strings */; };
5B7BC4B027AFFBE800F66C24 /* frmPrefWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B7BC4AE27AFFBE800F66C24 /* frmPrefWindow.xib */; };
5BAD0CD527D701F6003D127F /* vChewingKeyLayout.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */; };
5BBBB75F27AED54C0023B93A /* Beep.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB75D27AED54C0023B93A /* Beep.m4a */; };
5BBBB76027AED54C0023B93A /* Fart.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB75E27AED54C0023B93A /* Fart.m4a */; };
5BBBB76B27AED5DB0023B93A /* frmNonModalAlertWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB76527AED5DB0023B93A /* frmNonModalAlertWindow.xib */; };
@ -50,12 +51,6 @@
5BD05C6827B2BBEF004C4F1D /* Content.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD05C6327B2BBEF004C4F1D /* Content.swift */; };
5BD05C6927B2BBEF004C4F1D /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD05C6427B2BBEF004C4F1D /* WindowController.swift */; };
5BD05C6A27B2BBEF004C4F1D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD05C6527B2BBEF004C4F1D /* ViewController.swift */; };
5BDC5CAB27C2873D00E1CCE2 /* Grid.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5BDC5CAA27C2873D00E1CCE2 /* Grid.mm */; };
5BDC5CB327C28E8B00E1CCE2 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5BDC5CB227C28E8B00E1CCE2 /* icon.icns */; };
5BDC5CB527C28E8B00E1CCE2 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDC5CB427C28E8B00E1CCE2 /* ShareViewController.swift */; };
5BDC5CB827C28E8B00E1CCE2 /* ShareViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5BDC5CB627C28E8B00E1CCE2 /* ShareViewController.xib */; };
5BDC5CBD27C28E8B00E1CCE2 /* KeyboardExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 5BDC5CB027C28E8B00E1CCE2 /* KeyboardExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
5BDC5CC227C2941F00E1CCE2 /* vChewingKeyLayout.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */; };
5BDCBB2E27B4E67A00D0CC59 /* vChewingPhraseEditor.app in Resources */ = {isa = PBXBuildFile; fileRef = 5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */; };
5BE78BD927B3775B005EA1BE /* ctlAboutWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BE78BD827B37750005EA1BE /* ctlAboutWindow.swift */; };
5BE78BDD27B3776D005EA1BE /* frmAboutWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5BE78BDA27B37764005EA1BE /* frmAboutWindow.xib */; };
@ -102,13 +97,6 @@
remoteGlobalIDString = 5BD05BB727B2A429004C4F1D;
remoteInfo = vChewingPhraseEditor;
};
5BDC5CBB27C28E8B00E1CCE2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6A0D4E9415FC0CFA00ABF4B3 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BDC5CAF27C28E8B00E1CCE2;
remoteInfo = KeyboardExtension;
};
6A38BC2515FC131100A8A51F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6A0D4E9415FC0CFA00ABF4B3 /* Project object */;
@ -132,7 +120,6 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
5BDC5CBD27C28E8B00E1CCE2 /* KeyboardExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
@ -231,13 +218,6 @@
5BD05C6327B2BBEF004C4F1D /* Content.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Content.swift; sourceTree = "<group>"; };
5BD05C6427B2BBEF004C4F1D /* WindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WindowController.swift; sourceTree = "<group>"; };
5BD05C6527B2BBEF004C4F1D /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5BDC5CAA27C2873D00E1CCE2 /* Grid.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Grid.mm; sourceTree = "<group>"; };
5BDC5CB027C28E8B00E1CCE2 /* KeyboardExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = KeyboardExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
5BDC5CB227C28E8B00E1CCE2 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = "<group>"; };
5BDC5CB427C28E8B00E1CCE2 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
5BDC5CB727C28E8B00E1CCE2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ShareViewController.xib; sourceTree = "<group>"; };
5BDC5CB927C28E8B00E1CCE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5BDC5CBA27C28E8B00E1CCE2 /* KeyboardExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = KeyboardExtension.entitlements; sourceTree = "<group>"; };
5BDCBB4227B4F6C600D0CC59 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/MainMenu.strings"; sourceTree = "<group>"; };
5BDCBB4327B4F6C600D0CC59 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/frmAboutWindow.strings"; sourceTree = "<group>"; };
5BDCBB4527B4F6C600D0CC59 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings"; sourceTree = "<group>"; };
@ -323,13 +303,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
5BDC5CAD27C28E8B00E1CCE2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
6A0D4E9F15FC0D2D00ABF4B3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -671,11 +644,6 @@
isa = PBXGroup;
children = (
5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */,
5BDC5CB227C28E8B00E1CCE2 /* icon.icns */,
5BDC5CB427C28E8B00E1CCE2 /* ShareViewController.swift */,
5BDC5CB627C28E8B00E1CCE2 /* ShareViewController.xib */,
5BDC5CB927C28E8B00E1CCE2 /* Info.plist */,
5BDC5CBA27C28E8B00E1CCE2 /* KeyboardExtension.entitlements */,
);
path = KeyboardExtension;
sourceTree = "<group>";
@ -702,7 +670,6 @@
6A0D4EA215FC0D2D00ABF4B3 /* vChewing.app */,
6ACA41CB15FC1D7500935EF6 /* vChewingInstaller.app */,
5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */,
5BDC5CB027C28E8B00E1CCE2 /* KeyboardExtension.appex */,
);
name = Products;
sourceTree = "<group>";
@ -752,7 +719,6 @@
6A0D4F1515FC0EB100ABF4B3 /* BlockReadingBuilder.h */,
6A0D4F1615FC0EB100ABF4B3 /* Gramambular.h */,
6A0D4F1715FC0EB100ABF4B3 /* Grid.h */,
5BDC5CAA27C2873D00E1CCE2 /* Grid.mm */,
6A0D4F1815FC0EB100ABF4B3 /* KeyValuePair.h */,
6A0D4F1915FC0EB100ABF4B3 /* LanguageModel.h */,
6A0D4F1A15FC0EB100ABF4B3 /* Node.h */,
@ -792,11 +758,11 @@
/* Begin PBXLegacyTarget section */
6A38BC2115FC12FD00A8A51F /* Data */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION) macv";
buildArgumentsString = "$(ACTION) ../../DataCompiler/dataCompiler.swift";
buildConfigurationList = 6A38BC2215FC12FD00A8A51F /* Build configuration list for PBXLegacyTarget "Data" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildToolPath = /usr/bin/swift;
buildWorkingDirectory = "$(SRCROOT)/Source/Data";
dependencies = (
);
@ -824,23 +790,6 @@
productReference = 5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */;
productType = "com.apple.product-type.application";
};
5BDC5CAF27C28E8B00E1CCE2 /* KeyboardExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BDC5CC127C28E8B00E1CCE2 /* Build configuration list for PBXNativeTarget "KeyboardExtension" */;
buildPhases = (
5BDC5CAC27C28E8B00E1CCE2 /* Sources */,
5BDC5CAD27C28E8B00E1CCE2 /* Frameworks */,
5BDC5CAE27C28E8B00E1CCE2 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = KeyboardExtension;
productName = KeyboardExtension;
productReference = 5BDC5CB027C28E8B00E1CCE2 /* KeyboardExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
6A0D4EA115FC0D2D00ABF4B3 /* vChewing */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6A0D4EC015FC0D2E00ABF4B3 /* Build configuration list for PBXNativeTarget "vChewing" */;
@ -855,7 +804,6 @@
dependencies = (
5B0AF8B327B2C4E20096FE54 /* PBXTargetDependency */,
6A38BC2615FC131100A8A51F /* PBXTargetDependency */,
5BDC5CBC27C28E8B00E1CCE2 /* PBXTargetDependency */,
);
name = vChewing;
packageProductDependencies = (
@ -899,10 +847,6 @@
LastSwiftMigration = 1320;
ProvisioningStyle = Automatic;
};
5BDC5CAF27C28E8B00E1CCE2 = {
CreatedOnToolsVersion = 13.2;
ProvisioningStyle = Automatic;
};
6A0D4EA115FC0D2D00ABF4B3 = {
LastSwiftMigration = 1240;
ProvisioningStyle = Automatic;
@ -934,7 +878,6 @@
6A0D4EA115FC0D2D00ABF4B3 /* vChewing */,
6ACA41CA15FC1D7500935EF6 /* vChewingInstaller */,
5BD05BB727B2A429004C4F1D /* vChewingPhraseEditor */,
5BDC5CAF27C28E8B00E1CCE2 /* KeyboardExtension */,
6A38BC2115FC12FD00A8A51F /* Data */,
);
};
@ -952,16 +895,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
5BDC5CAE27C28E8B00E1CCE2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BDC5CB827C28E8B00E1CCE2 /* ShareViewController.xib in Resources */,
5BDC5CC227C2941F00E1CCE2 /* vChewingKeyLayout.bundle in Resources */,
5BDC5CB327C28E8B00E1CCE2 /* icon.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6A0D4EA015FC0D2D00ABF4B3 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -984,6 +917,7 @@
5BBBB77627AED70B0023B93A /* MenuIcon-TCVIM.png in Resources */,
6A187E2616004C5900466B2E /* MainMenu.xib in Resources */,
5BBBB75F27AED54C0023B93A /* Beep.m4a in Resources */,
5BAD0CD527D701F6003D127F /* vChewingKeyLayout.bundle in Resources */,
5B2DB16F27AF6891006D874E /* data-chs.txt in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -1038,14 +972,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
5BDC5CAC27C28E8B00E1CCE2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BDC5CB527C28E8B00E1CCE2 /* ShareViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6A0D4E9E15FC0D2D00ABF4B3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -1075,7 +1001,6 @@
D47F7DD3278C1263002F9DD7 /* UserOverrideModel.cpp in Sources */,
5B62A33627AE795800A19448 /* PreferencesModule.swift in Sources */,
5B62A33827AE79CD00A19448 /* NSStringUtils.swift in Sources */,
5BDC5CAB27C2873D00E1CCE2 /* Grid.mm in Sources */,
5B62A33227AE792F00A19448 /* InputSourceHelper.swift in Sources */,
5B62A34927AE7CD900A19448 /* TooltipController.swift in Sources */,
6A0D4F4515FC0EB100ABF4B3 /* Mandarin.cpp in Sources */,
@ -1112,11 +1037,6 @@
target = 5BD05BB727B2A429004C4F1D /* vChewingPhraseEditor */;
targetProxy = 5B0AF8B227B2C4E20096FE54 /* PBXContainerItemProxy */;
};
5BDC5CBC27C28E8B00E1CCE2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BDC5CAF27C28E8B00E1CCE2 /* KeyboardExtension */;
targetProxy = 5BDC5CBB27C28E8B00E1CCE2 /* PBXContainerItemProxy */;
};
6A38BC2615FC131100A8A51F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6A38BC2115FC12FD00A8A51F /* Data */;
@ -1184,14 +1104,6 @@
name = Main.storyboard;
sourceTree = "<group>";
};
5BDC5CB627C28E8B00E1CCE2 /* ShareViewController.xib */ = {
isa = PBXVariantGroup;
children = (
5BDC5CB727C28E8B00E1CCE2 /* Base */,
);
name = ShareViewController.xib;
sourceTree = "<group>";
};
5BE78BDA27B37764005EA1BE /* frmAboutWindow.xib */ = {
isa = PBXVariantGroup;
children = (
@ -1293,7 +1205,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1926;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
@ -1306,13 +1218,14 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "UserPhraseEditor/PhraseEditor-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "$(PRODUCT_NAME)";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2021-2022 vChewing Project.";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
@ -1345,7 +1258,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1926;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
@ -1353,13 +1266,14 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "UserPhraseEditor/PhraseEditor-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "$(PRODUCT_NAME)";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2021-2022 vChewing Project.";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
@ -1371,102 +1285,6 @@
};
name = Release;
};
5BDC5CBF27C28E8B00E1CCE2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = KeyboardExtension/KeyboardExtension.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1925;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_ASSET_PATHS = KeyboardExtension/vChewingKeyLayout.bundle;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = KeyboardExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = KeyboardExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 12.1;
MARKETING_VERSION = 1.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing.KeyboardExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
5BDC5CC027C28E8B00E1CCE2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = KeyboardExtension/KeyboardExtension.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1925;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = KeyboardExtension/vChewingKeyLayout.bundle;
DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = KeyboardExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = KeyboardExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 12.1;
MARKETING_VERSION = 1.3.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing.KeyboardExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
};
name = Release;
};
6A0D4E9915FC0CFA00ABF4B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -1570,7 +1388,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1926;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1602,7 +1420,7 @@
INFOPLIST_FILE = "Source/Resources/IME-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1635,7 +1453,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1926;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
@ -1661,7 +1479,7 @@
INFOPLIST_FILE = "Source/Resources/IME-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1744,7 +1562,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1927;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@ -1766,7 +1584,7 @@
INFOPLIST_FILE = "Installer/Installer-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1794,7 +1612,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1925;
CURRENT_PROJECT_VERSION = 1927;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1810,7 +1628,7 @@
INFOPLIST_FILE = "Installer/Installer-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.3.7;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1833,15 +1651,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BDC5CC127C28E8B00E1CCE2 /* Build configuration list for PBXNativeTarget "KeyboardExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BDC5CBF27C28E8B00E1CCE2 /* Debug */,
5BDC5CC027C28E8B00E1CCE2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6A0D4E9715FC0CFA00ABF4B3 /* Build configuration list for PBXProject "vChewing" */ = {
isa = XCConfigurationList;
buildConfigurations = (