Merge pull request #35 from ShikiSuen/dev/LMConsolidator
Pref // Updates for LMConsolidator and OOBE.
This commit is contained in:
commit
b15398a4a0
|
@ -150,7 +150,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NonModalAlertWindowControlle
|
|||
LanguageModelManager.loadUserPhrases()
|
||||
LanguageModelManager.loadUserPhraseReplacement()
|
||||
|
||||
OOBE.setMissingDefaults()
|
||||
Preferences.setMissingDefaults()
|
||||
|
||||
// 只要使用者沒有勾選檢查更新、沒有主動做出要檢查更新的操作,就不要檢查更新。
|
||||
if (UserDefaults.standard.object(forKey: kCheckUpdateAutomatically) != nil) == true {
|
||||
|
|
|
@ -85,8 +85,8 @@
|
|||
</connections>
|
||||
</popUpButton>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="5Rz-c8-hp9">
|
||||
<rect key="frame" x="18" y="127" width="188" height="15"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Change user interface language." id="ZEv-Q2-mYL">
|
||||
<rect key="frame" x="18" y="127" width="306" height="15"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Change user interface language (will reboot the IME)." id="ZEv-Q2-mYL">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
|
@ -459,21 +459,72 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dnE-Vw-KrP">
|
||||
<rect key="frame" x="18" y="361" width="249" height="15"/>
|
||||
<rect key="frame" x="18" y="361" width="323" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="231" id="MzY-w8-DKW"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="This dictionary page is under development." id="j48-5a-cEs">
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Define your preferred action when user data files reload." id="j48-5a-cEs">
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="1hA-Po-5li">
|
||||
<rect key="frame" x="19" y="338.5" width="404" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="288" id="0mm-CA-Mxs"/>
|
||||
<constraint firstAttribute="height" constant="16" id="c3e-cU-pEw"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="check" title="Sort entries when reloading user phrases and excluded phrases list" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="Li3-Yg-SOC">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="32" name="value" keyPath="values.ShouldAutoSortUserPhrasesAndExclListOnLoad" id="k4w-CX-EfE"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nnT-wS-mZo">
|
||||
<rect key="frame" x="19" y="316.5" width="342" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="IBn-Xf-uEw"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="234" id="srn-3X-kPi"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="check" title="Sort entries when reloading the phrase replacement map" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="o60-vW-i1B">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="32" name="value" keyPath="values.ShouldAutoSortPhraseReplacementMapOnLoad" id="Xn2-So-Dp3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p7V-IN-OTr">
|
||||
<rect key="frame" x="19" y="295.5" width="336" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="8eX-Tw-Erk"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="234" id="yhP-XF-CQj"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="check" title="Automatically reload user data files if changes detected" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="f8i-69-zxm">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<binding destination="32" name="value" keyPath="values.ShouldAutoReloadUserDataFiles" id="XTI-ol-DVN"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="dnE-Vw-KrP" secondAttribute="trailing" constant="214" id="3wA-Rn-cTn"/>
|
||||
<constraint firstItem="nnT-wS-mZo" firstAttribute="leading" secondItem="p7V-IN-OTr" secondAttribute="leading" id="4di-W1-ufn"/>
|
||||
<constraint firstItem="1hA-Po-5li" firstAttribute="leading" secondItem="nnT-wS-mZo" secondAttribute="leading" id="Cfb-2F-MRg"/>
|
||||
<constraint firstItem="1hA-Po-5li" firstAttribute="leading" secondItem="dnE-Vw-KrP" secondAttribute="leading" id="Exw-iA-Unz"/>
|
||||
<constraint firstItem="1hA-Po-5li" firstAttribute="top" secondItem="dnE-Vw-KrP" secondAttribute="bottom" constant="6.5" id="HrQ-4q-l78"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="p7V-IN-OTr" secondAttribute="trailing" constant="20" symbolic="YES" id="MFR-05-QJN"/>
|
||||
<constraint firstItem="dnE-Vw-KrP" firstAttribute="leading" secondItem="rWB-y8-q94" secondAttribute="leading" constant="20" id="QQJ-7P-HAG"/>
|
||||
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="nnT-wS-mZo" secondAttribute="trailing" constant="101" id="QsT-xW-prJ"/>
|
||||
<constraint firstItem="dnE-Vw-KrP" firstAttribute="top" secondItem="rWB-y8-q94" secondAttribute="top" constant="15" id="Vzj-xd-Q2W"/>
|
||||
<constraint firstItem="p7V-IN-OTr" firstAttribute="top" secondItem="nnT-wS-mZo" secondAttribute="bottom" constant="5" id="gRe-fD-67h"/>
|
||||
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="1hA-Po-5li" secondAttribute="trailing" constant="39" id="quD-Rd-uwL"/>
|
||||
<constraint firstItem="nnT-wS-mZo" firstAttribute="top" secondItem="1hA-Po-5li" secondAttribute="bottom" constant="6" symbolic="YES" id="zxn-Pa-o6f"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</box>
|
||||
|
|
|
@ -49,11 +49,13 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldsort) {
|
|||
vecEntry.push_back(zfdBuffer);
|
||||
}
|
||||
// 第一遍 for 用來統整每行內的內容。
|
||||
regex sedCJKWhiteSpace(" "), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // RegEx 先定義好。
|
||||
// regex sedCJKWhiteSpace("\\x{3000}"), sedNonBreakWhiteSpace("\\x{A0}"), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // 這樣寫會導致輸入法敲不了任何字,推測 Xcode 13 支援的 cpp / objCpp 可能對某些 Regex 寫法有相容性問題。
|
||||
regex sedCJKWhiteSpace(" "), sedNonBreakWhiteSpace(" "), sedWhiteSpace("\\s+"), sedLeadingSpace("^\\s"), sedTrailingSpace("\\s$"); // RegEx 先定義好。
|
||||
for(int i=0;i<vecEntry.size();i++) { // 第一遍 for 用來統整每行內的內容。
|
||||
if (vecEntry[i].size() != 0) { // 不要理會空行,否則給空行加上 endl 等於再加空行。
|
||||
// RegEx 處理順序:先將全形空格換成西文空格,然後合併任何意義上的連續空格(包括 tab 等),最後去除每行首尾空格。
|
||||
vecEntry[i] = regex_replace(vecEntry[i], sedCJKWhiteSpace, " ").c_str(); // 中日韓全形空格轉為 ASCII 空格。
|
||||
vecEntry[i] = regex_replace(vecEntry[i], sedNonBreakWhiteSpace, " ").c_str(); // Non-Break 型空格轉為 ASCII 空格。
|
||||
vecEntry[i] = regex_replace(vecEntry[i], sedWhiteSpace, " ").c_str(); // 所有意義上的連續的 \s 型空格都轉為單個 ASCII 空格。
|
||||
vecEntry[i] = regex_replace(vecEntry[i], sedLeadingSpace, "").c_str(); // 去掉行首空格。
|
||||
vecEntry[i] = regex_replace(vecEntry[i], sedTrailingSpace, "").c_str(); // 去掉行尾空格。
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "KeyValueBlobReader.h"
|
||||
#include "PhraseReplacementMap.h"
|
||||
#include "LMConsolidator.h"
|
||||
#include "vChewing-Swift.h"
|
||||
|
||||
namespace vChewing {
|
||||
|
||||
|
@ -39,9 +40,14 @@ bool PhraseReplacementMap::open(const char *path)
|
|||
if (data) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
LMConsolidator::FixEOF(path);
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
|
||||
if (Preferences.shouldAutoSortPhraseReplacementMapOnLoad) {
|
||||
LMConsolidator::ConsolidateContent(path, true);
|
||||
} else {
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
}
|
||||
|
||||
fd = ::open(path, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <syslog.h>
|
||||
#include "LMConsolidator.h"
|
||||
#include "KeyValueBlobReader.h"
|
||||
#include "vChewing-Swift.h"
|
||||
|
||||
namespace vChewing {
|
||||
|
||||
|
@ -39,7 +40,12 @@ bool UserPhrasesLM::open(const char *path)
|
|||
}
|
||||
|
||||
LMConsolidator::FixEOF(path);
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
|
||||
if (Preferences.ShouldAutoSortUserPhrasesAndExclListOnLoad) {
|
||||
LMConsolidator::ConsolidateContent(path, true);
|
||||
} else {
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
}
|
||||
|
||||
fd = ::open(path, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* clsOOBEDefaults.swift
|
||||
*
|
||||
* Copyright 2021-2022 vChewing Project (3-Clause BSD License).
|
||||
* Derived from 2011-2022 OpenVanilla Project (MIT License).
|
||||
* Some rights reserved. See "LICENSE.TXT" for details.
|
||||
*/
|
||||
|
||||
import Cocoa
|
||||
|
||||
private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep"
|
||||
private let kCheckUpdateAutomatically = "CheckUpdateAutomatically"
|
||||
private let kCandidateListTextSize = "CandidateListTextSize"
|
||||
private let kChooseCandidateUsingSpaceKey = "ChooseCandidateUsingSpaceKey"
|
||||
private let kUseWinNT351BPMF = "UseWinNT351BPMF"
|
||||
private let kSelectPhraseAfterCursorAsCandidate = "SelectPhraseAfterCursorAsCandidate"
|
||||
private let kUseHorizontalCandidateList = "UseHorizontalCandidateList"
|
||||
private let kCNS11643EnabledKey = "CNS11643Enabled"
|
||||
private let kChineseConversionEnabledKey = "ChineseConversionEnabled"
|
||||
private let kPhraseReplacementEnabledKey = "PhraseReplacementEnabled"
|
||||
|
||||
@objc public class OOBE : NSObject {
|
||||
|
||||
@objc public static func setMissingDefaults () {
|
||||
// 既然 Preferences Module 的預設屬性不自動寫入 plist、而且還是 private,那這邊就先寫入了。
|
||||
|
||||
// 首次啟用輸入法時設定不要自動更新,免得在某些要隔絕外部網路連線的保密機構內觸犯資安規則。
|
||||
if UserDefaults.standard.object(forKey: kCheckUpdateAutomatically) == nil {
|
||||
UserDefaults.standard.set(false, forKey: kCheckUpdateAutomatically)
|
||||
UserDefaults.standard.synchronize()
|
||||
}
|
||||
|
||||
// 預設選字窗字詞文字尺寸,設成 18 剛剛好
|
||||
if UserDefaults.standard.object(forKey: kCandidateListTextSize) == nil {
|
||||
UserDefaults.standard.set(Preferences.candidateListTextSize, forKey: kCandidateListTextSize)
|
||||
}
|
||||
|
||||
// 預設摁空格鍵來選字,所以設成 true
|
||||
if UserDefaults.standard.object(forKey: kChooseCandidateUsingSpaceKey) == nil {
|
||||
UserDefaults.standard.set(Preferences.chooseCandidateUsingSpace, forKey: kChooseCandidateUsingSpaceKey)
|
||||
}
|
||||
|
||||
// 預設禁用 WinNT351 風格的注音選字模式(就是每個字都要選的那種),所以設成 false
|
||||
if UserDefaults.standard.object(forKey: kUseWinNT351BPMF) == nil {
|
||||
UserDefaults.standard.set(Preferences.useWinNT351BPMF, forKey: kUseWinNT351BPMF)
|
||||
}
|
||||
|
||||
// 預設漢音風格選字,所以要設成 0
|
||||
if UserDefaults.standard.object(forKey: kSelectPhraseAfterCursorAsCandidate) == nil {
|
||||
UserDefaults.standard.set(Preferences.selectPhraseAfterCursorAsCandidate, forKey: kSelectPhraseAfterCursorAsCandidate)
|
||||
}
|
||||
|
||||
// 預設橫向選字窗,不爽請自行改成縱向選字窗
|
||||
if UserDefaults.standard.object(forKey: kUseHorizontalCandidateList) == nil {
|
||||
UserDefaults.standard.set(Preferences.useHorizontalCandidateList, forKey: kUseHorizontalCandidateList)
|
||||
}
|
||||
|
||||
// 預設停用全字庫支援
|
||||
if UserDefaults.standard.object(forKey: kCNS11643EnabledKey) == nil {
|
||||
UserDefaults.standard.set(Preferences.cns11643Enabled, forKey: kCNS11643EnabledKey)
|
||||
}
|
||||
|
||||
// 預設停用繁體轉康熙模組
|
||||
if UserDefaults.standard.object(forKey: kChineseConversionEnabledKey) == nil {
|
||||
UserDefaults.standard.set(Preferences.chineseConversionEnabled, forKey: kChineseConversionEnabledKey)
|
||||
}
|
||||
|
||||
// 預設停用自訂語彙置換
|
||||
if UserDefaults.standard.object(forKey: kPhraseReplacementEnabledKey) == nil {
|
||||
UserDefaults.standard.set(Preferences.phraseReplacementEnabled, forKey: kPhraseReplacementEnabledKey)
|
||||
}
|
||||
|
||||
// 預設沒事不要在那裡放屁
|
||||
if UserDefaults.standard.object(forKey: kShouldNotFartInLieuOfBeep) == nil {
|
||||
UserDefaults.standard.set(Preferences.shouldNotFartInLieuOfBeep, forKey: kShouldNotFartInLieuOfBeep)
|
||||
}
|
||||
|
||||
UserDefaults.standard.synchronize()
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#import "InputMethodController.h"
|
||||
#include <objc/objc.h>
|
||||
#import <fstream>
|
||||
#import <iostream>
|
||||
#import <set>
|
||||
|
@ -158,14 +157,16 @@ static double FindHighestScore(const vector<NodeAnchor>& nodes, double epsilon)
|
|||
|
||||
[menu addItem:[NSMenuItem separatorItem]]; // ------------------------------
|
||||
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Edit User Phrases", @"") action:@selector(openUserPhrases:) keyEquivalent:@""];
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Edit User Phrases…", @"") action:@selector(openUserPhrases:) keyEquivalent:@""];
|
||||
if (optionKeyPressed) {
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Edit Excluded Phrases", @"") action:@selector(openExcludedPhrases:) keyEquivalent:@""];
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Edit Phrase Replacement Table", @"") action:@selector(openPhraseReplacement:) keyEquivalent:@""];
|
||||
}
|
||||
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Reload User Phrases", @"") action:@selector(reloadUserPhrases:) keyEquivalent:@""];
|
||||
|
||||
if (optionKeyPressed || !Preferences.shouldAutoReloadUserDataFiles) {
|
||||
[menu addItemWithTitle:NSLocalizedString(@"Reload User Phrases", @"") action:@selector(reloadUserPhrases:) keyEquivalent:@""];
|
||||
}
|
||||
|
||||
[menu addItem:[NSMenuItem separatorItem]]; // ------------------------------
|
||||
|
||||
[menu addItemWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""];
|
||||
|
@ -182,7 +183,7 @@ static double FindHighestScore(const vector<NodeAnchor>& nodes, double epsilon)
|
|||
- (void)activateServer:(id)client
|
||||
{
|
||||
// Write missing OOBE user plist entries.
|
||||
[OOBE setMissingDefaults];
|
||||
[Preferences setMissingDefaults];
|
||||
|
||||
// Read user plist.
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
@ -191,6 +192,11 @@ static double FindHighestScore(const vector<NodeAnchor>& nodes, double epsilon)
|
|||
NSString *basisKeyboardLayoutID = Preferences.basisKeyboardLayout;
|
||||
[client overrideKeyboardWithKeyboardNamed:basisKeyboardLayoutID];
|
||||
|
||||
// Load UserPhrases // 這裡今後需要改造成「驗證檔案指紋、根據驗證結果判定是否需要重新讀入」的形式。
|
||||
if (Preferences.shouldAutoReloadUserDataFiles) {
|
||||
[self reloadUserPhrases:(id)nil];
|
||||
}
|
||||
|
||||
// reset the state
|
||||
_currentDeferredClient = nil;
|
||||
_currentCandidateClient = nil;
|
||||
|
@ -1493,7 +1499,7 @@ NS_INLINE size_t max(size_t a, size_t b) { return a > b ? a : b; }
|
|||
- (void)showPreferences:(id)sender
|
||||
{
|
||||
// Write missing OOBE user plist entries.
|
||||
[OOBE setMissingDefaults];
|
||||
[Preferences setMissingDefaults];
|
||||
|
||||
// show the preferences panel, and also make the IME app itself the focus
|
||||
if ([IMKInputController instancesRespondToSelector:@selector(showPreferences:)]) {
|
||||
|
|
|
@ -8,20 +8,24 @@
|
|||
|
||||
import Cocoa
|
||||
|
||||
private let kKeyboardLayoutPreferenceKey = "KeyboardLayout"
|
||||
private let kBasisKeyboardLayoutPreferenceKey = "BasisKeyboardLayout" // alphanumeric ("ASCII") input basi
|
||||
private let kFunctionKeyKeyboardLayoutPreferenceKey = "FunctionKeyKeyboardLayout" // alphanumeric ("ASCII") input basi
|
||||
private let kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey = "FunctionKeyKeyboardLayoutOverrideIncludeShift" // whether include shif
|
||||
private let kCandidateListTextSizeKey = "CandidateListTextSize"
|
||||
private let kAppleLanguagesPreferencesKey = "AppleLanguages"
|
||||
private let kSelectPhraseAfterCursorAsCandidatePreferenceKey = "SelectPhraseAfterCursorAsCandidate"
|
||||
private let kUseHorizontalCandidateListPreferenceKey = "UseHorizontalCandidateList"
|
||||
private let kComposingBufferSizePreferenceKey = "ComposingBufferSize"
|
||||
private let kChooseCandidateUsingSpaceKey = "ChooseCandidateUsingSpaceKey"
|
||||
private let kCNS11643EnabledKey = "CNS11643Enabled"
|
||||
private let kChineseConversionEnabledKey = "ChineseConversionEnabled"
|
||||
private let kHalfWidthPunctuationEnabledKey = "HalfWidthPunctuationEnable"
|
||||
private let kEscToCleanInputBufferKey = "EscToCleanInputBuffer"
|
||||
private let kCheckUpdateAutomatically = "CheckUpdateAutomatically"
|
||||
private let kKeyboardLayoutPreference = "KeyboardLayout"
|
||||
private let kBasisKeyboardLayoutPreference = "BasisKeyboardLayout"
|
||||
private let kFunctionKeyKeyboardLayoutPreference = "FunctionKeyKeyboardLayout"
|
||||
private let kFunctionKeyKeyboardLayoutOverrideIncludeShift = "FunctionKeyKeyboardLayoutOverrideIncludeShift"
|
||||
private let kCandidateListTextSize = "CandidateListTextSize"
|
||||
private let kAppleLanguagesPreferences = "AppleLanguages"
|
||||
private let kShouldAutoReloadUserDataFiles = "ShouldAutoReloadUserDataFiles"
|
||||
private let kShouldAutoSortUserPhrasesAndExclListOnLoad = "ShouldAutoSortUserPhrasesAndExclListOnLoad"
|
||||
private let kShouldAutoSortPhraseReplacementMapOnLoad = "ShouldAutoSortPhraseReplacementMapOnLoad"
|
||||
private let kSelectPhraseAfterCursorAsCandidatePreference = "SelectPhraseAfterCursorAsCandidate"
|
||||
private let kUseHorizontalCandidateListPreference = "UseHorizontalCandidateList"
|
||||
private let kComposingBufferSizePreference = "ComposingBufferSize"
|
||||
private let kChooseCandidateUsingSpace = "ChooseCandidateUsingSpaceKey"
|
||||
private let kCNS11643Enabled = "CNS11643Enabled"
|
||||
private let kChineseConversionEnabled = "ChineseConversionEnabled"
|
||||
private let kHalfWidthPunctuationEnabled = "HalfWidthPunctuationEnable"
|
||||
private let kEscToCleanInputBuffer = "EscToCleanInputBuffer"
|
||||
private let kUseWinNT351BPMF = "UseWinNT351BPMF"
|
||||
private let kMaxCandidateLength = "MaxCandidateLength"
|
||||
private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep"
|
||||
|
@ -29,8 +33,8 @@ private let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep"
|
|||
private let kCandidateTextFontName = "CandidateTextFontName"
|
||||
private let kCandidateKeyLabelFontName = "CandidateKeyLabelFontName"
|
||||
private let kCandidateKeys = "CandidateKeys"
|
||||
private let kChineseConversionEngineKey = "ChineseConversionEngine"
|
||||
private let kPhraseReplacementEnabledKey = "PhraseReplacementEnabled"
|
||||
private let kChineseConversionEngine = "ChineseConversionEngine"
|
||||
private let kPhraseReplacementEnabled = "PhraseReplacementEnabled"
|
||||
|
||||
private let kDefaultCandidateListTextSize: CGFloat = 18
|
||||
private let kMinKeyLabelSize: CGFloat = 10
|
||||
|
@ -168,62 +172,145 @@ struct ComposingBufferSize {
|
|||
@objc public class Preferences: NSObject {
|
||||
static func reset() {
|
||||
let defaults = UserDefaults.standard
|
||||
defaults.removeObject(forKey: kKeyboardLayoutPreferenceKey)
|
||||
defaults.removeObject(forKey: kBasisKeyboardLayoutPreferenceKey)
|
||||
defaults.removeObject(forKey: kFunctionKeyKeyboardLayoutPreferenceKey)
|
||||
defaults.removeObject(forKey: kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey)
|
||||
defaults.removeObject(forKey: kCandidateListTextSizeKey)
|
||||
defaults.removeObject(forKey: kAppleLanguagesPreferencesKey)
|
||||
defaults.removeObject(forKey: kSelectPhraseAfterCursorAsCandidatePreferenceKey)
|
||||
defaults.removeObject(forKey: kUseHorizontalCandidateListPreferenceKey)
|
||||
defaults.removeObject(forKey: kComposingBufferSizePreferenceKey)
|
||||
defaults.removeObject(forKey: kChooseCandidateUsingSpaceKey)
|
||||
defaults.removeObject(forKey: kCNS11643EnabledKey)
|
||||
defaults.removeObject(forKey: kChineseConversionEnabledKey)
|
||||
defaults.removeObject(forKey: kHalfWidthPunctuationEnabledKey)
|
||||
defaults.removeObject(forKey: kEscToCleanInputBufferKey)
|
||||
defaults.removeObject(forKey: kKeyboardLayoutPreference)
|
||||
defaults.removeObject(forKey: kBasisKeyboardLayoutPreference)
|
||||
defaults.removeObject(forKey: kFunctionKeyKeyboardLayoutPreference)
|
||||
defaults.removeObject(forKey: kFunctionKeyKeyboardLayoutOverrideIncludeShift)
|
||||
defaults.removeObject(forKey: kCandidateListTextSize)
|
||||
defaults.removeObject(forKey: kAppleLanguagesPreferences)
|
||||
defaults.removeObject(forKey: kShouldAutoReloadUserDataFiles)
|
||||
defaults.removeObject(forKey: kShouldAutoSortUserPhrasesAndExclListOnLoad)
|
||||
defaults.removeObject(forKey: kShouldAutoSortPhraseReplacementMapOnLoad)
|
||||
defaults.removeObject(forKey: kSelectPhraseAfterCursorAsCandidatePreference)
|
||||
defaults.removeObject(forKey: kUseHorizontalCandidateListPreference)
|
||||
defaults.removeObject(forKey: kComposingBufferSizePreference)
|
||||
defaults.removeObject(forKey: kChooseCandidateUsingSpace)
|
||||
defaults.removeObject(forKey: kCNS11643Enabled)
|
||||
defaults.removeObject(forKey: kChineseConversionEnabled)
|
||||
defaults.removeObject(forKey: kHalfWidthPunctuationEnabled)
|
||||
defaults.removeObject(forKey: kEscToCleanInputBuffer)
|
||||
defaults.removeObject(forKey: kCandidateTextFontName)
|
||||
defaults.removeObject(forKey: kCandidateKeyLabelFontName)
|
||||
defaults.removeObject(forKey: kCandidateKeys)
|
||||
defaults.removeObject(forKey: kPhraseReplacementEnabledKey)
|
||||
defaults.removeObject(forKey: kChineseConversionEngineKey)
|
||||
defaults.removeObject(forKey: kPhraseReplacementEnabled)
|
||||
defaults.removeObject(forKey: kChineseConversionEngine)
|
||||
defaults.removeObject(forKey: kUseWinNT351BPMF)
|
||||
defaults.removeObject(forKey: kMaxCandidateLength)
|
||||
defaults.removeObject(forKey: kShouldNotFartInLieuOfBeep)
|
||||
}
|
||||
|
||||
@UserDefault(key: kAppleLanguagesPreferencesKey, defaultValue: [])
|
||||
@objc public static func setMissingDefaults () {
|
||||
// 既然 Preferences Module 的預設屬性不自動寫入 plist、而且還是 private,那這邊就先寫入了。
|
||||
|
||||
// 首次啟用輸入法時設定不要自動更新,免得在某些要隔絕外部網路連線的保密機構內觸犯資安規則。
|
||||
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)
|
||||
}
|
||||
|
||||
// 預設摁空格鍵來選字,所以設成 true
|
||||
if UserDefaults.standard.object(forKey: kChooseCandidateUsingSpace) == nil {
|
||||
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: kShouldAutoSortPhraseReplacementMapOnLoad) == nil {
|
||||
UserDefaults.standard.set(Preferences.shouldAutoSortPhraseReplacementMapOnLoad, forKey: kShouldAutoSortPhraseReplacementMapOnLoad)
|
||||
}
|
||||
|
||||
// 預設禁用 WinNT351 風格的注音選字模式(就是每個字都要選的那種),所以設成 false
|
||||
if UserDefaults.standard.object(forKey: kUseWinNT351BPMF) == nil {
|
||||
UserDefaults.standard.set(Preferences.useWinNT351BPMF, forKey: kUseWinNT351BPMF)
|
||||
}
|
||||
|
||||
// 預設漢音風格選字,所以要設成 0
|
||||
if UserDefaults.standard.object(forKey: kSelectPhraseAfterCursorAsCandidatePreference) == nil {
|
||||
UserDefaults.standard.set(Preferences.selectPhraseAfterCursorAsCandidate, forKey: kSelectPhraseAfterCursorAsCandidatePreference)
|
||||
}
|
||||
|
||||
// 預設橫向選字窗,不爽請自行改成縱向選字窗
|
||||
if UserDefaults.standard.object(forKey: kUseHorizontalCandidateListPreference) == nil {
|
||||
UserDefaults.standard.set(Preferences.useHorizontalCandidateList, forKey: kUseHorizontalCandidateListPreference)
|
||||
}
|
||||
|
||||
// 預設停用全字庫支援
|
||||
if UserDefaults.standard.object(forKey: kCNS11643Enabled) == nil {
|
||||
UserDefaults.standard.set(Preferences.cns11643Enabled, forKey: kCNS11643Enabled)
|
||||
}
|
||||
|
||||
// 預設停用繁體轉康熙模組
|
||||
if UserDefaults.standard.object(forKey: kChineseConversionEnabled) == nil {
|
||||
UserDefaults.standard.set(Preferences.chineseConversionEnabled, forKey: kChineseConversionEnabled)
|
||||
}
|
||||
|
||||
// 預設停用自訂語彙置換
|
||||
if UserDefaults.standard.object(forKey: kPhraseReplacementEnabled) == nil {
|
||||
UserDefaults.standard.set(Preferences.phraseReplacementEnabled, forKey: kPhraseReplacementEnabled)
|
||||
}
|
||||
|
||||
// 預設沒事不要在那裡放屁
|
||||
if UserDefaults.standard.object(forKey: kShouldNotFartInLieuOfBeep) == nil {
|
||||
UserDefaults.standard.set(Preferences.shouldNotFartInLieuOfBeep, forKey: kShouldNotFartInLieuOfBeep)
|
||||
}
|
||||
|
||||
UserDefaults.standard.synchronize()
|
||||
}
|
||||
|
||||
@UserDefault(key: kAppleLanguagesPreferences, defaultValue: [])
|
||||
@objc static var appleLanguages: Array<String>
|
||||
|
||||
@UserDefault(key: kKeyboardLayoutPreferenceKey, defaultValue: 0)
|
||||
@UserDefault(key: kKeyboardLayoutPreference, defaultValue: 0)
|
||||
@objc static var keyboardLayout: Int
|
||||
|
||||
@objc static var keyboardLayoutName: String {
|
||||
(KeyboardLayout(rawValue: self.keyboardLayout) ?? KeyboardLayout.standard).name
|
||||
}
|
||||
|
||||
@UserDefault(key: kBasisKeyboardLayoutPreferenceKey, defaultValue: "com.apple.keylayout.US")
|
||||
@UserDefault(key: kBasisKeyboardLayoutPreference, defaultValue: "com.apple.keylayout.US")
|
||||
@objc static var basisKeyboardLayout: String
|
||||
|
||||
@UserDefault(key: kFunctionKeyKeyboardLayoutPreferenceKey, defaultValue: "com.apple.keylayout.US")
|
||||
@UserDefault(key: kFunctionKeyKeyboardLayoutPreference, defaultValue: "com.apple.keylayout.US")
|
||||
@objc static var functionKeyboardLayout: String
|
||||
|
||||
@UserDefault(key: kFunctionKeyKeyboardLayoutOverrideIncludeShiftKey, defaultValue: false)
|
||||
@UserDefault(key: kFunctionKeyKeyboardLayoutOverrideIncludeShift, defaultValue: false)
|
||||
@objc static var functionKeyKeyboardLayoutOverrideIncludeShiftKey: Bool
|
||||
|
||||
@CandidateListTextSize(key: kCandidateListTextSizeKey)
|
||||
@CandidateListTextSize(key: kCandidateListTextSize)
|
||||
@objc static var candidateListTextSize: CGFloat
|
||||
|
||||
@UserDefault(key: kShouldAutoReloadUserDataFiles, defaultValue: false)
|
||||
@objc static var shouldAutoReloadUserDataFiles: Bool
|
||||
|
||||
@UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreferenceKey, defaultValue: false)
|
||||
@UserDefault(key: kShouldAutoSortUserPhrasesAndExclListOnLoad, defaultValue: false)
|
||||
@objc static var ShouldAutoSortUserPhrasesAndExclListOnLoad: Bool
|
||||
|
||||
@UserDefault(key: kShouldAutoSortPhraseReplacementMapOnLoad, defaultValue: false)
|
||||
@objc static var shouldAutoSortPhraseReplacementMapOnLoad: Bool
|
||||
|
||||
@UserDefault(key: kSelectPhraseAfterCursorAsCandidatePreference, defaultValue: false)
|
||||
@objc static var selectPhraseAfterCursorAsCandidate: Bool
|
||||
|
||||
@UserDefault(key: kUseHorizontalCandidateListPreferenceKey, defaultValue: true)
|
||||
@UserDefault(key: kUseHorizontalCandidateListPreference, defaultValue: true)
|
||||
@objc static var useHorizontalCandidateList: Bool
|
||||
|
||||
@ComposingBufferSize(key: kComposingBufferSizePreferenceKey)
|
||||
@ComposingBufferSize(key: kComposingBufferSizePreference)
|
||||
@objc static var composingBufferSize: Int
|
||||
|
||||
@UserDefault(key: kChooseCandidateUsingSpaceKey, defaultValue: true)
|
||||
@UserDefault(key: kChooseCandidateUsingSpace, defaultValue: true)
|
||||
@objc static var chooseCandidateUsingSpace: Bool
|
||||
|
||||
@UserDefault(key: kUseWinNT351BPMF, defaultValue: false)
|
||||
|
@ -247,25 +334,25 @@ struct ComposingBufferSize {
|
|||
return shouldNotFartInLieuOfBeep
|
||||
}
|
||||
|
||||
@UserDefault(key: kCNS11643EnabledKey, defaultValue: false)
|
||||
@UserDefault(key: kCNS11643Enabled, defaultValue: false)
|
||||
@objc static var cns11643Enabled: Bool
|
||||
|
||||
@objc static func toggleCNS11643Enabled() -> Bool {
|
||||
cns11643Enabled = !cns11643Enabled
|
||||
UserDefaults.standard.set(cns11643Enabled, forKey: kCNS11643EnabledKey)
|
||||
UserDefaults.standard.set(cns11643Enabled, forKey: kCNS11643Enabled)
|
||||
return cns11643Enabled
|
||||
}
|
||||
|
||||
@UserDefault(key: kChineseConversionEnabledKey, defaultValue: false)
|
||||
@UserDefault(key: kChineseConversionEnabled, defaultValue: false)
|
||||
@objc static var chineseConversionEnabled: Bool
|
||||
|
||||
@objc static func toggleChineseConversionEnabled() -> Bool {
|
||||
chineseConversionEnabled = !chineseConversionEnabled
|
||||
UserDefaults.standard.set(chineseConversionEnabled, forKey: kChineseConversionEnabledKey)
|
||||
UserDefaults.standard.set(chineseConversionEnabled, forKey: kChineseConversionEnabled)
|
||||
return chineseConversionEnabled
|
||||
}
|
||||
|
||||
@UserDefault(key: kHalfWidthPunctuationEnabledKey, defaultValue: false)
|
||||
@UserDefault(key: kHalfWidthPunctuationEnabled, defaultValue: false)
|
||||
@objc static var halfWidthPunctuationEnabled: Bool
|
||||
|
||||
@objc static func toggleHalfWidthPunctuationEnabled() -> Bool {
|
||||
|
@ -273,7 +360,7 @@ struct ComposingBufferSize {
|
|||
return halfWidthPunctuationEnabled
|
||||
}
|
||||
|
||||
@UserDefault(key: kEscToCleanInputBufferKey, defaultValue: true)
|
||||
@UserDefault(key: kEscToCleanInputBuffer, defaultValue: true)
|
||||
@objc static var escToCleanInputBuffer: Bool
|
||||
|
||||
// MARK: Optional settings
|
||||
|
@ -343,19 +430,19 @@ struct ComposingBufferSize {
|
|||
|
||||
}
|
||||
|
||||
@UserDefault(key: kChineseConversionEngineKey, defaultValue: 0)
|
||||
@UserDefault(key: kChineseConversionEngine, defaultValue: 0)
|
||||
@objc static var chineseConversionEngine: Int
|
||||
|
||||
@objc static var chineseConversionEngineName: String? {
|
||||
return ChineseConversionEngine(rawValue: chineseConversionEngine)?.name
|
||||
}
|
||||
|
||||
@UserDefault(key: kPhraseReplacementEnabledKey, defaultValue: false)
|
||||
@UserDefault(key: kPhraseReplacementEnabled, defaultValue: false)
|
||||
@objc static var phraseReplacementEnabled: Bool
|
||||
|
||||
@objc static func togglePhraseReplacementEnabled() -> Bool {
|
||||
phraseReplacementEnabled = !phraseReplacementEnabled
|
||||
UserDefaults.standard.set(phraseReplacementEnabled, forKey: kPhraseReplacementEnabledKey)
|
||||
UserDefaults.standard.set(phraseReplacementEnabled, forKey: kPhraseReplacementEnabled)
|
||||
return phraseReplacementEnabled
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
"Force KangXi Writing" = "Force KangXi Writing";
|
||||
"NotificationSwitchON" = "✔ ON";
|
||||
"NotificationSwitchOFF" = "✘ OFF";
|
||||
"Edit User Phrases" = "Edit User Phrases";
|
||||
"Edit User Phrases…" = "Edit User Phrases…";
|
||||
"Reload User Phrases" = "Reload User Phrases";
|
||||
"Unable to create the user phrase file." = "Unable to create the user phrase file.";
|
||||
"Please check the permission of at \"%@\"." = "Please check the permission of at \"%@\".";
|
||||
"Edit Excluded Phrases" = "Edit Excluded Phrases";
|
||||
"Edit Excluded Phrases" = "Edit Excluded Phrases…";
|
||||
"Use Half-Width Punctuations" = "Use Half-Width Punctuations";
|
||||
"\"%@\" length must ≥ 2 for a user phrase." = "\"%@\" length must ≥ 2 for a user phrase.";
|
||||
"\"%@\" length too long for a user phrase." = "\"%@\" length too long for a user phrase.";
|
||||
"\"%@\" selected. ENTER to add user phrase." = "\"%@\" selected. ENTER to add user phrase.";
|
||||
"Edit Phrase Replacement Table" = "Edit Phrase Replacement Table";
|
||||
"Edit Phrase Replacement Table" = "Edit Phrase Replacement Table…";
|
||||
"Use Phrase Replacement" = "Use Phrase Replacement";
|
||||
"Candidates keys cannot be empty." = "Candidates keys cannot be empty.";
|
||||
"Candidate keys can only contain ASCII characters like alphanumerals." = "Candidate keys can only contain ASCII characters like alphanumerals.";
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "ISh-Da-hKv"; */
|
||||
"ISh-Da-hKv.label" = "Dictionary";
|
||||
|
||||
/* 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";
|
||||
|
||||
|
@ -155,11 +158,14 @@
|
|||
/* Class = "NSButtonCell"; title = "Press ESC key clears entire input buffer"; ObjectID = "f2j-xD-4xK"; */
|
||||
"f2j-xD-4xK.title" = "Press ESC key clears entire input buffer";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */
|
||||
"f8i-69-zxm.title" = "Automatically reload user data files if changes detected";
|
||||
|
||||
/* 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 = "This dictionary page is under development."; ObjectID = "j48-5a-cEs"; */
|
||||
"j48-5a-cEs.title" = "This dictionary page is under development.";
|
||||
/* 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";
|
||||
|
@ -170,6 +176,9 @@
|
|||
/* 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";
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
"Force KangXi Writing" = "康熙文字変換モード";
|
||||
"NotificationSwitchON" = "✔ 機能起動";
|
||||
"NotificationSwitchOFF" = "✘ 機能停止";
|
||||
"Edit User Phrases" = "ユーザー辞書を編集";
|
||||
"Edit User Phrases…" = "ユーザー辞書を編集…";
|
||||
"Reload User Phrases" = "ユーザー辞書を再び読込む";
|
||||
"Unable to create the user phrase file." = "ユーザー辞書ファイルの作成は失敗しました。";
|
||||
"Please check the permission of at \"%@\"." = "「%@」に書き出す権限は不足らしい。";
|
||||
"Edit Excluded Phrases" = "辞書条目排除表を編集";
|
||||
"Edit Excluded Phrases" = "辞書条目排除表を編集…";
|
||||
"Use Half-Width Punctuations" = "半角句読機能を起用";
|
||||
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」もう1つ文字のお選びを。";
|
||||
"\"%@\" length too long for a user phrase." = "「%@」文字数過剰で登録不可。";
|
||||
"\"%@\" selected. ENTER to add user phrase." = "「%@」を ENTER で辞書に登録。";
|
||||
"Edit Phrase Replacement Table" = "言葉置換表を編集";
|
||||
"Edit Phrase Replacement Table" = "言葉置換表を編集…";
|
||||
"Use Phrase Replacement" = "言葉置換機能";
|
||||
"Candidates keys cannot be empty." = "言選り用キー陣列に何かキーをご登録ください。";
|
||||
"Candidate keys can only contain ASCII characters like alphanumerals." = "言選り用キー陣列にはASCII文字だけをご登録ください(英数など)。";
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "ISh-Da-hKv"; */
|
||||
"ISh-Da-hKv.label" = "辞書";
|
||||
|
||||
/* 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" = "全般";
|
||||
|
||||
|
@ -155,11 +158,14 @@
|
|||
/* Class = "NSButtonCell"; title = "Press ESC key clears entire input buffer"; ObjectID = "f2j-xD-4xK"; */
|
||||
"f2j-xD-4xK.title" = "ESC キーで入力緩衝列を消す";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */
|
||||
"f8i-69-zxm.title" = "変更されたユーザー辞書データを自動的に再読込";
|
||||
|
||||
/* 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 = "This dictionary page is under development."; ObjectID = "j48-5a-cEs"; */
|
||||
"j48-5a-cEs.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";
|
||||
|
@ -170,6 +176,9 @@
|
|||
/* 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" = "和語";
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
"Force KangXi Writing" = "康熙繁体字模式";
|
||||
"NotificationSwitchON" = "✔ 已启用";
|
||||
"NotificationSwitchOFF" = "✘ 已停用";
|
||||
"Edit User Phrases" = "编辑自订语汇";
|
||||
"Edit User Phrases…" = "编辑自订语汇…";
|
||||
"Reload User Phrases" = "重载自订语汇";
|
||||
"Unable to create the user phrase file." = "无法创建自订语汇档案。";
|
||||
"Please check the permission of at \"%@\"." = "请检查此处的存取权限:\"%@\".";
|
||||
"Edit Excluded Phrases" = "编辑要滤除的语汇";
|
||||
"Edit Excluded Phrases" = "编辑要滤除的语汇…";
|
||||
"Use Half-Width Punctuations" = "啟用半角標點輸出";
|
||||
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」字数不足以自订语汇。";
|
||||
"\"%@\" length too long for a user phrase." = "「%@」字数太长、无法自订。";
|
||||
"\"%@\" selected. ENTER to add user phrase." = "「%@」敲 Enter 添入自订语汇。";
|
||||
"Edit Phrase Replacement Table" = "编辑语汇置换表";
|
||||
"Edit Phrase Replacement Table" = "编辑语汇置换表…";
|
||||
"Use Phrase Replacement" = "使用语汇置换";
|
||||
"Candidates keys cannot be empty." = "您必须指定选字键。";
|
||||
"Candidate keys can only contain ASCII characters like alphanumerals." = "选字键只能是英数等 ASCII 字符。";
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "ISh-Da-hKv"; */
|
||||
"ISh-Da-hKv.label" = "辞典";
|
||||
|
||||
/* 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" = "一般";
|
||||
|
||||
|
@ -155,11 +158,14 @@
|
|||
/* Class = "NSButtonCell"; title = "Press ESC key clears entire input buffer"; ObjectID = "f2j-xD-4xK"; */
|
||||
"f2j-xD-4xK.title" = "敲 ESC 键以清空整个输入缓冲区";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */
|
||||
"f8i-69-zxm.title" = "自动重新载入变更过的使用者数据内容";
|
||||
|
||||
/* 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 = "This dictionary page is under development."; ObjectID = "j48-5a-cEs"; */
|
||||
"j48-5a-cEs.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";
|
||||
|
@ -170,6 +176,9 @@
|
|||
/* 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" = "和语";
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
"Force KangXi Writing" = "康熙繁體字模式";
|
||||
"NotificationSwitchON" = "✔ 已啟用";
|
||||
"NotificationSwitchOFF" = "✘ 已停用";
|
||||
"Edit User Phrases" = "編輯自訂語彙";
|
||||
"Edit User Phrases…" = "編輯自訂語彙…";
|
||||
"Reload User Phrases" = "重載自訂語彙";
|
||||
"Unable to create the user phrase file." = "無法創建自訂語彙檔案。";
|
||||
"Please check the permission of at \"%@\"." = "請檢查此處的存取權限:\"%@\".";
|
||||
"Edit Excluded Phrases" = "編輯要濾除的語彙";
|
||||
"Edit Excluded Phrases" = "編輯要濾除的語彙…";
|
||||
"Use Half-Width Punctuations" = "啟用半形標點輸出";
|
||||
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」字數不足以自訂語彙。";
|
||||
"\"%@\" length too long for a user phrase." = "「%@」字數太長、無法自訂。";
|
||||
"\"%@\" selected. ENTER to add user phrase." = "「%@」敲 Enter 添入自訂語彙。";
|
||||
"Edit Phrase Replacement Table" = "編輯語彙置換表";
|
||||
"Edit Phrase Replacement Table" = "編輯語彙置換表…";
|
||||
"Use Phrase Replacement" = "使用語彙置換";
|
||||
"Candidates keys cannot be empty." = "您必須指定選字鍵。";
|
||||
"Candidate keys can only contain ASCII characters like alphanumerals." = "選字鍵只能是英數等 ASCII 字符。";
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
/* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "ISh-Da-hKv"; */
|
||||
"ISh-Da-hKv.label" = "辭典";
|
||||
|
||||
/* 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" = "一般";
|
||||
|
||||
|
@ -155,11 +158,14 @@
|
|||
/* Class = "NSButtonCell"; title = "Press ESC key clears entire input buffer"; ObjectID = "f2j-xD-4xK"; */
|
||||
"f2j-xD-4xK.title" = "敲 ESC 鍵以清空整個輸入緩衝區";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Automatically reload user data files if changes detected"; ObjectID = "f8i-69-zxm"; */
|
||||
"f8i-69-zxm.title" = "自動重新載入變更過的使用者數據內容";
|
||||
|
||||
/* 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 = "This dictionary page is under development."; ObjectID = "j48-5a-cEs"; */
|
||||
"j48-5a-cEs.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";
|
||||
|
@ -170,6 +176,9 @@
|
|||
/* 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" = "和語";
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
5BD0D19427940E9D0008F48E /* Fart.aif in Resources */ = {isa = PBXBuildFile; fileRef = 5BD0D19327940E9D0008F48E /* Fart.aif */; };
|
||||
5BD0D19A27943D390008F48E /* clsSFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD0D19927943D390008F48E /* clsSFX.swift */; };
|
||||
5BD0D19F279454F60008F48E /* Beep.aif in Resources */ = {isa = PBXBuildFile; fileRef = 5BD0D19E279454F60008F48E /* Beep.aif */; };
|
||||
5BD0D1A4279463510008F48E /* clsOOBEDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD0D1A3279463510008F48E /* clsOOBEDefaults.swift */; };
|
||||
5BD13F482794F0A6000E429F /* PhraseReplacementMap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5B6797B42794822C004AC7CE /* PhraseReplacementMap.mm */; };
|
||||
5BDD25F2279D65CC00AA18F8 /* UNICHARS.zip in Resources */ = {isa = PBXBuildFile; fileRef = 5BDD25F1279D65CB00AA18F8 /* UNICHARS.zip */; };
|
||||
5BDD25F4279D678600AA18F8 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BDD25F3279D677F00AA18F8 /* libz.tbd */; };
|
||||
|
@ -146,7 +145,6 @@
|
|||
5BD0D19327940E9D0008F48E /* Fart.aif */ = {isa = PBXFileReference; lastKnownFileType = file; path = Fart.aif; sourceTree = "<group>"; };
|
||||
5BD0D19927943D390008F48E /* clsSFX.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = clsSFX.swift; sourceTree = "<group>"; };
|
||||
5BD0D19E279454F60008F48E /* Beep.aif */ = {isa = PBXFileReference; lastKnownFileType = file; path = Beep.aif; sourceTree = "<group>"; };
|
||||
5BD0D1A3279463510008F48E /* clsOOBEDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = clsOOBEDefaults.swift; sourceTree = "<group>"; };
|
||||
5BDD25E2279D64FB00AA18F8 /* AWFileHash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AWFileHash.h; sourceTree = "<group>"; };
|
||||
5BDD25E3279D64FB00AA18F8 /* AWFileHash.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AWFileHash.m; sourceTree = "<group>"; };
|
||||
5BDD25E6279D64FB00AA18F8 /* unzip.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = unzip.m; sourceTree = "<group>"; };
|
||||
|
@ -275,7 +273,6 @@
|
|||
children = (
|
||||
5BC2D2842793B434002C0BEC /* KeyValueBlobReader.h */,
|
||||
5BC2D2862793B434002C0BEC /* KeyValueBlobReader.cpp */,
|
||||
5BD0D1A3279463510008F48E /* clsOOBEDefaults.swift */,
|
||||
);
|
||||
path = vChewing;
|
||||
sourceTree = "<group>";
|
||||
|
@ -729,7 +726,6 @@
|
|||
5BC3EE1B278FC48C00F5E44C /* VerticalCandidateController.swift in Sources */,
|
||||
5B42B64027876FDC00BB9B9F /* UserOverrideModel.mm in Sources */,
|
||||
5BDD25F7279D6D1200AA18F8 /* unzip.m in Sources */,
|
||||
5BD0D1A4279463510008F48E /* clsOOBEDefaults.swift in Sources */,
|
||||
D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */,
|
||||
6A0D4F4515FC0EB100ABF4B3 /* Mandarin.mm in Sources */,
|
||||
5B6797B52794822C004AC7CE /* PhraseReplacementMap.h in Sources */,
|
||||
|
|
Loading…
Reference in New Issue