Skip to content

Commit eaf3267

Browse files
committed
Add space for pinyin translation
1 parent 2608d96 commit eaf3267

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Flow.Launcher.Infrastructure/PinyinAlphabet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public string Translate(string content)
3636
{
3737
if (WordsHelper.HasChinese(content))
3838
{
39-
var result = WordsHelper.GetPinyin(content, ";");
40-
result = GetFirstPinyinChar(result) + result.Replace(";", "");
39+
var result = WordsHelper.GetPinyin(content, " ");
40+
result = GetFirstPinyinChar(result) + result;
4141
_pinyinCache[content] = result;
4242
return result;
4343
}
@@ -59,7 +59,7 @@ public string Translate(string content)
5959

6060
private string GetFirstPinyinChar(string content)
6161
{
62-
return string.Concat(content.Split(';').Select(x => x.First()));
62+
return string.Concat(content.Split(' ').Select(x => x.First()));
6363
}
6464
}
6565
}

0 commit comments

Comments
 (0)