qdore / Mutate

A simple launcher inspired by Alfred for ubuntu and Fedora.
MIT License
1.28k stars 98 forks source link

Error with Translate #118

Open jfreak53 opened 8 years ago

jfreak53 commented 8 years ago

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'
jed49 commented 8 years ago

Were you able to figure it out?

samundra commented 8 years ago

@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?

jed49 commented 8 years ago

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.

samundra commented 8 years ago

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.