Merge pull request #276 from zonble/master
This commit is contained in:
commit
9ac9a4dd87
|
@ -3,12 +3,15 @@ on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and Test
|
name: Build and Test with Xcode 12.4
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: '12.4'
|
||||||
- name: Build McBopomofoLMLibTest
|
- name: Build McBopomofoLMLibTest
|
||||||
run: cmake -S . -B build
|
run: cmake -S . -B build
|
||||||
working-directory: Source/Engine
|
working-directory: Source/Engine
|
|
@ -0,0 +1,48 @@
|
||||||
|
name: Build
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Test with Latest Xcode
|
||||||
|
runs-on: macOS-latest
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest-stable
|
||||||
|
- name: Build McBopomofoLMLibTest
|
||||||
|
run: cmake -S . -B build
|
||||||
|
working-directory: Source/Engine
|
||||||
|
- name: Run McBopomofoLMLibTest
|
||||||
|
run: make runTest
|
||||||
|
working-directory: Source/Engine/build
|
||||||
|
- name: Build MandarinTest
|
||||||
|
run: cmake -S . -B build
|
||||||
|
working-directory: Source/Engine/Mandarin
|
||||||
|
- name: Run MandarinTest
|
||||||
|
run: make runTest
|
||||||
|
working-directory: Source/Engine/Mandarin/build
|
||||||
|
- name: Test McBopomofo App Bundle
|
||||||
|
run: xcodebuild -scheme McBopomofo -configuration Debug test
|
||||||
|
- name: Test CandidateUI
|
||||||
|
run: swift test
|
||||||
|
working-directory: Packages/CandidateUI
|
||||||
|
- name: Test OpenCCBridge
|
||||||
|
run: swift test
|
||||||
|
working-directory: Packages/OpenCCBridge
|
||||||
|
- name: Test VXHanConvert
|
||||||
|
run: swift test
|
||||||
|
working-directory: Packages/VXHanConvert
|
||||||
|
- name: Test NSStringUtils
|
||||||
|
run: swift test
|
||||||
|
working-directory: Packages/NSStringUtils
|
||||||
|
- name: Clean McBopomofo
|
||||||
|
run: xcodebuild -scheme McBopomofo -configuration Release clean
|
||||||
|
- name: Clean McBopomofoInstaller
|
||||||
|
run: xcodebuild -scheme McBopomofoInstaller -configuration Release clean
|
||||||
|
- name: Build McBopomofo
|
||||||
|
run: xcodebuild -scheme McBopomofo -configuration Release build
|
||||||
|
- name: Build McBopomofoInstaller
|
||||||
|
run: xcodebuild -scheme McBopomofoInstaller -configuration Release build
|
|
@ -601,6 +601,113 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertTrue(state is InputState.EmptyIgnoringPreviousState, "\(state)")
|
XCTAssertTrue(state is InputState.EmptyIgnoringPreviousState, "\(state)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testBackspaceToDeleteReading() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let backspace = KeyHandlerInput(inputText: " ", keyCode: 0, charCode: 8, flags: [], isVerticalMode: false)
|
||||||
|
|
||||||
|
handler.handle(input: backspace, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "ㄋ")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
handler.handle(input: backspace, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
XCTAssertTrue(state is InputState.EmptyIgnoringPreviousState, "\(state)")
|
||||||
|
}
|
||||||
|
|
||||||
|
func testBackspaceAtBegin() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl3").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let left = KeyHandlerInput(inputText: " ", keyCode: KeyCode.left.rawValue, charCode: 0, flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: left, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
handler.handle(input: left, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你好")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
let backspace = KeyHandlerInput(inputText: " ", keyCode: 0, charCode: 8, flags: [], isVerticalMode: false)
|
||||||
|
var errorCall = false
|
||||||
|
handler.handle(input: backspace, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
errorCall = true
|
||||||
|
}
|
||||||
|
XCTAssertTrue(errorCall)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testBackspaceToDeleteReadingWithText() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let backspace = KeyHandlerInput(inputText: " ", keyCode: 0, charCode: 8, flags: [], isVerticalMode: false)
|
||||||
|
|
||||||
|
handler.handle(input: backspace, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你ㄏ")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
handler.handle(input: backspace, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testBackspace() {
|
func testBackspace() {
|
||||||
var state: InputState = InputState.Empty()
|
var state: InputState = InputState.Empty()
|
||||||
let keys = Array("su3cl3").map {
|
let keys = Array("su3cl3").map {
|
||||||
|
@ -640,6 +747,39 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertTrue(state is InputState.EmptyIgnoringPreviousState, "\(state)")
|
XCTAssertTrue(state is InputState.EmptyIgnoringPreviousState, "\(state)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testCursorWithReading() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let left = KeyHandlerInput(inputText: " ", keyCode: KeyCode.left.rawValue, charCode: 0, flags: [], isVerticalMode: false)
|
||||||
|
let right = KeyHandlerInput(inputText: " ", keyCode: KeyCode.right.rawValue, charCode: 0, flags: [], isVerticalMode: false)
|
||||||
|
var leftErrorCalled = false
|
||||||
|
var rightErrorCalled = false
|
||||||
|
|
||||||
|
handler.handle(input: left, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
leftErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
handler.handle(input: right, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
rightErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(leftErrorCalled)
|
||||||
|
XCTAssertTrue(rightErrorCalled)
|
||||||
|
}
|
||||||
|
|
||||||
func testCursor() {
|
func testCursor() {
|
||||||
var state: InputState = InputState.Empty()
|
var state: InputState = InputState.Empty()
|
||||||
let keys = Array("su3cl3").map {
|
let keys = Array("su3cl3").map {
|
||||||
|
@ -918,6 +1058,20 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertEqual(state.cursorIndex, 0)
|
XCTAssertEqual(state.cursorIndex, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var homeErrorCalled = false
|
||||||
|
handler.handle(input: home, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
homeErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你好")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 0)
|
||||||
|
}
|
||||||
|
XCTAssertTrue(homeErrorCalled)
|
||||||
|
|
||||||
handler.handle(input: end, state: state) { newState in
|
handler.handle(input: end, state: state) { newState in
|
||||||
state = newState
|
state = newState
|
||||||
} errorCallback: {
|
} errorCallback: {
|
||||||
|
@ -927,6 +1081,125 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertEqual(state.composingBuffer, "你好")
|
XCTAssertEqual(state.composingBuffer, "你好")
|
||||||
XCTAssertEqual(state.cursorIndex, 2)
|
XCTAssertEqual(state.cursorIndex, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var endErrorCalled = false
|
||||||
|
handler.handle(input: end, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
endErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你好")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 2)
|
||||||
|
}
|
||||||
|
XCTAssertTrue(endErrorCalled)
|
||||||
|
}
|
||||||
|
|
||||||
|
func testHomeAndEndWithReading() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你ㄏㄠ")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
let home = KeyHandlerInput(inputText: " ", keyCode: KeyCode.home.rawValue, charCode: 0, flags: [], isVerticalMode: false)
|
||||||
|
let end = KeyHandlerInput(inputText: " ", keyCode: KeyCode.end.rawValue, charCode: 0, flags: [], isVerticalMode: false)
|
||||||
|
var homeErrorCalled = false
|
||||||
|
var endErrorCalled = false
|
||||||
|
|
||||||
|
handler.handle(input: home, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
homeErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(homeErrorCalled)
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你ㄏㄠ")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 3)
|
||||||
|
}
|
||||||
|
|
||||||
|
handler.handle(input: end, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
endErrorCalled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(endErrorCalled)
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "你ㄏㄠ")
|
||||||
|
XCTAssertEqual(state.cursorIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testMarkingLeftAtBegin() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl3").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let input = KeyHandlerInput(inputText: " ", keyCode: KeyCode.left.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
||||||
|
var errorCalled = false
|
||||||
|
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
errorCalled = true
|
||||||
|
}
|
||||||
|
XCTAssertTrue(errorCalled)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func testMarkingRightAtEnd() {
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
let keys = Array("su3cl3").map {
|
||||||
|
String($0)
|
||||||
|
}
|
||||||
|
for key in keys {
|
||||||
|
let input = KeyHandlerInput(inputText: key, keyCode: 0, charCode: charCode(key), flags: [], isVerticalMode: false)
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let input = KeyHandlerInput(inputText: " ", keyCode: KeyCode.right.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
||||||
|
var errorCalled = false
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
errorCalled = true
|
||||||
|
}
|
||||||
|
XCTAssertTrue(errorCalled)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testMarkingLeft() {
|
func testMarkingLeft() {
|
||||||
|
@ -974,6 +1247,20 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertEqual(state.markerIndex, 0)
|
XCTAssertEqual(state.markerIndex, 0)
|
||||||
XCTAssertEqual(state.markedRange, NSRange(location: 0, length: 2))
|
XCTAssertEqual(state.markedRange, NSRange(location: 0, length: 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var stateForGoingRight: InputState = state
|
||||||
|
|
||||||
|
let right = KeyHandlerInput(inputText: " ", keyCode: KeyCode.right.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
||||||
|
handler.handle(input: right, state: stateForGoingRight) { newState in
|
||||||
|
stateForGoingRight = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
handler.handle(input: right, state: stateForGoingRight) { newState in
|
||||||
|
stateForGoingRight = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(stateForGoingRight is InputState.Inputting, "\(stateForGoingRight)")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testMarkingRight() {
|
func testMarkingRight() {
|
||||||
|
@ -1004,6 +1291,16 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
} errorCallback: {
|
} errorCallback: {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let errorInput = KeyHandlerInput(inputText: " ", keyCode: KeyCode.left.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
||||||
|
var errorCalled = false
|
||||||
|
handler.handle(input: errorInput, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
errorCalled = true
|
||||||
|
}
|
||||||
|
XCTAssertTrue(errorCalled)
|
||||||
|
|
||||||
|
|
||||||
let input = KeyHandlerInput(inputText: " ", keyCode: KeyCode.right.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
let input = KeyHandlerInput(inputText: " ", keyCode: KeyCode.right.rawValue, charCode: 0, flags: .shift, isVerticalMode: false)
|
||||||
handler.handle(input: input, state: state) { newState in
|
handler.handle(input: input, state: state) { newState in
|
||||||
state = newState
|
state = newState
|
||||||
|
@ -1030,6 +1327,19 @@ class KeyHandlerBopomofoTests: XCTestCase {
|
||||||
XCTAssertEqual(state.markerIndex, 2)
|
XCTAssertEqual(state.markerIndex, 2)
|
||||||
XCTAssertEqual(state.markedRange, NSRange(location: 0, length: 2))
|
XCTAssertEqual(state.markedRange, NSRange(location: 0, length: 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var stateForGoingLeft: InputState = state
|
||||||
|
|
||||||
|
handler.handle(input: left, state: stateForGoingLeft) { newState in
|
||||||
|
stateForGoingLeft = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
handler.handle(input: left, state: stateForGoingLeft) { newState in
|
||||||
|
stateForGoingLeft = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(stateForGoingLeft is InputState.Inputting, "\(stateForGoingLeft)")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testCancelMarking() {
|
func testCancelMarking() {
|
||||||
|
|
|
@ -84,6 +84,71 @@ class KeyHandlerPlainBopomofoTests: XCTestCase {
|
||||||
Preferences.halfWidthPunctuationEnabled = enabled
|
Preferences.halfWidthPunctuationEnabled = enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func testHalfPunctuationPeriod() {
|
||||||
|
let enabled = Preferences.halfWidthPunctuationEnabled
|
||||||
|
Preferences.halfWidthPunctuationEnabled = true
|
||||||
|
let input = KeyHandlerInput(inputText: ">", keyCode: 0, charCode: charCode(">"), flags: .shift, isVerticalMode: false)
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.ChoosingCandidate, "\(state)")
|
||||||
|
if let state = state as? InputState.ChoosingCandidate {
|
||||||
|
XCTAssertEqual(state.composingBuffer, ".")
|
||||||
|
}
|
||||||
|
Preferences.halfWidthPunctuationEnabled = enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
func testControlPunctuationPeriod() {
|
||||||
|
let input = KeyHandlerInput(inputText: ".", keyCode: 0, charCode: charCode("."), flags: [.shift, .control], isVerticalMode: false)
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
var count = 0
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
if count == 0 {
|
||||||
|
state = newState
|
||||||
|
}
|
||||||
|
count += 1
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "。")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testEnterWithReading() {
|
||||||
|
let input = KeyHandlerInput(inputText: "s", keyCode: 0, charCode: charCode("s"), flags: .shift, isVerticalMode: false)
|
||||||
|
var state: InputState = InputState.Empty()
|
||||||
|
handler.handle(input: input, state: state) { newState in
|
||||||
|
state = newState
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "ㄋ")
|
||||||
|
}
|
||||||
|
|
||||||
|
let enter = KeyHandlerInput(inputText: " ", keyCode: 0, charCode: 13, flags: [], isVerticalMode: false)
|
||||||
|
var count = 0
|
||||||
|
|
||||||
|
handler.handle(input: enter, state: state) { newState in
|
||||||
|
if count == 0 {
|
||||||
|
state = newState
|
||||||
|
}
|
||||||
|
count += 1
|
||||||
|
} errorCallback: {
|
||||||
|
}
|
||||||
|
|
||||||
|
XCTAssertTrue(state is InputState.Inputting, "\(state)")
|
||||||
|
if let state = state as? InputState.Inputting {
|
||||||
|
XCTAssertEqual(state.composingBuffer, "ㄋ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testInputNe() {
|
func testInputNe() {
|
||||||
let input = KeyHandlerInput(inputText: "s", keyCode: 0, charCode: charCode("s"), flags: .shift, isVerticalMode: false)
|
let input = KeyHandlerInput(inputText: "s", keyCode: 0, charCode: charCode("s"), flags: .shift, isVerticalMode: false)
|
||||||
var state: InputState = InputState.Empty()
|
var state: InputState = InputState.Empty()
|
||||||
|
|
|
@ -90,3 +90,5 @@
|
||||||
"Cursor is after \"%@\"." = "Cursor is after \"%@\".";
|
"Cursor is after \"%@\"." = "Cursor is after \"%@\".";
|
||||||
|
|
||||||
"Cursor is between \"%@\" and \"%@\"." = "Cursor is between \"%@\" and \"%@\".";
|
"Cursor is between \"%@\" and \"%@\"." = "Cursor is between \"%@\" and \"%@\".";
|
||||||
|
|
||||||
|
"You are now selecting \"%@\". The phrase already exists." = "You are now selecting \"%@\". The phrase already exists.";
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
<window title="Bopomofo Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" animationBehavior="default" id="1" userLabel="Window - Preferences">
|
<window title="Bopomofo Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" animationBehavior="default" id="1" userLabel="Window - Preferences">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="401" y="295" width="475" height="484"/>
|
<rect key="contentRect" x="401" y="295" width="475" height="502"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||||
<view key="contentView" id="2">
|
<view key="contentView" id="2">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="475" height="484"/>
|
<rect key="frame" x="0.0" y="0.0" width="475" height="502"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11">
|
||||||
<rect key="frame" x="38" y="446" width="183" height="17"/>
|
<rect key="frame" x="38" y="464" width="183" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Bopomofo Keyboard Layout:" id="12">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Bopomofo Keyboard Layout:" id="12">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="124">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="124">
|
||||||
<rect key="frame" x="225" y="409" width="156" height="26"/>
|
<rect key="frame" x="225" y="427" width="156" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="127">
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="127">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="125">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="125">
|
||||||
<rect key="frame" x="16" y="415" width="205" height="17"/>
|
<rect key="frame" x="16" y="433" width="205" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Alphanumeric Keyboard Layout:" id="126">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Alphanumeric Keyboard Layout:" id="126">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="109">
|
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="109">
|
||||||
<rect key="frame" x="226" y="355" width="217" height="18"/>
|
<rect key="frame" x="226" y="373" width="217" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="check" title="Space key chooses candidate" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="110">
|
<buttonCell key="cell" type="check" title="Space key chooses candidate" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="110">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uHU-aL-du7">
|
<comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uHU-aL-du7">
|
||||||
<rect key="frame" x="228" y="382" width="209" height="25"/>
|
<rect key="frame" x="228" y="400" width="209" height="25"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<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">
|
<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="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</comboBox>
|
</comboBox>
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ETa-09-qWI">
|
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ETa-09-qWI">
|
||||||
<rect key="frame" x="38" y="388" width="183" height="16"/>
|
<rect key="frame" x="38" y="406" width="183" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Selection Keys:" id="FnD-oH-El5">
|
<textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="Selection Keys:" id="FnD-oH-El5">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3">
|
||||||
<rect key="frame" x="225" y="440" width="132" height="26"/>
|
<rect key="frame" x="225" y="458" width="132" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" title="Standard" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="6" id="4">
|
<popUpButtonCell key="cell" type="push" title="Standard" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="6" id="4">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
</popUpButtonCell>
|
</popUpButtonCell>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bE0-Lq-Pj7">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bE0-Lq-Pj7">
|
||||||
<rect key="frame" x="226" y="333" width="229" height="18"/>
|
<rect key="frame" x="226" y="351" width="229" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="check" title="ESC key clears entire input buffer" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="f2j-xD-4xK">
|
<buttonCell key="cell" type="check" title="ESC key clears entire input buffer" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="f2j-xD-4xK">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
||||||
<rect key="frame" x="63" y="298" width="155" height="17"/>
|
<rect key="frame" x="63" y="316" width="155" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Candidate Phrase:" id="14">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Candidate Phrase:" id="14">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||||
<rect key="frame" x="80" y="252" width="138" height="17"/>
|
<rect key="frame" x="80" y="233" width="138" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Candidate List Style:" id="24">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Candidate List Style:" id="24">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="28">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="28">
|
||||||
<rect key="frame" x="84" y="205" width="134" height="17"/>
|
<rect key="frame" x="84" y="186" width="134" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Candidate Text Size:" id="29">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Candidate Text Size:" id="29">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<matrix verticalHuggingPriority="750" fixedFrame="YES" tag="1" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15">
|
<matrix verticalHuggingPriority="750" fixedFrame="YES" tag="1" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15">
|
||||||
<rect key="frame" x="227" y="277" width="213" height="38"/>
|
<rect key="frame" x="227" y="295" width="213" height="38"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
<size key="cellSize" width="206" height="18"/>
|
<size key="cellSize" width="206" height="18"/>
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</matrix>
|
</matrix>
|
||||||
<matrix verticalHuggingPriority="750" fixedFrame="YES" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
|
<matrix verticalHuggingPriority="750" fixedFrame="YES" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
|
||||||
<rect key="frame" x="227" y="231" width="207" height="38"/>
|
<rect key="frame" x="227" y="212" width="207" height="38"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
<size key="cellSize" width="88" height="18"/>
|
<size key="cellSize" width="88" height="18"/>
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</matrix>
|
</matrix>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="90">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="90">
|
||||||
<rect key="frame" x="224" y="197" width="86" height="26"/>
|
<rect key="frame" x="224" y="178" width="86" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" title="18" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="18" imageScaling="proportionallyDown" inset="2" selectedItem="96" id="91">
|
<popUpButtonCell key="cell" type="push" title="18" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="18" imageScaling="proportionallyDown" inset="2" selectedItem="96" id="91">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Fc2-qh-r1H">
|
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Fc2-qh-r1H">
|
||||||
<rect key="frame" x="226" y="127" width="218" height="18"/>
|
<rect key="frame" x="226" y="131" width="218" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="check" title="Check for updates automatically" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="Z9t-P0-BLF">
|
<buttonCell key="cell" type="check" title="Check for updates automatically" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="Z9t-P0-BLF">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
@ -311,10 +311,31 @@
|
||||||
<rect key="frame" x="12" y="117" width="443" height="5"/>
|
<rect key="frame" x="12" y="117" width="443" height="5"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
</box>
|
</box>
|
||||||
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BZV-O5-4za">
|
||||||
|
<rect key="frame" x="226" y="270" width="192" height="18"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<buttonCell key="cell" type="check" title="Move cursor after selection" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="FT6-wb-sx1">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="32" name="enabled" keyPath="values.SelectPhraseAfterCursorAsCandidate" id="GZB-gK-2JZ"/>
|
||||||
|
<binding destination="32" name="value" keyPath="values.MoveCursorAfterSelectingCandidate" id="o5h-nT-3PL"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<point key="canvasLocation" x="148.5" y="256"/>
|
<point key="canvasLocation" x="148.5" y="265"/>
|
||||||
</window>
|
</window>
|
||||||
<userDefaultsController representsSharedInstance="YES" id="32"/>
|
<userDefaultsController representsSharedInstance="YES" id="32"/>
|
||||||
|
<button verticalHuggingPriority="750" id="hKA-Ld-tSe">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="231" height="20"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<buttonCell key="cell" type="check" title="選字之後自動移動游標位置" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="FG1-Le-plw">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" size="13" name="Times-Roman"/>
|
||||||
|
</buttonCell>
|
||||||
|
<point key="canvasLocation" x="151" y="-92"/>
|
||||||
|
</button>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
@ -185,6 +185,16 @@ class InputState: NSObject {
|
||||||
} else if (markedRange.length > kMaxMarkRangeLength) {
|
} else if (markedRange.length > kMaxMarkRangeLength) {
|
||||||
return String(format: NSLocalizedString("You are now selecting \"%@\". A phrase cannot be longer than %d characters.", comment: ""), text, kMaxMarkRangeLength)
|
return String(format: NSLocalizedString("You are now selecting \"%@\". A phrase cannot be longer than %d characters.", comment: ""), text, kMaxMarkRangeLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let (exactBegin, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location)
|
||||||
|
let (exactEnd, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location + markedRange.length)
|
||||||
|
let selectedReadings = readings[exactBegin..<exactEnd]
|
||||||
|
let joined = selectedReadings.joined(separator: "-")
|
||||||
|
let exist = LanguageModelManager.checkIfExist(userPhrase: text, key: joined)
|
||||||
|
if exist {
|
||||||
|
return String(format: NSLocalizedString("You are now selecting \"%@\". The phrase already exists.", comment: ""), text)
|
||||||
|
}
|
||||||
|
|
||||||
return String(format: NSLocalizedString("You are now selecting \"%@\". Press enter to add a new phrase.", comment: ""), text)
|
return String(format: NSLocalizedString("You are now selecting \"%@\". Press enter to add a new phrase.", comment: ""), text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,9 +248,18 @@ class InputState: NSObject {
|
||||||
if composingBuffer.count != readings.count {
|
if composingBuffer.count != readings.count {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if markedRange.length < kMinMarkRangeLength {
|
||||||
return markedRange.length >= kMinMarkRangeLength &&
|
return false
|
||||||
markedRange.length <= kMaxMarkRangeLength
|
}
|
||||||
|
if markedRange.length > kMaxMarkRangeLength {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
let text = (composingBuffer as NSString).substring(with: markedRange)
|
||||||
|
let (exactBegin, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location)
|
||||||
|
let (exactEnd, _) = (composingBuffer as NSString).characterIndex(from: markedRange.location + markedRange.length)
|
||||||
|
let selectedReadings = readings[exactBegin..<exactEnd]
|
||||||
|
let joined = selectedReadings.joined(separator: "-")
|
||||||
|
return LanguageModelManager.checkIfExist(userPhrase: text, key: joined) == false
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc var userPhrase: String {
|
@objc var userPhrase: String {
|
||||||
|
|
|
@ -202,6 +202,20 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot
|
||||||
_userOverrideModel->observe(_walkedNodes, cursorIndex, stringValue, [[NSDate date] timeIntervalSince1970]);
|
_userOverrideModel->observe(_walkedNodes, cursorIndex, stringValue, [[NSDate date] timeIntervalSince1970]);
|
||||||
}
|
}
|
||||||
[self _walk];
|
[self _walk];
|
||||||
|
|
||||||
|
if (Preferences.selectPhraseAfterCursorAsCandidate &&
|
||||||
|
Preferences.moveCursorAfterSelectingCandidate) {
|
||||||
|
size_t nextPosition = 0;
|
||||||
|
for (auto node: _walkedNodes) {
|
||||||
|
if (nextPosition >= cursorIndex) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
nextPosition += node.spanningLength;
|
||||||
|
}
|
||||||
|
if (nextPosition <= _builder->length()) {
|
||||||
|
_builder->setCursorIndex(nextPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)clear
|
- (void)clear
|
||||||
|
@ -765,12 +779,15 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_inputMode == InputModePlainBopomofo) {
|
// Actually the lines would not be reached. When there is BMPF reading and
|
||||||
if (!_bpmfReadingBuffer->isEmpty()) {
|
// a user input enter, we just send the readings to the client app.
|
||||||
errorCallback();
|
|
||||||
}
|
// if (_inputMode == InputModePlainBopomofo) {
|
||||||
return YES;
|
// if (!_bpmfReadingBuffer->isEmpty()) {
|
||||||
}
|
// errorCallback();
|
||||||
|
// }
|
||||||
|
// return YES;
|
||||||
|
// }
|
||||||
|
|
||||||
[self clear];
|
[self clear];
|
||||||
|
|
||||||
|
@ -880,7 +897,6 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot
|
||||||
} else {
|
} else {
|
||||||
stateCallback(marking);
|
stateCallback(marking);
|
||||||
}
|
}
|
||||||
stateCallback(marking);
|
|
||||||
} else {
|
} else {
|
||||||
errorCallback();
|
errorCallback();
|
||||||
stateCallback(state);
|
stateCallback(state);
|
||||||
|
|
|
@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
+ (void)loadUserPhraseReplacement;
|
+ (void)loadUserPhraseReplacement;
|
||||||
+ (void)setupDataModelValueConverter;
|
+ (void)setupDataModelValueConverter;
|
||||||
+ (BOOL)checkIfUserLanguageModelFilesExist;
|
+ (BOOL)checkIfUserLanguageModelFilesExist;
|
||||||
|
|
||||||
|
+ (BOOL)checkIfUserPhraseExist:(NSString *)userPhrase key:(NSString *)key NS_SWIFT_NAME(checkIfExist(userPhrase:key:));
|
||||||
+ (BOOL)writeUserPhrase:(NSString *)userPhrase;
|
+ (BOOL)writeUserPhrase:(NSString *)userPhrase;
|
||||||
|
|
||||||
@property (class, readonly, nonatomic) NSString *dataFolderPath;
|
@property (class, readonly, nonatomic) NSString *dataFolderPath;
|
||||||
|
|
|
@ -193,6 +193,19 @@ static void LTLoadAssociatedPhrases(McBopomofoLM &lm)
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL)checkIfUserPhraseExist:(NSString *)userPhrase key:(NSString *)key NS_SWIFT_NAME(checkIfExist(userPhrase:key:))
|
||||||
|
{
|
||||||
|
string unigramKey = string(key.UTF8String);
|
||||||
|
vector<Unigram> unigrams = gLanguageModelMcBopomofo.unigramsForKey(unigramKey);
|
||||||
|
string userPhraseString = string(userPhrase.UTF8String);
|
||||||
|
for (auto unigram: unigrams) {
|
||||||
|
if (unigram.keyValue.value == userPhraseString) {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
+ (BOOL)writeUserPhrase:(NSString *)userPhrase
|
+ (BOOL)writeUserPhrase:(NSString *)userPhrase
|
||||||
{
|
{
|
||||||
if (![self checkIfUserLanguageModelFilesExist]) {
|
if (![self checkIfUserLanguageModelFilesExist]) {
|
||||||
|
|
|
@ -24,11 +24,15 @@
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
private let kKeyboardLayoutPreferenceKey = "KeyboardLayout"
|
private let kKeyboardLayoutPreferenceKey = "KeyboardLayout"
|
||||||
private let kBasisKeyboardLayoutPreferenceKey = "BasisKeyboardLayout" // alphanumeric ("ASCII") input basi
|
/// alphanumeric ("ASCII") input basic keyboard layout.
|
||||||
private let kFunctionKeyKeyboardLayoutPreferenceKey = "FunctionKeyKeyboardLayout" // alphanumeric ("ASCII") input basi
|
private let kBasisKeyboardLayoutPreferenceKey = "BasisKeyboardLayout"
|
||||||
private let kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey = "FunctionKeyKeyboardLayoutOverrideIncludeShift" // whether include shif
|
/// alphanumeric ("ASCII") input basic keyboard layout.
|
||||||
|
private let kFunctionKeyKeyboardLayoutPreferenceKey = "FunctionKeyKeyboardLayout"
|
||||||
|
/// whether include shift.
|
||||||
|
private let kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey = "FunctionKeyKeyboardLayoutOverrideIncludeShift"
|
||||||
private let kCandidateListTextSizeKey = "CandidateListTextSize"
|
private let kCandidateListTextSizeKey = "CandidateListTextSize"
|
||||||
private let kSelectPhraseAfterCursorAsCandidatePreferenceKey = "SelectPhraseAfterCursorAsCandidate"
|
private let kSelectPhraseAfterCursorAsCandidateKey = "SelectPhraseAfterCursorAsCandidate"
|
||||||
|
private let kMoveCursorAfterSelectingCandidateKey = "MoveCursorAfterSelectingCandidate"
|
||||||
private let kUseHorizontalCandidateListPreferenceKey = "UseHorizontalCandidateList"
|
private let kUseHorizontalCandidateListPreferenceKey = "UseHorizontalCandidateList"
|
||||||
private let kComposingBufferSizePreferenceKey = "ComposingBufferSize"
|
private let kComposingBufferSizePreferenceKey = "ComposingBufferSize"
|
||||||
private let kChooseCandidateUsingSpaceKey = "ChooseCandidateUsingSpaceKey"
|
private let kChooseCandidateUsingSpaceKey = "ChooseCandidateUsingSpaceKey"
|
||||||
|
@ -41,9 +45,8 @@ private let kCandidateKeyLabelFontName = "CandidateKeyLabelFontName"
|
||||||
private let kCandidateKeys = "CandidateKeys"
|
private let kCandidateKeys = "CandidateKeys"
|
||||||
private let kPhraseReplacementEnabledKey = "PhraseReplacementEnabled"
|
private let kPhraseReplacementEnabledKey = "PhraseReplacementEnabled"
|
||||||
private let kChineseConversionEngineKey = "ChineseConversionEngine"
|
private let kChineseConversionEngineKey = "ChineseConversionEngine"
|
||||||
private let kChineseConversionStyle = "ChineseConversionStyle"
|
private let kChineseConversionStyleKey = "ChineseConversionStyle"
|
||||||
private let kAssociatedPhrasesEnabledKey = "AssociatedPhrasesEnabled"
|
private let kAssociatedPhrasesEnabledKey = "AssociatedPhrasesEnabled"
|
||||||
//private let kAssociatedPhrasesKeys = "AssociatedPhrasesKeys"
|
|
||||||
|
|
||||||
private let kDefaultCandidateListTextSize: CGFloat = 16
|
private let kDefaultCandidateListTextSize: CGFloat = 16
|
||||||
private let kMinCandidateListTextSize: CGFloat = 12
|
private let kMinCandidateListTextSize: CGFloat = 12
|
||||||
|
@ -204,7 +207,7 @@ class Preferences: NSObject {
|
||||||
kFunctionKeyKeyboardLayoutPreferenceKey,
|
kFunctionKeyKeyboardLayoutPreferenceKey,
|
||||||
kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey,
|
kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey,
|
||||||
kCandidateListTextSizeKey,
|
kCandidateListTextSizeKey,
|
||||||
kSelectPhraseAfterCursorAsCandidatePreferenceKey,
|
kSelectPhraseAfterCursorAsCandidateKey,
|
||||||
kUseHorizontalCandidateListPreferenceKey,
|
kUseHorizontalCandidateListPreferenceKey,
|
||||||
kComposingBufferSizePreferenceKey,
|
kComposingBufferSizePreferenceKey,
|
||||||
kChooseCandidateUsingSpaceKey,
|
kChooseCandidateUsingSpaceKey,
|
||||||
|
@ -216,7 +219,7 @@ class Preferences: NSObject {
|
||||||
kCandidateKeys,
|
kCandidateKeys,
|
||||||
kPhraseReplacementEnabledKey,
|
kPhraseReplacementEnabledKey,
|
||||||
kChineseConversionEngineKey,
|
kChineseConversionEngineKey,
|
||||||
kChineseConversionStyle,
|
kChineseConversionStyleKey,
|
||||||
kAssociatedPhrasesEnabledKey]
|
kAssociatedPhrasesEnabledKey]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,9 +243,12 @@ class Preferences: NSObject {
|
||||||
@CandidateListTextSize(key: kCandidateListTextSizeKey)
|
@CandidateListTextSize(key: kCandidateListTextSizeKey)
|
||||||
@objc static var candidateListTextSize: CGFloat
|
@objc static var candidateListTextSize: CGFloat
|
||||||
|
|
||||||
@UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreferenceKey, defaultValue: false)
|
@UserDefault(key: kSelectPhraseAfterCursorAsCandidateKey, defaultValue: false)
|
||||||
@objc static var selectPhraseAfterCursorAsCandidate: Bool
|
@objc static var selectPhraseAfterCursorAsCandidate: Bool
|
||||||
|
|
||||||
|
@UserDefault(key: kMoveCursorAfterSelectingCandidateKey, defaultValue: false)
|
||||||
|
@objc static var moveCursorAfterSelectingCandidate: Bool
|
||||||
|
|
||||||
@UserDefault(key: kUseHorizontalCandidateListPreferenceKey, defaultValue: false)
|
@UserDefault(key: kUseHorizontalCandidateListPreferenceKey, defaultValue: false)
|
||||||
@objc static var useHorizontalCandidateList: Bool
|
@objc static var useHorizontalCandidateList: Bool
|
||||||
|
|
||||||
|
@ -362,7 +368,7 @@ class Preferences: NSObject {
|
||||||
///
|
///
|
||||||
/// - 0: convert the output
|
/// - 0: convert the output
|
||||||
/// - 1: convert the phrase models.
|
/// - 1: convert the phrase models.
|
||||||
@UserDefault(key: kChineseConversionStyle, defaultValue: 0)
|
@UserDefault(key: kChineseConversionStyleKey, defaultValue: 0)
|
||||||
@objc static var chineseConversionStyle: Int
|
@objc static var chineseConversionStyle: Int
|
||||||
|
|
||||||
@objc static var chineseConversionStyleName: String? {
|
@objc static var chineseConversionStyleName: String? {
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
├── AppDelegate.swift
|
├── AppDelegate.swift
|
||||||
├── Base.lproj
|
├── Base.lproj
|
||||||
│ ├── Credits.rtf
|
│ ├── Credits.rtf
|
||||||
|
│ ├── InfoPlist.strings
|
||||||
|
│ ├── Localizable.strings
|
||||||
│ ├── MainMenu.xib
|
│ ├── MainMenu.xib
|
||||||
│ ├── preferences.xib
|
│ ├── preferences.xib
|
||||||
│ ├── template-data.txt
|
│ ├── template-data.txt
|
||||||
|
@ -16,6 +18,7 @@
|
||||||
│ ├── PhraseFreq.txt
|
│ ├── PhraseFreq.txt
|
||||||
│ ├── README
|
│ ├── README
|
||||||
│ ├── Symbols.txt
|
│ ├── Symbols.txt
|
||||||
|
│ ├── associated-phrases.cin
|
||||||
│ ├── bin
|
│ ├── bin
|
||||||
│ │ ├── C_Version
|
│ │ ├── C_Version
|
||||||
│ │ │ ├── Makefile
|
│ │ │ ├── Makefile
|
||||||
|
@ -59,6 +62,8 @@
|
||||||
│ │ └── falsecount.txt
|
│ │ └── falsecount.txt
|
||||||
│ └── phrase.occ
|
│ └── phrase.occ
|
||||||
├── Engine
|
├── Engine
|
||||||
|
│ ├── AssociatedPhrases.cpp
|
||||||
|
│ ├── AssociatedPhrases.h
|
||||||
│ ├── CMakeLists.txt
|
│ ├── CMakeLists.txt
|
||||||
│ ├── Gramambular
|
│ ├── Gramambular
|
||||||
│ │ ├── Bigram.h
|
│ │ ├── Bigram.h
|
||||||
|
@ -76,43 +81,12 @@
|
||||||
│ ├── KeyValueBlobReader.h
|
│ ├── KeyValueBlobReader.h
|
||||||
│ ├── KeyValueBlobReaderTest.cpp
|
│ ├── KeyValueBlobReaderTest.cpp
|
||||||
│ ├── Mandarin
|
│ ├── Mandarin
|
||||||
|
│ │ ├── CMakeLists.txt
|
||||||
│ │ ├── Mandarin.cpp
|
│ │ ├── Mandarin.cpp
|
||||||
│ │ └── Mandarin.h
|
│ │ ├── Mandarin.h
|
||||||
|
│ │ └── MandarinTest.cpp
|
||||||
│ ├── McBopomofoLM.cpp
|
│ ├── McBopomofoLM.cpp
|
||||||
│ ├── McBopomofoLM.h
|
│ ├── McBopomofoLM.h
|
||||||
│ ├── OpenVanilla
|
|
||||||
│ │ ├── OVAroundFilter.h
|
|
||||||
│ │ ├── OVBase.h
|
|
||||||
│ │ ├── OVBenchmark.h
|
|
||||||
│ │ ├── OVCINDataTable.h
|
|
||||||
│ │ ├── OVCINDatabaseService.h
|
|
||||||
│ │ ├── OVCINToSQLiteConvertor.h
|
|
||||||
│ │ ├── OVCandidateService.h
|
|
||||||
│ │ ├── OVDatabaseService.h
|
|
||||||
│ │ ├── OVDateTimeHelper.h
|
|
||||||
│ │ ├── OVEncodingService.h
|
|
||||||
│ │ ├── OVEventHandlingContext.h
|
|
||||||
│ │ ├── OVException.h
|
|
||||||
│ │ ├── OVFileHelper.h
|
|
||||||
│ │ ├── OVFrameworkInfo.h
|
|
||||||
│ │ ├── OVInputMethod.h
|
|
||||||
│ │ ├── OVKey.h
|
|
||||||
│ │ ├── OVKeyPreprocessor.h
|
|
||||||
│ │ ├── OVKeyValueMap.h
|
|
||||||
│ │ ├── OVLoaderBase.h
|
|
||||||
│ │ ├── OVLoaderService.h
|
|
||||||
│ │ ├── OVLocalization.h
|
|
||||||
│ │ ├── OVModule.h
|
|
||||||
│ │ ├── OVModulePackage.h
|
|
||||||
│ │ ├── OVOutputFilter.h
|
|
||||||
│ │ ├── OVPathInfo.h
|
|
||||||
│ │ ├── OVSQLiteDatabaseService.h
|
|
||||||
│ │ ├── OVSQLiteWrapper.h
|
|
||||||
│ │ ├── OVStringHelper.h
|
|
||||||
│ │ ├── OVTextBuffer.h
|
|
||||||
│ │ ├── OVUTF8Helper.h
|
|
||||||
│ │ ├── OVWildcard.h
|
|
||||||
│ │ └── OpenVanilla.h
|
|
||||||
│ ├── ParselessLM.cpp
|
│ ├── ParselessLM.cpp
|
||||||
│ ├── ParselessLM.h
|
│ ├── ParselessLM.h
|
||||||
│ ├── ParselessLMBenchmark.cpp
|
│ ├── ParselessLMBenchmark.cpp
|
||||||
|
@ -205,4 +179,4 @@
|
||||||
├── template-exclude-phrases.txt
|
├── template-exclude-phrases.txt
|
||||||
└── template-phrases-replacement.txt
|
└── template-phrases-replacement.txt
|
||||||
|
|
||||||
23 directories, 182 files
|
22 directories, 157 files
|
||||||
|
|
|
@ -90,3 +90,6 @@
|
||||||
"Cursor is after \"%@\"." = "Cursor is after \"%@\".";
|
"Cursor is after \"%@\"." = "Cursor is after \"%@\".";
|
||||||
|
|
||||||
"Cursor is between \"%@\" and \"%@\"." = "Cursor is between \"%@\" and \"%@\".";
|
"Cursor is between \"%@\" and \"%@\"." = "Cursor is between \"%@\" and \"%@\".";
|
||||||
|
|
||||||
|
"You are now selecting \"%@\". The phrase already exists." = "You are now selecting \"%@\". The phrase already exists.";
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,11 @@
|
||||||
|
|
||||||
"Use Half-Width Punctuations" = "使用半型標點符號";
|
"Use Half-Width Punctuations" = "使用半型標點符號";
|
||||||
|
|
||||||
"You are now selecting \"%@\". You can add a phrase with two or more characters." = "您目前選擇了 \"%@\"。請選擇兩個字以上,才能加入使用者詞彙。";
|
"You are now selecting \"%@\". You can add a phrase with two or more characters." = "您目前選擇了「%@」。請選擇兩個字以上,才能加入使用者詞彙。";
|
||||||
|
|
||||||
"You are now selecting \"%@\". Press enter to add a new phrase." = "您目前選擇了 \"%@\"。按下 Enter 就可以加入到使用者詞彙中。";
|
"You are now selecting \"%@\". Press enter to add a new phrase." = "您目前選擇了「%@」。按下 Enter 就可以加入到使用者詞彙中。";
|
||||||
|
|
||||||
"You are now selecting \"%@\". A phrase cannot be longer than %d characters." = "您目前選擇了 \"%@\"。自訂詞彙不能超過 %d 個字元。";
|
"You are now selecting \"%@\". A phrase cannot be longer than %d characters." = "您目前選擇了「%@」。自訂詞彙不能超過 %d 個字元。";
|
||||||
|
|
||||||
"Chinese conversion on" = "已經切換到簡體中文模式";
|
"Chinese conversion on" = "已經切換到簡體中文模式";
|
||||||
|
|
||||||
|
@ -90,3 +90,5 @@
|
||||||
"Cursor is after \"%@\"." = "游標正在「%@」後方";
|
"Cursor is after \"%@\"." = "游標正在「%@」後方";
|
||||||
|
|
||||||
"Cursor is between \"%@\" and \"%@\"." = "游標正在「%@」與「%@」之間";
|
"Cursor is between \"%@\" and \"%@\"." = "游標正在「%@」與「%@」之間";
|
||||||
|
|
||||||
|
"You are now selecting \"%@\". The phrase already exists." = "您目前選擇了「%@」,這個詞彙已經存在了";
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
<window title="注音偏好設定" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" animationBehavior="default" id="1" userLabel="Window - Preferences">
|
<window title="注音偏好設定" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" animationBehavior="default" id="1" userLabel="Window - Preferences">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="489" y="334" width="446" height="479"/>
|
<rect key="contentRect" x="489" y="334" width="446" height="520"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||||
<view key="contentView" id="2">
|
<view key="contentView" id="2">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="446" height="479"/>
|
<rect key="frame" x="0.0" y="0.0" width="446" height="520"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3">
|
||||||
<rect key="frame" x="181" y="434" width="125" height="26"/>
|
<rect key="frame" x="181" y="475" width="125" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="4">
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="4">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
</popUpButtonCell>
|
</popUpButtonCell>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="11">
|
||||||
<rect key="frame" x="83" y="440" width="95" height="17"/>
|
<rect key="frame" x="83" y="481" width="95" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="注音鍵盤配置:" id="12">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="注音鍵盤配置:" id="12">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="112">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="112">
|
||||||
<rect key="frame" x="181" y="397" width="149" height="26"/>
|
<rect key="frame" x="181" y="438" width="149" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="115">
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="115">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -70,16 +70,16 @@
|
||||||
</connections>
|
</connections>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
||||||
<rect key="frame" x="18" y="277" width="160" height="17"/>
|
<rect key="frame" x="14" y="318" width="164" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字時,候選詞起算點在:" id="14">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字時,候選詞起算點在:" id="14">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" size="13" name=".PingFangTC-Regular"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||||
<rect key="frame" x="40" y="231" width="138" height="17"/>
|
<rect key="frame" x="40" y="237" width="138" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="候選詞呈現方式:" id="24">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="候選詞呈現方式:" id="24">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="28">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="28">
|
||||||
<rect key="frame" x="70" y="184" width="108" height="17"/>
|
<rect key="frame" x="70" y="190" width="108" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字窗文字大小:" id="29">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字窗文字大小:" id="29">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<matrix verticalHuggingPriority="750" fixedFrame="YES" tag="1" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15">
|
<matrix verticalHuggingPriority="750" fixedFrame="YES" tag="1" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15">
|
||||||
<rect key="frame" x="184" y="256" width="184" height="38"/>
|
<rect key="frame" x="184" y="297" width="184" height="38"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
<size key="cellSize" width="184" height="18"/>
|
<size key="cellSize" width="184" height="18"/>
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</matrix>
|
</matrix>
|
||||||
<matrix verticalHuggingPriority="750" fixedFrame="YES" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
|
<matrix verticalHuggingPriority="750" fixedFrame="YES" allowsEmptySelection="NO" translatesAutoresizingMaskIntoConstraints="NO" id="19">
|
||||||
<rect key="frame" x="184" y="210" width="207" height="38"/>
|
<rect key="frame" x="184" y="216" width="207" height="38"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
<size key="cellSize" width="207" height="18"/>
|
<size key="cellSize" width="207" height="18"/>
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</matrix>
|
</matrix>
|
||||||
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="90">
|
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="90">
|
||||||
<rect key="frame" x="181" y="176" width="86" height="26"/>
|
<rect key="frame" x="181" y="182" width="86" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" title="18" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="18" imageScaling="proportionallyDown" inset="2" selectedItem="96" id="91">
|
<popUpButtonCell key="cell" type="push" title="18" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="18" imageScaling="proportionallyDown" inset="2" selectedItem="96" id="91">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="109">
|
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="109">
|
||||||
<rect key="frame" x="182" y="336" width="231" height="18"/>
|
<rect key="frame" x="182" y="377" width="231" height="18"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="check" title="使用空白鍵選字" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="110">
|
<buttonCell key="cell" type="check" title="使用空白鍵選字" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="110">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bQw-gl-dUP">
|
<comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bQw-gl-dUP">
|
||||||
<rect key="frame" x="184" y="363" width="206" height="25"/>
|
<rect key="frame" x="184" y="404" width="206" height="25"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="mNx-Jy-SJB">
|
<comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="mNx-Jy-SJB">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</comboBox>
|
</comboBox>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8KJ-n8-0Wd">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8KJ-n8-0Wd">
|
||||||
<rect key="frame" x="70" y="367" width="108" height="17"/>
|
<rect key="frame" x="70" y="408" width="108" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字鍵:" id="eBT-Tv-vED">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="選字鍵:" id="eBT-Tv-vED">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<button verticalHuggingPriority="750" id="OrA-WH-e5x">
|
<button verticalHuggingPriority="750" id="OrA-WH-e5x">
|
||||||
<rect key="frame" x="182" y="313" width="231" height="20"/>
|
<rect key="frame" x="182" y="354" width="231" height="20"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<buttonCell key="cell" type="check" title="按下 ESC 會清除整個輸入緩衝區" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7gv-k3-Mbt">
|
<buttonCell key="cell" type="check" title="按下 ESC 會清除整個輸入緩衝區" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7gv-k3-Mbt">
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="113">
|
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="113">
|
||||||
<rect key="frame" x="70" y="403" width="108" height="17"/>
|
<rect key="frame" x="70" y="444" width="108" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="英數字鍵盤配置:" id="114">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="英數字鍵盤配置:" id="114">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
<rect key="frame" x="18" y="41" width="160" height="17"/>
|
<rect key="frame" x="18" y="41" width="160" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="中文簡繁轉換引擎:" id="jd1-sb-9rA">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="中文簡繁轉換引擎:" id="jd1-sb-9rA">
|
||||||
<font key="font" size="13" name=".PingFangTC-Regular"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
<rect key="frame" x="18" y="87" width="160" height="17"/>
|
<rect key="frame" x="18" y="87" width="160" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="中文簡繁轉換模式:" id="8fJ-OC-sPK">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="中文簡繁轉換模式:" id="8fJ-OC-sPK">
|
||||||
<font key="font" size="13" name=".PingFangTC-Regular"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
|
@ -313,9 +313,21 @@
|
||||||
<rect key="frame" x="28" y="115" width="406" height="5"/>
|
<rect key="frame" x="28" y="115" width="406" height="5"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
</box>
|
</box>
|
||||||
|
<button verticalHuggingPriority="750" id="zwI-Ew-0RX">
|
||||||
|
<rect key="frame" x="182" y="270" width="231" height="20"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<buttonCell key="cell" type="check" title="選字之後自動移動游標位置" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="gpw-vC-BHA">
|
||||||
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
|
<font key="font" size="13" name=".PingFangTC-Regular"/>
|
||||||
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="32" name="enabled" keyPath="values.SelectPhraseAfterCursorAsCandidate" id="4vY-3d-hrt"/>
|
||||||
|
<binding destination="32" name="value" keyPath="values.MoveCursorAfterSelectingCandidate" id="2Dc-Ap-QWt"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<point key="canvasLocation" x="189" y="253.5"/>
|
<point key="canvasLocation" x="189" y="274"/>
|
||||||
</window>
|
</window>
|
||||||
<userDefaultsController representsSharedInstance="YES" id="32"/>
|
<userDefaultsController representsSharedInstance="YES" id="32"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
|
Loading…
Reference in New Issue