I tried to set this up but in the final step (getting a translation) I fail with the following error message:
An error occurred: #<Excon::Response:0x00007f25419e6818 @data={:body=>"<!doctype html>\n<html lang=en>\n<title>405 Method Not Allowed</title>\n<h1>Method Not Allowed</h1>\n<p>The method is not allowed for the requested URL.</p>\n", :cookies=>[], :host=>"172.17.0.1", :headers=>{"Access-Control-Allow-Credentials"=>"true", "Access-Control-Allow-Headers"=>"Authorization, Content-Type", "Access-Control-Allow-Methods"=>"GET, POST", "Access-Control-Allow-Origin"=>"*", "Access-Control-Expose-Headers"=>"Authorization", "Access-Control-Max-Age"=>"1728000", "Allow"=>"HEAD, GET, OPTIONS", "Content-Length"=>"153", "Content-Type"=>"text/html; charset=utf-8", "Date"=>"Sat, 17 Dec 2022 11:18:27 GMT", "Server"=>"waitress"}, :path=>"//languages", :port=>5000, :status=>405, :status_line=>"HTTP/1.1 405 METHOD NOT ALLOWED\r\n", :reason_phrase=>"METHOD NOT ALLOWED", :remote_ip=>"172.17.0.1", :local_port=>50848, :local_address=>"172.17.0.3"}, @body="<!doctype html>\n<html lang=en>\n<title>405 Method Not Allowed</title>\n<h1>Method Not Allowed</h1>\n<p>The method is not allowed for the requested URL.</p>\n", @headers={"Access-Control-Allow-Credentials"=>"true", "Access-Control-Allow-Headers"=>"Authorization, Content-Type", "Access-Control-Allow-Methods"=>"GET, POST", "Access-Control-Allow-Origin"=>"*", "Access-Control-Expose-Headers"=>"Authorization", "Access-Control-Max-Age"=>"1728000", "Allow"=>"HEAD, GET, OPTIONS", "Content-Length"=>"153", "Content-Type"=>"text/html; charset=utf-8", "Date"=>"Sat, 17 Dec 2022 11:18:27 GMT", "Server"=>"waitress"}, @status=405, @remote_ip="172.17.0.1", @local_port=50848, @local_address="172.17.0.3">
I set up a docker container with docker run -d --restart unless-stopped -ti -p 5000:5000 --name="libretranslate" libretranslate/libretranslate
which seemed to be fine for me according to the docs and set up translator libretranslate endpoint
to http://172.17.0.1:5000
(the IP is the docker host IP).
According to the error message Discourse can also connect to LibreTranslate but something is not working.
Any ideas?