File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Flow.Launcher.Infrastructure Expand file tree Collapse file tree 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)
4747 {
4848 if ( WordsHelper . HasChinese ( content ) )
4949 {
50- var resultList = WordsHelper . GetPinyinList ( content ) . Select ( ToDoublePin ) . ToArray ( ) ;
50+ var resultList = WordsHelper . GetPinyinList ( content ) ;
5151 StringBuilder resultBuilder = new StringBuilder ( ) ;
5252 TranslationMapping map = new TranslationMapping ( ) ;
5353
@@ -57,9 +57,10 @@ public bool CanBeTranslated(string stringToTranslate)
5757 {
5858 if ( content [ i ] >= 0x3400 && content [ i ] <= 0x9FD5 )
5959 {
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 ) ;
6162 resultBuilder . Append ( ' ' ) ;
62- resultBuilder . Append ( resultList [ i ] ) ;
63+ resultBuilder . Append ( dp ) ;
6364 pre = true ;
6465 }
6566 else
You can’t perform that action at this time.
0 commit comments