fix: add workaround for the translation API
Some checks failed
melpazoid / build (push) Has been cancelled

This commit is contained in:
Pavel Korytov 2025-06-10 13:32:08 +03:00
parent ecea6f2c66
commit 40ed3d83c4

View file

@ -344,10 +344,19 @@ The result is an alist with the following keys:
(origin . "reversomobile") (origin . "reversomobile")
(sentenceSpliiter . :json-false))) (sentenceSpliiter . :json-false)))
(to . ,(alist-get target reverso--language-mapping)))) (to . ,(alist-get target reverso--language-mapping))))
:headers `(("Content-Type" . "application/json") :headers `(("Accept" . "application/json, text/plain, */*")
("Accept" . "*/*") ("Accept-Language" . "en-US,en;q=0.5")
("Connection" . "keep-alive") ("Connection" . "keep-alive")
("User-Agent" . ,reverso--user-agent)) ("Content-Type" . "application/json")
("Host" . "api.reverso.net")
("Origin" . "https://www.reverso.net")
("Referer" . "https://www.reverso.net")
("Sec-Fetch-Dest" . "empty")
("Sec-Fetch-Mode" . "cors")
("Sec-Fetch-Site" . "same-site")
("TE" . "trailers")
("User-Agent" . ,reverso--user-agent)
("X-Reverso-Origin" . "translation.web"))
:parser 'json-read :parser 'json-read
:encoding 'utf-8 :encoding 'utf-8
:success (cl-function :success (cl-function