mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix translation mapping logic
This commit is contained in:
parent
3c2581d7f1
commit
4fb2e3d14e
1 changed files with 9 additions and 3 deletions
|
|
@ -99,13 +99,19 @@ namespace Flow.Launcher.Infrastructure
|
|||
{
|
||||
if (content[i] >= 0x3400 && content[i] <= 0x9FD5)
|
||||
{
|
||||
string dp = _settings.UseDoublePinyin ? ToDoublePin(resultList[i]) : resultList[i];
|
||||
map.AddNewIndex(i, resultBuilder.Length, dp.Length + 1);
|
||||
string translated = _settings.UseDoublePinyin ? ToDoublePin(resultList[i]) : resultList[i];
|
||||
if (previousIsChinese)
|
||||
{
|
||||
map.AddNewIndex(i, resultBuilder.Length, translated.Length + 1);
|
||||
resultBuilder.Append(' ');
|
||||
resultBuilder.Append(translated);
|
||||
}
|
||||
else
|
||||
{
|
||||
map.AddNewIndex(i, resultBuilder.Length, translated.Length);
|
||||
resultBuilder.Append(translated);
|
||||
previousIsChinese = true;
|
||||
}
|
||||
resultBuilder.Append(dp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue