crow-translate / QOnlineTranslator

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

Highly strange translations from Italian to Russian #56

Open Kristinita opened 1 year ago

Kristinita commented 1 year ago

1. Summary

I get highly inadequate translations of some sentences of one book in Italian using Yandex Translate in Crow Translate.

2. Steps to reproduce

I selected texts from the Source text sections of this issue → I pressed my global shortcut for the Translate selected text action.

3. Examples

From the book “La politica dell’inciviltà” by Sara Bentivegna and Rossella Rega.

3.1. Example 1 — Islamic literature and Messenger of Allah

3.1.1. Source text

From the page 41:

Muovendo da questa interpretazione, l’inciviltà, piuttosto che essere il problema, diventa il sintomo di questioni ben più preoccupanti, come le disuguaglianze politiche e sociali, la discriminazione o la negazione di pari libertà e diritti a tutti i membri della comunità.
3.1.2. Expected behavior — Yandex Translate online

Yandex Translate online:

Исходя из этой интерпретации, невежливость, а не проблема, становится симптомом гораздо более тревожных проблем, таких как политическое и социальное неравенство, дискриминация или отрицание равных свобод и прав для всех членов сообщества
3.1.3. Bug behavior — Crow Translate + Yandex Translate
В исламской литературе имеется множество хадисов, в которых говорится о том, что Посланник Аллаха (Дбар) политическое и социальное неравенство, дискриминация или отрицание равных свобод и прав для всех членов сообщества.

Let’s translate this into English:

There are many hadiths in Islamic literature that say that the Messenger of Allah (Dbar) is a political and social inequality, discrimination or denial of equal freedoms and rights for all members of the community.

The source text doesn’t contain anything about Islamic literature and Allah. Where did this come from?

3.2. Example 2 — The Beatles

From the page 44:

Un primo elemento da evidenziare in tal senso riguarda il progetto originario dei fondatori, ovvero di contestare la politica degli insulti, della prevaricazione e delle fake news, popolata solo da nemici e da logiche di appartenenza tribale in-group vs out-group.
3.2.1. Expected behavior — Yandex Translate online

Yandex Translate online:

Первый элемент, который следует выделить в этом отношении, касается первоначального проекта основателей, то есть оспаривания политики оскорблений, оскорблений и фальшивых новостей, населенных только врагами и логикой членства племен в группе против вне группы
3.2.2. Bug behavior — Crow Translate + Yandex Translate
Первый элемент, который следует выделить в этом отношении, касается первоначального проекта основателей или оспаривания политики оскорблений, в 2009 году в США был выпущен первый альбом "The Beatles", который был выпущен в 2009 году.

Let’s translate this into English:

The first element that should be highlighted in this regard concerns the founders' initial draft, or challenging the insult policy, in 2009 The first album "The Beatles" was released in the USA in 2009.

What is The Beatles doing here? The source text doesn’t contain anything about this music group.

4. Reproducibility

4.1. Not reproduce

I don’t reproduce this problem:

  1. For Yandex Translate online
  2. For Google Translate in Crow Translate
  3. If I set English as Primary Translation Language in Crow Translate settings, and Crow Translate, respectively, translated texts from Italian to English, and not from Italian to Russian

4.2. Reproduce

I reproduced this problem with enabled and disabled Crow Translate option Simplify Source.

5. Environment

  1. Microsoft Windows 11 [Version 10.0.22621.1778]
  2. Crow Translate 2.10.7
  3. Yandex Translate
  4. Translation settings:

    Crow Translate translation settings

Thanks.

Shatur commented 1 year ago

Thanks for the report. That's odd. I think this have something to do with the "mobile API" usage (see https://github.com/crow-translate/crow-translate/issues/519 for details). We use mobile API because Yandex started using some sort of encryption, but mobile API works. Do you have a mobile app to test it?

@VolkMilit you may be interested in it.

VolkMilit commented 1 year ago

We don't use "mobile" API, we just set mobile UserAgent, so this is completly Yandex fault.

Yandex has changing something recently, and there is no "desktop" API anymore. At least, it will return 410 every time. I think, they just block it, if it's not used from their client.

Shatur commented 1 year ago

Oh, right. Could you try the examples, what JSON do you receive?

VolkMilit commented 1 year ago

Ok, after some attempts, I can't reproduce this issue using cURL:

curl 'https://translate.yandex.net/api/v1/tr.json/translate' --data 'ucid=f0c7414586f64fdb8cb58d12ad46a96b&srv=android&text=Muovendo da questa interpretazione, l’inciviltà, piuttosto che essere il problema, diventa il sintomo di questioni ben più preoccupanti, come le disuguaglianze politiche e sociali, la discriminazione o la negazione di pari libertà e diritti a tutti i membri della comunità.&lang=ru'
{"code":200,"lang":"it-ru","text":["Исходя из этой интерпретации, невежливость, а не проблема, становится симптомом гораздо более тревожных проблем, таких как политическое и социальное неравенство, дискриминация или отрицание равных свобод и прав для всех членов сообщества."]}

But issue indeed existing into Crow. That is very odd.

изображение

EDIT: After further invistegation, we've found that any percent-encoded symbols change translations drastically. What the actual F?!