!8 1.3.9 // Maintenance.

Merge pull request !8 from ShikiSuen/upd/1.3.9
This commit is contained in:
ShikiSuen 2022-03-17 06:13:16 +00:00 committed by Gitee
commit d772f59288
30 changed files with 298 additions and 132 deletions

@ -1 +1 @@
Subproject commit e4143b8b79e3cf1acde79eba68c5c8e61349090e
Subproject commit 3fc29bcbc321f412e8a1656774fdae3009f01ac3

View File

@ -199,6 +199,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega
ctlPrefWindowInstance?.window?.center()
ctlPrefWindowInstance?.window?.orderFrontRegardless() //
ctlPrefWindowInstance?.window?.level = .statusBar
ctlPrefWindowInstance?.window?.titlebarAppearsTransparent = true
}
// New About Window

View File

@ -433,8 +433,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return YES;
}
// MARK: Space and Down, plus PageUp / PageDn / PageLeft / PageRight.
// keyCode 125 = Down, charCode 32 = Space
// MARK: Calling candidate window using Space or Down or PageUp / PageDn.
if (_bpmfReadingBuffer->isEmpty() &&
[state isKindOfClass:[InputStateNotEmpty class]] &&
([input isExtraChooseCandidateKey] || [input isExtraChooseCandidateKeyReverse]
@ -527,7 +526,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
// MARK: Enter
if ([input isEnter]) {
if ([input isControlHold]) {
if (![input isCommandHold]) {
if (ctlInputMethod.areWeUsingOurOwnPhraseEditor || [input isCommandHold]) {
return [self _handleCtrlEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback];
}
}
@ -586,7 +585,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
// Lukhnos 這裡的處理反而會使得 Apple 倚天注音動態鍵盤佈局「敲不了半形大寫英文」的缺點曝露無疑,所以注釋掉。
// 至於他試圖用這種處理來解決的上游 UPR293 的問題,其實針對詞庫檔案的排序做點手腳就可以解決。威注音本來也就是這麼做的。
if (/*[state isKindOfClass:[InputStateNotEmpty class]] && */(char) charCode >= 'A' && (char) charCode <= 'Z') {
if (/*[state isKindOfClass:[InputStateNotEmpty class]] && */[input isUpperCaseASCIILetterKey]) {
std::string letter = std::string("_letter_") + std::string(1, (char) charCode);
if ([self _handlePunctuation:letter state:state usingVerticalMode:input.useVerticalMode stateCallback:stateCallback errorCallback:errorCallback]) {
return YES;
@ -1254,7 +1253,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
BOOL shouldAutoSelectCandidate = _bpmfReadingBuffer->isValidKey((char) charCode) || _languageModel->hasUnigramsForKey(customPunctuation) ||
_languageModel->hasUnigramsForKey(punctuation);
if (!shouldAutoSelectCandidate && (char) charCode >= 'A' && (char) charCode <= 'Z') {
if (!shouldAutoSelectCandidate && [input isUpperCaseASCIILetterKey]) {
std::string letter = std::string("_letter_") + std::string(1, (char) charCode);
if (_languageModel->hasUnigramsForKey(letter)) {
shouldAutoSelectCandidate = YES;

View File

@ -233,6 +233,11 @@ class KeyHandlerInput: NSObject {
KeyCode(rawValue: keyCode) == verticalModeOnlyChooseCandidateKey
}
@objc var isUpperCaseASCIILetterKey: Bool {
// flags == .shift Shift
self.charCode >= 65 && self.charCode <= 90 && flags == .shift
}
@objc var isSymbolMenuPhysicalKey: Bool {
// KeyCode macOS Apple
// ![input isShift] 使 Shift

View File

@ -72,7 +72,8 @@ bool LMConsolidator::FixEOF(const char *path)
// CONTENT CONSOLIDATOR. CREDIT: Shiki Suen.
bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma) {
if (LMConsolidator::CheckPragma(path) && shouldCheckPragma){
bool pragmaCheckResult = LMConsolidator::CheckPragma(path);
if (pragmaCheckResult && shouldCheckPragma){
return true;
}
@ -107,7 +108,7 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma
std::reverse(vecEntry.begin(), vecEntry.end()); // 再顛倒回來。
// 統整完畢。開始將統整過的內容寫入檔案。
ofstream zfdContentConsolidatorOutput(path); // 這裡是要從頭開始重寫檔案內容,所以不需要「 ios_base::app 」。
if (!LMConsolidator::CheckPragma(path)){
if (!pragmaCheckResult){
zfdContentConsolidatorOutput<<FORMATTED_PRAGMA_HEADER<<endl; // 寫入經過整理處理的 HEADER。
}
for(int i=0;i<vecEntry.size();i++) { // 第二遍 for 用來寫入統整過的內容。

View File

@ -70,7 +70,6 @@ private let kMinComposingBufferSize = 4
private let kMaxComposingBufferSize = 30
private let kDefaultKeys = "123456789"
private let kDefaultAssociatedPhrasesKeys = "!@#$%^&*("
// MARK: Property wrappers

View File

@ -111,9 +111,10 @@ class ctlInputMethod: IMKInputController {
menu.addItem(withTitle: NSLocalizedString("Edit User Phrases…", comment: ""), action: #selector(openUserPhrases(_:)), keyEquivalent: "")
if optionKeyPressed {
menu.addItem(withTitle: NSLocalizedString("Edit Excluded Phrases", comment: ""), action: #selector(openExcludedPhrases(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("Edit Excluded Phrases", comment: ""), action: #selector(openExcludedPhrases(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("Edit Phrase Replacement Table…", comment: ""), action: #selector(openPhraseReplacement(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("Edit Associated Phrases…", comment: ""), action: #selector(openAssociatedPhrases(_:)), keyEquivalent: "")
menu.addItem(withTitle: NSLocalizedString("Edit User Symbol & Emoji Data…", comment: ""), action: #selector(openUserSymbols(_:)), keyEquivalent: "")
}
if (optionKeyPressed || !Preferences.shouldAutoReloadUserDataFiles) {
@ -307,6 +308,10 @@ class ctlInputMethod: IMKInputController {
open(userFileAt: mgrLangModel.excludedPhrasesDataPath(keyHandler.inputMode))
}
@objc func openUserSymbols(_ sender: Any?) {
open(userFileAt: mgrLangModel.userSymbolDataPath(keyHandler.inputMode))
}
@objc func openPhraseReplacement(_ sender: Any?) {
open(userFileAt: mgrLangModel.phraseReplacementDataPath(keyHandler.inputMode))
}

View File

@ -27,6 +27,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#include "PhraseReplacementMap.h"
#include "SymbolLM.h"
#include "UserPhrasesLM.h"
#include "UserSymbolLM.h"
#include <stdio.h>
#include <unordered_set>
@ -89,8 +90,11 @@ public:
/// @param userPhrasesPath The path of user phrases.
/// @param excludedPhrasesPath The path of excluded phrases.
void loadUserPhrases(const char* userPhrasesPath, const char* excludedPhrasesPath);
/// Asks to load the user symbol data at the given path.
/// @param userSymbolDataPath The path of user symbol data.
void loadUserSymbolData(const char* userPhrasesPath);
/// Asks to load the user associated phrases at the given path.
/// @param userAssociatedPhrasesPath The path of the phrase replacement table.
/// @param userAssociatedPhrasesPath The path of the user associated phrases.
void loadUserAssociatedPhrases(const char* userAssociatedPhrasesPath);
/// Asks to load the phrase replacement table at the given path.
/// @param phraseReplacementPath The path of the phrase replacement table.
@ -150,6 +154,7 @@ protected:
CNSLM m_cnsModel;
UserPhrasesLM m_userPhrases;
UserPhrasesLM m_excludedPhrases;
UserSymbolLM m_userSymbolModel;
PhraseReplacementMap m_phraseReplacement;
AssociatedPhrases m_associatedPhrases;
bool m_phraseReplacementEnabled;

View File

@ -32,6 +32,7 @@ LMInstantiator::~LMInstantiator()
m_languageModel.close();
m_miscModel.close();
m_userPhrases.close();
m_userSymbolModel.close();
m_cnsModel.close();
m_excludedPhrases.close();
m_phraseReplacement.close();
@ -103,6 +104,14 @@ void LMInstantiator::loadUserPhrases(const char* userPhrasesDataPath,
}
}
void LMInstantiator::loadUserSymbolData(const char *userSymbolDataPath)
{
if (userSymbolDataPath) {
m_userSymbolModel.close();
m_userSymbolModel.open(userSymbolDataPath);
}
}
void LMInstantiator::loadUserAssociatedPhrases(const char *userAssociatedPhrasesPath)
{
if (userAssociatedPhrasesPath) {
@ -140,6 +149,7 @@ const std::vector<Gramambular::Unigram> LMInstantiator::unigramsForKey(const std
std::vector<Gramambular::Unigram> miscUnigrams;
std::vector<Gramambular::Unigram> symbolUnigrams;
std::vector<Gramambular::Unigram> userUnigrams;
std::vector<Gramambular::Unigram> userSymbolUnigrams;
std::vector<Gramambular::Unigram> cnsUnigrams;
std::unordered_set<std::string> excludedValues;
@ -175,6 +185,11 @@ const std::vector<Gramambular::Unigram> LMInstantiator::unigramsForKey(const std
symbolUnigrams = filterAndTransformUnigrams(rawSymbolUnigrams, excludedValues, insertedValues);
}
if (m_userSymbolModel.hasUnigramsForKey(key) && m_symbolEnabled) {
std::vector<Gramambular::Unigram> rawUserSymbolUnigrams = m_userSymbolModel.unigramsForKey(key);
userSymbolUnigrams = filterAndTransformUnigrams(rawUserSymbolUnigrams, excludedValues, insertedValues);
}
if (m_cnsModel.hasUnigramsForKey(key) && m_cnsEnabled) {
std::vector<Gramambular::Unigram> rawCNSUnigrams = m_cnsModel.unigramsForKey(key);
cnsUnigrams = filterAndTransformUnigrams(rawCNSUnigrams, excludedValues, insertedValues);
@ -183,6 +198,7 @@ const std::vector<Gramambular::Unigram> LMInstantiator::unigramsForKey(const std
allUnigrams.insert(allUnigrams.begin(), userUnigrams.begin(), userUnigrams.end());
allUnigrams.insert(allUnigrams.end(), cnsUnigrams.begin(), cnsUnigrams.end());
allUnigrams.insert(allUnigrams.begin(), miscUnigrams.begin(), miscUnigrams.end());
allUnigrams.insert(allUnigrams.end(), userSymbolUnigrams.begin(), userSymbolUnigrams.end());
allUnigrams.insert(allUnigrams.end(), symbolUnigrams.begin(), symbolUnigrams.end());
return allUnigrams;
}

View File

@ -35,7 +35,7 @@ public:
return false;
}
virtual float overridedValue() override {
return -12.0;
return -13.0;
}
};

View File

@ -0,0 +1,44 @@
// Copyright (c) 2011 and onwards The OpenVanilla Project (MIT License).
// All possible vChewing-specific modifications are (c) 2021 and onwards The vChewing Project (MIT-NTL License).
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor,
except as required to fulfill notice requirements above.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef USERSYMBOLLM_H
#define USERSYMBOLLM_H
#include <string>
#include <map>
#include <iostream>
#include "LanguageModel.h"
#include "UserPhrasesLM.h"
namespace vChewing {
class UserSymbolLM: public UserPhrasesLM
{
public:
virtual bool allowConsolidation() override {
return true;
}
virtual float overridedValue() override {
return -12.0;
}
};
}
#endif

View File

@ -40,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (NSString *)specifyBundleDataPath:(NSString *)filename;
+ (NSString *)userPhrasesDataPath:(InputMode)mode;
+ (NSString *)userSymbolDataPath:(InputMode)mode;
+ (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode;
+ (NSString *)excludedPhrasesDataPath:(InputMode)mode;
+ (NSString *)phraseReplacementDataPath:(InputMode)mode;

View File

@ -34,6 +34,7 @@ static NSString *const kUserDataTemplateName = @"template-data";
static NSString *const kUserAssDataTemplateName = @"template-data";
static NSString *const kExcludedPhrasesvChewingTemplateName = @"template-exclude-phrases";
static NSString *const kPhraseReplacementTemplateName = @"template-phrases-replacement";
static NSString *const kUserSymbolDataTemplateName = @"template-user-symbol-data";
static NSString *const kTemplateExtension = @".txt";
@implementation mgrLangModel
@ -117,6 +118,8 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
{
gLangModelCHT.loadUserPhrases([[self userPhrasesDataPath:imeModeCHT] UTF8String], [[self excludedPhrasesDataPath:imeModeCHT] UTF8String]);
gLangModelCHS.loadUserPhrases([[self userPhrasesDataPath:imeModeCHS] UTF8String], [[self excludedPhrasesDataPath:imeModeCHS] UTF8String]);
gLangModelCHT.loadUserSymbolData([[self userSymbolDataPath:imeModeCHT] UTF8String]);
gLangModelCHS.loadUserSymbolData([[self userSymbolDataPath:imeModeCHS] UTF8String]);
}
+ (void)loadUserAssociatedPhrases
@ -205,33 +208,17 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
+ (BOOL)checkIfUserLanguageModelFilesExist
{
if (![self checkIfUserDataFolderExists]) {
return NO;
}
if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHS] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHT] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHS] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHT] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) {
return NO;
}
if (![self checkIfUserDataFolderExists]) return NO;
if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self userPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserDataTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHS] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self userAssociatedPhrasesDataPath:imeModeCHT] populateWithTemplate:kUserAssDataTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHS] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self excludedPhrasesDataPath:imeModeCHT] populateWithTemplate:kExcludedPhrasesvChewingTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHS] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self phraseReplacementDataPath:imeModeCHT] populateWithTemplate:kPhraseReplacementTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self userSymbolDataPath:imeModeCHT] populateWithTemplate:kUserSymbolDataTemplateName extension:kTemplateExtension]) return NO;
if (![self ensureFileExists:[self userSymbolDataPath:imeModeCHS] populateWithTemplate:kUserSymbolDataTemplateName extension:kTemplateExtension]) return NO;
return YES;
}
@ -321,6 +308,12 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
return [[self dataFolderPath] stringByAppendingPathComponent:fileName];
}
+ (NSString *)userSymbolDataPath:(InputMode)mode;
{
NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"usersymbolphrases-cht.txt" : @"usersymbolphrases-chs.txt";
return [[self dataFolderPath] stringByAppendingPathComponent:fileName];
}
+ (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode;
{
NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"associatedPhrases-cht.txt" : @"associatedPhrases-chs.txt";

View File

@ -19,7 +19,7 @@
"Reload User Phrases" = "Reload User Phrases";
"Unable to create the user phrase file." = "Unable to create the user phrase file.";
"Please check the permission at \"%@\"." = "Please check the permission at \"%@\".";
"Edit Excluded Phrases" = "Edit Excluded Phrases…";
"Edit Excluded Phrases" = "Edit Excluded Phrases…";
"Half-Width Punctuation Mode" = "Half-Width Punctuation Mode";
"\"%@\" 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.";

View File

@ -19,7 +19,7 @@
"Reload User Phrases" = "Reload User Phrases";
"Unable to create the user phrase file." = "Unable to create the user phrase file.";
"Please check the permission at \"%@\"." = "Please check the permission at \"%@\".";
"Edit Excluded Phrases" = "Edit Excluded Phrases…";
"Edit Excluded Phrases" = "Edit Excluded Phrases…";
"Half-Width Punctuation Mode" = "Half-Width Punctuation Mode";
"\"%@\" 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.";
@ -51,6 +51,7 @@
"Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)";
"Apple Zhuyin Eten" = "Apple Zhuyin Eten";
"Symbol & Emoji Input" = "Symbol & Emoji Input";
"Edit User Symbol & Emoji Data…" = "Edit User Symbol & Emoji Data…";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "CommonSymbols";

View File

@ -19,7 +19,7 @@
"Reload User Phrases" = "ユーザー辞書を再び読込む";
"Unable to create the user phrase file." = "ユーザー辞書ファイルの作成は失敗しました。";
"Please check the permission at \"%@\"." = "「%@」に書き出す権限は不足らしい。";
"Edit Excluded Phrases" = "辞書条目排除表を編集…";
"Edit Excluded Phrases" = "辞書条目排除表を編集…";
"Half-Width Punctuation Mode" = "半角句読モード";
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」もう1つ文字のお選びを。";
"\"%@\" length should ≤ %d for a user phrase." = "「%@」文字数過剰で登録不可、%d 文字以内にして下さい。";
@ -51,6 +51,7 @@
"Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(大千標準)";
"Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)";
"Symbol & Emoji Input" = "符号&絵文字入力";
"Edit User Symbol & Emoji Data…" = "ユーザー符号&絵文字辞書を編集…";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -19,7 +19,7 @@
"Reload User Phrases" = "重载自订语汇";
"Unable to create the user phrase file." = "无法创建自订语汇档案。";
"Please check the permission at \"%@\"." = "请检查此处的存取权限:\"%@\".";
"Edit Excluded Phrases" = "编辑要滤除的语汇…";
"Edit Excluded Phrases" = "编辑要滤除的语汇…";
"Half-Width Punctuation Mode" = "半角标点模式";
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」字数不足以自订语汇。";
"\"%@\" length should ≤ %d for a user phrase." = "「%@」字数超过 %d、无法自订。";
@ -51,6 +51,7 @@
"Apple Zhuyin Bopomofo" = "Apple 标准注音键盘布局";
"Apple Zhuyin Eten" = "Apple 倚天注音键盘布局";
"Symbol & Emoji Input" = "符号&绘文字输入";
"Edit User Symbol & Emoji Data…" = "编辑自订符号&绘文字资料…";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -19,7 +19,7 @@
"Reload User Phrases" = "重載自訂語彙";
"Unable to create the user phrase file." = "無法創建自訂語彙檔案。";
"Please check the permission at \"%@\"." = "請檢查此處的存取權限:\"%@\".";
"Edit Excluded Phrases" = "編輯要濾除的語彙…";
"Edit Excluded Phrases" = "編輯要濾除的語彙…";
"Half-Width Punctuation Mode" = "半形標點模式";
"\"%@\" length must ≥ 2 for a user phrase." = "「%@」字數不足以自訂語彙。";
"\"%@\" length should ≤ %d for a user phrase." = "「%@」字數超過 %d、無法自訂。";
@ -51,6 +51,7 @@
"Apple Zhuyin Bopomofo" = "Apple 標準注音鍵盤佈局";
"Apple Zhuyin Eten" = "Apple 倚天注音鍵盤佈局";
"Symbol & Emoji Input" = "符號&繪文字輸入";
"Edit User Symbol & Emoji Data…" = "編輯自訂符號&繪文字資料…";
// The followings are the category names used in the Symbol menu.
"catCommonSymbols" = "常用";

View File

@ -101,9 +101,14 @@ public class NotifierController: NSWindowController, NotifierWindowDelegate {
windowRect.origin.y = screenRect.maxY - windowRect.height - 10
let styleMask: NSWindow.StyleMask = [.fullSizeContentView, .titled]
let transparentVisualEffect = NSVisualEffectView()
transparentVisualEffect.blendingMode = .behindWindow
transparentVisualEffect.state = .active
transparentVisualEffect.material = .dark
let panel = NotifierWindow(contentRect: windowRect, styleMask: styleMask, backing: .buffered, defer: false)
panel.contentView = transparentVisualEffect
panel.isMovableByWindowBackground = true
panel.level = NSWindow.Level(Int(kCGPopUpMenuWindowLevel))
panel.hasShadow = true
panel.backgroundColor = backgroundColor

View File

@ -43,4 +43,9 @@ import Cocoa
appVersionLabel.stringValue = String(format: "%@ Build %@", versionString, installingVersion)
}
@IBAction func btnWiki(_ sender: NSButton) {
if let url = URL(string: "https://gitee.com/vchewing/vChewing-macOS/wikis") {
NSWorkspace.shared.open(url)
}
}
}

View File

@ -41,7 +41,9 @@ extension RangeReplaceableCollection where Element: Hashable {
var currentLanguageSelectItem: NSMenuItem? = nil
override func awakeFromNib() {
override func windowDidLoad() {
super.windowDidLoad()
let languages = ["auto", "en", "zh-Hans", "zh-Hant", "ja"]
var autoMUISelectItem: NSMenuItem? = nil
var chosenLanguageItem: NSMenuItem? = nil
@ -156,9 +158,6 @@ extension RangeReplaceableCollection where Element: Hashable {
}
selectionKeyComboBox.stringValue = candidateSelectionKeys
// MARK: -
}
// CNS
@ -219,6 +218,7 @@ extension RangeReplaceableCollection where Element: Hashable {
do {
try Preferences.validate(candidateKeys: keys)
Preferences.candidateKeys = keys
selectionKeyComboBox.stringValue = Preferences.candidateKeys
}
catch Preferences.CandidateKeyError.empty {
selectionKeyComboBox.stringValue = Preferences.candidateKeys
@ -232,9 +232,6 @@ extension RangeReplaceableCollection where Element: Hashable {
clsSFX.beep()
}
}
selectionKeyComboBox.stringValue = keys
Preferences.candidateKeys = keys
}
}

View File

@ -23,6 +23,17 @@
<action selector="about:" target="-1" id="1xp-To-Ecq"/>
</connections>
</menuItem>
<menuItem title="Preferences…" hidden="YES" enabled="NO" keyEquivalent="," id="duv-M8-BHk"/>
<menuItem title="Minimize" keyEquivalent="m" id="vF5-tQ-GWX">
<connections>
<action selector="performMiniaturize:" target="-1" id="FBN-kr-nL9"/>
</connections>
</menuItem>
<menuItem title="Close" keyEquivalent="w" id="7tD-hM-1q5">
<connections>
<action selector="performClose:" target="-1" id="RlZ-ub-Ep8"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -156,12 +156,23 @@ DQ
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8WL-H4-o1O">
<rect key="frame" x="382" y="69" width="143" height="32"/>
<buttonCell key="cell" type="push" title="Wiki" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="xCD-lx-zY7">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="btnWiki:" target="-2" id="ond-bM-3LE"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="9Pk-k3-0cO" secondAttribute="trailing" constant="20" symbolic="YES" id="0LE-Ck-Jy5"/>
<constraint firstItem="2Gh-nq-Mng" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="1cy-gM-7lt"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="trailing" secondItem="2Gh-nq-Mng" secondAttribute="trailing" id="24O-Jp-K8a"/>
<constraint firstItem="6Dx-DY-UG1" firstAttribute="leading" secondItem="bAv-ZO-Ihw" secondAttribute="trailing" constant="13" id="43n-1d-TD2"/>
<constraint firstItem="8WL-H4-o1O" firstAttribute="top" secondItem="bSu-np-tPT" secondAttribute="bottom" constant="7" id="450-VN-7n2"/>
<constraint firstItem="8Ju-DR-2C8" firstAttribute="top" secondItem="Srh-ua-uQD" secondAttribute="bottom" constant="1" id="5eL-dp-7Z8"/>
<constraint firstItem="8M8-3C-BZO" firstAttribute="top" secondItem="8Ju-DR-2C8" secondAttribute="bottom" constant="8" symbolic="YES" id="82T-Pc-3db"/>
<constraint firstItem="2Gh-nq-Mng" firstAttribute="top" secondItem="bAv-ZO-Ihw" secondAttribute="bottom" constant="7" id="8EG-DW-AZM"/>
@ -182,12 +193,14 @@ DQ
<constraint firstItem="8Ju-DR-2C8" firstAttribute="leading" secondItem="8M8-3C-BZO" secondAttribute="leading" id="UrF-M2-wpG"/>
<constraint firstItem="eYM-F7-drf" firstAttribute="top" secondItem="8M8-3C-BZO" secondAttribute="bottom" constant="8" symbolic="YES" id="WIZ-YQ-chM"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="2Gh-nq-Mng" secondAttribute="bottom" constant="134" id="WJK-gw-zR7"/>
<constraint firstItem="8WL-H4-o1O" firstAttribute="trailing" secondItem="bSu-np-tPT" secondAttribute="trailing" id="aEs-t7-H6v"/>
<constraint firstItem="9Pk-k3-0cO" firstAttribute="leading" secondItem="6Dx-DY-UG1" secondAttribute="trailing" constant="3" id="c3v-ZJ-usi"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="top" secondItem="eYM-F7-drf" secondAttribute="bottom" constant="8" symbolic="YES" id="eqh-Gi-fS2"/>
<constraint firstItem="bAv-ZO-Ihw" firstAttribute="top" secondItem="6Dx-DY-UG1" secondAttribute="top" id="hJv-Sh-M4t"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="8Ju-DR-2C8" secondAttribute="trailing" constant="20" symbolic="YES" id="hm1-o7-gLp"/>
<constraint firstItem="2Gh-nq-Mng" firstAttribute="trailing" secondItem="bSu-np-tPT" secondAttribute="trailing" id="ixJ-xP-aIU"/>
<constraint firstItem="2Gh-nq-Mng" firstAttribute="top" secondItem="JkD-J1-Yeu" secondAttribute="bottom" constant="8" symbolic="YES" id="pvU-C2-BNa"/>
<constraint firstItem="8WL-H4-o1O" firstAttribute="leading" secondItem="bSu-np-tPT" secondAttribute="leading" id="qog-au-dXJ"/>
<constraint firstItem="8M8-3C-BZO" firstAttribute="leading" secondItem="eYM-F7-drf" secondAttribute="leading" id="rLt-ck-nSt"/>
<constraint firstAttribute="trailing" secondItem="8M8-3C-BZO" secondAttribute="trailing" constant="15" id="rx3-ed-9sg"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="leading" secondItem="eYM-F7-drf" secondAttribute="leading" id="t9D-Vu-dOC"/>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -20,15 +20,15 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="vChewing Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" animationBehavior="default" titlebarAppearsTransparent="YES" id="1" userLabel="frmPrefWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<rect key="contentRect" x="401" y="295" width="501" height="469"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="501" height="469"/>
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" fullSizeContentView="YES"/>
<rect key="contentRect" x="401" y="295" width="501" height="494"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<view key="contentView" id="2" customClass="NSVisualEffectView">
<rect key="frame" x="0.0" y="0.0" width="501" height="494"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tabView initialItem="QUQ-oY-4Hc" translatesAutoresizingMaskIntoConstraints="NO" id="ul0-iw-Dk6">
<rect key="frame" x="9" y="4" width="483" height="470"/>
<rect key="frame" x="9" y="2" width="483" height="470"/>
<font key="font" usesAppearanceFont="YES"/>
<tabViewItems>
<tabViewItem label="General" identifier="" id="QUQ-oY-4Hc">
@ -328,11 +328,11 @@
</tabViewItem>
<tabViewItem label="Advanced" identifier="" id="xrE-8T-WKO">
<view key="view" id="bZr-iP-F6T">
<rect key="frame" x="10" y="33" width="463" height="424"/>
<rect key="frame" x="10" y="33" width="463" height="418"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box title="Advanced Settings" translatesAutoresizingMaskIntoConstraints="NO" id="E1l-m8-xgb">
<rect key="frame" x="6" y="10" width="451" height="409"/>
<rect key="frame" x="6" y="4" width="451" height="409"/>
<view key="contentView" id="Zaa-dP-WdF">
<rect key="frame" x="3" y="3" width="445" height="391"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -575,11 +575,11 @@
</tabViewItem>
<tabViewItem label="Dictionary" identifier="" id="2iG-Ic-gbl" userLabel="Dictionary">
<view key="view" id="DCm-Zy-lr2">
<rect key="frame" x="10" y="33" width="463" height="424"/>
<rect key="frame" x="10" y="33" width="463" height="418"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box title="Dictionary and Language Models" translatesAutoresizingMaskIntoConstraints="NO" id="cf2-se-PDO" userLabel="Dictionary and Language Models">
<rect key="frame" x="6" y="10" width="451" height="409"/>
<rect key="frame" x="6" y="4" width="451" height="409"/>
<view key="contentView" id="cy4-aV-hhk">
<rect key="frame" x="3" y="3" width="445" height="391"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -635,11 +635,11 @@
</tabViewItem>
<tabViewItem label="Keyboard" identifier="" id="1AW-xf-c2f">
<view key="view" id="FxL-ZG-Eue">
<rect key="frame" x="10" y="33" width="463" height="424"/>
<rect key="frame" x="10" y="33" width="463" height="418"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box title="Keyboard Layout" translatesAutoresizingMaskIntoConstraints="NO" id="Wvt-HE-LOv">
<rect key="frame" x="6" y="10" width="451" height="409"/>
<rect key="frame" x="6" y="4" width="451" height="409"/>
<view key="contentView" id="mE9-SY-ijS">
<rect key="frame" x="3" y="3" width="445" height="391"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -662,13 +662,13 @@
</constraints>
<textFieldCell key="cell" selectable="YES" id="wQ9-px-b07">
<font key="font" metaFont="cellTitle"/>
<mutableString key="title">Regarding On-Screen Keyboard Viewer Support:
<string key="title">Regarding On-Screen Keyboard Viewer Support:
Since v1.3.2, vChewing supports on-screen keyboard by supporting "Apple Zhuyin Bopomofo" and "Apple Zhuyin Eten" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard.
HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.
Note that If you have chosen those "vChewing****" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices.</mutableString>
Note that If you have chosen those "vChewing****" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices.</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -770,13 +770,13 @@
<constraints>
<constraint firstItem="ul0-iw-Dk6" firstAttribute="centerX" secondItem="2" secondAttribute="centerX" id="BOt-MN-cnS"/>
<constraint firstItem="ul0-iw-Dk6" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="16" id="Nbz-2Q-S3Q"/>
<constraint firstAttribute="bottom" secondItem="ul0-iw-Dk6" secondAttribute="bottom" constant="14" id="QYj-Si-eCv"/>
<constraint firstItem="ul0-iw-Dk6" firstAttribute="top" secondItem="2" secondAttribute="top" constant="1" id="VcH-iG-o6f"/>
<constraint firstAttribute="bottom" secondItem="ul0-iw-Dk6" secondAttribute="bottom" constant="12" id="QYj-Si-eCv"/>
<constraint firstItem="ul0-iw-Dk6" firstAttribute="top" secondItem="2" secondAttribute="top" constant="28" id="VcH-iG-o6f"/>
<constraint firstItem="ul0-iw-Dk6" firstAttribute="centerX" relation="greaterThanOrEqual" secondItem="2" secondAttribute="centerX" id="dAE-nS-es9"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ul0-iw-Dk6" secondAttribute="centerX" id="spC-lA-Mpv"/>
</constraints>
</view>
<point key="canvasLocation" x="161.5" y="66.5"/>
<point key="canvasLocation" x="161.5" y="79"/>
</window>
<userDefaultsController representsSharedInstance="YES" id="32"/>
</objects>

View File

@ -7,8 +7,8 @@
<key>UpdateInfoSite</key>
<string>https://gitee.com/vChewing/vChewing-macOS/releases</string>
<key>CFBundleVersion</key>
<string>1929</string>
<string>1930</string>
<key>CFBundleShortVersionString</key>
<string>1.3.8</string>
<string>1.3.9</string>
</dict>
</plist>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -155,8 +155,16 @@ DQ
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fbv-c6-gW8">
<rect key="frame" x="382" y="69" width="143" height="32"/>
<buttonCell key="cell" type="push" title="Wiki" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ImH-h2-3FG">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
</subviews>
<constraints>
<constraint firstItem="fbv-c6-gW8" firstAttribute="trailing" secondItem="bSu-np-tPT" secondAttribute="trailing" id="00j-Nu-LyX"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="9Pk-k3-0cO" secondAttribute="trailing" constant="20" symbolic="YES" id="0LE-Ck-Jy5"/>
<constraint firstItem="2Gh-nq-Mng" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="1cy-gM-7lt"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="trailing" secondItem="2Gh-nq-Mng" secondAttribute="trailing" id="24O-Jp-K8a"/>
@ -181,6 +189,7 @@ DQ
<constraint firstItem="8Ju-DR-2C8" firstAttribute="leading" secondItem="8M8-3C-BZO" secondAttribute="leading" id="UrF-M2-wpG"/>
<constraint firstItem="eYM-F7-drf" firstAttribute="top" secondItem="8M8-3C-BZO" secondAttribute="bottom" constant="8" symbolic="YES" id="WIZ-YQ-chM"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="2Gh-nq-Mng" secondAttribute="bottom" constant="134" id="WJK-gw-zR7"/>
<constraint firstItem="fbv-c6-gW8" firstAttribute="leading" secondItem="bSu-np-tPT" secondAttribute="leading" id="YoT-2L-YLU"/>
<constraint firstItem="9Pk-k3-0cO" firstAttribute="leading" secondItem="6Dx-DY-UG1" secondAttribute="trailing" constant="3" id="c3v-ZJ-usi"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="top" secondItem="eYM-F7-drf" secondAttribute="bottom" constant="8" symbolic="YES" id="eqh-Gi-fS2"/>
<constraint firstItem="bAv-ZO-Ihw" firstAttribute="top" secondItem="6Dx-DY-UG1" secondAttribute="top" id="hJv-Sh-M4t"/>
@ -191,6 +200,7 @@ DQ
<constraint firstAttribute="trailing" secondItem="8M8-3C-BZO" secondAttribute="trailing" constant="15" id="rx3-ed-9sg"/>
<constraint firstItem="JkD-J1-Yeu" firstAttribute="leading" secondItem="eYM-F7-drf" secondAttribute="leading" id="t9D-Vu-dOC"/>
<constraint firstItem="bAv-ZO-Ihw" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="u49-Fr-HYh"/>
<constraint firstItem="fbv-c6-gW8" firstAttribute="top" secondItem="bSu-np-tPT" secondAttribute="bottom" constant="7" id="zYE-t7-7vl"/>
</constraints>
</view>
<connections>

View File

@ -43,4 +43,9 @@ import Cocoa
appVersionLabel.stringValue = String(format: "%@ Build %@", versionString, installingVersion)
}
@IBAction func btnWiki(_ sender: NSButton) {
if let url = URL(string: "https://gitee.com/vchewing/vChewing-macOS/wikis") {
NSWorkspace.shared.open(url)
}
}
}

36
uninstall.sh Normal file
View File

@ -0,0 +1,36 @@
#!/bin/sh
# Here's how to uninstall this input method:
# Suppose that this IME is properly installed, you remove the following possible assets:
rm -rf ~/Library/Input\ Methods/vChewing.app
rm -rf ~/Library/Keyboard\ Layouts/vChewingKeyLayout.bundle
rm ~/Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout
rm ~/Library/Keyboard\ Layouts/vChewing\ IBM.keylayout
rm ~/Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout
rm ~/Library/Keyboard\ Layouts/vChewing\ ETen.keylayout
rm ~/Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout
# Also user phrase folder:
rm -rf ~/Library/Application\ Support/vChewing/
# Also the IME configuration file:
rm -rf ~/Library/Preferences/org.atelierInmu.inputmethod.vChewing.plist
# If you have ever tried the initial alpha builds of vChewing, you also remove:
rm -rf ~/Library/Preferences/org.openvanilla.inputmethod.vChewing.plist
# If it is not properly installed, you also check the following possible paths to remove:
sudo rm -rf /Library/Input\ Methods/vChewing.app
sudo rm -rf /Library/Keyboard\ Layouts/vChewingKeyLayout.bundle
sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout
sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ IBM.keylayout
sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout
sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ ETen.keylayout
sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout
# P.S.: The "vChewingKeyLayout.bundle" and keylayout files are deployed by the pkg installer. They are not hard-requirements for running vChewing, but providing extended on-screen keyboard for MiTAC, IBM, FakeSeigyou phonetic layouts.
# EOF.

View File

@ -724,7 +724,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
<string>1.3.8</string>
<string>1.3.9</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@ -944,11 +944,11 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Simplified Chinese</string>
<string>Traditional Chinese</string>
<key>VALUE</key>
<dict>
<key>PATH</key>
<string>LICENSE-CHS.txt</string>
<string>LICENSE-CHT.txt</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
@ -966,11 +966,11 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Traditional Chinese</string>
<string>Simplified Chinese</string>
<key>VALUE</key>
<dict>
<key>PATH</key>
<string>LICENSE-CHT.txt</string>
<string>LICENSE-CHS.txt</string>
<key>PATH_TYPE</key>
<integer>1</integer>
</dict>
@ -1001,9 +1001,9 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Traditional Chinese</string>
<string>Simplified Chinese</string>
<key>VALUE</key>
<string>威注音入法</string>
<string>威注音入法</string>
</dict>
<dict>
<key>LANGUAGE</key>
@ -1013,9 +1013,9 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Simplified Chinese</string>
<string>Traditional Chinese</string>
<key>VALUE</key>
<string>威注音入法</string>
<string>威注音入法</string>
</dict>
</array>
</dict>
@ -1052,11 +1052,11 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Traditional Chinese</string>
<string>Simplified Chinese</string>
<key>SECONDARY_VALUE</key>
<string>至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。</string>
<string>至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。</string>
<key>VALUE</key>
<string>作業系統版本太舊</string>
<string>作业系统版本太旧</string>
</dict>
<dict>
<key>LANGUAGE</key>
@ -1068,11 +1068,11 @@
</dict>
<dict>
<key>LANGUAGE</key>
<string>Simplified Chinese</string>
<string>Traditional Chinese</string>
<key>SECONDARY_VALUE</key>
<string>至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。</string>
<string>至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。</string>
<key>VALUE</key>
<string>作业系统版本太旧</string>
<string>作業系統版本太舊</string>
</dict>
</array>
<key>NAME</key>

View File

@ -45,6 +45,7 @@
5BBBB77527AED70B0023B93A /* MenuIcon-SCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB77127AED70B0023B93A /* MenuIcon-SCVIM.png */; };
5BBBB77627AED70B0023B93A /* MenuIcon-TCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB77227AED70B0023B93A /* MenuIcon-TCVIM.png */; };
5BBBB77A27AEDC690023B93A /* clsSFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBBB77927AEDC690023B93A /* clsSFX.swift */; };
5BC2652227E04B7E00700291 /* uninstall.sh in Resources */ = {isa = PBXBuildFile; fileRef = 5BC2652127E04B7B00700291 /* uninstall.sh */; };
5BD05B8127B22F3C004C4F1D /* char-kanji-cns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5BD05B8027B22F3C004C4F1D /* char-kanji-cns.txt */; };
5BD05BCA27B2A43D004C4F1D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6A2E40F5253A69DA00D1AE1D /* Images.xcassets */; };
5BD05C5D27B2BBA9004C4F1D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BD05C5B27B2BBA9004C4F1D /* Main.storyboard */; };
@ -197,6 +198,7 @@
5B62A34527AE7CD900A19448 /* NotifierController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotifierController.swift; sourceTree = "<group>"; };
5B707CE527D9F3A10099EF99 /* SwiftyOpenCC */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SwiftyOpenCC; path = Packages/SwiftyOpenCC; sourceTree = "<group>"; };
5B707CE727D9F4590099EF99 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = "<group>"; };
5B7111C727DEF9FF00444310 /* UserSymbolLM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserSymbolLM.h; sourceTree = "<group>"; };
5B73FB5427B2BD6900E9BF49 /* PhraseEditor-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "PhraseEditor-Info.plist"; path = "UserPhraseEditor/PhraseEditor-Info.plist"; sourceTree = SOURCE_ROOT; };
5B73FB5F27B2BE1300E9BF49 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
5B7BC4AF27AFFBE800F66C24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Source/WindowNIBs/Base.lproj/frmPrefWindow.xib; sourceTree = "<group>"; };
@ -213,6 +215,7 @@
5BBBB77727AEDB290023B93A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainMenu.strings; sourceTree = "<group>"; };
5BBBB77927AEDC690023B93A /* clsSFX.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = clsSFX.swift; sourceTree = "<group>"; };
5BBD627827B6C4D900271480 /* Update-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Update-Info.plist"; sourceTree = "<group>"; };
5BC2652127E04B7B00700291 /* uninstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = uninstall.sh; sourceTree = "<group>"; };
5BD05B8027B22F3C004C4F1D /* char-kanji-cns.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "char-kanji-cns.txt"; path = "Data/components/common/char-kanji-cns.txt"; sourceTree = "<group>"; };
5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vChewingPhraseEditor.app; sourceTree = BUILT_PRODUCTS_DIR; };
5BD05BC627B2A42A004C4F1D /* vChewingPhraseEditor.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = vChewingPhraseEditor.entitlements; sourceTree = "<group>"; };
@ -336,6 +339,7 @@
5B18BA7527C7BF6D0056EB19 /* MiscRootFiles */ = {
isa = PBXGroup;
children = (
5BC2652127E04B7B00700291 /* uninstall.sh */,
5B18BA6F27C7BD8B0056EB19 /* LICENSE-CHS.txt */,
5B18BA7427C7BD8C0056EB19 /* LICENSE-CHT.txt */,
5B18BA7327C7BD8C0056EB19 /* LICENSE-JPN.txt */,
@ -349,6 +353,7 @@
isa = PBXGroup;
children = (
5B8F43ED27C9BC220069AC27 /* SymbolLM.h */,
5B7111C727DEF9FF00444310 /* UserSymbolLM.h */,
5B62A32B27AE78B000A19448 /* CNSLM.h */,
);
path = InstantiatedModels;
@ -942,6 +947,7 @@
5BBBB77627AED70B0023B93A /* MenuIcon-TCVIM.png in Resources */,
6A187E2616004C5900466B2E /* MainMenu.xib in Resources */,
5BBBB75F27AED54C0023B93A /* Beep.m4a in Resources */,
5BC2652227E04B7E00700291 /* uninstall.sh in Resources */,
5BAD0CD527D701F6003D127F /* vChewingKeyLayout.bundle in Resources */,
5B2DB16F27AF6891006D874E /* data-chs.txt in Resources */,
);
@ -1235,11 +1241,11 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_OPTIMIZATION_LEVEL = z;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@ -1258,7 +1264,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
@ -1266,7 +1272,7 @@
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
};
name = Debug;
@ -1291,10 +1297,11 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_OPTIMIZATION_LEVEL = z;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
@ -1309,14 +1316,14 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
};
name = Release;
@ -1424,13 +1431,13 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_OPTIMIZATION_LEVEL = z;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/Headers/vChewing-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
@ -1459,14 +1466,14 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "Source/Headers/vChewing-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = app;
};
@ -1492,12 +1499,13 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = z;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/Headers/vChewing-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -1521,12 +1529,13 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "Source/Headers/vChewing-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = app;
};
@ -1604,12 +1613,12 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_OPTIMIZATION_LEVEL = z;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Installer/Installer-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
@ -1629,14 +1638,14 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "Installer/vChewingInstaller-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = app;
};
@ -1657,11 +1666,12 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1929;
CURRENT_PROJECT_VERSION = 1930;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = z;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Installer/Installer-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -1676,12 +1686,13 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11.5;
MARKETING_VERSION = 1.3.8;
MARKETING_VERSION = 1.3.9;
PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "Installer/vChewingInstaller-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Osize";
SWIFT_VERSION = 5.0;
WRAPPER_EXTENSION = app;
};