Search code examples
microsoft-translator

Microsoft translator changing phrase where there are html spans


Plain english sentence is:

While in 5th direct and ready for the downshift to 4th overdrive, push the range preselection lever down.

Converts to French correctly as:

Alors que dans le 5ème direct et prêt pour le downshift à la 4ème overdrive, pousser le levier de présélection de gamme vers le bas.

However, when including html (&textType=html), the phrase doesn't have the same meaning:

While in 5th direct and ready for the downshift to <span data-id="xyz123">4th overdrive</span>, push the range preselection lever down.

Translates to:

Alors que dans le 5ème direct et prêt pour le downshift à 4e overdrive, pousser la gamme levier de présélection duvet.


Solution

  • The tags are considered an additional token in the sentence. Similar effect as punctuation, both having an effect on the translation.