Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect translations with libretranslate, but only through wagtail-translate. #799

Closed
Hafnernuss opened this issue May 26, 2024 · 1 comment · Fixed by #803
Closed

Comments

@Hafnernuss
Copy link
Contributor

Hafnernuss commented May 26, 2024

Hi!

I've set up my own libretranslate service and tried it out. It seems to mostly work, but somehow the translation is wonky, but only if done through the wagtail-translate ui. An example (from german to english):

image

(The "Spare" in the translation is wrong. It should be "Save" or something similar, and the html markup is wrong)

If I enter it directly in my libretranslate ui, I get the following (which is correct)

<b>Save time<br/></b>by simply efficient organization 

If I do it via a normal POST request, it also works:
image

Is there any easy way to increase logging verbostiy for the requests that are being done? I suspect it has something to do with the HTML tags, because texts without them seem to work fine.

If necessary, I can provide a public link to my translate instance together with an API key.

@Hafnernuss
Copy link
Contributor Author

Hafnernuss commented May 26, 2024

It appears that in libretranslate.py, the following flag is missing:

"format": "html",

which confuses libretranslate as soon as there are html tags in the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant