Closed jawira closed 2 months ago
What Weblate version do you use? The custom URL validator is used since Weblate 5.5 (see ec0af648c5091594422fed25493bdce5881eb5b7).
…ah, but it seems to add this validator on top of the existing one instead of replacing it.
What Weblate version do you use? The custom URL validator is used since Weblate 5.5 (see ec0af64).
I recently update to docker image weblate/weblate:5.7.0.0.
Thanks for checking this :)
Thank you for your report; the issue you have reported has just been fixed.
Thank you for your report; the issue you have reported has just been fixed.
Describe the problem
As you might know, in dockerized environments, containers can communicate between them using Docker's container name. The problem is that, currently my container's name is not accepted when I configure LibreTranslate as "Automatic Suggestion" provider.
For example, using Docker-compose I have the following hostname: http://libretranslate-libretranslate-1:5000
Sadly, Weblate is too strict about URL and considers that previous URL is not valid, I get the message Enter a valid URL..
Describe the solution you would like
It would be nice to be more flexible about URLs and accept container names as valid URL.
As far I can see some effort has already by done to add compatibility with Dockerized environments, for example there is WeblateServiceURLValidator.
https://github.com/WeblateOrg/weblate/blob/a855fe6d57ef1b16e0f09b1ab3ef87b3559fedfb/weblate/utils/validators.py#L325-L330
So it would be nice to extend this "compatibility" to "Automatic Suggestions".
Describe alternatives you have considered
No response
Screenshots
No response
Additional context
No response