From 7180bb27982ef885805c5f97596a59db10944877 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 24 Feb 2023 22:59:28 +0800 Subject: [PATCH] ClientListMgr // Block the access of ComDlg32 for macOS <= 10.12. --- Source/Modules/WindowControllers/CtlClientListMgr.swift | 6 +++++- Source/Resources/Base.lproj/Localizable.strings | 1 + Source/Resources/en.lproj/Localizable.strings | 1 + Source/Resources/ja.lproj/Localizable.strings | 2 ++ Source/Resources/zh-Hans.lproj/Localizable.strings | 2 ++ Source/Resources/zh-Hant.lproj/Localizable.strings | 1 + 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Modules/WindowControllers/CtlClientListMgr.swift b/Source/Modules/WindowControllers/CtlClientListMgr.swift index 325cb987..34b6c341 100644 --- a/Source/Modules/WindowControllers/CtlClientListMgr.swift +++ b/Source/Modules/WindowControllers/CtlClientListMgr.swift @@ -108,12 +108,16 @@ extension CtlClientListMgr { alert.accessoryView = scrollview alert.beginSheetModal(for: window) { result in - switch result { + resultCheck: switch result { case .alertFirstButtonReturn, .alertSecondButtonReturn: theTextView.textContainer?.textView?.string.components(separatedBy: "\n").filter { !$0.isEmpty }.forEach { self.applyNewValue($0, highMitigation: result == .alertFirstButtonReturn) } if result == .alertFirstButtonReturn { break } + if #unavailable(macOS 10.13) { + window.callAlert(title: "Please drag the apps into the Client Manager window from Finder.".localized) + break resultCheck + } let dlgOpenPath = NSOpenPanel() dlgOpenPath.title = NSLocalizedString( "Choose the target application bundle.", comment: "" diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index a589cbf8..656efba7 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -291,6 +291,7 @@ "Override the previous reading's intonation with candidate-reset" = "Override the previous reading's intonation with candidate-reset"; "Path invalid or file access error." = "Path invalid or file access error."; "Phonetic Parser:" = "Phonetic Parser:"; +"Please drag the apps into the Client Manager window from Finder." = "Please drag the apps into the Client Manager window from Finder."; "Please reconfigure the cassette path to a valid one before enabling this mode." = "Please reconfigure the cassette path to a valid one before enabling this mode."; "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu." = "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu."; "Push the cursor in front of the phrase after selection" = "Push the cursor in front of the phrase after selection"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index a589cbf8..656efba7 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -291,6 +291,7 @@ "Override the previous reading's intonation with candidate-reset" = "Override the previous reading's intonation with candidate-reset"; "Path invalid or file access error." = "Path invalid or file access error."; "Phonetic Parser:" = "Phonetic Parser:"; +"Please drag the apps into the Client Manager window from Finder." = "Please drag the apps into the Client Manager window from Finder."; "Please reconfigure the cassette path to a valid one before enabling this mode." = "Please reconfigure the cassette path to a valid one before enabling this mode."; "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu." = "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu."; "Push the cursor in front of the phrase after selection" = "Push the cursor in front of the phrase after selection"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 1817f5d9..8cc07412 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -292,6 +292,7 @@ "Override the previous reading's intonation with candidate-reset" = "カーソルの後部の音読みの音調を上書きし、候補選択状態を戻す"; "Path invalid or file access error." = "ファイルアクセス失敗、或いはご指定したファイル位置情報は使えぬ。"; "Phonetic Parser:" = "注音配列:"; +"Please drag the apps into the Client Manager window from Finder." = "Finder からアプリをこのウィンドウに直接にドラッグしてください。"; "Please reconfigure the cassette path to a valid one before enabling this mode." = "カセットファイルを正しくご指定してから、このモードのご使用を。"; "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu." = "マウスホイールでページをご覧ください。キーに関する取扱説明のアクセスはメニューに。"; "Push the cursor in front of the phrase after selection" = "候補選択の直後、すぐカーソルを単語の向こうに推し進める"; @@ -340,3 +341,4 @@ "Vertical" = "縦型陳列"; "Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:これからの新機能テストのために作ったページですから、\nここで陳列されている諸機能は予想通り動けるだと思わないでください。"; "Yale Pinyin with Numeral Intonation" = "イェール弁音 (ローマ字+数字音調)"; +"iyh-1K-76v.title" = "言葉置換表を起用"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 8c913a0b..e0172c2f 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -291,6 +291,7 @@ "Override the previous reading's intonation with candidate-reset" = "尝试对游标正后方的字音覆写声调,且重设其选字状态"; "Path invalid or file access error." = "档案存取失败,或者路径不合规。"; "Phonetic Parser:" = "注音排列:"; +"Please drag the apps into the Client Manager window from Finder." = "请直接借由 Finder 将客体软体的 App 封包档案拽入至该客体管理视窗内。"; "Please reconfigure the cassette path to a valid one before enabling this mode." = "在启用该模式之前,请事先正确设定磁带档案路径。"; "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu." = "请利用滑鼠滚轮检视页面。也请洽输入法选单内的热键指南。"; "Push the cursor in front of the phrase after selection" = "在选字后将游标置于该字词的前方"; @@ -339,3 +340,4 @@ "Vertical" = "纵向布局"; "Warning: This page is for testing future features. \nFeatures listed here may not work as expected." = "警告:该页面仅作未来功能测试所用。\n在此列出的功能并非处于完全可用之状态。"; "Yale Pinyin with Numeral Intonation" = "耶鲁拼音+数字标调"; +"iyh-1K-76v.title" = "启用语汇置换表"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 55c52564..1a330162 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -291,6 +291,7 @@ "Override the previous reading's intonation with candidate-reset" = "嘗試對游標正後方的字音覆寫聲調,且重設其選字狀態"; "Path invalid or file access error." = "檔案存取失敗,或者路徑不合規。"; "Phonetic Parser:" = "注音排列:"; +"Please drag the apps into the Client Manager window from Finder." = "請直接藉由 Finder 將客體軟體的 App 封包檔案拽入至該客體管理視窗內。"; "Please reconfigure the cassette path to a valid one before enabling this mode." = "在啟用該模式之前,請事先正確設定磁帶檔案路徑。"; "Please use mouse wheel to scroll each page if needed. The CheatSheet is available in the IME menu." = "請利用滑鼠滾輪檢視頁面。也請洽輸入法選單內的熱鍵指南。"; "Push the cursor in front of the phrase after selection" = "在選字後將游標置於該字詞的前方";