This API used to work great, but around a month ago it seems that it changed and now it seems that it attempts to translate HTML tags. This makes the translated HTML unusable. Please see some examples below in translating a page of HTML from English to German…
data-sx-wiki-page
becomes Daten-sx-wiki-Page
data-wiki-href
becomes data-wiki- href
or Daten-SX-Wiki- HREF
(i.e. random whitespace added in the name, meaning the attribute is lost; seems to be guessing unrecognised words like ‘href’ are initialisms)<br data-x="">
becomes <Br-Daten -x = "">
- so the tag is no longer a <br> element at all.href="~57"
becomes href = "~" ~ "~" ~ "~" ~ "~" ~ "~" ~ "~" ~ "~" ~ " 57
(pretty crazy that one)<abbr title="married">m.</abbr>
becomes <abbr title = "verheiratet"> m. = "">
(closing tag has mostly disappeared, leaving invalid >
etc.)…and other things. It seems that the API is not parsing the source as HTML at all, and is making a best guess about how to translate the source HTML on the assumption it’s all natural language plain text. I can’t recall the API being like this when we first integrated it; so it looks like something’s changed on your end.
Can you please fix this quickly? Otherwise, we will have to try and find another translation API.
Many thanks!
Junte-se à discussão - adicione o comentário abaixo:
I have the same problem, I had to replace the <p> with @ and then replace it again