From 848d9f89afa2aecbced8b3a67f149b0ac71db82a Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 12:16:07 +0800 Subject: [PATCH 01/16] Main // Use IME module to manage (+un)installation, etc. --- Source/Modules/IME.swift | 113 +++++++++++++++++++++++++++++++++++++- Source/Modules/main.swift | 51 ++--------------- 2 files changed, 115 insertions(+), 49 deletions(-) diff --git a/Source/Modules/IME.swift b/Source/Modules/IME.swift index 38f65151..df9e3666 100644 --- a/Source/Modules/IME.swift +++ b/Source/Modules/IME.swift @@ -22,15 +22,19 @@ import Cocoa static let dlgOpenPath = NSOpenPanel(); - // MARK: - Functions - - // Print debug information to the console. + // MARK: - Print debug information to the console. @objc static func prtDebugIntel(_ strPrint: String) { if mgrPrefs.isDebugModeEnabled { NSLog("vChewingErrorCallback: %@", strPrint) } } + // MARK: - Tell whether this IME is running with Root privileges. + @objc static var isSudoMode: Bool { + NSUserName() == "root" + } + + // MARK: - Initializing Language Models. @objc static func initLangModels(userOnly: Bool) { if !userOnly { mgrLangModel.loadDataModels() // 這句還是不要砍了。 @@ -43,6 +47,7 @@ import Cocoa mgrLangModel.loadUserAssociatedPhrases() } + // MARK: - System Dark Mode Status Detector. @objc static func isDarkMode() -> Bool { if #available(macOS 10.15, *) { let appearanceDescription = NSApplication.shared.effectiveAppearance.debugDescription.lowercased() @@ -58,4 +63,106 @@ import Cocoa } return false } + + // MARK: - Trash a file if it exists. + @discardableResult static func trashTargetIfExists(_ path: String) -> Bool { + do { + if FileManager.default.fileExists(atPath: path) { + // 塞入垃圾桶 + try FileManager.default.trashItem(at: URL(fileURLWithPath: path), resultingItemURL: nil) + } else { + NSLog("Item doesn't exist: \(path)") + } + } catch let error as NSError { + NSLog("Failed from removing this object: \(path) || Error: \(error)") + return false + } + return true + } + // MARK: - Uninstalling the input method. + @discardableResult static func uninstall(isSudo: Bool = false, selfKill: Bool = true) -> Int32 { + // 輸入法自毀處理。這裡不用「Bundle.main.bundleURL」是為了方便使用者以 sudo 身分來移除被錯誤安裝到系統目錄內的輸入法。 + guard let bundleID = Bundle.main.bundleIdentifier else { + NSLog("Failed to ensure the bundle identifier.") + return -1 + } + + let kTargetBin = "vChewing" + let kTargetBundle = "/vChewing.app" + let pathLibrary = isSudo ? "/Library" : FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask)[0].path + let pathIMELibrary = isSudo ? "/Library/Input Methods" : FileManager.default.urls(for: .inputMethodsDirectory, in: .userDomainMask)[0].path + let pathUnitKeyboardLayouts = "/Keyboard Layouts" + let arrKeyLayoutFiles = ["/vChewing ETen.keylayout", "/vChewingKeyLayout.bundle", "/vChewing MiTAC.keylayout", "/vChewing IBM.keylayout", "/vChewing FakeSeigyou.keylayout", "/vChewing Dachen.keylayout"] + + // 先移除各種鍵盤佈局。 + for objPath in arrKeyLayoutFiles { + let objFullPath = pathLibrary + pathUnitKeyboardLayouts + objPath + if !IME.trashTargetIfExists(objFullPath) { return -1 } + } + if CommandLine.arguments.count > 2 && CommandLine.arguments[2] == "--all" && CommandLine.arguments[1] == "uninstall" { + // 再處理是否需要移除放在預設使用者資料夾內的檔案的情況。 + // 如果使用者有在輸入法偏好設定內將該目錄改到別的地方(而不是用 symbol link)的話,則不處理。 + // 目前暫時無法應對 symbol link 的情況。 + IME.trashTargetIfExists(mgrLangModel.dataFolderPath(isDefaultFolder: true)) + IME.trashTargetIfExists(pathLibrary + "/Preferences/" + bundleID + ".plist") // 之後移除 App 偏好設定 + } + if !IME.trashTargetIfExists(pathIMELibrary + kTargetBundle) { return -1 } // 最後移除 App 自身 + // 幹掉殘留在記憶體內的執行緒。 + if selfKill { + let killTask = Process() + killTask.launchPath = "/usr/bin/killall" + killTask.arguments = ["-9", kTargetBin] + killTask.launch() + killTask.waitUntilExit() + } + return 0 + } + + // MARK: - Registering the input method. + @discardableResult static func registerInputMethod() -> Int32 { + guard let bundleID = Bundle.main.bundleIdentifier else { + return -1 + } + let bundleUrl = Bundle.main.bundleURL + var maybeInputSource = InputSourceHelper.inputSource(for: bundleID) + + if maybeInputSource == nil { + NSLog("Registering input source \(bundleID) at \(bundleUrl.absoluteString)"); + // then register + let status = InputSourceHelper.registerTnputSource(at: bundleUrl) + + if !status { + NSLog("Fatal error: Cannot register input source \(bundleID) at \(bundleUrl.absoluteString).") + return -1 + } + + maybeInputSource = InputSourceHelper.inputSource(for: bundleID) + } + + guard let inputSource = maybeInputSource else { + NSLog("Fatal error: Cannot find input source \(bundleID) after registration.") + return -1 + } + + if !InputSourceHelper.inputSourceEnabled(for: inputSource) { + NSLog("Enabling input source \(bundleID) at \(bundleUrl.absoluteString).") + let status = InputSourceHelper.enable(inputSource: inputSource) + if !status { + NSLog("Fatal error: Cannot enable input source \(bundleID).") + return -1 + } + if !InputSourceHelper.inputSourceEnabled(for: inputSource) { + NSLog("Fatal error: Cannot enable input source \(bundleID).") + return -1 + } + } + + if CommandLine.arguments.count > 2 && CommandLine.arguments[2] == "--all" { + let enabled = InputSourceHelper.enableAllInputMode(for: bundleID) + NSLog(enabled ? "All input sources enabled for \(bundleID)" : "Cannot enable all input sources for \(bundleID), but this is ignored") + } + return 0 + } + + } diff --git a/Source/Modules/main.swift b/Source/Modules/main.swift index 4bf09c56..9996268f 100644 --- a/Source/Modules/main.swift +++ b/Source/Modules/main.swift @@ -20,56 +20,15 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH import Cocoa import InputMethodKit -private func install() -> Int32 { - guard let bundleID = Bundle.main.bundleIdentifier else { - return -1 - } - let bundleUrl = Bundle.main.bundleURL - var maybeInputSource = InputSourceHelper.inputSource(for: bundleID) - - if maybeInputSource == nil { - NSLog("Registering input source \(bundleID) at \(bundleUrl.absoluteString)"); - // then register - let status = InputSourceHelper.registerTnputSource(at: bundleUrl) - - if !status { - NSLog("Fatal error: Cannot register input source \(bundleID) at \(bundleUrl.absoluteString).") - return -1 - } - - maybeInputSource = InputSourceHelper.inputSource(for: bundleID) - } - - guard let inputSource = maybeInputSource else { - NSLog("Fatal error: Cannot find input source \(bundleID) after registration.") - return -1 - } - - if !InputSourceHelper.inputSourceEnabled(for: inputSource) { - NSLog("Enabling input source \(bundleID) at \(bundleUrl.absoluteString).") - let status = InputSourceHelper.enable(inputSource: inputSource) - if !status { - NSLog("Fatal error: Cannot enable input source \(bundleID).") - return -1 - } - if !InputSourceHelper.inputSourceEnabled(for: inputSource) { - NSLog("Fatal error: Cannot enable input source \(bundleID).") - return -1 - } - } - - if CommandLine.arguments.count > 2 && CommandLine.arguments[2] == "--all" { - let enabled = InputSourceHelper.enableAllInputMode(for: bundleID) - NSLog(enabled ? "All input sources enabled for \(bundleID)" : "Cannot enable all input sources for \(bundleID), but this is ignored") - } - return 0 -} - let kConnectionName = "vChewing_1_Connection" if CommandLine.arguments.count > 1 { if CommandLine.arguments[1] == "install" { - let exitCode = install() + let exitCode = IME.registerInputMethod() + exit(exitCode) + } + if CommandLine.arguments[1] == "uninstall" { + let exitCode = IME.uninstall(isSudo: IME.isSudoMode) exit(exitCode) } } From 1ae7fdbb88815f94164d50b7b95e034d62a9bacc Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 14:42:23 +0800 Subject: [PATCH 02/16] Xcode // Manage PKG pre/post-install scripts in project. --- vChewing.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index a32a59fe..05ae95aa 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -198,6 +198,8 @@ 5BBBB77727AEDB290023B93A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainMenu.strings; sourceTree = ""; }; 5BBBB77927AEDC690023B93A /* clsSFX.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = clsSFX.swift; sourceTree = ""; }; 5BBD627827B6C4D900271480 /* Update-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Update-Info.plist"; sourceTree = ""; }; + 5BC0AAC927F58472002D33E9 /* pkgPreInstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = pkgPreInstall.sh; sourceTree = ""; }; + 5BC0AACA27F58472002D33E9 /* pkgPostInstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = pkgPostInstall.sh; sourceTree = ""; }; 5BC2652127E04B7B00700291 /* uninstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = uninstall.sh; sourceTree = ""; }; 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 = ""; }; 5BD05BB827B2A429004C4F1D /* vChewingPhraseEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vChewingPhraseEditor.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -714,6 +716,8 @@ D4F0BBDE279AF1AF0071253C /* ArchiveUtil.swift */, 6ACA41F215FC1D9000935EF6 /* Installer-Info.plist */, 6ACA41F315FC1D9000935EF6 /* Installer-Prefix.pch */, + 5BC0AACA27F58472002D33E9 /* pkgPostInstall.sh */, + 5BC0AAC927F58472002D33E9 /* pkgPreInstall.sh */, 6A93050C279877FF00D370DA /* vChewingInstaller-Bridging-Header.h */, D4F0BBE2279B08900071253C /* Chronosphere.h */, D4F0BBE3279B08900071253C /* Chronosphere.m */, From 55cc8659ee37595a9afccb8823c0e3687b2192f9 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 14:50:55 +0800 Subject: [PATCH 03/16] PKG // Upgrade post-installation script to fix wrong installations. --- Installer/pkgPostInstall.sh | 18 +++++++++++++++++- Installer/pkgPreInstall.sh | 15 ++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/Installer/pkgPostInstall.sh b/Installer/pkgPostInstall.sh index 9805eb5f..babb41e8 100644 --- a/Installer/pkgPostInstall.sh +++ b/Installer/pkgPostInstall.sh @@ -1,2 +1,18 @@ #!/bin/sh -~/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing install --all +loggedInUser=$(stat -f%Su /dev/console) + +# First, copy the wrongfully installed contents to the right location: +cp -r /Library/Input\ Methods/vChewing.app /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/ || true +cp -r /Library/Keyboard\ Layouts/vChewing* /Users/$(stat -f%Su /dev/console)/Library/Keyboard\ Layouts/ || true +chown "$loggedInUser" /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app || true +chown "$loggedInUser" /Users/$(stat -f%Su /dev/console)/Library/Keyboard\ Layouts/vChewing* || true + +sleep 1 + +# Second, clean the wrongfully installed contents: +rm -rf /Library/Input\ Methods/vChewing.app || true +rm -rf /Library/Keyboard\ Layouts/vChewing* || true +sleep 1 + +# Finally, register the input method: +/Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing install --all || true diff --git a/Installer/pkgPreInstall.sh b/Installer/pkgPreInstall.sh index 82d041b5..fc3cb9a6 100644 --- a/Installer/pkgPreInstall.sh +++ b/Installer/pkgPreInstall.sh @@ -1,5 +1,18 @@ #!/bin/sh -killall vChewing +loggedInUser=$(stat -f%Su /dev/console) + +killall vChewing || true + +if [ "$loggedInUser" = root ]; then + rm -rf /Library/Input\ Methods/vChewing.app || true + rm -rf /Library/Keyboard\ Layouts/vChewingKeyLayout.bundle || true + rm -rf /Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout || true + rm -rf /Library/Keyboard\ Layouts/vChewing\ ETen.keylayout || true + rm -rf /Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout || true + rm -rf /Library/Keyboard\ Layouts/vChewing\ IBM.keylayout || true + rm -rf /Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout || true +fi + rm -rf ~/Library/Input\ Methods/vChewing.app rm -rf ~/Library/Keyboard\ Layouts/vChewingKeyLayout.bundle rm -rf ~/Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout From 8b8a223a574d27662bc2bcf94ec4b5accfc47387 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 17:50:55 +0800 Subject: [PATCH 04/16] Pkg // Update installation instructions. --- Installer/pkgTextWarning-CHS.txt | 6 +++++- Installer/pkgTextWarning-CHT.txt | 6 +++++- Installer/pkgTextWarning-ENU.txt | 4 ++++ Installer/pkgTextWarning-JPN.txt | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Installer/pkgTextWarning-CHS.txt b/Installer/pkgTextWarning-CHS.txt index 673bf003..d176751f 100644 --- a/Installer/pkgTextWarning-CHS.txt +++ b/Installer/pkgTextWarning-CHS.txt @@ -1,5 +1,9 @@ 注意事项: -一、macOS 10.x-11.x 系统有 Bug、令该安装程式无法自动将安装目标设为当前使用者资料夹。如果您在 macOS 12 Monterey 之前的系统安装该输入法的话,请务必「手动」将安装目的地设为当前使用者资料夹。否则,当您今后(在升级系统之后)升级输入法的时候,可能会出现各种混乱情况。 +一、macOS 10.x-11.x 系统有 Bug、令该安装程式无法自动将安装目标设为当前使用者资料夹。如果您在 macOS 12 Monterey 之前的系统安装该输入法的话,请务必「手动」将安装目的地设为当前使用者资料夹。否则,当您今后(在升级系统之后)升级输入法的时候,可能会出现各种混乱情况。下述终端指令可修复这类混乱情况: + +sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall + +该指令会将任何安装到错误位置的档案全部删除。 二、安装完毕之后,如果输入法无法正常使用的话,请重新登入即可。 diff --git a/Installer/pkgTextWarning-CHT.txt b/Installer/pkgTextWarning-CHT.txt index 25fd8f4f..bd125749 100644 --- a/Installer/pkgTextWarning-CHT.txt +++ b/Installer/pkgTextWarning-CHT.txt @@ -1,5 +1,9 @@ 注意事項: -一、macOS 10.x-11.x 系統有 Bug、令該安裝程式無法自動將安裝目標設為當前使用者資料夾。如果您在 macOS 12 Monterey 之前的系統安裝該輸入法的話,請務必「手動」將安裝目的地設為當前使用者資料夾。否則,當您今後(在升級系統之後)升級輸入法的時候,可能會出現各種混亂情況。 +一、macOS 10.x-11.x 系統有 Bug、令該安裝程式無法自動將安裝目標設為當前使用者資料夾。如果您在 macOS 12 Monterey 之前的系統安裝該輸入法的話,請務必「手動」將安裝目的地設為當前使用者資料夾。否則,當您今後(在升級系統之後)升級輸入法的時候,可能會出現各種混亂情況。下述終端指令可修復這類混亂情況: + +sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall + +該指令會將任何安裝到錯誤位置的檔案全部刪除。 二、安裝完畢之後,如果輸入法無法正常使用的話,請重新登入即可。 diff --git a/Installer/pkgTextWarning-ENU.txt b/Installer/pkgTextWarning-ENU.txt index 99601c11..a45e3f2f 100644 --- a/Installer/pkgTextWarning-ENU.txt +++ b/Installer/pkgTextWarning-ENU.txt @@ -2,4 +2,8 @@ Notice: Due to a bug in macOS 10.x and 11.x, if you are trying to install this input method on macOS releases earlier than macOS 12 Monterey, PLEASE manually choose the install target to the user folder. Otherwise, there will be problems when you are trying to install this input method to later versions when your OS gets upgraded to macOS 12 Monterey or later. +The following terminal command can solve such probelems by removing all incorrectly-installed files: + +sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall + Also, feel free to logout and re-login if the input method doesn't work after installation. diff --git a/Installer/pkgTextWarning-JPN.txt b/Installer/pkgTextWarning-JPN.txt index 51689bc3..db175173 100644 --- a/Installer/pkgTextWarning-JPN.txt +++ b/Installer/pkgTextWarning-JPN.txt @@ -1,6 +1,10 @@ ご注意: -macOS 12 Monterey 以前の OS(macOS 10.x-11.x)のバグのため、macOS 10.x-11.x でインストールする場合、この入力アプリ必ずご自分でユーザーフォルダをインストール先と設定してください。然もないと、いずれ macOS 12 にアップデートし、この入力アプリのもっと新しいバージョンをインストールする時に、予測できない支障が生ずる恐れがあります。 +macOS 12 Monterey 以前の OS(macOS 10.x-11.x)のバグのため、macOS 10.x-11.x でインストールする場合、この入力アプリ必ずご自分でユーザーフォルダをインストール先と設定してください。然もないと、いずれ macOS 12 にアップデートし、この入力アプリのもっと新しいバージョンをインストールする時に、予測できない支障が生ずる恐れがあります。下記のターミナル指令を実行すれば、この様な支障を解決することができます: + +sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall + +これで、間違ったところへ実装したファイルだけは消されます。 そして、インストール直後、入力アプリがうまく使えない場合、再ログインすれば済ませることです。 From 7b9d8242875211a86b81ffa71d60390f1237ddb9 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 17:52:29 +0800 Subject: [PATCH 05/16] AboutWindows // Update disclaimer statements. --- Installer/Resources/Base.lproj/MainMenu.xib | 2 +- Installer/Resources/en.lproj/MainMenu.strings | 4 ++-- Installer/Resources/ja.lproj/MainMenu.strings | 4 ++-- Installer/Resources/zh-Hans.lproj/MainMenu.strings | 4 ++-- Installer/Resources/zh-Hant.lproj/MainMenu.strings | 4 ++-- Source/WindowNIBs/Base.lproj/frmAboutWindow.xib | 2 +- Source/WindowNIBs/en.lproj/frmAboutWindow.strings | 4 ++-- Source/WindowNIBs/ja.lproj/frmAboutWindow.strings | 4 ++-- Source/WindowNIBs/zh-Hans.lproj/frmAboutWindow.strings | 4 ++-- Source/WindowNIBs/zh-Hant.lproj/frmAboutWindow.strings | 4 ++-- UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib | 2 +- UserPhraseEditor/Resources/en.lproj/frmAboutWindow.strings | 4 ++-- UserPhraseEditor/Resources/ja.lproj/frmAboutWindow.strings | 4 ++-- .../Resources/zh-Hans.lproj/frmAboutWindow.strings | 4 ++-- .../Resources/zh-Hant.lproj/frmAboutWindow.strings | 4 ++-- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Installer/Resources/Base.lproj/MainMenu.xib b/Installer/Resources/Base.lproj/MainMenu.xib index b0282031..8ad40b81 100644 --- a/Installer/Resources/Base.lproj/MainMenu.xib +++ b/Installer/Resources/Base.lproj/MainMenu.xib @@ -177,7 +177,7 @@ vChewing macOS Development: Shiki Suen, Hiraku Wang, etc.
vChewing Phrase Data - DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database. + DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database. diff --git a/Installer/Resources/en.lproj/MainMenu.strings b/Installer/Resources/en.lproj/MainMenu.strings index c94af990..8c874b35 100644 --- a/Installer/Resources/en.lproj/MainMenu.strings +++ b/Installer/Resources/en.lproj/MainMenu.strings @@ -50,8 +50,8 @@ /* Class = "NSTextFieldCell"; title = "version_placeholder"; ObjectID = "JRP-At-H9q"; */ // "JRP-At-H9q.title" = "version_placeholder"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ -"Q9M-ni-kUM.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ +"Q9M-ni-kUM.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; /* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */ "QYf-Nf-hoi.title" = "Derived from OpenVanilla McBopopmofo Project."; diff --git a/Installer/Resources/ja.lproj/MainMenu.strings b/Installer/Resources/ja.lproj/MainMenu.strings index 03c967d2..9ac68c7b 100644 --- a/Installer/Resources/ja.lproj/MainMenu.strings +++ b/Installer/Resources/ja.lproj/MainMenu.strings @@ -50,8 +50,8 @@ /* Class = "NSTextFieldCell"; title = "version_placeholder"; ObjectID = "JRP-At-H9q"; */ "JRP-At-H9q.title" = "version_placeholder"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ -"Q9M-ni-kUM.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データから削除済みである。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ +"Q9M-ni-kUM.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データに不収録。"; /* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */ "QYf-Nf-hoi.title" = "OpenVanilla 小麦注音プロジェクトから派生。"; diff --git a/Installer/Resources/zh-Hans.lproj/MainMenu.strings b/Installer/Resources/zh-Hans.lproj/MainMenu.strings index bbee8893..a1f23917 100644 --- a/Installer/Resources/zh-Hans.lproj/MainMenu.strings +++ b/Installer/Resources/zh-Hans.lproj/MainMenu.strings @@ -50,8 +50,8 @@ /* Class = "NSTextFieldCell"; title = "version_placeholder"; ObjectID = "JRP-At-H9q"; */ // "JRP-At-H9q.title" = "version_placeholder"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ -"Q9M-ni-kUM.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库已清除任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ +"Q9M-ni-kUM.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库不包含任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; /* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */ "QYf-Nf-hoi.title" = "该专案由 OpenVanilla 小麦注音专案衍生而来。"; diff --git a/Installer/Resources/zh-Hant.lproj/MainMenu.strings b/Installer/Resources/zh-Hant.lproj/MainMenu.strings index 7e11c4a0..2a399d2f 100644 --- a/Installer/Resources/zh-Hant.lproj/MainMenu.strings +++ b/Installer/Resources/zh-Hant.lproj/MainMenu.strings @@ -50,8 +50,8 @@ /* Class = "NSTextFieldCell"; title = "version_placeholder"; ObjectID = "JRP-At-H9q"; */ // "JRP-At-H9q.title" = "version_placeholder"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ -"Q9M-ni-kUM.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫已清除任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "Q9M-ni-kUM"; */ +"Q9M-ni-kUM.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫不包含任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; /* Class = "NSTextFieldCell"; title = "Derived from OpenVanilla McBopopmofo Project."; ObjectID = "QYf-Nf-hoi"; */ "QYf-Nf-hoi.title" = "該專案由 OpenVanilla 小麥注音專案衍生而來。"; diff --git a/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib b/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib index 33c00d01..ed7cce75 100644 --- a/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmAboutWindow.xib @@ -82,7 +82,7 @@ vChewing Phrase Database Maintained by Shiki Suen. - DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database. + DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database. diff --git a/Source/WindowNIBs/en.lproj/frmAboutWindow.strings b/Source/WindowNIBs/en.lproj/frmAboutWindow.strings index 2794c3c6..31b68b2f 100644 --- a/Source/WindowNIBs/en.lproj/frmAboutWindow.strings +++ b/Source/WindowNIBs/en.lproj/frmAboutWindow.strings @@ -17,8 +17,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing for macOS"; ObjectID = "lblAppTitle"; */ "lblAppTitle.title" = "vChewing for macOS"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; /* Class = "NSTextFieldCell"; title = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; ObjectID = "lblCopyright"; */ // "lblCopyright.title" = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; diff --git a/Source/WindowNIBs/ja.lproj/frmAboutWindow.strings b/Source/WindowNIBs/ja.lproj/frmAboutWindow.strings index 534e0993..c1cb4c90 100644 --- a/Source/WindowNIBs/ja.lproj/frmAboutWindow.strings +++ b/Source/WindowNIBs/ja.lproj/frmAboutWindow.strings @@ -17,8 +17,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing for macOS"; ObjectID = "lblAppTitle"; */ "lblAppTitle.title" = "vChewing for macOS"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データから削除済みである。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データに不収録。"; /* Class = "NSTextFieldCell"; title = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; ObjectID = "lblCopyright"; */ // "lblCopyright.title" = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; diff --git a/Source/WindowNIBs/zh-Hans.lproj/frmAboutWindow.strings b/Source/WindowNIBs/zh-Hans.lproj/frmAboutWindow.strings index 0529c644..c8a65f61 100644 --- a/Source/WindowNIBs/zh-Hans.lproj/frmAboutWindow.strings +++ b/Source/WindowNIBs/zh-Hans.lproj/frmAboutWindow.strings @@ -17,8 +17,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing for macOS"; ObjectID = "lblAppTitle"; */ "lblAppTitle.title" = "vChewing for macOS"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库已清除任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库不包含任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; /* Class = "NSTextFieldCell"; title = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; ObjectID = "lblCopyright"; */ // "lblCopyright.title" = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; diff --git a/Source/WindowNIBs/zh-Hant.lproj/frmAboutWindow.strings b/Source/WindowNIBs/zh-Hant.lproj/frmAboutWindow.strings index 665ae1ba..d0f88890 100644 --- a/Source/WindowNIBs/zh-Hant.lproj/frmAboutWindow.strings +++ b/Source/WindowNIBs/zh-Hant.lproj/frmAboutWindow.strings @@ -17,8 +17,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing for macOS"; ObjectID = "lblAppTitle"; */ "lblAppTitle.title" = "vChewing for macOS"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫已清除任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫不包含任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; /* Class = "NSTextFieldCell"; title = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; ObjectID = "lblCopyright"; */ // "lblCopyright.title" = "© 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project."; diff --git a/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib b/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib index bb45461e..19a706ea 100644 --- a/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib +++ b/UserPhraseEditor/Resources/Base.lproj/frmAboutWindow.xib @@ -81,7 +81,7 @@ vChewing Phrase Database Maintained by Shiki Suen. - DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database. + DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database. diff --git a/UserPhraseEditor/Resources/en.lproj/frmAboutWindow.strings b/UserPhraseEditor/Resources/en.lproj/frmAboutWindow.strings index 4447f0fe..b99c9b11 100644 --- a/UserPhraseEditor/Resources/en.lproj/frmAboutWindow.strings +++ b/UserPhraseEditor/Resources/en.lproj/frmAboutWindow.strings @@ -11,8 +11,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing Phrase Editor developed by Shiki Suen.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "lblCredits"; */ "lblCredits.title" = "vChewing Phrase Editor developed by Shiki Suen.\nvChewing Phrase Database Maintained by Shiki Suen."; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; /* Class = "NSTextFieldCell"; title = "MIT-NTL License:"; ObjectID = "lblLicense"; */ "lblLicense.title" = "MIT-NTL License:"; diff --git a/UserPhraseEditor/Resources/ja.lproj/frmAboutWindow.strings b/UserPhraseEditor/Resources/ja.lproj/frmAboutWindow.strings index d6a28f82..eecfe7a2 100644 --- a/UserPhraseEditor/Resources/ja.lproj/frmAboutWindow.strings +++ b/UserPhraseEditor/Resources/ja.lproj/frmAboutWindow.strings @@ -11,8 +11,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing Phrase Editor developed by Shiki Suen.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "lblCredits"; */ "lblCredits.title" = "威注音辞書データ編集アプリ開発:Shiki Suen。\n威注音語彙データの維持:Shiki Suen。"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データから削除済みである。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データに不収録。"; /* Class = "NSTextFieldCell"; title = "MIT-NTL License:"; ObjectID = "lblLicense"; */ "lblLicense.title" = "MIT商標不許可ライセンス (MIT-NTL License):"; diff --git a/UserPhraseEditor/Resources/zh-Hans.lproj/frmAboutWindow.strings b/UserPhraseEditor/Resources/zh-Hans.lproj/frmAboutWindow.strings index f0d9c722..d39ffa46 100644 --- a/UserPhraseEditor/Resources/zh-Hans.lproj/frmAboutWindow.strings +++ b/UserPhraseEditor/Resources/zh-Hans.lproj/frmAboutWindow.strings @@ -11,8 +11,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing Phrase Editor developed by Shiki Suen.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "lblCredits"; */ "lblCredits.title" = "威注音语汇编辑器研发:Shiki Suen。\n威注音词库维护:Shiki Suen。"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库已清除任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库不包含任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。"; /* Class = "NSTextFieldCell"; title = "MIT-NTL License:"; ObjectID = "lblLicense"; */ "lblLicense.title" = "麻理去商标授权合约 (MIT-NTL License):"; diff --git a/UserPhraseEditor/Resources/zh-Hant.lproj/frmAboutWindow.strings b/UserPhraseEditor/Resources/zh-Hant.lproj/frmAboutWindow.strings index be411a6a..ee36f51a 100644 --- a/UserPhraseEditor/Resources/zh-Hant.lproj/frmAboutWindow.strings +++ b/UserPhraseEditor/Resources/zh-Hant.lproj/frmAboutWindow.strings @@ -11,8 +11,8 @@ /* Class = "NSTextFieldCell"; title = "vChewing Phrase Editor developed by Shiki Suen.\nvChewing Phrase Database Maintained by Shiki Suen."; ObjectID = "lblCredits"; */ "lblCredits.title" = "威注音語彙編輯器研發:Shiki Suen。\n威注音詞庫維護:Shiki Suen。"; -/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, have been removed from vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ -"lblDisclaimer.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫已清除任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; +/* Class = "NSTextFieldCell"; title = "DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database."; ObjectID = "lblDisclaimer"; */ +"lblDisclaimer.title" = "免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫不包含任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。"; /* Class = "NSTextFieldCell"; title = "MIT-NTL License:"; ObjectID = "lblLicense"; */ "lblLicense.title" = "麻理去商標授權合約 (MIT-NTL License):"; From 710db071f8970ba7abd369b75232afb526aa00a2 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 17:53:54 +0800 Subject: [PATCH 06/16] LICENSE // Add disclaimer to the top of the file. --- LICENSE-CHS.txt | 2 ++ LICENSE-CHT.txt | 2 ++ LICENSE-JPN.txt | 2 ++ LICENSE.txt | 2 ++ 4 files changed, 8 insertions(+) diff --git a/LICENSE-CHS.txt b/LICENSE-CHS.txt index 2c8380e6..4cb6a2b5 100644 --- a/LICENSE-CHS.txt +++ b/LICENSE-CHS.txt @@ -1,3 +1,5 @@ +免责声明:威注音专案对小麦注音官方专案内赠的小麦注音原版词库内容不负任何责任。威注音输入法专用的威注音官方词库不包含任何「会在法理上妨碍威注音在全球传播」的「与地缘政治及政治意识形态有关的」内容。威注音专案与 OpenVanilla 专案之间无合作关系、无隶属关系。 + vChewing macOS: MIT-NTL License 麻理(去商标)授权合约 © 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project. diff --git a/LICENSE-CHT.txt b/LICENSE-CHT.txt index 518d06f8..c729ba13 100644 --- a/LICENSE-CHT.txt +++ b/LICENSE-CHT.txt @@ -1,3 +1,5 @@ +免責聲明:威注音專案對小麥注音官方專案內贈的小麥注音原版詞庫內容不負任何責任。威注音輸入法專用的威注音官方詞庫不包含任何「會在法理上妨礙威注音在全球傳播」的「與地緣政治及政治意識形態有關的」內容。威註音專案與 OpenVanilla 專案之間無合作關係、無隸屬關係。 + vChewing macOS: MIT-NTL License 麻理(去商標)授權合約 © 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project. diff --git a/LICENSE-JPN.txt b/LICENSE-JPN.txt index 28ecbc4c..bdfc2fb4 100644 --- a/LICENSE-JPN.txt +++ b/LICENSE-JPN.txt @@ -1,3 +1,5 @@ +免責事項:vChewing Project は、OpenVanilla と協力関係や提携関係にあるわけではなく、OpenVanilla が小麦注音プロジェクトに同梱した辞書データについて、vChewing Project は一切責任負い兼ねる。特定な地政学的・観念形態的な内容は、vChewing アプリの世界的な普及に妨害する恐れがあるため、vChewing 公式辞書データに不収録。 + vChewing macOS: MIT商標不許可ライセンス (MIT-NTL License) © 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project. diff --git a/LICENSE.txt b/LICENSE.txt index 319b514d..071de4ab 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,3 +1,5 @@ +DISCLAIMER: The vChewing project, having no relationship of cooperation or affiliation with the OpenVanilla project, is not responsible for the phrase database shipped in the original McBopomofo project. Certain geopolitical and ideological contents, which are potentially harmful to the global spread of this software, are not included in vChewing official phrase database. + vChewing macOS: MIT-NTL License © 2011-2022 OpenVanilla Project & © 2021-2022 vChewing Project. From 634bcf1eb18635a49ee207a827fd63b4b4c700c5 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 18:45:30 +0800 Subject: [PATCH 07/16] i18n // A forgotten Base Localizable String Fix. --- Source/Resources/Base.lproj/Localizable.strings | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index b90b9b8e..438017a6 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"; +"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. From a07709fd4fdc6f910a4a841c404ef9ad93af07e7 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 18:59:29 +0800 Subject: [PATCH 08/16] i18n // String updates for the Uninstallation function. --- Source/Resources/Base.lproj/Localizable.strings | 3 +++ Source/Resources/en.lproj/Localizable.strings | 3 +++ Source/Resources/ja.lproj/Localizable.strings | 3 +++ Source/Resources/zh-Hans.lproj/Localizable.strings | 3 +++ Source/Resources/zh-Hant.lproj/Localizable.strings | 3 +++ 5 files changed, 15 insertions(+) diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 438017a6..22739e01 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -1,5 +1,8 @@ "About vChewing…" = "About vChewing…"; "vChewing Preferences…" = "vChewing Preferences…"; +"Uninstallation" = "Uninstallation"; +"Uninstall vChewing…" = "Uninstall vChewing…"; +"This will remove vChewing Input Method from this user account, requiring your confirmation." = "This will remove vChewing Input Method from this user account, requiring your confirmation."; "Check Later" = "Check Later"; "Check for Updates…" = "Check for Updates…"; "Check for Update Completed" = "Check for Update Completed"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 438017a6..22739e01 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -1,5 +1,8 @@ "About vChewing…" = "About vChewing…"; "vChewing Preferences…" = "vChewing Preferences…"; +"Uninstallation" = "Uninstallation"; +"Uninstall vChewing…" = "Uninstall vChewing…"; +"This will remove vChewing Input Method from this user account, requiring your confirmation." = "This will remove vChewing Input Method from this user account, requiring your confirmation."; "Check Later" = "Check Later"; "Check for Updates…" = "Check for Updates…"; "Check for Update Completed" = "Check for Update Completed"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 706b3299..65715b6f 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -1,5 +1,8 @@ "About vChewing…" = "威注音について…"; "vChewing Preferences…" = "入力機能設定…"; +"Uninstallation" = "入力アプリの卸除(おろしのぞき)"; +"Uninstall vChewing…" = "入力アプリを卸除く…"; +"This will remove vChewing Input Method from this user account, requiring your confirmation." = "これにて威注音入力アプリをこのアカウントから卸除しますが、宜しいですか。"; "Check Later" = "後でやる"; "Check for Updates…" = "更新通知を受く…"; "Check for Update Completed" = "更新通知受信完了"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 057af145..df5b4d25 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -1,5 +1,8 @@ "About vChewing…" = "关于威注音…"; "vChewing Preferences…" = "威注音偏好设定…"; +"Uninstallation" = "卸除输入法"; +"Uninstall vChewing…" = "卸除威注音…"; +"This will remove vChewing Input Method from this user account, requiring your confirmation." = "此举会将威注音自当前系统使用者帐户卸除。请确认。"; "Check Later" = "晚点再通知我"; "Check for Updates…" = "检查是否有新版…"; "Check for Update Completed" = "新版检查完毕"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 0b529ba2..94998123 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -1,5 +1,8 @@ "About vChewing…" = "關於威注音…"; "vChewing Preferences…" = "威注音偏好設定…"; +"Uninstallation" = "卸除輸入法"; +"Uninstall vChewing…" = "卸除威注音…"; +"This will remove vChewing Input Method from this user account, requiring your confirmation." = "此舉會將威注音自當前系統使用者帳戶卸除。請確認。"; "Check Later" = "晚點再通知我"; "Check for Updates…" = "檢查是否有新版…"; "Check for Update Completed" = "新版檢查完畢"; From e4f907b37dbb4bd70edd87fdad98649c5e82ff7f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 18:39:29 +0800 Subject: [PATCH 09/16] AppDelegate // Define alert types. --- Source/Modules/AppDelegate.swift | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index b8bcf8df..e9dc35c9 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -162,6 +162,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega private var checkTask: URLSessionTask? private var updateNextStepURL: URL? private var fsStreamHelper = FSEventStreamHelper(path: mgrLangModel.dataFolderPath(isDefaultFolder: false), queue: DispatchQueue(label: "vChewing User Phrases")) + private var currentAlertType: String = "" // 補上 dealloc deinit { @@ -236,7 +237,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega let nextUpdateDate = Date(timeInterval: kNextCheckInterval, since: Date()) UserDefaults.standard.set(nextUpdateDate, forKey: kNextUpdateCheckDateKey) - checkTask = VersionUpdateApi.check(forced: forced) { result in + checkTask = VersionUpdateApi.check(forced: forced) { [self] result in defer { self.checkTask = nil } @@ -252,6 +253,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega report.remoteVersion, report.versionDescription) IME.prtDebugIntel("vChewingDebug: \(content)") + self.currentAlertType = "Update" ctlNonModalAlertWindow.shared.show(title: NSLocalizedString("New Version Available", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("Visit Website", comment: ""), cancelButtonTitle: NSLocalizedString("Not Now", comment: ""), cancelAsDefault: false, delegate: self) NSApp.setActivationPolicy(.accessory) case .noNeedToUpdate, .ignored: @@ -264,6 +266,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega let content = String(format: NSLocalizedString("There may be no internet connection or the server failed to respond.\n\nError message: %@", comment: ""), message) let buttonTitle = NSLocalizedString("Dismiss", comment: "") IME.prtDebugIntel("vChewingDebug: \(content)") + self.currentAlertType = "Update" ctlNonModalAlertWindow.shared.show(title: title, content: content, confirmButtonTitle: buttonTitle, cancelButtonTitle: nil, cancelAsDefault: false, delegate: nil) NSApp.setActivationPolicy(.accessory) default: @@ -274,14 +277,24 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega } func ctlNonModalAlertWindowDidConfirm(_ controller: ctlNonModalAlertWindow) { - if let updateNextStepURL = updateNextStepURL { - NSWorkspace.shared.open(updateNextStepURL) + switch self.currentAlertType { + case "Update": + if let updateNextStepURL = self.updateNextStepURL { + NSWorkspace.shared.open(updateNextStepURL) + } + self.updateNextStepURL = nil + default: + break } - updateNextStepURL = nil } func ctlNonModalAlertWindowDidCancel(_ controller: ctlNonModalAlertWindow) { - updateNextStepURL = nil + switch self.currentAlertType { + case "Update": + self.updateNextStepURL = nil + default: + break + } } // New About Window From bcd83c76c09678709d522d8391c8dfd51da8d453 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 18:59:48 +0800 Subject: [PATCH 10/16] AppDelegate // Implement the Uninstallation feature. --- Source/Modules/AppDelegate.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/Modules/AppDelegate.swift b/Source/Modules/AppDelegate.swift index e9dc35c9..7d69bd11 100644 --- a/Source/Modules/AppDelegate.swift +++ b/Source/Modules/AppDelegate.swift @@ -276,8 +276,18 @@ class AppDelegate: NSObject, NSApplicationDelegate, ctlNonModalAlertWindowDelega } } + func selfUninstall() { + self.currentAlertType = "Uninstall" + let content = String(format: NSLocalizedString("This will remove vChewing Input Method from this user account, requiring your confirmation.", comment: "")) + ctlNonModalAlertWindow.shared.show(title: NSLocalizedString("Uninstallation", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("OK", comment: ""), cancelButtonTitle: NSLocalizedString("Not Now", comment: ""), cancelAsDefault: false, delegate: self) + NSApp.setActivationPolicy(.accessory) + } + func ctlNonModalAlertWindowDidConfirm(_ controller: ctlNonModalAlertWindow) { switch self.currentAlertType { + case "Uninstall": + NSWorkspace.shared.openFile(mgrLangModel.dataFolderPath(isDefaultFolder: true), withApplication: "Finder") + IME.uninstall(isSudo: false, selfKill: true) case "Update": if let updateNextStepURL = self.updateNextStepURL { NSWorkspace.shared.open(updateNextStepURL) From 6e4f708462546cdac96fd62e2beb29c5a6fbe408 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 19:00:00 +0800 Subject: [PATCH 11/16] ctlIME // Implement the Uninstallation feature. --- Source/Modules/IMEModules/ctlInputMethod.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 9dea56d4..9500a800 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -136,9 +136,10 @@ class ctlInputMethod: IMKInputController { if !optionKeyPressed { menu.addItem(withTitle: NSLocalizedString("Check for Updates…", comment: ""), action: #selector(checkForUpdate(_:)), keyEquivalent: "") } + menu.addItem(withTitle: NSLocalizedString("Reboot vChewing…", comment: ""), action: #selector(selfTerminate(_:)), keyEquivalent: "") menu.addItem(withTitle: NSLocalizedString("About vChewing…", comment: ""), action: #selector(showAbout(_:)), keyEquivalent: "") if optionKeyPressed { - menu.addItem(withTitle: NSLocalizedString("Reboot vChewing…", comment: ""), action: #selector(selfTerminate(_:)), keyEquivalent: "") + menu.addItem(withTitle: NSLocalizedString("Uninstall vChewing…", comment: ""), action: #selector(selfUninstall(_:)), keyEquivalent: "") } // NSMenu 會阻止任何 modified key 相關的訊號傳回輸入法,所以咱們在此重設鍵盤佈局 @@ -273,6 +274,10 @@ class ctlInputMethod: IMKInputController { NotifierController.notify(message: String(format: "%@%@%@", NSLocalizedString("Use Phrase Replacement", comment: ""), "\n", mgrPrefs.togglePhraseReplacementEnabled() ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: ""))) } + @objc func selfUninstall(_ sender: Any?) { + (NSApp.delegate as? AppDelegate)?.selfUninstall() + } + @objc func selfTerminate(_ sender: Any?) { NSApp.terminate(nil) } From f621d4ca7551413b8ad021e38ced98100169fc05 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 19:17:54 +0800 Subject: [PATCH 12/16] NonModalAlert // Enable Windows Aero. --- Source/WindowNIBs/Base.lproj/frmNonModalAlertWindow.xib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WindowNIBs/Base.lproj/frmNonModalAlertWindow.xib b/Source/WindowNIBs/Base.lproj/frmNonModalAlertWindow.xib index 9a161183..20368443 100644 --- a/Source/WindowNIBs/Base.lproj/frmNonModalAlertWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmNonModalAlertWindow.xib @@ -22,7 +22,7 @@ - + From da4e59a63a32e118d62648419b69838f131aaacb Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 19:30:11 +0800 Subject: [PATCH 13/16] AppInstaller // Allow clipboard shortcut keys. --- Installer/Resources/Base.lproj/MainMenu.xib | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Installer/Resources/Base.lproj/MainMenu.xib b/Installer/Resources/Base.lproj/MainMenu.xib index 8ad40b81..2a204c55 100644 --- a/Installer/Resources/Base.lproj/MainMenu.xib +++ b/Installer/Resources/Base.lproj/MainMenu.xib @@ -61,6 +61,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cb926f5e81676cee75e45da62355115275ceb126 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 31 Mar 2022 19:38:55 +0800 Subject: [PATCH 14/16] frmPrefWindow // Reset control text colors. --- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index c815e053..c6501643 100644 --- a/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -59,8 +59,8 @@ - - + + @@ -123,8 +123,8 @@ - - + + @@ -177,8 +177,8 @@ - - + + @@ -381,8 +381,8 @@ - - + + @@ -452,8 +452,8 @@ - - + + @@ -485,8 +485,8 @@ - - + +