Jump to content
rice.shawn

Google Translate (Languages Configurable)

Recommended Posts

For some strange reasons this workflow stop working for me, when I type "trans" I see the options

Android File Transfer

something else with trans

Enable/Disable Languages

Or start typing to get a translation

something else with trans

 

and when I start typing "trans hello there" it does not work anymore, it shows me:

search google for 'trans hello there'

search amazin for 'trans hello there'

search wikipedia for 'trans hello there' 

 

Weird, also because it looks like alfred does not remember the word "trans", in fact, every time I type "trans" it shows me "android file transfer" as first option.

 

mmm

 

not sure what is going on. Any hint?

Share this post


Link to post

Don’t worry about distinguishing portuguese from Brasil and from Portugal. Orthography is now the same between countries, and google translate doesn’t give a crap, anyway, going the Brasil route when in doubt.

For example, “you”, in Portugal, can be translated as either “tu” (informal) or “você” (formal). In Brasil, they use “você” informally as well. There are some differences in style, but nothing that would be incorrect, or make comprehension much difficult.

Share this post


Link to post

Can you open up Alfred's debugger on the workflow and see if anything pops up?

 

Nope, no errors, only xml information when I type "trans hello there". I tried to delete the whole directory where the plugin is installed and re-install it again, somehow the chosen languages are still kept somewhere else.

Share this post


Link to post

Nope, no errors, only xml information when I type "trans hello there". I tried to delete the whole directory where the plugin is installed and re-install it again, somehow the chosen languages are still kept somewhere else.

 

I might have actually found the culprit. The Wifi Hotspot I used was just very slow I believe. Using a normal internet connection brought things back.

 

Thanks for helping though.

 

r

Share this post


Link to post

For future reference, the settings for the languages chosen are kept in the workflow's data directory. All the workflows should be storing data in

~/Library/Application Support/Alfred 2/Workflow Data/{workflow's-bundle-id}

Share this post


Link to post

It looks like it's receiving a 503 Service Unavailable Error, which means that Google has changed the way it's done things. The endpoint that this and the other Google Translate workflow was using was never official, so they might have just shut it off. The official one is paid.

 

If you know of another way to access an unofficial endpoint, then I can look into fixing this one.

Share this post


Link to post

Thanks for your good work, Shawn Rice. I'm currently working with a slow internet connection, but your workflow seems to be sending too many requests or sending them too early. Which takes like 15 sec or more for me to get the results. Could you implement a delay after a key stroke to prevent a request after every key stroke?

Share this post


Link to post

Hey, dunno why, but the update doesn't work for me. Any ideas why? Can I change something? I also tried deleting the old one and new one and re-adding it but nothing.

Share this post


Link to post

Hey, dunno why, but the update doesn't work for me. Any ideas why? Can I change something? I also tried deleting the old one and new one and re-adding it but nothing.

 

It seems to work. The API is a bit slow, so if you have a spotty internet connection, then the results might not show up for a while. Those are my only thoughts.

Share this post


Link to post

Thanks for your good work, Shawn Rice. I'm currently working with a slow internet connection, but your workflow seems to be sending too many requests or sending them too early. Which takes like 15 sec or more for me to get the results. Could you implement a delay after a key stroke to prevent a request after every key stroke?

 

I just pushed an update that should fix those settings and also fix an icon.

Share this post


Link to post

Ah.. I don't understand why it's not working. I'm on Snow Leopard, maybe that is why? 

 

All I'm getting is this: 

 

Screen%20shot%202015-04-14%20at%203.51.4

 

After I import the workflow, do I have to do anything to enable the translation or the languages I want? Cuz I just import the workflow and then write "tr something" and I get this, as the screenshot above. 

Share this post


Link to post

Ah.. I don't understand why it's not working. I'm on Snow Leopard, maybe that is why? 

 

All I'm getting is this: 

 

Screen%20shot%202015-04-14%20at%203.51.4

 

After I import the workflow, do I have to do anything to enable the translation or the languages I want? Cuz I just import the workflow and then write "tr something" and I get this, as the screenshot above. 

 

The keyword is "trans" not "tr"

Share this post


Link to post

Yes sorry Shawn, forgot to say, I changed the hotkey to that. But either way, changed it back, re-installed the workflow and still nothing with "trans" too. :/

 

 

PS. I don't know about Scripts and stuff, but is it supposed to have only this for Script? :

 

Screen%20shot%202015-04-17%20at%201.30.2

Edited by Samurai

Share this post


Link to post

Yes sorry Shawn, forgot to say, I changed the hotkey to that. But either way, changed it back, re-installed the workflow and still nothing with "trans" too. :/

 

 

PS. I don't know about Scripts and stuff, but is it supposed to have only this for Script? :

 

Screen%20shot%202015-04-17%20at%201.30.2

 

Yes. That's what it's supposed to have. It runs a PHP script with the query.  If you can, would you try to open a terminal in the workflow directory and run the command "php filter.php testing" and see what comes out of it? Or open the debug window and run the workflow and see if there is anything informative there.

 

The API is fairly slow, and so it might just be slow running.

Share this post


Link to post

For some reason it is not working for me either (1.21 and prior).

I wonder if it is due to the latest OS update.

If I translate to another language "hello" for example I get:

 

translate hello

content-type http://ipv4.googl...kxxolvRWWEFEFrwrewAgqw...blabla

 

Any OS updates shouldn't matter (I've updated, and it still works on mine).

 

Previous versions of the workflow will not work because Google changed the API endpoint, which should give you that strange redirect. If you open the page, then it will be a captcha challenge that leads no where. The new one should give some malformed JSON data (that the workflow reworks into valid json).

Share this post


Link to post

Could you add zh-TW into this workflow?

zh-CN and zh-TW are two different versions of Chinese.

zh-CN is used in China mainland while zh-TW is the official language of Taiwan, HongKong and Macau.

According to Google's documents, they should be called  'Chinese (Simplified) ' and 'Chinese (Traditional)' respectively .

 

'zh-CN' => 'Chinese (Simplified)',

'zh-TW' => 'Chinese (Traditional)',
 
The icon of zh-TW 'tw.png' is also included in the icon pack you using.
 
Thank you.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...