File tree 1 file changed +4
-3
lines changed
Flow.Launcher.Infrastructure
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public bool CanBeTranslated(string stringToTranslate)
47
47
{
48
48
if ( WordsHelper . HasChinese ( content ) )
49
49
{
50
- var resultList = WordsHelper . GetPinyinList ( content ) . Select ( ToDoublePin ) . ToArray ( ) ;
50
+ var resultList = WordsHelper . GetPinyinList ( content ) ;
51
51
StringBuilder resultBuilder = new StringBuilder ( ) ;
52
52
TranslationMapping map = new TranslationMapping ( ) ;
53
53
@@ -57,9 +57,10 @@ public bool CanBeTranslated(string stringToTranslate)
57
57
{
58
58
if ( content [ i ] >= 0x3400 && content [ i ] <= 0x9FD5 )
59
59
{
60
- map . AddNewIndex ( i , resultBuilder . Length , resultList [ i ] . Length + 1 ) ;
60
+ string dp = ToDoublePin ( resultList [ i ] . ToLower ( ) ) ;
61
+ map . AddNewIndex ( i , resultBuilder . Length , dp . Length + 1 ) ;
61
62
resultBuilder . Append ( ' ' ) ;
62
- resultBuilder . Append ( resultList [ i ] ) ;
63
+ resultBuilder . Append ( dp ) ;
63
64
pre = true ;
64
65
}
65
66
else
You can’t perform that action at this time.
0 commit comments