File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed 
Flow.Launcher.Infrastructure Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,19 @@ public bool ShouldTranslate(string stringToTranslate)
9999            { 
100100                if  ( content [ i ]  >=  0x3400  &&  content [ i ]  <=  0x9FD5 ) 
101101                { 
102-                     string  dp  =  _settings . UseDoublePinyin  ?  ToDoublePin ( resultList [ i ] )  :  resultList [ i ] ; 
103-                     map . AddNewIndex ( i ,  resultBuilder . Length ,  dp . Length  +  1 ) ; 
102+                     string  translated  =  _settings . UseDoublePinyin  ?  ToDoublePin ( resultList [ i ] )  :  resultList [ i ] ; 
104103                    if  ( previousIsChinese ) 
105104                    { 
105+                         map . AddNewIndex ( i ,  resultBuilder . Length ,  translated . Length  +  1 ) ; 
106106                        resultBuilder . Append ( ' ' ) ; 
107+                         resultBuilder . Append ( translated ) ; 
108+                     } 
109+                     else 
110+                     { 
111+                         map . AddNewIndex ( i ,  resultBuilder . Length ,  translated . Length ) ; 
112+                         resultBuilder . Append ( translated ) ; 
113+                         previousIsChinese  =  true ; 
107114                    } 
108-                     resultBuilder . Append ( dp ) ; 
109115                } 
110116                else 
111117                { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments