crow-translate / QOnlineTranslator

A library for Qt5 that provides free usage of Google, Yandex and Bing translate API.
GNU General Public License v3.0
79 stars 12 forks source link

LibreTranslate returns only a portion of the original text #65

Closed parasiteoflife closed 6 months ago

parasiteoflife commented 6 months ago

Bug description I'm hosting my instance of LibreTranslate and every time I translate any text I only get a portion of it translated. I've also tested this with this instance: https://libretranslate.eownerdead.dedyn.io and get the same result.

Steps to reproduce

  1. Setup LibreTranslate
  2. Paste this to translate:
    
    The Iliad (/ˈɪliəd/;[1] Ancient Greek: Ἰλιάς, romanized: Iliás, Attic Greek: [iː.li.ás]; "a poem about Ilium (Troy)") is one of two major ancient Greek epic poems attributed to Homer. It is one of the oldest extant works of literature still widely read by modern audiences. As with the Odyssey, the poem is divided into 24 books and was written in dactylic hexameter. It contains 15,693 lines in its most widely accepted version. Set towards the end of the Trojan War, a ten-year siege of the city of Troy by a coalition of Mycenaean Greek states, the poem depicts significant events in the siege's final weeks. In particular, it depicts a fierce quarrel between King Agamemnon and a celebrated warrior, Achilles. It is a central part of the Epic Cycle. The Iliad is often regarded as the first substantial piece of European literature.

The Iliad and the Odyssey were likely written down in Homeric Greek, a literary mixture of Ionic Greek and other dialects, probably around the late 8th or early 7th century BC. Homer's authorship was infrequently questioned in antiquity, but contemporary scholarship predominantly assumes that the Iliad and the Odyssey were composed independently and that the stories formed as part of a long oral tradition. The poem was performed by professional reciters of Homer known as rhapsodes.


3. Receive only this sentence "The poem was performed by professional reciters of Homer known as rhapsodes." translated.

**Expected behavior**
To get the whole text translated.

**Environment**

- OS: windows 10
- Crow Translate version: 2.11.0
VolkMilit commented 6 months ago

There was typo in parser. New release should fix this issue.

parasiteoflife commented 3 months ago

@VolkMilit I'm having a new issue with LibreTranslate. I always get:

Error transferring https://lt.arpa/translate - server replied: BAD REQUEST

When I open https://lt.arpa/translate in Firefox I get:

Method Not Allowed

The method is not allowed for the requested URL.

Should I open a new issue?

VolkMilit commented 3 months ago

@parasiteoflife, if you get Method Not Allowed error, this means server doesn't allow GET requests at all. I can't access this webside either. Are you sure this website even exists? Anyway, you should complain to their author, I'm not developer of Lingva nor any of instances.

parasiteoflife commented 3 months ago

Do you mean accessing lt.arpa? That is not public, is my local libretranslate instance. I have tried both with and without api key (though it shouldn't need one) and get the same message, maybe something has changed in LibreTranslate?

VolkMilit commented 3 months ago

@parasiteoflife

Do you mean accessing lt.arpa? That is not public, is my local libretranslate instance.

Oh, I was not pay attention to arpa suffix.

I have tried both with and without api key (though it shouldn't need one) and get the same message, maybe something has changed in LibreTranslate?

You're probably right. There is no way to fetch api using GET request anymore, I think? Will invistigate.

EDIT: Crow already using POST requests for Libre, everything works as expected on my side with https://translate.terraprint.co/ instance.