Skip to content

Commit dd2d3c6

Browse files
committed
fixup the reduced code due to testing
1 parent 4ebfba7 commit dd2d3c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Flow.Launcher.Infrastructure/Alphabet.cs

Lines changed: 4 additions & 2 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.Replace(";", "");
4141
_pinyinCache[content] = result;
4242
return result;
4343
}
@@ -46,6 +46,8 @@ public string Translate(string content)
4646
return content;
4747
}
4848
}
49+
else
50+
return _pinyinCache[content];
4951
}
5052
else
5153
{

0 commit comments

Comments
 (0)