Skip to content

Commit 100f753

Browse files
Fix ShouldTranslate() logic
1 parent 64f3738 commit 100f753

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher.Infrastructure/PinyinAlphabet.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ private void LoadDoublePinyinTable()
7676

7777
public bool ShouldTranslate(string stringToTranslate)
7878
{
79-
return WordsHelper.HasChinese(stringToTranslate);
79+
// If a string has Chinese characters, we don't need to translate it to pinyin.
80+
return !WordsHelper.HasChinese(stringToTranslate);
8081
}
8182

8283
public (string translation, TranslationMapping map) Translate(string content)

0 commit comments

Comments
 (0)