我使用包m2mtech/weblate-translation-provider将Symfony翻译推送到一个自我托管的Weblate实例中。
调用此命令时:
bin/console translation:push --domains=messages weblate -vv
我在日志中得到以下错误:
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.为什么最后一个URL会得到404响应?我是设置错了Weblate,还是使用命令行工具出错了?
发布于 2022-08-22 16:22:26
第二个请求是使用HTTP。您应该用HTTPS替换它,以防止错误的重定向。
发布于 2022-08-22 14:54:41
URL缺少尾随斜杠-它应该是https://WEBLATE_DOMAIN/api/components/MY_PROJECT/messages/translations/
https://stackoverflow.com/questions/73389431
复制相似问题