Fix ShouldTranslate() logic

- Check settings or it won't work  as expected
This commit is contained in:
VictoriousRaptor 2025-07-13 19:01:59 +08:00
parent fdbb183064
commit ebcd7d5915

View file

@ -77,7 +77,7 @@ namespace Flow.Launcher.Infrastructure
public bool ShouldTranslate(string stringToTranslate)
{
// If a string has Chinese characters, we don't need to translate it to pinyin.
return !WordsHelper.HasChinese(stringToTranslate);
return _settings.ShouldUsePinyin && !WordsHelper.HasChinese(stringToTranslate);
}
public (string translation, TranslationMapping map) Translate(string content)