From a7e38b5b2d130be77daee84ac34af23cbb7b4302 Mon Sep 17 00:00:00 2001 From: zonble Date: Thu, 13 Jan 2022 22:00:29 +0800 Subject: [PATCH] Fine-tunes tooltip UI. --- Source/InputMethodController.mm | 3 +++ Source/en.lproj/Localizable.strings | 4 ++++ Source/zh-Hant.lproj/Localizable.strings | 3 +++ 3 files changed, 10 insertions(+) diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index dc8436ba..09439089 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -336,6 +336,8 @@ static double FindHighestScore(const vector& nodes, double epsilon) gCurrentCandidateController.delegate = nil; gCurrentCandidateController.visible = NO; [_candidates removeAllObjects]; + + [self _hideTooltip]; } - (void)setValue:(id)value forTag:(long)tag client:(id)sender @@ -411,6 +413,7 @@ static double FindHighestScore(const vector& nodes, double epsilon) [_composingBuffer setString:@""]; gCurrentCandidateController.visible = NO; [_candidates removeAllObjects]; + [self _hideTooltip]; } NS_INLINE size_t min(size_t a, size_t b) { return a < b ? a : b; } diff --git a/Source/en.lproj/Localizable.strings b/Source/en.lproj/Localizable.strings index 45b1bba8..0a96077b 100644 --- a/Source/en.lproj/Localizable.strings +++ b/Source/en.lproj/Localizable.strings @@ -64,3 +64,7 @@ "Edit Excluded Phrases" = "Edit Excluded Phrases"; "Use Half-Width Punctuations" = "Use Half-Width Punctuations"; + +"You are now selecting \"%@\". You can add a phrase with two or more characters." = "You are now selecting \"%@\". You can add a phrase with two or more characters."; + +"You are now selecting \"%@\". Press enter to add a new phrase." = "You are now selecting \"%@\". Press enter to add a new phrase."; diff --git a/Source/zh-Hant.lproj/Localizable.strings b/Source/zh-Hant.lproj/Localizable.strings index f43d189f..a91f7bc9 100644 --- a/Source/zh-Hant.lproj/Localizable.strings +++ b/Source/zh-Hant.lproj/Localizable.strings @@ -65,3 +65,6 @@ "Use Half-Width Punctuations" = "使用半型標點符號"; +"You are now selecting \"%@\". You can add a phrase with two or more characters." = "您目前選擇了 \"%@\"。請選擇兩個字以上,才能加入使用者詞彙。"; + +"You are now selecting \"%@\". Press enter to add a new phrase." = "您目前選擇了 \"%@\"。按下 Enter 就可以加入到使用者詞彙中。";