Mutate icon indicating copy to clipboard operation
Mutate copied to clipboard

Error with Translate

Open jfreak53 opened this issue 8 years ago • 4 comments

Whenever I try the translate function it errors out like so:

Traceback (most recent call last):
  File "/home/myuser/.config/Mutate/scripts/googletranslate/google_translate.py", line 53, in <module>
    if 'dict' in get_page.keys() and 'entry' in  get_page['dict'][0]:
AttributeError: 'unicode' object has no attribute 'keys'

jfreak53 avatar Mar 11 '16 18:03 jfreak53

Were you able to figure it out?

jed49 avatar Jun 29 '16 17:06 jed49

@jed49 you have to alter the google_translate.py Did you try this https://gist.github.com/samundra/d07bd2e312f7c3d0b65de4b68c91b22d ? Try replacing google_translate.py with the one provided and see if it works for you or not?

samundra avatar Jun 30 '16 20:06 samundra

I tried that yesterday and it works partially.

It only translates one way though. For example if I type: tr hello the mutate application will translate to whatever target language I choose. However, if I type a word in the target language it will not translate it to the source language I specified which in this case is English.

Thanks for your help.

jed49 avatar Jun 30 '16 22:06 jed49

It doesn't work that both way. It just translates from source to target language. The both way feature is not available in the mutate.

samundra avatar Jul 01 '16 08:07 samundra