diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift index 3318fbd0..36e9cf05 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneExperience.swift @@ -41,6 +41,8 @@ struct suiPrefPaneExperience: View { forKey: UserDef.kSpecifyIntonationKeyBehavior.rawValue) @State private var selSpecifyShiftBackSpaceKeyBehavior = UserDefaults.standard.integer( forKey: UserDef.kSpecifyShiftBackSpaceKeyBehavior.rawValue) + @State private var selTrimUnfinishedReadingsOnCommit = UserDefaults.standard.bool( + forKey: UserDef.kTrimUnfinishedReadingsOnCommit.rawValue) private let contentMaxHeight: Double = 432 private let contentWidth: Double = { @@ -220,6 +222,12 @@ struct suiPrefPaneExperience: View { mgrPrefs.keepReadingUponCompositionError = selKeepReadingUponCompositionError } ) + Toggle( + LocalizedStringKey("Trim unfinished readings on commit"), + isOn: $selTrimUnfinishedReadingsOnCommit.onChange { + mgrPrefs.trimUnfinishedReadingsOnCommit = selTrimUnfinishedReadingsOnCommit + } + ) Toggle( LocalizedStringKey("Emulating select-candidate-per-character mode"), isOn: $selEnableSCPCTypingMode.onChange { diff --git a/Source/Resources/Base.lproj/Localizable.strings b/Source/Resources/Base.lproj/Localizable.strings index 517096d3..bce949a9 100644 --- a/Source/Resources/Base.lproj/Localizable.strings +++ b/Source/Resources/Base.lproj/Localizable.strings @@ -195,6 +195,7 @@ "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later."; "Traditional Chinese" = "Traditional Chinese"; +"Trim unfinished readings on commit" = "Trim unfinished readings on commit"; "Type them into inline composition buffer" = "Type them into inline composition buffer"; "Typing Style:" = "Typing Style:"; "UI Language:" = "UI Language:"; diff --git a/Source/Resources/en.lproj/Localizable.strings b/Source/Resources/en.lproj/Localizable.strings index 517096d3..bce949a9 100644 --- a/Source/Resources/en.lproj/Localizable.strings +++ b/Source/Resources/en.lproj/Localizable.strings @@ -195,6 +195,7 @@ "Stop farting (when typed phonetic combination is invalid, etc.)" = "Stop farting (when typed phonetic combination is invalid, etc.)"; "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later."; "Traditional Chinese" = "Traditional Chinese"; +"Trim unfinished readings on commit" = "Trim unfinished readings on commit"; "Type them into inline composition buffer" = "Type them into inline composition buffer"; "Typing Style:" = "Typing Style:"; "UI Language:" = "UI Language:"; diff --git a/Source/Resources/ja.lproj/Localizable.strings b/Source/Resources/ja.lproj/Localizable.strings index 36d9f6a1..4c00e769 100644 --- a/Source/Resources/ja.lproj/Localizable.strings +++ b/Source/Resources/ja.lproj/Localizable.strings @@ -195,6 +195,7 @@ "Stop farting (when typed phonetic combination is invalid, etc.)" = "マナーモード // 外すと入力間違った時に変な声が出る"; "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "これは Apple Bug Report #FB10978412 の臨時対策であり、macOS 12 からの macOS に効き、IMK 以外の候補陳列ウィンドウに作用する。Apple は macOS 11 からの macOS のために該当 Bug を修復すべきである。"; "Traditional Chinese" = "繁体中国語"; +"Trim unfinished readings on commit" = "送り出す緩衝列内容から未完成な音読みを除く"; "Type them into inline composition buffer" = "入力緩衝列にローマ字入力"; "Typing Style:" = "入力習慣:"; "UI Language:" = "表示用言語:"; diff --git a/Source/Resources/zh-Hans.lproj/Localizable.strings b/Source/Resources/zh-Hans.lproj/Localizable.strings index 47093c28..6d0894e8 100644 --- a/Source/Resources/zh-Hans.lproj/Localizable.strings +++ b/Source/Resources/zh-Hans.lproj/Localizable.strings @@ -195,6 +195,7 @@ "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉耻模式 // 取消勾选的话,敲错字时会有异音"; "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "该方法是 Apple Bug Report #FB10978412 的保守治疗方案,用来仅针对 macOS 12 开始的系统,且仅对非 IMK 选字窗起作用。Apple 应该对 macOS 11 开始的系统修复这个 Bug。"; "Traditional Chinese" = "繁体中文"; +"Trim unfinished readings on commit" = "在递交时清理未完成拼写的读音"; "Type them into inline composition buffer" = "直接键入内文组字区"; "Typing Style:" = "输入风格:"; "UI Language:" = "介面语言:"; diff --git a/Source/Resources/zh-Hant.lproj/Localizable.strings b/Source/Resources/zh-Hant.lproj/Localizable.strings index 6c6a677a..ae7b2c06 100644 --- a/Source/Resources/zh-Hant.lproj/Localizable.strings +++ b/Source/Resources/zh-Hant.lproj/Localizable.strings @@ -195,6 +195,7 @@ "Stop farting (when typed phonetic combination is invalid, etc.)" = "廉恥模式 // 取消勾選的話,敲錯字時會有異音"; "This only works since macOS 12 with non-IMK candidate window as an alternative wordaround of Apple Bug Report #FB10978412. Apple should patch that for macOS 11 and later." = "該方法是 Apple Bug Report #FB10978412 的保守治療方案,用來僅針對 macOS 12 開始的系統,且僅對非 IMK 選字窗起作用。Apple 應該對 macOS 11 開始的系統修復這個 Bug。"; "Traditional Chinese" = "繁體中文"; +"Trim unfinished readings on commit" = "在遞交時清理未完成拼寫的讀音"; "Type them into inline composition buffer" = "直接鍵入內文組字區"; "Typing Style:" = "輸入風格:"; "UI Language:" = "介面語言:";