diff --git a/Source/Data b/Source/Data index 6dc73cd3..70342c40 160000 --- a/Source/Data +++ b/Source/Data @@ -1 +1 @@ -Subproject commit 6dc73cd3edd47c85089db8f58e92f0c821e67ed6 +Subproject commit 70342c4047c1402c97bde98a51e961e82fa29f60 diff --git a/Source/Modules/ControllerModules/InputState.swift b/Source/Modules/ControllerModules/InputState.swift index e488c15e..babd93b4 100644 --- a/Source/Modules/ControllerModules/InputState.swift +++ b/Source/Modules/ControllerModules/InputState.swift @@ -184,7 +184,7 @@ class InputState: NSObject { let joined = selectedReadings.joined(separator: "-") let exist = mgrLangModel.checkIfUserPhraseExist(userPhrase: text, mode: ctlInputMethod.currentKeyHandler.inputMode, key: joined) if exist { - return String(format: NSLocalizedString("\"%@\" already exists, ENTER to boost its priority.", comment: ""), text) + return String(format: NSLocalizedString("\"%@\" already exists, ENTER to override its priority.", comment: ""), text) } return String(format: NSLocalizedString("\"%@\" selected. ENTER to add user phrase.", comment: ""), text) diff --git a/Source/Modules/ControllerModules/KeyHandler.h b/Source/Modules/ControllerModules/KeyHandler.h index 4aa5bd4a..730ab28a 100644 --- a/Source/Modules/ControllerModules/KeyHandler.h +++ b/Source/Modules/ControllerModules/KeyHandler.h @@ -39,6 +39,7 @@ extern InputMode imeModeNULL; @interface KeyHandler : NSObject +- (BOOL)isBuilderEmpty; - (BOOL)handleInput:(KeyHandlerInput *)input state:(InputState *)state stateCallback:(void (^)(InputState *))stateCallback diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index 2fb6d2be..e81d5b5d 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -87,6 +87,14 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return _inputMode; } +- (BOOL)isBuilderEmpty { + if (_builder->grid().width() == 0) { + return YES; + } else { + return NO; + } +} + - (void)setInputMode:(NSString *)value { NSString *newInputMode; @@ -255,7 +263,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } // Caps Lock processing : if Caps Lock is on, temporarily disable bopomofo. - if ([input isBackSpace] || [input isEnterCharCode] || [input isEnter] || [input isAbsorbedArrowKey] || [input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse] || [input isCursorForward] || [input isCursorBackward]) { + 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]) { // process all possible combination, we hope. @@ -339,13 +347,14 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // see if we have composition if Enter/Space is hit and buffer is not empty // this is bit-OR'ed so that the tone marker key is also taken into account - composeReading |= (!_bpmfReadingBuffer->isEmpty() && ([input isSpace] || [input isEnterCharCode] || [input isEnter])); + composeReading |= (!_bpmfReadingBuffer->isEmpty() && ([input isSpace] || [input isEnter])); if (composeReading) { // combine the reading std::string reading = _bpmfReadingBuffer->syllable().composedString(); // see if we have a unigram for this if (!_languageModel->hasUnigramsForKey(reading)) { + [self errorCallbackConsolePrint:@"B49C0979"]; errorCallback(); InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); @@ -410,7 +419,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if (_bpmfReadingBuffer->isEmpty() && [state isKindOfClass:[InputStateNotEmpty class]] && ([input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse] - || [input isSpace] || [input isPageDown] || [input isPageUp] + || [input isSpace] || [input isPageDown] || [input isPageUp] || [input isTab] || (input.useVerticalMode && ([input isVerticalModeOnlyChooseCandidateKey])))) { if ([input isSpace]) { // if the spacebar is NOT set to be a selection key @@ -497,7 +506,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } // MARK: Enter - if ([input isEnter] || [input isEnterCharCode]) { + if ([input isEnter]) { if ([input isControlHold]) { if (ctlInputMethod.areWeUsingOurOwnPhraseEditor) { return [self _handleCtrlEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback]; @@ -508,8 +517,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // MARK: Punctuation list if ([input isSymbolMenuKey]) { - InputStateEmpty *empty = [[InputStateEmpty alloc] init]; - stateCallback(empty); + + // 得在這裡先 commit buffer,不然會導致「在摁 ESC 離開符號選單時會重複輸入上一次的組字區的內容」的不當行為。 + // 於是這裡用「模擬一次 Enter 鍵的操作」使其代為執行這個 commit buffer 的動作。 + [self _handleEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback]; SymbolNode *root = [SymbolNode root]; InputStateSymbolTable *symbolState = [[InputStateSymbolTable alloc] initWithNode:root useVerticalMode:input.useVerticalMode]; @@ -567,6 +578,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // strange behavior if we don't do this, "thinking" the key is not // actually consumed) if ([state isKindOfClass:[InputStateNotEmpty class]] || !_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"A9BFF20E"]; errorCallback(); stateCallback(state); return YES; @@ -617,6 +629,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } if (!_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"6ED95318"]; errorCallback(); stateCallback(state); return YES; @@ -632,6 +645,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; marking.tooltipForInputting = currentState.tooltip; stateCallback(marking); } else { + [self errorCallbackConsolePrint:@"D326DEA3"]; errorCallback(); stateCallback(state); } @@ -641,6 +655,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); } else { + [self errorCallbackConsolePrint:@"7045E6F3"]; errorCallback(); stateCallback(state); } @@ -655,6 +670,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } if (!_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"B3BA5257"]; errorCallback(); stateCallback(state); return YES; @@ -670,6 +686,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; marking.tooltipForInputting = currentState.tooltip; stateCallback(marking); } else { + [self errorCallbackConsolePrint:@"BB7F6DB9"]; errorCallback(); stateCallback(state); } @@ -679,6 +696,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); } else { + [self errorCallbackConsolePrint:@"A96AAD58"]; errorCallback(); stateCallback(state); } @@ -694,6 +712,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } if (!_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"ABC44080"]; errorCallback(); stateCallback(state); return YES; @@ -704,6 +723,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); } else { + [self errorCallbackConsolePrint:@"66D97F90"]; errorCallback(); stateCallback(state); } @@ -718,6 +738,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } if (!_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"9B69908D"]; errorCallback(); stateCallback(state); return YES; @@ -728,6 +749,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); } else { + [self errorCallbackConsolePrint:@"9B69908E"]; errorCallback(); stateCallback(state); } @@ -742,6 +764,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } if (!_bpmfReadingBuffer->isEmpty()) { + [self errorCallbackConsolePrint:@"9B6F908D"]; errorCallback(); } stateCallback(state); @@ -759,6 +782,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; _builder->deleteReadingBeforeCursor(); [self _walk]; } else { + [self errorCallbackConsolePrint:@"9D69908D"]; errorCallback(); stateCallback(state); return YES; @@ -795,10 +819,12 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; stateCallback(inputting); } } else { + [self errorCallbackConsolePrint:@"9B69938D"]; errorCallback(); stateCallback(state); } } else { + [self errorCallbackConsolePrint:@"9C69908D"]; errorCallback(); stateCallback(state); } @@ -852,6 +878,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; _builder->insertReadingAtCursor(customPunctuation); poppedText = [self _popOverflowComposingTextAndWalk]; } else { // If there is still unfinished bpmf reading, ignore the punctuation + [self errorCallbackConsolePrint:@"A9B69908D"]; errorCallback(); stateCallback(state); return YES; @@ -891,8 +918,9 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } // Enter - if ([input isEnter] || [input isEnterCharCode]) { + if ([input isEnter]) { if (![self.delegate keyHandler:self didRequestWriteUserPhraseWithState:state]) { + [self errorCallbackConsolePrint:@"5B69CC8D"]; errorCallback(); return YES; } @@ -917,6 +945,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; stateCallback(marking); } } else { + [self errorCallbackConsolePrint:@"1149908D"]; errorCallback(); stateCallback(state); } @@ -938,6 +967,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; stateCallback(marking); } } else { + [self errorCallbackConsolePrint:@"9B51408D"]; errorCallback(); stateCallback(state); } @@ -970,6 +1000,12 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; [self clear]; InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init]; stateCallback(empty); + } else if ([self isBuilderEmpty]) { + // 如果此時發現當前組字緩衝區為真空的情況的話,就將當前的組字緩衝區析構處理、強制重設輸入狀態。 + // 不然的話,一個本不該出現的真空組字緩衝區會使前後方向鍵與 BackSpace 鍵失靈。 + [self clear]; + InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init]; + stateCallback(empty); } else { InputStateInputting *inputting = (InputStateInputting *)[self buildInputtingState]; stateCallback(inputting); @@ -977,7 +1013,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return YES; } - if ([input isEnterCharCode] || [input isEnter]) { + if ([input isEnter]) { if ([state isKindOfClass: [InputStateAssociatedPhrases class]]) { [self clear]; InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init]; @@ -988,9 +1024,24 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return YES; } + if ([input isTab]) { + BOOL updated = + Preferences.specifyTabKeyBehavior? + ([input isShiftHold] ? [gCurrentCandidateController showPreviousPage] : [gCurrentCandidateController showNextPage]) + : + ([input isShiftHold] ? [gCurrentCandidateController highlightPreviousCandidate] : [gCurrentCandidateController highlightNextCandidate]) + ; + if (!updated) { + [self errorCallbackConsolePrint:@"9B691919"]; + errorCallback(); + } + return YES; + } + if ([input isSpace] || [input isPageDown] || input.emacsKey == vChewingEmacsKeyNextPage) { BOOL updated = [gCurrentCandidateController showNextPage]; if (!updated) { + [self errorCallbackConsolePrint:@"9B691919"]; errorCallback(); } return YES; @@ -999,6 +1050,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([input isPageUp]) { BOOL updated = [gCurrentCandidateController showPreviousPage]; if (!updated) { + [self errorCallbackConsolePrint:@"9569955D"]; errorCallback(); } return YES; @@ -1008,11 +1060,13 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([gCurrentCandidateController isKindOfClass:[VTHorizontalCandidateController class]]) { BOOL updated = [gCurrentCandidateController highlightPreviousCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"1145148D"]; errorCallback(); } } else { BOOL updated = [gCurrentCandidateController showPreviousPage]; if (!updated) { + [self errorCallbackConsolePrint:@"1919810D"]; errorCallback(); } } @@ -1022,6 +1076,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if (input.emacsKey == vChewingEmacsKeyBackward) { BOOL updated = [gCurrentCandidateController highlightPreviousCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"9B89308D"]; errorCallback(); } return YES; @@ -1031,11 +1086,13 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([gCurrentCandidateController isKindOfClass:[VTHorizontalCandidateController class]]) { BOOL updated = [gCurrentCandidateController highlightNextCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"9B65138D"]; errorCallback(); } } else { BOOL updated = [gCurrentCandidateController showNextPage]; if (!updated) { + [self errorCallbackConsolePrint:@"9244908D"]; errorCallback(); } } @@ -1045,6 +1102,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if (input.emacsKey == vChewingEmacsKeyForward) { BOOL updated = [gCurrentCandidateController highlightNextCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"9B2428D"]; errorCallback(); } return YES; @@ -1054,11 +1112,13 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([gCurrentCandidateController isKindOfClass:[VTHorizontalCandidateController class]]) { BOOL updated = [gCurrentCandidateController showPreviousPage]; if (!updated) { + [self errorCallbackConsolePrint:@"9B614524"]; errorCallback(); } } else { BOOL updated = [gCurrentCandidateController highlightPreviousCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"ASD9908D"]; errorCallback(); } } @@ -1069,11 +1129,13 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([gCurrentCandidateController isKindOfClass:[VTHorizontalCandidateController class]]) { BOOL updated = [gCurrentCandidateController showNextPage]; if (!updated) { + [self errorCallbackConsolePrint:@"92B990DD"]; errorCallback(); } } else { BOOL updated = [gCurrentCandidateController highlightNextCandidate]; if (!updated) { + [self errorCallbackConsolePrint:@"6B99908D"]; errorCallback(); } } @@ -1082,6 +1144,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if ([input isHome] || input.emacsKey == vChewingEmacsKeyHome) { if (gCurrentCandidateController.selectedCandidateIndex == 0) { + [self errorCallbackConsolePrint:@"9B6EDE8D"]; errorCallback(); } else { gCurrentCandidateController.selectedCandidateIndex = 0; @@ -1104,6 +1167,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; if (([input isEnd] || input.emacsKey == vChewingEmacsKeyEnd) && candidates.count > 0) { if (gCurrentCandidateController.selectedCandidateIndex == candidates.count - 1) { + [self errorCallbackConsolePrint:@"9B69AAAD"]; errorCallback(); } else { gCurrentCandidateController.selectedCandidateIndex = candidates.count - 1; @@ -1181,6 +1245,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } } + [self errorCallbackConsolePrint:@"172A0F81"]; errorCallback(); return YES; } @@ -1378,4 +1443,11 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; return nil; } +-(void)errorCallbackConsolePrint:(NSString *)strPrint +{ + if (Preferences.isDebugModeEnabled) { + NSLog(@"vChewingErrorCallback: %@", strPrint); + } +} + @end diff --git a/Source/Modules/ControllerModules/KeyHandlerInput.swift b/Source/Modules/ControllerModules/KeyHandlerInput.swift index 7469c7a3..96df1979 100644 --- a/Source/Modules/ControllerModules/KeyHandlerInput.swift +++ b/Source/Modules/ControllerModules/KeyHandlerInput.swift @@ -19,8 +19,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH import Cocoa +// KeyCodes: https://eastmanreference.com/complete-list-of-applescript-key-codes enum KeyCode: UInt16 { case none = 0 + case esc = 53 + case tab = 48 case enter = 76 case up = 126 case down = 125 @@ -33,6 +36,7 @@ enum KeyCode: UInt16 { case delete = 117 } +// CharCodes: https://theasciicode.com.ar/ascii-control-characters/horizontal-tab-ascii-code-9.html enum CharCode: UInt16 { case space = 32 case backSpace = 8 @@ -141,12 +145,12 @@ class KeyHandlerInput: NSObject { return code.rawValue != KeyCode.none.rawValue } - @objc var isEnter: Bool { - KeyCode(rawValue: keyCode) == KeyCode.enter + @objc var isTab: Bool { + KeyCode(rawValue: keyCode) == KeyCode.tab } - @objc var isEnterCharCode: Bool { - CharCode(rawValue: charCode) == CharCode.enter + @objc var isEnter: Bool { + (CharCode(rawValue: charCode) == CharCode.enter) || (KeyCode(rawValue: keyCode) == KeyCode.enter) } @objc var isUp: Bool { @@ -182,7 +186,7 @@ class KeyHandlerInput: NSObject { } @objc var isESC: Bool { - CharCode(rawValue: charCode) == CharCode.esc + (CharCode(rawValue: charCode) == CharCode.esc) || (KeyCode(rawValue: keyCode) == KeyCode.esc) } @objc var isHome: Bool { diff --git a/Source/Modules/FileHandlers/LMConsolidator.h b/Source/Modules/FileHandlers/LMConsolidator.h index 3dd481ca..38b25ae8 100644 --- a/Source/Modules/FileHandlers/LMConsolidator.h +++ b/Source/Modules/FileHandlers/LMConsolidator.h @@ -37,7 +37,7 @@ class LMConsolidator public: static bool CheckPragma(const char *path); static bool FixEOF(const char *path); - static bool ConsolidateContent(const char *path, bool shouldsort, bool shouldCheckPragma); + static bool ConsolidateContent(const char *path, bool shouldCheckPragma); }; } // namespace vChewing diff --git a/Source/Modules/FileHandlers/LMConsolidator.mm b/Source/Modules/FileHandlers/LMConsolidator.mm index d3350e2f..1cb685df 100644 --- a/Source/Modules/FileHandlers/LMConsolidator.mm +++ b/Source/Modules/FileHandlers/LMConsolidator.mm @@ -71,8 +71,8 @@ bool LMConsolidator::FixEOF(const char *path) } // END: EOF FIXER. // CONTENT CONSOLIDATOR. CREDIT: Shiki Suen. -bool LMConsolidator::ConsolidateContent(const char *path, bool shouldsort, bool shouldCheckPragma) { - if (LMConsolidator::CheckPragma(path) && !shouldsort && shouldCheckPragma){ +bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma) { + if (LMConsolidator::CheckPragma(path) && shouldCheckPragma){ return true; } @@ -97,8 +97,7 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldsort, bool vecEntry[i] = regex_replace(vecEntry[i], sedTrailingSpace, "").c_str(); // 去掉行尾空格。 } } - // 在第二遍 for 運算之前,針對 vecEntry 排序+去除重複條目。 - if (shouldsort) {sort(vecEntry.begin(), vecEntry.end());} // 要不要排序,得做成開關。 + // 在第二遍 for 運算之前,針對 vecEntry 去除重複條目。 vecEntry.erase(unique(vecEntry.begin(), vecEntry.end()), vecEntry.end()); // 去重複。 // 統整完畢。開始將統整過的內容寫入檔案。 ofstream zfdContentConsolidatorOutput(path); // 這裡是要從頭開始重寫檔案內容,所以不需要「 ios_base::app 」。 diff --git a/Source/Modules/IMEModules/PreferencesModule.swift b/Source/Modules/IMEModules/PreferencesModule.swift index aed90dd5..68d2cf45 100644 --- a/Source/Modules/IMEModules/PreferencesModule.swift +++ b/Source/Modules/IMEModules/PreferencesModule.swift @@ -19,6 +19,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH import Cocoa +private let kIsDebugModeEnabled = "_DebugMode" private let kCheckUpdateAutomatically = "CheckUpdateAutomatically" private let kKeyboardLayoutPreference = "KeyboardLayout" private let kBasisKeyboardLayoutPreference = "BasisKeyboardLayout" @@ -27,9 +28,6 @@ private let kFunctionKeyKeyboardLayoutOverrideIncludeShift = "FunctionKeyKeyboar private let kCandidateListTextSize = "CandidateListTextSize" private let kAppleLanguagesPreferences = "AppleLanguages" private let kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles" -private let kShouldAutoSortUserPhrasesAndExclListOnLoad = "ShouldAutoSortUserPhrasesAndExclListOnLoad" -private let kShouldAutoSortPhraseReplacementMapOnLoad = "ShouldAutoSortPhraseReplacementMapOnLoad" -private let kShouldAutoSortAssociatedPhrasesOnLoad = "ShouldAutoSortAssociatedPhrasesOnLoad" private let kSelectPhraseAfterCursorAsCandidatePreference = "SelectPhraseAfterCursorAsCandidate" private let kUseHorizontalCandidateListPreference = "UseHorizontalCandidateList" private let kComposingBufferSizePreference = "ComposingBufferSize" @@ -40,6 +38,7 @@ private let kShiftJISShinjitaiOutputEnabled = "ShiftJISShinjitaiOutputEnabled" private let kHalfWidthPunctuationEnabled = "HalfWidthPunctuationEnable" private let kMoveCursorAfterSelectingCandidate = "MoveCursorAfterSelectingCandidate" private let kEscToCleanInputBuffer = "EscToCleanInputBuffer" +private let kSpecifyTabKeyBehavior = "SpecifyTabKeyBehavior" private let kUseSCPCTypingMode = "UseSCPCTypingMode" private let kMaxCandidateLength = "MaxCandidateLength" private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep" @@ -213,16 +212,14 @@ struct ComposingBufferSize { // MARK: - @objc public class Preferences: NSObject { static var allKeys:[String] { - [kKeyboardLayoutPreference, + [kIsDebugModeEnabled, + kKeyboardLayoutPreference, kBasisKeyboardLayoutPreference, kFunctionKeyKeyboardLayoutPreference, kFunctionKeyKeyboardLayoutOverrideIncludeShift, kCandidateListTextSize, kAppleLanguagesPreferences, kShouldAutoReloadUserDataFiles, - kShouldAutoSortUserPhrasesAndExclListOnLoad, - kShouldAutoSortPhraseReplacementMapOnLoad, - kShouldAutoSortAssociatedPhrasesOnLoad, kSelectPhraseAfterCursorAsCandidatePreference, kUseHorizontalCandidateListPreference, kComposingBufferSizePreference, @@ -231,6 +228,7 @@ struct ComposingBufferSize { kChineseConversionEnabled, kShiftJISShinjitaiOutputEnabled, kHalfWidthPunctuationEnabled, + kSpecifyTabKeyBehavior, kEscToCleanInputBuffer, kCandidateTextFontName, kCandidateKeyLabelFontName, @@ -248,11 +246,16 @@ struct ComposingBufferSize { @objc public static func setMissingDefaults () { // 既然 Preferences Module 的預設屬性不自動寫入 plist、而且還是 private,那這邊就先寫入了。 + // 首次啟用輸入法時不要啟用偵錯模式。 + if UserDefaults.standard.object(forKey: kIsDebugModeEnabled) == nil { + UserDefaults.standard.set(Preferences.isDebugModeEnabled, forKey: kIsDebugModeEnabled) + } + // 首次啟用輸入法時設定不要自動更新,免得在某些要隔絕外部網路連線的保密機構內觸犯資安規則。 if UserDefaults.standard.object(forKey: kCheckUpdateAutomatically) == nil { UserDefaults.standard.set(false, forKey: kCheckUpdateAutomatically) } - + // 預設選字窗字詞文字尺寸,設成 18 剛剛好 if UserDefaults.standard.object(forKey: kCandidateListTextSize) == nil { UserDefaults.standard.set(Preferences.candidateListTextSize, forKey: kCandidateListTextSize) @@ -263,24 +266,14 @@ struct ComposingBufferSize { UserDefaults.standard.set(Preferences.chooseCandidateUsingSpace, forKey: kChooseCandidateUsingSpace) } - // 在檔案載入時,預設不啟用使用者自訂語彙表與語彙排除表的內容排序。 + // 自動檢測使用者自訂語彙數據的變動並載入。 if UserDefaults.standard.object(forKey: kShouldAutoReloadUserDataFiles) == nil { UserDefaults.standard.set(Preferences.shouldAutoReloadUserDataFiles, forKey: kShouldAutoReloadUserDataFiles) } - // 在檔案載入時,預設不啟用語彙置換表的內容排序。 - if UserDefaults.standard.object(forKey: kShouldAutoSortUserPhrasesAndExclListOnLoad) == nil { - UserDefaults.standard.set(Preferences.shouldAutoSortUserPhrasesAndExclListOnLoad, forKey: kShouldAutoSortUserPhrasesAndExclListOnLoad) - } - - // 在檔案載入時,預設不啟用自訂聯想詞表的內容排序。 - if UserDefaults.standard.object(forKey: kShouldAutoSortAssociatedPhrasesOnLoad) == nil { - UserDefaults.standard.set(Preferences.shouldAutoSortAssociatedPhrasesOnLoad, forKey: kShouldAutoSortAssociatedPhrasesOnLoad) - } - - // 自動檢測使用者自訂語彙數據的變動並載入。 - if UserDefaults.standard.object(forKey: kShouldAutoSortPhraseReplacementMapOnLoad) == nil { - UserDefaults.standard.set(Preferences.shouldAutoSortPhraseReplacementMapOnLoad, forKey: kShouldAutoSortPhraseReplacementMapOnLoad) + // 預設情況下讓 Tab 鍵在選字窗內切換候選字、而不是用來換頁。 + if UserDefaults.standard.object(forKey: kSpecifyTabKeyBehavior) == nil { + UserDefaults.standard.set(Preferences.specifyTabKeyBehavior, forKey: kSpecifyTabKeyBehavior) } // 預設禁用逐字選字模式(就是每個字都要選的那種),所以設成 false @@ -336,6 +329,9 @@ struct ComposingBufferSize { UserDefaults.standard.synchronize() } + @UserDefault(key: kIsDebugModeEnabled, defaultValue: false) + @objc static var isDebugModeEnabled: Bool + @UserDefault(key: kAppleLanguagesPreferences, defaultValue: []) @objc static var appleLanguages: Array @@ -361,15 +357,6 @@ struct ComposingBufferSize { @UserDefault(key: kShouldAutoReloadUserDataFiles, defaultValue: true) @objc static var shouldAutoReloadUserDataFiles: Bool - @UserDefault(key: kShouldAutoSortUserPhrasesAndExclListOnLoad, defaultValue: false) - @objc static var shouldAutoSortUserPhrasesAndExclListOnLoad: Bool - - @UserDefault(key: kShouldAutoSortPhraseReplacementMapOnLoad, defaultValue: false) - @objc static var shouldAutoSortPhraseReplacementMapOnLoad: Bool - - @UserDefault(key: kShouldAutoSortAssociatedPhrasesOnLoad, defaultValue: false) - @objc static var shouldAutoSortAssociatedPhrasesOnLoad: Bool - @UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreference, defaultValue: true) @objc static var selectPhraseAfterCursorAsCandidate: Bool @@ -448,7 +435,10 @@ struct ComposingBufferSize { @UserDefault(key: kEscToCleanInputBuffer, defaultValue: true) @objc static var escToCleanInputBuffer: Bool - // MARK: Optional settings + @UserDefault(key: kSpecifyTabKeyBehavior, defaultValue: false) + @objc static var specifyTabKeyBehavior: Bool + + // MARK: - Optional settings @UserDefault(key: kCandidateTextFontName, defaultValue: nil) @objc static var candidateTextFontName: String? diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 48af8aa4..5a04837a 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -115,7 +115,9 @@ class ctlInputMethod: IMKInputController { menu.addItem(NSMenuItem.separator()) // --------------------- menu.addItem(withTitle: NSLocalizedString("vChewing Preferences…", comment: ""), action: #selector(showPreferences(_:)), keyEquivalent: "") - menu.addItem(withTitle: NSLocalizedString("Check for Updates…", comment: ""), action: #selector(checkForUpdate(_:)), keyEquivalent: "") + if !optionKeyPressed { + menu.addItem(withTitle: NSLocalizedString("Check for Updates…", comment: ""), action: #selector(checkForUpdate(_:)), keyEquivalent: "") + } menu.addItem(withTitle: NSLocalizedString("About vChewing…", comment: ""), action: #selector(showAbout(_:)), keyEquivalent: "") if optionKeyPressed { menu.addItem(withTitle: NSLocalizedString("Reboot vChewing…", comment: ""), action: #selector(selfTerminate(_:)), keyEquivalent: "") diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm b/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm index 4970f8a3..1af8c9d0 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm @@ -59,7 +59,7 @@ bool AssociatedPhrases::open(const char *path) } LMConsolidator::FixEOF(path); - LMConsolidator::ConsolidateContent(path, Preferences.shouldAutoSortAssociatedPhrasesOnLoad, true); + LMConsolidator::ConsolidateContent(path, true); fd = ::open(path, O_RDONLY); if (fd == -1) { diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm b/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm index 64d2071e..835c24b6 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm @@ -54,7 +54,7 @@ bool PhraseReplacementMap::open(const char *path) } LMConsolidator::FixEOF(path); - LMConsolidator::ConsolidateContent(path, Preferences.shouldAutoSortPhraseReplacementMapOnLoad, true); + LMConsolidator::ConsolidateContent(path, true); fd = ::open(path, O_RDONLY); if (fd == -1) { diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm b/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm index f23206f8..cd82d11c 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm @@ -60,7 +60,7 @@ bool UserPhrasesLM::open(const char *path) } LMConsolidator::FixEOF(path); - LMConsolidator::ConsolidateContent(path, Preferences.shouldAutoSortUserPhrasesAndExclListOnLoad, true); + LMConsolidator::ConsolidateContent(path, true); fd = ::open(path, O_RDONLY); if (fd == -1) { diff --git a/Source/Modules/LangModelRelated/mgrLangModel.mm b/Source/Modules/LangModelRelated/mgrLangModel.mm index 2564a8e5..c6f830f6 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.mm +++ b/Source/Modules/LangModelRelated/mgrLangModel.mm @@ -266,7 +266,7 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing [writeFile closeFile]; // We enforce the format consolidation here, since the pragma header will let the UserPhraseLM bypasses the consolidating process on load. - vChewing::LMConsolidator::ConsolidateContent([path UTF8String], Preferences.shouldAutoSortUserPhrasesAndExclListOnLoad, false); + vChewing::LMConsolidator::ConsolidateContent([path UTF8String], false); // We use FSEventStream to monitor the change of the user phrase folder, // so we don't have to load data here unless FSEventStream is disabled by user. diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index fac28d72..0600f2b2 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -24,7 +24,7 @@ "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; "\"%@\" selected. ENTER to add user phrase." = "\"%@\" selected. ENTER to add user phrase."; -"\"%@\" already exists, ENTER to boost its priority." = "\"%@\" already exists, ENTER to boost its priority."; +"\"%@\" already exists, ENTER to override its priority." = "\"%@\" already exists, ENTER to override its priority."; "Edit Phrase Replacement Table…" = "Edit Phrase Replacement Table…"; "Use Phrase Replacement" = "Use Phrase Replacement"; "Candidates keys cannot be empty." = "Candidates keys cannot be empty."; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index fac28d72..0600f2b2 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -24,7 +24,7 @@ "\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase."; "\"%@\" length should ≤ %d for a user phrase." = "\"%@\" length should ≤ %d for a user phrase."; "\"%@\" selected. ENTER to add user phrase." = "\"%@\" selected. ENTER to add user phrase."; -"\"%@\" already exists, ENTER to boost its priority." = "\"%@\" already exists, ENTER to boost its priority."; +"\"%@\" already exists, ENTER to override its priority." = "\"%@\" already exists, ENTER to override its priority."; "Edit Phrase Replacement Table…" = "Edit Phrase Replacement Table…"; "Use Phrase Replacement" = "Use Phrase Replacement"; "Candidates keys cannot be empty." = "Candidates keys cannot be empty."; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 00026872..6d599f13 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -24,7 +24,7 @@ "\"%@\" length must ≥ 2 for a user phrase." = "「%@」もう1つ文字のお選びを。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」文字数過剰で登録不可、%d 文字以内にして下さい。"; "\"%@\" selected. ENTER to add user phrase." = "「%@」を ENTER で辞書に登録。"; -"\"%@\" already exists, ENTER to boost its priority." = "「%@」は既存語彙であり、ENTER で最優先にする。"; +"\"%@\" already exists, ENTER to override its priority." = "「%@」は既存語彙であり、ENTER で優先順位を再調整。"; "Edit Phrase Replacement Table…" = "言葉置換表を編集…"; "Use Phrase Replacement" = "言葉置換機能"; "Candidates keys cannot be empty." = "言選り用キー陣列に何かキーをご登録ください。"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index bee4cf8e..8d811d21 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -24,7 +24,7 @@ "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字数不足以自订语汇。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字数超过 %d、无法自订。"; "\"%@\" selected. ENTER to add user phrase." = "「%@」敲 Enter 添入自订语汇。"; -"\"%@\" already exists, ENTER to boost its priority." = "「%@」已存在,敲 ENTER 以提升其权重。"; +"\"%@\" already exists, ENTER to override its priority." = "「%@」已存在,敲 ENTER 以覆写其权重。"; "Edit Phrase Replacement Table…" = "编辑语汇置换表…"; "Use Phrase Replacement" = "使用语汇置换"; "Candidates keys cannot be empty." = "您必须指定选字键。"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 3a1b9998..44db7b42 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -24,7 +24,7 @@ "\"%@\" length must ≥ 2 for a user phrase." = "「%@」字數不足以自訂語彙。"; "\"%@\" length should ≤ %d for a user phrase." = "「%@」字數超過 %d、無法自訂。"; "\"%@\" selected. ENTER to add user phrase." = "「%@」敲 Enter 添入自訂語彙。"; -"\"%@\" already exists, ENTER to boost its priority." = "「%@」已存在,敲 ENTER 以提升其權重。"; +"\"%@\" already exists, ENTER to override its priority." = "「%@」已存在,敲 ENTER 以覆寫其權重。"; "Edit Phrase Replacement Table…" = "編輯語彙置換表…"; "Use Phrase Replacement" = "使用語彙置換"; "Candidates keys cannot be empty." = "您必須指定選字鍵。"; diff --git a/Source/UI/CandidateUI/HorizontalCandidateController.swift b/Source/UI/CandidateUI/HorizontalCandidateController.swift index a6494bb7..ffe8ee48 100644 --- a/Source/UI/CandidateUI/HorizontalCandidateController.swift +++ b/Source/UI/CandidateUI/HorizontalCandidateController.swift @@ -255,61 +255,32 @@ public class HorizontalCandidateController: CandidateController { } public override func showNextPage() -> Bool { - guard delegate != nil else { - return false - } - - if currentPage + 1 >= pageCount { - currentPage = 0 - } else { - currentPage += 1 - } - + guard delegate != nil else {return false} + if pageCount == 1 {return highlightNextCandidate()} + currentPage = (currentPage + 1 >= pageCount) ? 0 : currentPage + 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true } public override func showPreviousPage() -> Bool { - guard delegate != nil else { - return false - } - - if currentPage == 0 { - currentPage = pageCount - 1 - } else { - currentPage -= 1 - } - + guard delegate != nil else {return false} + if pageCount == 1 {return highlightPreviousCandidate()} + currentPage = (currentPage == 0) ? pageCount - 1 : currentPage - 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true } public override func highlightNextCandidate() -> Bool { - guard let delegate = delegate else { - return false - } - - let currentIndex = selectedCandidateIndex - if currentIndex + 1 >= delegate.candidateCountForController(self) { - return false - } - selectedCandidateIndex = currentIndex + 1 + guard let delegate = delegate else {return false} + selectedCandidateIndex = (selectedCandidateIndex + 1 >= delegate.candidateCountForController(self)) ? 0 : selectedCandidateIndex + 1 return true } public override func highlightPreviousCandidate() -> Bool { - guard delegate != nil else { - return false - } - - let currentIndex = selectedCandidateIndex - if currentIndex == 0 { - return false - } - - selectedCandidateIndex = currentIndex - 1 + guard let delegate = delegate else {return false} + selectedCandidateIndex = (selectedCandidateIndex == 0) ? delegate.candidateCountForController(self) - 1 : selectedCandidateIndex - 1 return true } diff --git a/Source/UI/CandidateUI/VerticalCandidateController.swift b/Source/UI/CandidateUI/VerticalCandidateController.swift index 05a9b4dd..50fe09f7 100644 --- a/Source/UI/CandidateUI/VerticalCandidateController.swift +++ b/Source/UI/CandidateUI/VerticalCandidateController.swift @@ -261,61 +261,32 @@ public class VerticalCandidateController: CandidateController { } public override func showNextPage() -> Bool { - guard delegate != nil else { - return false - } - - if currentPage + 1 >= pageCount { - currentPage = 0 - } else { - currentPage += 1 - } - + guard delegate != nil else {return false} + if pageCount == 1 {return highlightNextCandidate()} + currentPage = (currentPage + 1 >= pageCount) ? 0 : currentPage + 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true } public override func showPreviousPage() -> Bool { - guard delegate != nil else { - return false - } - - if currentPage == 0 { - currentPage = pageCount - 1 - } else { - currentPage -= 1 - } - + guard delegate != nil else {return false} + if pageCount == 1 {return highlightPreviousCandidate()} + currentPage = (currentPage == 0) ? pageCount - 1 : currentPage - 1 candidateView.highlightedIndex = 0 layoutCandidateView() return true } public override func highlightNextCandidate() -> Bool { - guard let delegate = delegate else { - return false - } - - let currentIndex = selectedCandidateIndex - if currentIndex + 1 >= delegate.candidateCountForController(self) { - return false - } - selectedCandidateIndex = currentIndex + 1 + guard let delegate = delegate else {return false} + selectedCandidateIndex = (selectedCandidateIndex + 1 >= delegate.candidateCountForController(self)) ? 0 : selectedCandidateIndex + 1 return true } public override func highlightPreviousCandidate() -> Bool { - guard delegate != nil else { - return false - } - - let currentIndex = selectedCandidateIndex - if currentIndex == 0 { - return false - } - - selectedCandidateIndex = currentIndex - 1 + guard let delegate = delegate else {return false} + selectedCandidateIndex = (selectedCandidateIndex == 0) ? delegate.candidateCountForController(self) - 1 : selectedCandidateIndex - 1 return true } diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 9e6e2d40..8cf4f8fd 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -300,15 +300,29 @@ + + + + + @@ -318,17 +332,17 @@ - + - + - + - + @@ -340,7 +354,7 @@ - + @@ -359,7 +373,7 @@ - + @@ -367,7 +381,7 @@ - + @@ -378,9 +392,9 @@ - + - + @@ -402,25 +416,10 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - - - + + + + - - - + + + - - - + - - + + - + - + - - - - - - - - - - - - - - - - - - + - - - - - - + - + diff --git a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 8d36bb1c..8e72240f 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -2,6 +2,9 @@ /* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "vChewing Preferences"; +/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ +"sZx-18-8dO.title" = "Debug Mode"; + /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; @@ -131,9 +134,6 @@ /* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "Auto-Select"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading user phrases and excluded phrases list"; ObjectID = "Li3-Yg-SOC"; */ -"Li3-Yg-SOC.title" = "Sort entries when reloading user phrases and excluded phrases list"; - /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "General"; @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "Change UI font size of candidate window for a better visual clarity."; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "Define your preferred action when user data files reload."; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; @@ -185,9 +182,6 @@ /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading the phrase replacement map"; ObjectID = "o60-vW-i1B"; */ -"o60-vW-i1B.title" = "Sort entries when reloading the phrase replacement map"; - /* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "Japanese"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index f7c41959..859f850c 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -2,6 +2,9 @@ /* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音アプリ機能設定"; +/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ +"sZx-18-8dO.title" = "欠陥辿着モード"; + /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; @@ -131,9 +134,6 @@ /* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "システム設定に準ずる"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading user phrases and excluded phrases list"; ObjectID = "Li3-Yg-SOC"; */ -"Li3-Yg-SOC.title" = "ユーザー辞書と条目排除表を読み込むときに、内容の順番を整う"; - /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "全般"; @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "入力候補陣列の候補文字の字号をご指定ください。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "ユーザー辞書データの読み込む時のやることをご指示ください。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; @@ -185,9 +182,6 @@ /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading the phrase replacement map"; ObjectID = "o60-vW-i1B"; */ -"o60-vW-i1B.title" = "言葉置換表を読み込むときに、内容の順番を整う"; - /* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和語"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 55278482..c2a38827 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -2,6 +2,9 @@ /* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音偏好设定"; +/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ +"sZx-18-8dO.title" = "侦错模式"; + /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; @@ -131,9 +134,6 @@ /* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "自动选择"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading user phrases and excluded phrases list"; ObjectID = "Li3-Yg-SOC"; */ -"Li3-Yg-SOC.title" = "在重新加载自订语汇与滤除语汇时,统整档案内容排序"; - /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "变更候选字窗的字型大小。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "请指定在使用者资料重载时要启用的功能。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; @@ -185,9 +182,6 @@ /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading the phrase replacement map"; ObjectID = "o60-vW-i1B"; */ -"o60-vW-i1B.title" = "在重新加载语汇滤除表时,统整档案内容排序"; - /* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和语"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index 29a8b8c4..7032b8c9 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -2,6 +2,9 @@ /* Class = "NSWindow"; title = "vChewing Preferences"; ObjectID = "1"; */ "1.title" = "威注音偏好設定"; +/* Class = "NSButtonCell"; title = "Debug Mode"; ObjectID = "sZx-18-8dO"; */ +"sZx-18-8dO.title" = "偵錯模式"; + /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "5"; */ "5.title" = "OtherViews"; @@ -131,9 +134,6 @@ /* Class = "NSMenuItem"; title = "Auto-Select"; ObjectID = "GlJ-Ns-9eE"; */ "GlJ-Ns-9eE.title" = "自動選擇"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading user phrases and excluded phrases list"; ObjectID = "Li3-Yg-SOC"; */ -"Li3-Yg-SOC.title" = "在重新載入自訂語彙與濾除語彙時,統整檔案內容排序"; - /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; @@ -173,9 +173,6 @@ /* Class = "NSTextFieldCell"; title = "Change UI font size of candidate window for a better visual clarity."; ObjectID = "iRg-wx-Nx2"; */ "iRg-wx-Nx2.title" = "變更候選字窗的字型大小。"; -/* Class = "NSTextFieldCell"; title = "Define your preferred action when user data files reload."; ObjectID = "j48-5a-cEs"; */ -"j48-5a-cEs.title" = "請指定在使用者數據重載時要啟用的功能。"; - /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[0]" = "Item 1"; @@ -185,9 +182,6 @@ /* Class = "NSComboBoxCell"; jQC-12-UuK.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "jQC-12-UuK"; */ "jQC-12-UuK.ibShadowedObjectValues[2]" = "Item 3"; -/* Class = "NSButtonCell"; title = "Sort entries when reloading the phrase replacement map"; ObjectID = "o60-vW-i1B"; */ -"o60-vW-i1B.title" = "在重新載入語彙濾除表時,統整檔案內容排序"; - /* Class = "NSMenuItem"; title = "Japanese"; ObjectID = "rVQ-Hx-cGi"; */ "rVQ-Hx-cGi.title" = "和語";