Open vitonsky opened 1 year ago
Hi, i'm working on Linguist - browser addon to translate pages, i've implement custom translator for lingva project https://github.com/translate-tools/linguist-translators/blob/c826016314f5f3f68b69d83b9e3182618b991086/translators/LingvaTranslator.js
Users report this issue https://github.com/translate-tools/linguist/issues/354
I've investigated it and as i see, Lingva return error while users trying to translate text of URLs.
await fetch("https://lingva.ml/api/v1/en/tr/https://github.com/translate-tools/linguist-translators/blob/c826016314f5f3f68b69d83b9e3182618b991086/translators/LingvaTranslator.js", { "credentials": "omit", "headers": { "Accept": "*/*", "Accept-Language": "en-US,en;q=0.5", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin" }, "method": "GET", "mode": "cors" }).then(r => r.json());
{ "error": "Not Found" }
Translated text or the same text as in request with no changes
Lingva could just return the same text with no changes for cases like this
Hi, i'm working on Linguist - browser addon to translate pages, i've implement custom translator for lingva project https://github.com/translate-tools/linguist-translators/blob/c826016314f5f3f68b69d83b9e3182618b991086/translators/LingvaTranslator.js
Users report this issue https://github.com/translate-tools/linguist/issues/354
I've investigated it and as i see, Lingva return error while users trying to translate text of URLs.
Request example
Actual response
Expected response
Translated text or the same text as in request with no changes
Solution i suggest
Lingva could just return the same text with no changes for cases like this