dialect-app / dialect

A translation app for GNOME.
GNU General Public License v3.0
596 stars 69 forks source link

Trying to translate text containing ": *" fails #330

Closed wjt closed 2 months ago

wjt commented 1 year ago

With Dialect 2.1.1 from Flathub, I see the following error for any attempt to translate anything:

Screenshot from 2023-06-07 10-35-11

In the journal, I see:

Jun 07 10:35:33 camille app.drey.Dialect.desktop[13722]: ERROR:root:Translator Error: the JSON object must be str, bytes or bytearray, not NoneType

I am using Google Translate.

wjt commented 1 year ago

Weird. I closed and reopened the app and the issue went away.

wjt commented 1 year ago

OK, I hit this error again, and tracked down the problematic sequence of characters:

: *

Once you attempt to translate a block of text containing that three-character string (colon, space, asterisk) then all future attempts to translate fail until I restart the app

rafaelmardojai commented 1 year ago

It is a bit inconsistent to me, it does not always fail and when it does, the retry is successful.

mufeedali commented 1 year ago

Strange, I'm not able to reproduce this at all.

I've tried Dialect's current state (main), 2.1.1 from Flathub and also 2.1.1 from Fedora's official RPM repos.

rafaelmardojai commented 1 year ago

Strange, I'm not able to reproduce this at all.

I've tried Dialect's current state (main), 2.1.1 from Flathub and also 2.1.1 from Fedora's official RPM repos.

In my case, if I just translate : * nothings happens. The issue appears when you use it with text, like hello: *.

mufeedali commented 1 year ago

Unable to reproduce with hello: * as well :(

rafaelmardojai commented 1 year ago

Unable to reproduce with hello: * as well :(

It not always happens on the first try for me. Has I said is quite inconsistent. Usually I have to change the dest lang a few times. It happens with German for example.

meybonomme commented 4 months ago
: *

The same happens if text contains a character /

mufeedali commented 2 months ago

Can somebody provide any complete sample strings where this issue is seen consistently? I'm unable to reproduce this at all from my end

wjt commented 2 months ago

I can no longer reproduce it. At the time I reported the bug it was completely reproduceable with just the string : * with all language pairs that I tried.

rafaelmardojai commented 2 months ago

I also can't reproduce this, probably something changed on the Google side. Let's close this for now and reopen if necessary.