mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add space for pinyin translation
This commit is contained in:
parent
2608d961d0
commit
eaf3267353
1 changed files with 3 additions and 3 deletions
|
|
@ -36,8 +36,8 @@ namespace Flow.Launcher.Infrastructure
|
|||
{
|
||||
if (WordsHelper.HasChinese(content))
|
||||
{
|
||||
var result = WordsHelper.GetPinyin(content, ";");
|
||||
result = GetFirstPinyinChar(result) + result.Replace(";", "");
|
||||
var result = WordsHelper.GetPinyin(content, " ");
|
||||
result = GetFirstPinyinChar(result) + result;
|
||||
_pinyinCache[content] = result;
|
||||
return result;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ namespace Flow.Launcher.Infrastructure
|
|||
|
||||
private string GetFirstPinyinChar(string content)
|
||||
{
|
||||
return string.Concat(content.Split(';').Select(x => x.First()));
|
||||
return string.Concat(content.Split(' ').Select(x => x.First()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue