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)
99
99
{
100
100
if ( content [ i ] >= 0x3400 && content [ i ] <= 0x9FD5 )
101
101
{
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 ] ;
104
103
if ( previousIsChinese )
105
104
{
105
+ map . AddNewIndex ( i , resultBuilder . Length , translated . Length + 1 ) ;
106
106
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 ;
107
114
}
108
- resultBuilder . Append ( dp ) ;
109
115
}
110
116
else
111
117
{
You can’t perform that action at this time.
0 commit comments