| Summary: | Language autodetection after switching to the Mozhi | ||
|---|---|---|---|
| Product: | [Applications] Crow Translate | Reporter: | Serge Roussak <beaux_monde> |
| Component: | general | Assignee: | Gena <genaloner> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | normal | CC: | javirrdar |
| Priority: | NOR | Keywords: | usability |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Screenshot with error | ||
|
Description
Serge Roussak
2024-07-30 07:01:30 UTC
> But, it's not 100% clear if the Mozhi (by the way, it sounds symbolically on the Russian: "brain" ;) ) in turn gather what I send via it to the Google or any other translator. The name pronounced as "moli" :) But Mozhi is much more secure. Instead of sending your data to an engine from your IP, it receives the IP of the instance. Consider it's as a proxy. You can even create your own instance if you worry about the instance being compromised. > The second issue is in that the new approach works noticeably slower. Try to choose an instance that is close to you. For me it depends on the instance. But the main migration reason was maintainability, security and more engines support. Online engines often breaks and there is literally zero documentation of how to use API for free. We usually reverse-engineer the API by inspecting what browser do with web version. We decided easier to delegate it to the Mozhi team. > Yandex translator. That's unfortunate, yes. Should be fixed on Mozhi side: https://codeberg.org/aryak/libmozhi/issues/3 I just don't know Go, so I can't contribute. Regardless autodetection in google, I can't reproduce it. Works for me just fine. > Finally, IMHO, the main engine switching in the software is a significant cause to change its version. It will be 3.0, I didn't draft a new release. Ah, you probably installed it from https://flathub.org/apps/org.kde.CrowTranslate which is based on unpublished version. I submitted Flatpak manifest to prepare for the upcoming release, I didn't expect it to be published. I will contact the team about it. Created attachment 173470 [details]
Screenshot with error
See the picture.
Hint: I suppose, you use JSON or something like that and don't escape the quotation marks
The text is escaped properly, the issue is response parsing. Could you send me the output of the translation using CLI with `--json`? $ crow --json 'This is an example of the "quoted" text translation'
"Error: Error: Unable to parse autodetected language"
{
"detected": "",
"engine": "google",
"source_antonyms": null,
"source_equivalent_target_lang": {
},
"source_language": "auto",
"source_synonyms": null,
"source_transliteration": "",
"target_antonyms": null,
"target_equivalent_source_lang": {
},
"target_language": "en",
"target_synonyms": null,
"target_transliteration": "",
"translated-text": "",
"word_choices": null
}
Ah, I see, so the response parsed correctly and the problem is in quotes. But I escape them on the app side, this is why I suspected that the bug was in parsing. I tried using Mozhi web interface and it have the same issue. I reported it here: https://codeberg.org/aryak/libmozhi/issues/6, it's a bug on their side. They added autodetection for Yandex, BTW. OK, thank you. Could you please drop a line here when the Mozhi will be fixed? I have no account at the codeberg (and I think, it'll never be needed for me). Sure :) Fixed, already available in https://mozhi.aryak.me instance. |