I am using the package m2mtech/weblate-translation-provider
to push Symfony translations to a self-hosted Weblate instance.
When calling this command:
bin/console translation:push --domains=messages weblate -vv
I get the following error in the logs:
INFO [http_client] Request: "GET https://WEBLATE_DOMAIN/api/projects/MY_PROJECT/components/"
INFO [http_client] Response: "200 https://WEBLATE_DOMAIN/api/projects/MY_PROJECT/components/"
INFO [http_client] Request: "GET http://WEBLATE_DOMAIN/api/components/MY_PROJECT/messages/translations/"
INFO [http_client] Redirecting: "308 https://WEBLATE_DOMAIN/api/components/MY_PROJECT/messages/translations"
INFO [http_client] Response: "404 https://WEBLATE_DOMAIN/api/components/MY_PROJECT/messages/translations"
In TranslationApi.php line 66:
[Symfony\Component\Translation\Exception\ProviderException]
Unable to get weblate components translations for messages.
Why does the last URL get a 404 response? Did I set up Weblate incorrectly or am using the command line tool wrong?
CodePudding user response:
The URL is missing the trailing slash - it should be https://WEBLATE_DOMAIN/api/components/MY_PROJECT/messages/translations/
CodePudding user response:
The second request is using HTTP. You should replace it by HTTPS to prevent the broken redirect.