From 35edeaf6e0efa5992f19c3a4ed8cccf75b460d28 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 17 Feb 2023 18:43:21 +0800 Subject: [PATCH] PrefUI // Add the DevZone back with new options. --- .../Modules/UIModules/PrefUI/CtlPrefUI.swift | 2 +- .../UIModules/PrefUI/VwrPrefPaneDevZone.swift | 18 +++++++++++++++++- .../Resources/Base.lproj/Localizable.strings | 3 +++ Source/Resources/en.lproj/Localizable.strings | 3 +++ Source/Resources/ja.lproj/Localizable.strings | 3 +++ .../zh-Hans.lproj/Localizable.strings | 3 +++ .../zh-Hant.lproj/Localizable.strings | 3 +++ 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift index 0e4121bd..753e6e5d 100644 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift +++ b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift @@ -39,7 +39,7 @@ class CtlPrefUI { panes: { var result = [PreferencePaneConvertible]() PrefUITabs.allCases.forEach { neta in - if [.tabDevZone, .tabExperience].contains(neta) { return } + if [.tabExperience].contains(neta) { return } let item: PreferencePaneConvertible = SSPreferences.Pane( identifier: SSPreferences.PaneIdentifier(rawValue: neta.rawValue), title: neta.i18nTitle, toolbarIcon: neta.icon, diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift index 86749a8d..de845889 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift @@ -13,6 +13,11 @@ import SwiftUI @available(macOS 10.15, *) struct VwrPrefPaneDevZone: View { + @State private var selDisableSegmentedThickUnderlineInMarkingModeForManagedClients + = UserDefaults.standard.bool( + forKey: UserDef.kDisableSegmentedThickUnderlineInMarkingModeForManagedClients.rawValue + ) + var isMontereyOrAbove: Bool = { if #available(macOS 12.0, *) { return true @@ -31,8 +36,19 @@ struct VwrPrefPaneDevZone: View { .fixedSize(horizontal: false, vertical: true) Divider() HStack { - Text("Nothing for now.") + Text("Some previous options are moved to other tabs.".localized) + .preferenceDescription().fixedSize(horizontal: false, vertical: true) } + Toggle( + "Disable segmented thick underline in marking mode for managed clients".localized, + isOn: $selDisableSegmentedThickUnderlineInMarkingModeForManagedClients.onChange { + PrefMgr.shared.disableSegmentedThickUnderlineInMarkingModeForManagedClients = selDisableSegmentedThickUnderlineInMarkingModeForManagedClients + } + ) + Text( + "Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer.".localized + ) + .preferenceDescription().fixedSize(horizontal: false, vertical: true) } } } diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 4aee8c7a..c1d47356 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -238,6 +238,7 @@ "Directly commit lowercased letters" = "Directly commit lowercased letters"; "Directly commit uppercased letters" = "Directly commit uppercased letters"; "Disable forced conversion for cassette outputs" = "Disable forced conversion for cassette outputs"; +"Disable segmented thick underline in marking mode for managed clients" = "Disable segmented thick underline in marking mode for managed clients"; "Disassemble the previous reading, dropping its intonation" = "Disassemble the previous reading, dropping its intonation"; "Disassembling process does not work with non-phonetic reading keys." = "Disassembling process does not work with non-phonetic reading keys."; "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed." = "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed."; @@ -304,6 +305,8 @@ "Show notifications when toggling Caps Lock" = "Show notifications when toggling Caps Lock"; "Show translated strokes in composition buffer" = "Show translated strokes in composition buffer"; "Simplified Chinese" = "Simplified Chinese"; +"Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer." = "Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer."; +"Some previous options are moved to other tabs." = "Some previous options are moved to other tabs."; "Space to +revolve candidates, Shift+Space to +revolve pages" = "Space to +revolve candidates, Shift+Space to +revolve pages"; "Space to +revolve pages, Shift+Space to +revolve candidates" = "Space to +revolve pages, Shift+Space to +revolve candidates"; "Space:" = "Space:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 4aee8c7a..c1d47356 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -238,6 +238,7 @@ "Directly commit lowercased letters" = "Directly commit lowercased letters"; "Directly commit uppercased letters" = "Directly commit uppercased letters"; "Disable forced conversion for cassette outputs" = "Disable forced conversion for cassette outputs"; +"Disable segmented thick underline in marking mode for managed clients" = "Disable segmented thick underline in marking mode for managed clients"; "Disassemble the previous reading, dropping its intonation" = "Disassemble the previous reading, dropping its intonation"; "Disassembling process does not work with non-phonetic reading keys." = "Disassembling process does not work with non-phonetic reading keys."; "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed." = "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed."; @@ -304,6 +305,8 @@ "Show notifications when toggling Caps Lock" = "Show notifications when toggling Caps Lock"; "Show translated strokes in composition buffer" = "Show translated strokes in composition buffer"; "Simplified Chinese" = "Simplified Chinese"; +"Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer." = "Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer."; +"Some previous options are moved to other tabs." = "Some previous options are moved to other tabs."; "Space to +revolve candidates, Shift+Space to +revolve pages" = "Space to +revolve candidates, Shift+Space to +revolve pages"; "Space to +revolve pages, Shift+Space to +revolve candidates" = "Space to +revolve pages, Shift+Space to +revolve candidates"; "Space:" = "Space:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 0f58681f..058c8455 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -239,6 +239,7 @@ "Directly commit lowercased letters" = "ローマ字(小文字)を直接出力"; "Directly commit uppercased letters" = "ローマ字(大文字)を直接出力"; "Disable forced conversion for cassette outputs" = "カセットモードによる漢字出力の簡繁転換を行わずにする"; +"Disable segmented thick underline in marking mode for managed clients" = "管理されている客体アプリには、マーキングモードの多段式太下線の描きを禁ず"; "Disassemble the previous reading, dropping its intonation" = "カーソルの後部の音読みを解き、その音調を除く"; "Disassembling process does not work with non-phonetic reading keys." = "実の意味の音読みだけを解くことができる。"; "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed." = "セキュリティ上の懸念から、いかなるシェルスクリプトの実装も計画していません。App Sandbox の実装が無い場合には、関連する UserDefaults を容易に改ざんできることから、悪意のあるシェルスクリプトが実行される恐れがあり、従ってシステム全体に脆弱性を持つことは疑う余地がありません。威注音入力アプリの公式発行版は Sandbox 処理済みであり、そして威注音入力アプリは、このような脆弱性を持たないために、すでに(デザイン上の)安全処置済み。"; @@ -305,6 +306,8 @@ "Show notifications when toggling Caps Lock" = "Caps Lock で切り替えの時に吹出通知メッセージを"; "Show translated strokes in composition buffer" = "原始キーネームでなく、筆画を入力緩衝列で表示する"; "Simplified Chinese" = "簡体中国語"; +"Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer." = "一部の「Web UI を用いた」客体アプリには、多段式太下線の描きをうまく取り扱えぬ支障はございます。このチェックを入れると、IME から「client().setMarkedText()」を経由して、客体に「多段式太下線を書かずに」と命令することはできます。多段式太下線はマーキングモードだけで用いるデザインですが、間違くて別のモードでもそれを書いてしまう客体アプリはございます(多分 IMKTextInput の実作の問題かもしれません)。このチェックは「文脈内入力緩衝列」だけに関わります。"; +"Some previous options are moved to other tabs." = "かつてこのページに載った一部のオプションは、今は他のページへ移動しました。"; "Space to +revolve candidates, Shift+Space to +revolve pages" = "Shift+Space で次のページ、Space で次の候補文字を"; "Space to +revolve pages, Shift+Space to +revolve candidates" = "Space で次のページ、Shift+Space で次の候補文字を"; "Space:" = "Space:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 7f19071c..5840bd07 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -238,6 +238,7 @@ "Directly commit lowercased letters" = "直接递交小写字母"; "Directly commit uppercased letters" = "直接递交大写字母"; "Disable forced conversion for cassette outputs" = "对磁带模式禁用繁简转换"; +"Disable segmented thick underline in marking mode for managed clients" = "针对被管理的客体,在标记模式下禁用分段式粗型下划线"; "Disassemble the previous reading, dropping its intonation" = "析构游标正后方的字音,且剔除其声调"; "Disassembling process does not work with non-phonetic reading keys." = "析构行为仅针对组字器内「身为汉字读音」的读音索引单元有效。"; "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed." = "出于与资讯安全有关的考量,此处不提供任何与终端机脚本执行有关的功能。一款尚未经过 App Sandbox 沙箱处理的输入法,若提供了这种功能,便会带来系统层面上的资安缺陷:与该功能有关的 UserDefaults 可被任意篡改、以执行恶意脚本。威注音本身的设计使得其不会有这种资安缺陷,且官方发行的威注音有经过沙箱处理。"; @@ -304,6 +305,8 @@ "Show notifications when toggling Caps Lock" = "以 Caps Lock 切换输入法/中英模式时显示通知"; "Show translated strokes in composition buffer" = "在组字区内显示字根、而非原始键盘码"; "Simplified Chinese" = "简体中文"; +"Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer." = "部分采用 Web 前端介面设计的客体应用可能会无法正常绘制用于输入法标记模式的分段式粗型下划线。这个选项将会阻止输入法借由 client().setMarkedText() 函式向客体应用传达对粗型下划线的分段绘制请求。分段式粗型下划线仅用于输入法的标记模式,除非客体应用对 setMarkedText() 这个 IMKTextInput 协定方法的实作有问题。该选项仅影响内文组字区。"; +"Some previous options are moved to other tabs." = "该页面某些先前曾经有过的选项已被移往其它页签。"; "Space to +revolve candidates, Shift+Space to +revolve pages" = "Shift+空格键 换下一页,空格键 换选下一个候选字"; "Space to +revolve pages, Shift+Space to +revolve candidates" = "空格键 换下一页,Shift+空格键 换选下一个候选字"; "Space:" = "空格键:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 303b5d20..6429f6a8 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -238,6 +238,7 @@ "Directly commit lowercased letters" = "直接遞交小寫字母"; "Directly commit uppercased letters" = "直接遞交大寫字母"; "Disable forced conversion for cassette outputs" = "對磁帶模式禁用繁簡轉換"; +"Disable segmented thick underline in marking mode for managed clients" = "針對被管理的客體,在標記模式下禁用分段式粗型下劃線"; "Disassemble the previous reading, dropping its intonation" = "析構游標正後方的字音,且剔除其聲調"; "Disassembling process does not work with non-phonetic reading keys." = "析構行為僅針對組字器內「身為漢字讀音」的讀音索引單元有效。"; "Due to security concerns, we don't consider implementing anything related to shell script execution here. An input method doing this without implementing App Sandbox will definitely have system-wide vulnerabilities, considering that its related UserDefaults are easily tamperable to execute malicious shell scripts. vChewing is designed to be invulnerable from this kind of attack. Also, official releases of vChewing are Sandboxed." = "出於與資訊安全有關的考量,此處不提供任何與終端機腳本執行有關的功能。一款尚未經過 App Sandbox 沙箱處理的輸入法,若提供了這種功能,便會帶來系統層面上的資安缺陷:與該功能有關的 UserDefaults 可被任意篡改、以執行惡意腳本。威注音本身的設計使得其不會有這種資安缺陷,且官方發行的威注音有經過沙箱處理。"; @@ -304,6 +305,8 @@ "Show notifications when toggling Caps Lock" = "以 Caps Lock 切換輸入法/中英模式時顯示通知"; "Show translated strokes in composition buffer" = "在組字區內顯示字根、而非原始鍵盤碼"; "Simplified Chinese" = "簡體中文"; +"Some clients with web-based front UI may have issues rendering segmented thick underlines drawn by their implemented “setMarkedText()”. This option stops the input method from delivering segmented thick underlines to “client().setMarkedText()”. Note that segmented thick underlines are only used in marking mode, unless the client itself misimplements the IMKTextInput method “setMarkedText()”. This option only affects the inline composition buffer." = "部分採用 Web 前端介面設計的客體應用可能會無法正常繪製用於輸入法標記模式的分段式粗型下劃線。這個選項將會阻止輸入法藉由 client().setMarkedText() 函式向客體應用傳達對粗型下劃線的分段繪製請求。分段式粗型下劃線僅用於輸入法的標記模式,除非客體應用對 setMarkedText() 這個 IMKTextInput 協定方法的實作有問題。該選項僅影響內文組字區。"; +"Some previous options are moved to other tabs." = "該頁面某些先前曾經有過的選項已被移往其它頁籤。"; "Space to +revolve candidates, Shift+Space to +revolve pages" = "Shift+空格鍵 換下一頁,空格鍵 換選下一個候選字"; "Space to +revolve pages, Shift+Space to +revolve candidates" = "空格鍵 換下一頁,Shift+空格鍵 換選下一個候選字"; "Space:" = "空格鍵:";