InputHandler // Show tooltip on overriding previous intonation.
This commit is contained in:
parent
6963784e59
commit
1edce13f67
|
@ -31,6 +31,7 @@ extension InputHandler {
|
|||
private func handlePhonabetComposition(input: InputSignalProtocol) -> Bool? {
|
||||
guard let delegate = delegate else { return nil }
|
||||
let existedIntonation = composer.intonation
|
||||
var overrideHappened = false
|
||||
|
||||
// 哪怕不啟用支援對「先輸入聲調、後輸入注音」的情況的支援,對 keyConsumedByReading 的處理得保留。
|
||||
// 不然的話,「敲 Space 叫出選字窗」的功能會失效。
|
||||
|
@ -65,6 +66,7 @@ extension InputHandler {
|
|||
walk() // 這裡必須 Walk 一次、來更新目前被 walk 的內容。
|
||||
composer = theComposer
|
||||
// 這裡不需要回呼 generateStateOfInputting(),因為當前輸入的聲調鍵一定是合規的、會在之後回呼 generateStateOfInputting()。
|
||||
overrideHappened = true
|
||||
} else {
|
||||
delegate.callError("4B0DD2D4:語彙庫內無「\(temporaryReadingKey)」的匹配記錄,放棄覆寫游標身後的內容。")
|
||||
return true
|
||||
|
@ -140,6 +142,11 @@ extension InputHandler {
|
|||
// 再以回呼組字狀態的方式來執行 setInlineDisplayWithCursor()。
|
||||
var inputting = generateStateOfInputting()
|
||||
inputting.textToCommit = textToCommit
|
||||
if overrideHappened {
|
||||
inputting.tooltip = "Previous intonation has been overridden.".localized
|
||||
inputting.tooltipDuration = 2
|
||||
inputting.data.tooltipColorState = .normal
|
||||
}
|
||||
delegate.switchState(inputting)
|
||||
|
||||
/// 逐字選字模式的處理。
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"vChewing" = "vChewing";
|
||||
"Previous intonation has been overridden." = "Previous intonation has been overridden.";
|
||||
"It will attempt to combine with the incoming phonabet input." = "It will attempt to combine with the incoming phonabet input.";
|
||||
"Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer." = "Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer.";
|
||||
"CHS / CHT Input Mode Switch" = "CHS / CHT Input Mode Switch";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"vChewing" = "vChewing";
|
||||
"Previous intonation has been overridden." = "Previous intonation has been overridden.";
|
||||
"It will attempt to combine with the incoming phonabet input." = "It will attempt to combine with the incoming phonabet input.";
|
||||
"Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer." = "Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer.";
|
||||
"CHS / CHT Input Mode Switch" = "CHS / CHT Input Mode Switch";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"vChewing" = "威注音入力アプリ";
|
||||
"Previous intonation has been overridden." = "後ろ側の漢字の音調を書き直しました。";
|
||||
"It will attempt to combine with the incoming phonabet input." = "この音調は次の注音入力と組み合わす。";
|
||||
"Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer." = "音調記号。ENTER で送り出す。\nSPACE で入力緩衝列に挿入。";
|
||||
"CHS / CHT Input Mode Switch" = "簡体・繁体中国語入力の切り替え";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"vChewing" = "威注音输入法";
|
||||
"Previous intonation has been overridden." = "已覆写游标身后的汉字的音调。";
|
||||
"It will attempt to combine with the incoming phonabet input." = "该声调亦会尝试与接下来输入的注音相组合。";
|
||||
"Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer." = "声调符号。敲 Enter 以递交。\n敲空格键以插入组字区。";
|
||||
"CHS / CHT Input Mode Switch" = "简体/繁体中文输入模式切换";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"vChewing" = "威注音輸入法";
|
||||
"Previous intonation has been overridden." = "已覆寫游標身後的漢字的音調。";
|
||||
"It will attempt to combine with the incoming phonabet input." = "該聲調亦會嘗試與接下來輸入的注音相組合。";
|
||||
"Intonation mark. ENTER to commit.\nSPACE to insert into composition buffer." = "聲調符號。敲 Enter 以遞交。\n敲空格鍵以插入組字區。";
|
||||
"CHS / CHT Input Mode Switch" = "簡體/繁體中文輸入模式切換";
|
||||
|
|
Loading…
Reference in New Issue