From 651a8704402657a33795c159d0bc859f4f32756e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 10:31:38 +0800 Subject: [PATCH 01/12] LMs // Bind Syslog prints with debug conditions. --- Source/Modules/FileHandlers/LMConsolidator.mm | 29 ++++++++++--------- .../SubLanguageModels/AssociatedPhrases.mm | 2 +- .../SubLanguageModels/CoreLM.mm | 25 ++++++++-------- .../SubLanguageModels/PhraseReplacementMap.mm | 2 +- .../SubLanguageModels/UserPhrasesLM.mm | 2 +- 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/Source/Modules/FileHandlers/LMConsolidator.mm b/Source/Modules/FileHandlers/LMConsolidator.mm index 0c26866d..8a9a7b4a 100644 --- a/Source/Modules/FileHandlers/LMConsolidator.mm +++ b/Source/Modules/FileHandlers/LMConsolidator.mm @@ -17,6 +17,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH */ #include "LMConsolidator.h" +#include "vChewing-Swift.h" namespace vChewing { @@ -31,13 +32,13 @@ bool LMConsolidator::CheckPragma(const char *path) { string firstLine; getline(zfdCheckPragma, firstLine); - syslog(LOG_CONS, "HEADER SEEN ||%s", firstLine.c_str()); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "HEADER SEEN ||%s", firstLine.c_str()); if (firstLine != FORMATTED_PRAGMA_HEADER) { - syslog(LOG_CONS, "HEADER VERIFICATION FAILED. START IN-PLACE CONSOLIDATING PROCESS."); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "HEADER VERIFICATION FAILED. START IN-PLACE CONSOLIDATING PROCESS."); return false; } } - syslog(LOG_CONS, "HEADER VERIFICATION SUCCESSFUL."); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "HEADER VERIFICATION SUCCESSFUL."); return true; } @@ -49,22 +50,22 @@ bool LMConsolidator::FixEOF(const char *path) char z; zfdEOFFixerIncomingStream.get(z); if(z!='\n'){ - syslog(LOG_CONS, "// REPORT: Data File not ended with a new line.\n"); - syslog(LOG_CONS, "// DATA FILE: %s", path); - syslog(LOG_CONS, "// PROCEDURE: Trying to insert a new line as EOF before per-line check process.\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// REPORT: Data File not ended with a new line.\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// DATA FILE: %s", path); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// PROCEDURE: Trying to insert a new line as EOF before per-line check process.\n"); std::ofstream zfdEOFFixerOutput(path, std::ios_base::app); zfdEOFFixerOutput << std::endl; zfdEOFFixerOutput.close(); if (zfdEOFFixerOutput.fail()) { - syslog(LOG_CONS, "// REPORT: Failed to append a newline to the data file. Insufficient Privileges?\n"); - syslog(LOG_CONS, "// DATA FILE: %s", path); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// REPORT: Failed to append a newline to the data file. Insufficient Privileges?\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// DATA FILE: %s", path); return false; } } zfdEOFFixerIncomingStream.close(); if (zfdEOFFixerIncomingStream.fail()) { - syslog(LOG_CONS, "// REPORT: Failed to read lines through the data file for EOF check. Insufficient Privileges?\n"); - syslog(LOG_CONS, "// DATA FILE: %s", path); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// REPORT: Failed to read lines through the data file for EOF check. Insufficient Privileges?\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// DATA FILE: %s", path); return false; } return true; @@ -118,14 +119,14 @@ bool LMConsolidator::ConsolidateContent(const char *path, bool shouldCheckPragma } zfdContentConsolidatorOutput.close(); if (zfdContentConsolidatorOutput.fail()) { - syslog(LOG_CONS, "// REPORT: Failed to write content-consolidated data to the file. Insufficient Privileges?\n"); - syslog(LOG_CONS, "// DATA FILE: %s", path); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// REPORT: Failed to write content-consolidated data to the file. Insufficient Privileges?\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// DATA FILE: %s", path); return false; } zfdContentConsolidatorIncomingStream.close(); if (zfdContentConsolidatorIncomingStream.fail()) { - syslog(LOG_CONS, "// REPORT: Failed to read lines through the data file for content-consolidation. Insufficient Privileges?\n"); - syslog(LOG_CONS, "// DATA FILE: %s", path); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// REPORT: Failed to read lines through the data file for content-consolidation. Insufficient Privileges?\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "// DATA FILE: %s", path); return false; } return true; diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm b/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm index 1af8c9d0..430df6e7 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/AssociatedPhrases.mm @@ -90,7 +90,7 @@ bool AssociatedPhrases::open(const char *path) // 下面這一段或許可以做成開關、來詢問是否對使用者語彙採取寬鬆策略(哪怕有行內容寫錯也會放行) if (state == KeyValueBlobReader::State::ERROR) { // close(); - syslog(LOG_CONS, "AssociatedPhrases: Failed at Open Step 5. On Error Resume Next.\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "AssociatedPhrases: Failed at Open Step 5. On Error Resume Next.\n"); // return false; } return true; diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/CoreLM.mm b/Source/Modules/LangModelRelated/SubLanguageModels/CoreLM.mm index 2f84c4c3..b9fae8fd 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/CoreLM.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/CoreLM.mm @@ -24,6 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH #include #include #include +#include "vChewing-Swift.h" using namespace Gramambular; @@ -123,7 +124,7 @@ start: c = *head; // \s -> error if (c == ' ') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // Start: \\s -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // Start: \\s -> error"); goto error; } // \n -> start @@ -140,14 +141,14 @@ start: state1: // EOF -> error if (head == end) { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 1: EOF -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 1: EOF -> error"); goto error; } c = *head; // \n -> error if (c == '\n') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 1: \\n -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 1: \\n -> error"); goto error; } // \s -> state2 + zero out ending + record column start @@ -165,14 +166,14 @@ state1: state2: // eof -> error if (head == end) { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 2: EOF -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 2: EOF -> error"); goto error; } c = *head; // \n, \s -> error if (c == '\n' || c == ' ') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 2: \\n \\s -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 2: \\n \\s -> error"); goto error; } @@ -184,7 +185,7 @@ state2: state3: // eof -> error if (head == end) { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 3: EOF -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 3: EOF -> error"); goto error; } @@ -192,7 +193,7 @@ state3: // \n -> error if (c == '\n') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 3: \\n -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 3: \\n -> error"); goto error; } // \s -> state4 + zero out ending + record column start @@ -210,14 +211,14 @@ state3: state4: // eof -> error if (head == end) { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 4: EOF -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 4: EOF -> error"); goto error; } c = *head; // \n, \s -> error if (c == '\n' || c == ' ') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 4: \\n \\s -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 4: \\n \\s -> error"); goto error; } @@ -230,14 +231,14 @@ state4: state5: // eof -> error if (head == end) { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 5: EOF -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 5: EOF -> error"); goto error; } c = *head; // \s -> error if (c == ' ') { - syslog(LOG_CONS, "vChewingDebug: CoreLM // state 5: \\s -> error"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // state 5: \\s -> error"); goto error; } // \n -> start @@ -264,7 +265,7 @@ end: emptyRow.value = space; emptyRow.logProbability = zero; keyRowMap[space].push_back(emptyRow); - syslog(LOG_CONS, "vChewingDebug: CoreLM // File Load Complete."); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "vChewingDebug: CoreLM // File Load Complete."); return true; } diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm b/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm index 835c24b6..b3a10e49 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/PhraseReplacementMap.mm @@ -85,7 +85,7 @@ bool PhraseReplacementMap::open(const char *path) // 下面這一段或許可以做成開關、來詢問是否對使用者語彙採取寬鬆策略(哪怕有行內容寫錯也會放行) if (state == KeyValueBlobReader::State::ERROR) { // close(); - syslog(LOG_CONS, "PhraseReplacementMap: Failed at Open Step 5. On Error Resume Next.\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "PhraseReplacementMap: Failed at Open Step 5. On Error Resume Next.\n"); // return false; } return true; diff --git a/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm b/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm index f530f21f..b62db2db 100644 --- a/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm +++ b/Source/Modules/LangModelRelated/SubLanguageModels/UserPhrasesLM.mm @@ -94,7 +94,7 @@ bool UserPhrasesLM::open(const char *path) // 下面這一段或許可以做成開關、來詢問是否對使用者語彙採取寬鬆策略(哪怕有行內容寫錯也會放行) if (state == KeyValueBlobReader::State::ERROR) { // close(); - syslog(LOG_CONS, "UserPhrasesLM: Failed at Open Step 5. On Error Resume Next.\n"); + if (mgrPrefs.isDebugModeEnabled) syslog(LOG_CONS, "UserPhrasesLM: Failed at Open Step 5. On Error Resume Next.\n"); // return false; } return true; From 6e263a425e3fa7d92a869322f83e681bbaf059b1 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 28 Mar 2022 22:04:25 +0800 Subject: [PATCH 02/12] mgrPrefs // +kUserDataFolderSpecified, etc. --- Source/Modules/IMEModules/mgrPrefs.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Modules/IMEModules/mgrPrefs.swift b/Source/Modules/IMEModules/mgrPrefs.swift index b2ab0c00..96b817bf 100644 --- a/Source/Modules/IMEModules/mgrPrefs.swift +++ b/Source/Modules/IMEModules/mgrPrefs.swift @@ -20,6 +20,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH import Cocoa private let kIsDebugModeEnabled = "_DebugMode" +private let kUserDataFolderSpecified = "UserDataFolderSpecified" private let kCheckUpdateAutomatically = "CheckUpdateAutomatically" private let kKeyboardLayoutPreference = "KeyboardLayout" private let kBasisKeyboardLayoutPreference = "BasisKeyboardLayout" @@ -183,6 +184,7 @@ struct ComposingBufferSize { @objc public class mgrPrefs: NSObject { static var allKeys:[String] { [kIsDebugModeEnabled, + kUserDataFolderSpecified, kKeyboardLayoutPreference, kBasisKeyboardLayoutPreference, kShowPageButtonsInCandidateWindow, @@ -316,6 +318,13 @@ struct ComposingBufferSize { @UserDefault(key: kIsDebugModeEnabled, defaultValue: false) @objc static var isDebugModeEnabled: Bool + @UserDefault(key: kUserDataFolderSpecified, defaultValue: "") + @objc static var userDataFolderSpecified: String + + @objc static func ifSpecifiedUserDataPathExistsInPlist() -> Bool { + UserDefaults.standard.object(forKey: kUserDataFolderSpecified) != nil + } + @UserDefault(key: kAppleLanguagesPreferences, defaultValue: []) @objc static var appleLanguages: Array From 07c9282f8b02bf8c3be37e7c5875e4605e295b9c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 28 Mar 2022 22:33:17 +0800 Subject: [PATCH 03/12] mgrLM // Allow specifying user data folder, etc. mgrLM // +checkIfSpecifiedUserDataFolderValid. mgrLM // Allow dataFolderPath to be specified, etc. - Also add a parameter to dataFolderPath in case that only the default value is requested. mgrLM // Avoid implicit Enum conversion. mgrLM // Auto-remove invalid userDataPath preferences. mgrLM // Ensure stringByExpandingTildeInPath. --- .../Modules/LangModelRelated/mgrLangModel.h | 4 +- .../Modules/LangModelRelated/mgrLangModel.mm | 40 ++++++++++++++----- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/Source/Modules/LangModelRelated/mgrLangModel.h b/Source/Modules/LangModelRelated/mgrLangModel.h index eba1d6b3..0a3d3332 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.h +++ b/Source/Modules/LangModelRelated/mgrLangModel.h @@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN + (void)loadUserPhraseReplacement; + (BOOL)checkIfUserLanguageModelFilesExist; + (BOOL)checkIfUserDataFolderExists; ++ (BOOL)checkIfSpecifiedUserDataFolderValid:(NSString *)folderPath; ++ (NSString *)dataFolderPath:(bool)isDefaultFolder NS_SWIFT_NAME(dataFolderPath(isDefaultFolder:)); + (BOOL)checkIfUserPhraseExist:(NSString *)userPhrase inputMode:(InputMode)mode key:(NSString *)key NS_SWIFT_NAME(checkIfUserPhraseExist(userPhrase:mode:key:)); + (BOOL)writeUserPhrase:(NSString *)userPhrase inputMode:(InputMode)mode areWeDuplicating:(BOOL)areWeDuplicating areWeDeleting:(BOOL)areWeDeleting; @@ -44,8 +46,6 @@ NS_ASSUME_NONNULL_BEGIN + (NSString *)excludedPhrasesDataPath:(InputMode)mode; + (NSString *)phraseReplacementDataPath:(InputMode)mode; -@property (class, readonly, nonatomic) NSString *dataFolderPath; - @end /// The following methods are merely for testing. diff --git a/Source/Modules/LangModelRelated/mgrLangModel.mm b/Source/Modules/LangModelRelated/mgrLangModel.mm index c98a740a..9d5e411d 100644 --- a/Source/Modules/LangModelRelated/mgrLangModel.mm +++ b/Source/Modules/LangModelRelated/mgrLangModel.mm @@ -136,7 +136,7 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing + (BOOL)checkIfUserDataFolderExists { - NSString *folderPath = [self dataFolderPath]; + NSString *folderPath = [self dataFolderPath:false]; BOOL isFolder = NO; BOOL folderExist = [[NSFileManager defaultManager] fileExistsAtPath:folderPath isDirectory:&isFolder]; if (folderExist && !isFolder) { @@ -159,6 +159,16 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing return YES; } ++ (BOOL)checkIfSpecifiedUserDataFolderValid:(NSString *)folderPath +{ + BOOL isFolder = NO; + BOOL folderExist = [[NSFileManager defaultManager] fileExistsAtPath:folderPath isDirectory:&isFolder]; + if ((folderExist && !isFolder) || (!folderExist)) { + return NO; + } + return YES; +} + + (BOOL)ensureFileExists:(NSString *)filePath populateWithTemplate:(NSString *)templateBasename extension:(NSString *)ext { if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) { @@ -250,42 +260,52 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing return YES; } -+ (NSString *)dataFolderPath ++ (NSString *)dataFolderPath:(bool)isDefaultFolder { - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDirectory, YES); - NSString *appSupportPath = paths[0]; - NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"vChewing"]; + // 此處不能用「~」來取代當前使用者目錄名稱。不然的話,一旦輸入法被系統的沙箱干預的話,則反而會定位到沙箱目錄內。 + NSString *appSupportPath = [NSFileManager.defaultManager URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask][0].path; + NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"vChewing"].stringByExpandingTildeInPath; + if (mgrPrefs.userDataFolderSpecified.stringByExpandingTildeInPath == userDictPath || isDefaultFolder) { + return userDictPath; + } + if ([mgrPrefs ifSpecifiedUserDataPathExistsInPlist]) { + if ([self checkIfSpecifiedUserDataFolderValid:mgrPrefs.userDataFolderSpecified.stringByExpandingTildeInPath]) { + return mgrPrefs.userDataFolderSpecified.stringByExpandingTildeInPath; + } else { + [NSUserDefaults.standardUserDefaults removeObjectForKey:@"UserDataFolderSpecified"]; + } + } return userDictPath; } + (NSString *)userPhrasesDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"userdata-cht.txt" : @"userdata-chs.txt"; - return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; + return [[self dataFolderPath:false] stringByAppendingPathComponent:fileName]; } + (NSString *)userSymbolDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"usersymbolphrases-cht.txt" : @"usersymbolphrases-chs.txt"; - return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; + return [[self dataFolderPath:false] stringByAppendingPathComponent:fileName]; } + (NSString *)userAssociatedPhrasesDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"associatedPhrases-cht.txt" : @"associatedPhrases-chs.txt"; - return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; + return [[self dataFolderPath:false] stringByAppendingPathComponent:fileName]; } + (NSString *)excludedPhrasesDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"exclude-phrases-cht.txt" : @"exclude-phrases-chs.txt"; - return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; + return [[self dataFolderPath:false] stringByAppendingPathComponent:fileName]; } + (NSString *)phraseReplacementDataPath:(InputMode)mode; { NSString *fileName = [mode isEqualToString:imeModeCHT] ? @"phrases-replacement-cht.txt" : @"phrases-replacement-chs.txt"; - return [[self dataFolderPath] stringByAppendingPathComponent:fileName]; + return [[self dataFolderPath:false] stringByAppendingPathComponent:fileName]; } + (vChewing::LMInstantiator *)lmCHT From 50569c13443c754f1f593aade64ace5ae4ccd59a Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Mar 2022 14:52:52 +0800 Subject: [PATCH 04/12] ctlIME // Allow opeing specified user data (folder). --- Source/Modules/IMEModules/ctlInputMethod.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index e2c953fe..9dea56d4 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -284,7 +284,7 @@ class ctlInputMethod: IMKInputController { private func open(userFileAt path: String) { func checkIfUserFilesExist() -> Bool { if !mgrLangModel.checkIfUserLanguageModelFilesExist() { - let content = String(format: NSLocalizedString("Please check the permission at \"%@\".", comment: ""), mgrLangModel.dataFolderPath) + let content = String(format: NSLocalizedString("Please check the permission at \"%@\".", comment: ""), mgrLangModel.dataFolderPath(isDefaultFolder: false)) ctlNonModalAlertWindow.shared.show(title: NSLocalizedString("Unable to create the user phrase file.", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("OK", comment: ""), cancelButtonTitle: nil, cancelAsDefault: false, delegate: nil) NSApp.setActivationPolicy(.accessory) return false @@ -306,7 +306,7 @@ class ctlInputMethod: IMKInputController { if !mgrLangModel.checkIfUserDataFolderExists() { return } - NSWorkspace.shared.openFile(mgrLangModel.dataFolderPath, withApplication: "Finder") + NSWorkspace.shared.openFile(mgrLangModel.dataFolderPath(isDefaultFolder: false), withApplication: "Finder") } @objc func openExcludedPhrases(_ sender: Any?) { From deb7355ef56688abd3c4c6fa1f032c68088cb5b4 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Mar 2022 14:53:37 +0800 Subject: [PATCH 05/12] AppDelegate // To monitor specified user data folder. --- Source/Modules/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index a46a9332..e8d482ce 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -163,7 +163,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega private var ctlAboutWindowInstance: ctlAboutWindow? // New About Window private var checkTask: URLSessionTask? private var updateNextStepURL: URL? - private var fsStreamHelper = FSEventStreamHelper(path: mgrLangModel.dataFolderPath, queue: DispatchQueue(label: "vChewing User Phrases")) + private var fsStreamHelper = FSEventStreamHelper(path: mgrLangModel.dataFolderPath(isDefaultFolder: false), queue: DispatchQueue(label: "vChewing User Phrases")) // 補上 dealloc deinit { From 9e31025a4126cd86106e557253f4bce0470acdf2 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 00:28:55 +0800 Subject: [PATCH 06/12] PrefWindow // Allow specifying user data folder. --- Source/Modules/IME.swift | 2 + Source/WindowControllers/ctlPrefWindow.swift | 42 +++++ .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 144 +++++++++++++----- 3 files changed, 148 insertions(+), 40 deletions(-) diff --git a/Source/Modules/IME.swift b/Source/Modules/IME.swift index 8c56f79c..11b8a007 100644 --- a/Source/Modules/IME.swift +++ b/Source/Modules/IME.swift @@ -20,6 +20,8 @@ import Cocoa @objc public class IME: NSObject { + static let dlgOpenPath = NSOpenPanel(); + // MARK: - Functions // Print debug information to the console. diff --git a/Source/WindowControllers/ctlPrefWindow.swift b/Source/WindowControllers/ctlPrefWindow.swift index deae0fe5..26d271e7 100644 --- a/Source/WindowControllers/ctlPrefWindow.swift +++ b/Source/WindowControllers/ctlPrefWindow.swift @@ -38,12 +38,15 @@ extension RangeReplaceableCollection where Element: Hashable { @IBOutlet weak var selectionKeyComboBox: NSComboBox! @IBOutlet weak var chkTrad2KangXi: NSButton! @IBOutlet weak var chkTrad2JISShinjitai: NSButton! + @IBOutlet weak var lblCurrentlySpecifiedUserDataFolder: NSTextFieldCell! var currentLanguageSelectItem: NSMenuItem? = nil override func windowDidLoad() { super.windowDidLoad() + lblCurrentlySpecifiedUserDataFolder.placeholderString = mgrLangModel.dataFolderPath(isDefaultFolder: true) + let languages = ["auto", "en", "zh-Hans", "zh-Hant", "ja"] var autoMUISelectItem: NSMenuItem? = nil var chosenLanguageItem: NSMenuItem? = nil @@ -234,4 +237,43 @@ extension RangeReplaceableCollection where Element: Hashable { } } + @IBAction func resetSpecifiedUserDataFolder(_ sender: Any) { + UserDefaults.standard.removeObject(forKey: "UserDataFolderSpecified") + IME.initLangModels(userOnly: true) + } + + @IBAction func chooseUserDataFolderToSpecify(_ sender: Any) { + IME.dlgOpenPath.title = NSLocalizedString("Choose your desired user data folder.", comment: ""); + IME.dlgOpenPath.showsResizeIndicator = true; + IME.dlgOpenPath.showsHiddenFiles = true; + IME.dlgOpenPath.canChooseFiles = false; + IME.dlgOpenPath.canChooseDirectories = true; + + let PreviousFolderValidity = mgrLangModel.checkIfSpecifiedUserDataFolderValid(NSString(string: mgrPrefs.userDataFolderSpecified).expandingTildeInPath) + + if self.window != nil { + IME.dlgOpenPath.beginSheetModal(for: self.window!) { result in + if result == NSApplication.ModalResponse.OK { + if (IME.dlgOpenPath.url != nil) { + if (mgrLangModel.checkIfSpecifiedUserDataFolderValid(IME.dlgOpenPath.url!.path)) { + mgrPrefs.userDataFolderSpecified = IME.dlgOpenPath.url!.path + IME.initLangModels(userOnly: true) + } else { + clsSFX.beep() + if !PreviousFolderValidity { + self.resetSpecifiedUserDataFolder(self) + } + return + } + } + } else { + if !PreviousFolderValidity { + self.resetSpecifiedUserDataFolder(self) + } + return + } + } + } // End If self.window != nil + } // End IBAction + } diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 5cf4fda9..5409f63e 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -12,6 +12,7 @@ + @@ -23,7 +24,7 @@ - + @@ -162,7 +163,7 @@ - + @@ -448,7 +449,7 @@ - + @@ -456,7 +457,7 @@ - + @@ -481,7 +482,7 @@ - + @@ -489,7 +490,7 @@ + + - - - - - - + + + + + + + + + + + + + + + + + @@ -635,11 +699,11 @@ - + - + From ddaaf3f52af728638eae8bdf50ed32b9bc25ac2e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 00:29:12 +0800 Subject: [PATCH 07/12] i18n // Allow specifying user data folder. --- Source/Resources/Base.lproj/Localizable.strings | 1 + Source/Resources/en.lproj/Localizable.strings | 1 + Source/Resources/ja.lproj/Localizable.strings | 1 + Source/Resources/zh-Hans.lproj/Localizable.strings | 1 + Source/Resources/zh-Hant.lproj/Localizable.strings | 1 + .../Source/WindowNIBs/en.lproj/frmPrefWindow.strings | 3 +++ .../Source/WindowNIBs/ja.lproj/frmPrefWindow.strings | 3 +++ .../Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings | 3 +++ .../Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings | 2 ++ 9 files changed, 16 insertions(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 6c7a07c9..b90b9b8e 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -51,6 +51,7 @@ "Apple Zhuyin Bopomofo" = "Apple Zhuyin Bopomofo (Standard)"; "Apple Zhuyin Eten" = "Apple Zhuyin Eten"; "Symbol & Emoji Input" = "Symbol & Emoji Input"; +"Choose your desired user data folder." = "Choose your desired user data folder."; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "CommonSymbols"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index fb2ea4e4..438017a6 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -52,6 +52,7 @@ "Apple Zhuyin Eten" = "Apple Zhuyin Eten"; "Symbol & Emoji Input" = "Symbol & Emoji Input"; "Edit User Symbol & Emoji Data…" = "Edit User Symbol & Emoji Data…"; +"Choose your desired user data folder." = "Choose your desired user data folder."; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "CommonSymbols"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 5e80f1c4..c9a1cffa 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -52,6 +52,7 @@ "Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)"; "Symbol & Emoji Input" = "符号&絵文字入力"; "Edit User Symbol & Emoji Data…" = "ユーザー符号&絵文字辞書を編集…"; +"Choose your desired user data folder." = "欲しがるユーザー辞書フォルダをお選びください。"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 69fd06db..057af145 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -52,6 +52,7 @@ "Apple Zhuyin Eten" = "Apple 倚天注音键盘布局"; "Symbol & Emoji Input" = "符号&绘文字输入"; "Edit User Symbol & Emoji Data…" = "编辑自订符号&绘文字资料…"; +"Choose your desired user data folder." = "请选择您想指定的使用者语汇档案目录。"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index deab0014..0b529ba2 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -52,6 +52,7 @@ "Apple Zhuyin Eten" = "Apple 倚天注音鍵盤佈局"; "Symbol & Emoji Input" = "符號&繪文字輸入"; "Edit User Symbol & Emoji Data…" = "編輯自訂符號&繪文字資料…"; +"Choose your desired user data folder." = "請選擇您想指定的使用者語彙檔案目錄。"; // The followings are the category names used in the Symbol menu. "catCommonSymbols" = "常用"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 738aa27a..5af9281c 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -223,3 +223,6 @@ /* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "Enable symbol input support (incl. certain emoji symbols)"; + +/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ +"wN3-k3-b2a.title" = "Choose your desired user data folder path. Will be omitted if invalid."; diff --git a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index ac4b31c7..48e1d04e 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -223,3 +223,6 @@ /* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "僅かなる絵文字も含む符号入力サポートを起用"; + +/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ +"wN3-k3-b2a.title" = "欲しがるユーザー辞書保存先をご指定ください。無効の保存先設定は効かぬ。"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index 76022f2c..cbd74238 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -223,3 +223,6 @@ /* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "启用包括少许绘文字在内的符号输入支援"; + +/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ +"wN3-k3-b2a.title" = "请在此指定您想指定的使用者语汇档案目录。无效值会被忽略。"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index c8358d64..eb96c041 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -224,3 +224,5 @@ /* Class = "NSButtonCell"; title = "Enable symbol input support (incl. certain emoji symbols)"; ObjectID = "hSv-LJ-Cq3"; */ "hSv-LJ-Cq3.title" = "啟用包括少許繪文字在內的符號輸入支援"; +/* Class = "NSTextFieldCell"; title = "Choose your desired user data folder path. Will be omitted if invalid."; ObjectID = "wN3-k3-b2a"; */ +"wN3-k3-b2a.title" = "請在此指定您想指定的使用者語彙檔案目錄。無效值會被忽略。"; From 8c6d166aa0dc7c9c75920a672587f195e787616d Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Mar 2022 14:25:21 +0800 Subject: [PATCH 08/12] i18n // Nomenclature updates, etc. --- Source/Resources/ja.lproj/Localizable.strings | 4 +-- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 24 ++++++---------- .../WindowNIBs/en.lproj/frmPrefWindow.strings | 16 +++++------ .../WindowNIBs/ja.lproj/frmPrefWindow.strings | 28 +++++++++---------- .../zh-Hans.lproj/frmPrefWindow.strings | 14 +++++----- .../zh-Hant.lproj/frmPrefWindow.strings | 16 +++++------ 6 files changed, 48 insertions(+), 54 deletions(-) diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index c9a1cffa..706b3299 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -48,8 +48,8 @@ "zh-Hant" = "繁體中国語"; "ja" = "和語"; "Alphanumerical Input Mode" = "英数入力モード"; -"Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ配列(大千標準)"; -"Apple Zhuyin Eten" = "Apple 注音ボポモフォ配列(倚天伝統)"; +"Apple Zhuyin Bopomofo" = "Apple 注音ボポモフォ(大千標準)"; +"Apple Zhuyin Eten" = "Apple 注音ボポモフォ(倚天伝統)"; "Symbol & Emoji Input" = "符号&絵文字入力"; "Edit User Symbol & Emoji Data…" = "ユーザー符号&絵文字辞書を編集…"; "Choose your desired user data folder." = "欲しがるユーザー辞書フォルダをお選びください。"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index 5409f63e..33c008e5 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -24,7 +24,7 @@ - + @@ -709,31 +709,25 @@ - + - + - + - + - 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. - + Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional. + @@ -743,7 +737,7 @@ - + @@ -790,7 +784,7 @@ - + diff --git a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings index 5af9281c..4e07de6c 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/en.lproj/frmPrefWindow.strings @@ -23,8 +23,8 @@ /* Class = "NSMenuItem"; title = "Hanyu Pinyin"; ObjectID = "10"; */ "10.title" = "Hanyu Pinyin"; -/* Class = "NSTextFieldCell"; title = "Bopomofo:"; ObjectID = "12"; */ -"12.title" = "Bopomofo:"; +/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ +"12.title" = "BPMF Parser:"; /* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "Choose the cursor position where you want to list possible candidates."; @@ -86,8 +86,8 @@ /* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "Enable Space key for calling candidate window"; -/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */ -"126.title" = "Alphanumeric:"; +/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ +"126.title" = "Basic Layout:"; /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; @@ -140,8 +140,8 @@ /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "General"; -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */ -"RQ6-MS-m4C.title" = "Choose your preferred keyboard layout."; +/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ +"RQ6-MS-m4C.title" = "Choose your preferred keyboard layout and phonetic parser."; /* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "Push the cursor to the front of the phrase after selection"; @@ -200,8 +200,8 @@ /* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "Dictionary"; -/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */ -"wQ9-px-b07.title" = "Regarding On-Screen Keyboard Viewer Support:\n\n\tSince v1.3.2, vChewing supports on-screen keyboard by supporting \"Apple Zhuyin Bopomofo\" and \"Apple Zhuyin Eten\" alphanumeric layout. Theoreotically, these two dynamic layouts work with all types of Apple physical keyboards, and you can report failure cases through macOS Feedback Assistant app if macOS built-in Zhuyin / Eten-Zhuyin Input Method fails from working with your non-US keyboard. HOWEVER, choosing such dynamic alphanumeric layouts REQUIRING THAT you have to choose the Bopomofo layout above to Standard (Microsoft / Dachen) since the Bopomofo / Eten layout support in this case is already finished by the macOS system.\n\n\tAlso: If you have chosen those \"vChewing****\" Alphanumerical layouts, then the Bopomofo layouts MUST MATCH the choices."; +/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ +"wQ9-px-b07.title" = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; /* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "Choose the behavior of (Shift+)Tab key in the candidate window."; diff --git a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings index 48e1d04e..b8ab1fba 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/ja.lproj/frmPrefWindow.strings @@ -9,7 +9,7 @@ "5.title" = "OtherViews"; /* Class = "NSMenuItem"; title = "Standard"; ObjectID = "6"; */ -"6.title" = "標準配列(Microsoft・大千・王安など)"; +"6.title" = "大千配列(Microsoft 標準・王安など)"; /* Class = "NSMenuItem"; title = "ETen"; ObjectID = "7"; */ "7.title" = "倚天伝統配列"; @@ -18,13 +18,13 @@ "8.title" = "許氏国音自然配列"; /* Class = "NSMenuItem"; title = "ETen26"; ObjectID = "9"; */ -"9.title" = "倚天26キー配列"; +"9.title" = "倚天形忘れ配列 (26キー)"; /* Class = "NSMenuItem"; title = "Hanyu Pinyin"; ObjectID = "10"; */ "10.title" = "漢語弁音(ローマ字+数字音調)"; -/* Class = "NSTextFieldCell"; title = "Bopomofo:"; ObjectID = "12"; */ -"12.title" = "注音キーボード配列:"; +/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ +"12.title" = "注音配列:"; /* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "カーソルはどこで入力候補を呼び出すかとご選択ください:"; @@ -86,20 +86,20 @@ /* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "Space キーで入力候補を呼び出す"; -/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */ -"126.title" = "英数キーボード配列:"; +/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ +"126.title" = "基礎キーボード:"; /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; /* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ -"137.title" = "IBM"; +"137.title" = "IBM 配列"; /* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */ -"7fV-x8-WHQ.title" = "神通"; +"7fV-x8-WHQ.title" = "神通配列"; /* Class = "NSMenuItem"; title = "Fake Seigyou"; ObjectID = "27F-8T-FkQ"; */ -"27F-8T-FkQ.title" = "偽精業"; +"27F-8T-FkQ.title" = "偽精業配列"; /* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ "1AW-xf-c2f.label" = "キーボード"; @@ -140,8 +140,8 @@ /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "全般"; -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */ -"RQ6-MS-m4C.title" = "お好きなるキーボード配列をお選びください。"; +/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ +"RQ6-MS-m4C.title" = "お好きなるキーボードとそれに相応しい注音配列をお選びください。"; /* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "候補選択の直後、すぐカーソルを単語の向こうに推す"; @@ -156,7 +156,7 @@ "W24-T4-cg0.title" = "全字庫モード // 入力可能の漢字数倍増 (2022-01-07)"; /* Class = "NSBox"; title = "Keyboard Layout"; ObjectID = "Wvt-HE-LOv"; */ -"Wvt-HE-LOv.title" = "キーボード配列"; +"Wvt-HE-LOv.title" = "キーボード"; /* Class = "NSButtonCell"; title = "Check for updates automatically"; ObjectID = "Z9t-P0-BLF"; */ "Z9t-P0-BLF.title" = "アプリの更新通知を受く"; @@ -200,8 +200,8 @@ /* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辞書"; -/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */ -"wQ9-px-b07.title" = "macOS 内蔵のキーボードビューアについて:\n\n\t威注音は v1.3.2 版にて macOS 内蔵のキーボードビューアをサポートし始めたが、「Apple Zhuyin Bopomofo」と「Apple Zhuyin Eten」この2つダイナミック英数キーボード配列をサポートしたためである。基本的には、この機能は全ての言語の Apple キーボードと一緒に動けるはず。macOS 内蔵の注音入力と倚天注音入力が支障なく使える限り(支障があったら Feedback Assistant.app で Apple にご報告を)、この2つダイナミック英数キーボード配列も威注音で作動できるだと考えられる。だが、もし、ダイナミック英数キーボード配列を起用すると、今のこの画面の上の「注音キーボード配列」を標準配列にしなければならぬこと。なぜなら、この場合、倚天などの注音配列のサポート役割は macOS である。\n\n\t他に注意:英数配列を「vChewing○○○○」と名付けた配列に設定した場合、注音配列も必ず一致して下さい。"; +/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ +"wQ9-px-b07.title" = "Apple 動態注音キーボード (大千と倚天伝統) を使うには、共通語分析器の注音配列を大千と設定すべきである。"; /* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "入力候補陳列での (Shift+)Tab キーの輪番切替対象をご指定ください。"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings index cbd74238..fbaf9196 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hans.lproj/frmPrefWindow.strings @@ -23,8 +23,8 @@ /* Class = "NSMenuItem"; title = "Hanyu Pinyin"; ObjectID = "10"; */ "10.title" = "汉语拼音二式(字母拼音+数字标调)"; -/* Class = "NSTextFieldCell"; title = "Bopomofo:"; ObjectID = "12"; */ -"12.title" = "注音键盘布局:"; +/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ +"12.title" = "基础键盘布局:"; /* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "用以触发选字的光标相对位置:"; @@ -86,7 +86,7 @@ /* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "敲空格键以选字"; -/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */ +/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ "126.title" = "英数键盘布局:"; /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ @@ -140,8 +140,8 @@ /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */ -"RQ6-MS-m4C.title" = "选择您所偏好的键盘布局。"; +/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ +"RQ6-MS-m4C.title" = "选择您所偏好的系统键盘布局与注音分析器配列。"; /* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "在选字后将光标置于该字词的前方"; @@ -200,8 +200,8 @@ /* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辞典"; -/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */ -"wQ9-px-b07.title" = "关于 macOS 内建萤幕模拟键盘支援:\n\n\t自 v1.3.2 版开始,威注音支援 macOS 内建的萤幕小键盘。该功能是借由对「Apple 标准注音键盘布局」与「Apple 倚天注音键盘布局」这两个动态英数键盘布局来完成的。理论上来讲,这两个动态英数键盘布局应该可以与所有语种的 Apple 物理键盘相容。如果有不相容的情况的话,macOS 内建的注音与倚天注音输入法一定也会有相同的故障(可以借由 Feedback Assistant.app 向 Apple 反馈这种键盘布局问题)。然而,如果您启用了这种动态英数键盘布局的话,请将当前画面顶端的注音键盘布局设为「微软/大千……」,因为对诸如倚天等异种键盘的支援已经交给 macOS 系统来事先完成了。\n\n\t另外:如果您在「英数键盘布局」内选了所有以「vChewing」开头的键盘配列的话,对应的「注音键盘布局」也要选成相同的配列才可以。比如说前者选「vChewing Dachen」那后者就得选「微软/大千……」、前者选「vChewing FakeSeigyou」那后者就得选「伪精业」,依此类推。"; +/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ +"wQ9-px-b07.title" = "Apple 动态注音键盘布局(大千与倚天)要求普通话/国音分析器的注音配列得配置为大千配列。"; /* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 热键在选字窗内的轮替操作对象。"; diff --git a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings index eb96c041..e1704d83 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings +++ b/Source/WindowNIBs/Source/WindowNIBs/zh-Hant.lproj/frmPrefWindow.strings @@ -23,8 +23,8 @@ /* Class = "NSMenuItem"; title = "Hanyu Pinyin"; ObjectID = "10"; */ "10.title" = "漢語拼音二式(字母拼音+數字標調)"; -/* Class = "NSTextFieldCell"; title = "Bopomofo:"; ObjectID = "12"; */ -"12.title" = "注音鍵盤佈局:"; +/* Class = "NSTextFieldCell"; title = "BPMF Parser:"; ObjectID = "12"; */ +"12.title" = "注音配列:"; /* Class = "NSTextFieldCell"; title = "Choose the cursor position where you want to list possible candidates."; ObjectID = "14"; */ "14.title" = "用以觸發選字的游標相對位置:"; @@ -86,8 +86,8 @@ /* Class = "NSButtonCell"; title = "Enable Space key for calling candidate window"; ObjectID = "110"; */ "110.title" = "敲空格鍵以選字"; -/* Class = "NSTextFieldCell"; title = "Alphanumeric:"; ObjectID = "126"; */ -"126.title" = "英數鍵盤佈局:"; +/* Class = "NSTextFieldCell"; title = "Basic Layout:"; ObjectID = "126"; */ +"126.title" = "基礎鍵盤佈局:"; /* Class = "NSMenu"; title = "OtherViews"; ObjectID = "128"; */ "128.title" = "OtherViews"; @@ -140,8 +140,8 @@ /* Class = "NSTabViewItem"; label = "General"; ObjectID = "QUQ-oY-4Hc"; */ "QUQ-oY-4Hc.label" = "一般"; -/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout."; ObjectID = "RQ6-MS-m4C"; */ -"RQ6-MS-m4C.title" = "選擇您所偏好的鍵盤佈局。"; +/* Class = "NSTextFieldCell"; title = "Choose your preferred keyboard layout and phonetic parser."; ObjectID = "RQ6-MS-m4C"; */ +"RQ6-MS-m4C.title" = "選擇您所偏好的系統鍵盤佈局與注音分析器配列。"; /* Class = "NSButtonCell"; title = "Push the cursor to the front of the phrase after selection"; ObjectID = "RUG-ls-KyA"; */ "RUG-ls-KyA.title" = "在選字後將游標置於該字詞的前方"; @@ -200,8 +200,8 @@ /* Class = "NSTabViewItem"; label = "Dictionary"; ObjectID = "2iG-Ic-gbl"; */ "2iG-Ic-gbl.label" = "辭典"; -/* Class = "NSTextFieldCell"; title = "Regarding On-Screen Keyboard Support:"; ObjectID = "wQ9-px-b07"; */ -"wQ9-px-b07.title" = "關於 macOS 內建螢幕模擬鍵盤支援:\n\n\t自 v1.3.2 版開始,威注音支援 macOS 內建的螢幕小鍵盤。該功能是藉由對「Apple 標準注音鍵盤佈局」與「Apple 倚天注音鍵盤佈局」這兩個動態英數鍵盤佈局來完成的。理論上來講,這兩個動態英數鍵盤佈局應該可以與所有語種的 Apple 物理鍵盤相容。如果有不相容的情況的話,macOS 內建的注音與倚天注音輸入法一定也會有相同的故障(可以藉由 Feedback Assistant.app 向 Apple 反饋這種鍵盤佈局問題)。然而,如果您啟用了這種動態英數鍵盤佈局的話,請將當前畫面頂端的注音鍵盤佈局設為「微軟/大千……」,因為對諸如倚天等異種鍵盤的支援已經交給 macOS 系統來事先完成了。\n\n\t另外:如果您在「英數鍵盤佈局」內選了所有以「vChewing」開頭的鍵盤配列的話,對應的「注音鍵盤佈局」也要選成相同的配列才可以。比如說前者選「vChewing Dachen」那後者就得選「微軟/大千……」、前者選「vChewing FakeSeigyou」那後者就得選「偽精業」,依此類推。"; +/* Class = "NSTextFieldCell"; title = "Apple Dynamic Bopomofo Basic Keyboard Layouts (Dachen & Eten Traditional) must match the Dachen parser in order to be functional."; ObjectID = "wQ9-px-b07"; */ +"wQ9-px-b07.title" = "Apple 動態注音鍵盤佈局(大千與倚天)要求普通話/國音分析器的注音配列得配置為大千配列。"; /* Class = "NSTextFieldCell"; title = "Choose the behavior of (Shift+)Tab key in the candidate window."; ObjectID = "ueU-Rz-a1C"; */ "ueU-Rz-a1C.title" = "指定 (Shift+)Tab 熱鍵在選字窗內的輪替操作對象。"; From 4b987035abf66c51c41fd8f4d3fca58200444218 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 10:35:30 +0800 Subject: [PATCH 09/12] AppDelegate // Move LM initialization to IME module. --- Source/Modules/AppDelegate.swift | 9 ++------- Source/Modules/IME.swift | 12 ++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index e8d482ce..b8bcf8df 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -149,9 +149,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega // 拖 100ms 再重載,畢竟有些有特殊需求的使用者可能會想使用巨型自訂語彙檔案。 DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) { if mgrPrefs.shouldAutoReloadUserDataFiles { - mgrLangModel.loadUserPhrases() - mgrLangModel.loadUserPhraseReplacement() - mgrLangModel.loadUserAssociatedPhrases() + IME.initLangModels(userOnly: true) } } } @@ -176,10 +174,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega } func applicationDidFinishLaunching(_ notification: Notification) { - mgrLangModel.loadDataModels() // 這句還是不要砍了。 - mgrLangModel.loadUserPhrases() - mgrLangModel.loadUserPhraseReplacement() - mgrLangModel.loadUserAssociatedPhrases() + IME.initLangModels(userOnly: false) fsStreamHelper.delegate = self _ = fsStreamHelper.start() diff --git a/Source/Modules/IME.swift b/Source/Modules/IME.swift index 11b8a007..38f65151 100644 --- a/Source/Modules/IME.swift +++ b/Source/Modules/IME.swift @@ -31,6 +31,18 @@ import Cocoa } } + @objc static func initLangModels(userOnly: Bool) { + if !userOnly { + mgrLangModel.loadDataModels() // 這句還是不要砍了。 + } + // mgrLangModel 的 loadUserPhrases 等函數在自動讀取 dataFolderPath 時, + // 如果發現自訂目錄不可用,則會自動抹去自訂目錄設定、改採預設目錄。 + // 所以這裡不需要特別處理。 + mgrLangModel.loadUserPhrases() + mgrLangModel.loadUserPhraseReplacement() + mgrLangModel.loadUserAssociatedPhrases() + } + @objc static func isDarkMode() -> Bool { if #available(macOS 10.15, *) { let appearanceDescription = NSApplication.shared.effectiveAppearance.debugDescription.lowercased() From 1560e918ab5a099bf93646f55a6a07ba3a6036a7 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 11:54:34 +0800 Subject: [PATCH 10/12] AppInstaller // Use FileManager to handle paths. --- Installer/AppDelegate.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Installer/AppDelegate.swift b/Installer/AppDelegate.swift index 0228e9f9..b9d212c6 100644 --- a/Installer/AppDelegate.swift +++ b/Installer/AppDelegate.swift @@ -22,9 +22,14 @@ import Cocoa private let kTargetBin = "vChewing" private let kTargetType = "app" private let kTargetBundle = "vChewing.app" -private let kDestinationPartial = "~/Library/Input Methods/" -private let kTargetPartialPath = "~/Library/Input Methods/vChewing.app" -private let kTargetFullBinPartialPath = "~/Library/Input Methods/vChewing.app/Contents/MacOS/vChewing" + +private let urlDestinationPartial = FileManager.default.urls(for: .inputMethodsDirectory, in: .userDomainMask)[0] +private let urlTargetPartial = urlDestinationPartial.appendingPathComponent(kTargetBundle) +private let urlTargetFullBinPartial = urlTargetPartial.appendingPathComponent("Contents/MacOS/").appendingPathComponent(kTargetBin) + +private let kDestinationPartial = urlDestinationPartial.path +private let kTargetPartialPath = urlTargetPartial.path +private let kTargetFullBinPartialPath = urlTargetFullBinPartial.path private let kTranslocationRemovalTickInterval: TimeInterval = 0.5 private let kTranslocationRemovalDeadline: TimeInterval = 60.0 From a0c64bf5f51cff52e81d244f615e17cc9f225520 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 29 Mar 2022 14:28:47 +0800 Subject: [PATCH 11/12] Update Data - 20220330 --- Source/Data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Data b/Source/Data index fd7208e3..8533cf09 160000 --- a/Source/Data +++ b/Source/Data @@ -1 +1 @@ -Subproject commit fd7208e3ece1bf0ba6c128160dfdcac79e3451bd +Subproject commit 8533cf091fc8307529fc07c042b3a591c3f8b79c From 04391dfa3c4e31bd81a0984c100090765ae61607 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Mar 2022 18:06:20 +0800 Subject: [PATCH 12/12] Bump version to 1.4.5 Build 1945. --- Update-Info.plist | 4 ++-- vChewing.pkgproj | 38 +++++++++++++++--------------- vChewing.xcodeproj/project.pbxproj | 24 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Update-Info.plist b/Update-Info.plist index 8b5e89fc..c5d19562 100644 --- a/Update-Info.plist +++ b/Update-Info.plist @@ -7,8 +7,8 @@ UpdateInfoSite https://gitee.com/vChewing/vChewing-macOS/releases CFBundleVersion - 1944 + 1945 CFBundleShortVersionString - 1.4.4 + 1.4.5 diff --git a/vChewing.pkgproj b/vChewing.pkgproj index 7111aee5..057e8b44 100644 --- a/vChewing.pkgproj +++ b/vChewing.pkgproj @@ -726,7 +726,7 @@ USE_HFS+_COMPRESSION VERSION - 1.4.4 + 1.4.5 TYPE 0 @@ -941,11 +941,11 @@ LANGUAGE - Traditional Chinese + Simplified Chinese VALUE PATH - Installer/pkgTextWarning-CHT.txt + Installer/pkgTextWarning-CHS.txt PATH_TYPE 1 @@ -963,11 +963,11 @@ LANGUAGE - Simplified Chinese + Traditional Chinese VALUE PATH - Installer/pkgTextWarning-CHS.txt + Installer/pkgTextWarning-CHT.txt PATH_TYPE 1 @@ -991,11 +991,11 @@ LANGUAGE - Traditional Chinese + Simplified Chinese VALUE PATH - LICENSE-CHT.txt + LICENSE-CHS.txt PATH_TYPE 1 @@ -1013,11 +1013,11 @@ LANGUAGE - Simplified Chinese + Traditional Chinese VALUE PATH - LICENSE-CHS.txt + LICENSE-CHT.txt PATH_TYPE 1 @@ -1048,9 +1048,9 @@ LANGUAGE - Simplified Chinese + Traditional Chinese VALUE - 威注音输入法 + 威注音輸入法 LANGUAGE @@ -1060,9 +1060,9 @@ LANGUAGE - Traditional Chinese + Simplified Chinese VALUE - 威注音輸入法 + 威注音输入法 @@ -1099,11 +1099,11 @@ LANGUAGE - Simplified Chinese + Traditional Chinese SECONDARY_VALUE - 至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。 + 至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。 VALUE - 作业系统版本太旧 + 作業系統版本太舊 LANGUAGE @@ -1115,11 +1115,11 @@ LANGUAGE - Traditional Chinese + Simplified Chinese SECONDARY_VALUE - 至少 macOS 10.11.5 方可滿足威注音對系統內的萬國碼版本支援的需要。 + 至少 macOS 10.11.5 方可满足威注音对系统内的万国码版本支援的需要。 VALUE - 作業系統版本太舊 + 作业系统版本太旧 NAME diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 285df168..c42c92ac 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -1183,7 +1183,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -1206,7 +1206,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; @@ -1239,7 +1239,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1258,7 +1258,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.vChewing.vChewingPhraseEditor; @@ -1373,7 +1373,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1408,7 +1408,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1441,7 +1441,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; @@ -1471,7 +1471,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; PRODUCT_BUNDLE_IDENTIFIER = org.atelierInmu.inputmethod.vChewing; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1555,7 +1555,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -1580,7 +1580,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1608,7 +1608,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1944; + CURRENT_PROJECT_VERSION = 1945; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -1628,7 +1628,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.11.5; - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5; PRODUCT_BUNDLE_IDENTIFIER = "org.atelierInmu.vChewing.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";