Skip to content

Commit

Permalink
Fix ShouldTranslate()
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoriousRaptor committed Jun 2, 2024
1 parent 12c4e37 commit f673000
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Flow.Launcher.Infrastructure/PinyinAlphabet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public void Initialize([NotNull] Settings settings)

public bool ShouldTranslate(string stringToTranslate)
{
return _settings.UseDoublePinyin ?
(WordsHelper.HasChinese(stringToTranslate) && stringToTranslate.Length % 2 == 0) :
WordsHelper.HasChinese(stringToTranslate);
return _settings.UseDoublePinyin ?
(!WordsHelper.HasChinese(stringToTranslate) && stringToTranslate.Length % 2 == 0) :
!WordsHelper.HasChinese(stringToTranslate);
}

public (string translation, TranslationMapping map) Translate(string content)
Expand Down

0 comments on commit f673000

Please sign in to comment.