Jump to content


Photo

Google translate workflow


  • Please log in to reply
27 replies to this topic

#1 Florian

Florian

    Advanced Member

  • Member
  • PipPipPip
  • 289 posts

Posted 15 January 2013 - 04:07 AM

Hey guys,

 

here is a Google Translate workflow i made based on Anders Bech Mellson's work. Once again, I don't want to take credit for a work that isn't mine. I'm just feeding back to alfred the results of an already good extension.

 

Press enter to copy to clipboard, FN to look up on the actual translate.google.com website. 

 

It's really easy to add / remove / edit for your own set of languages, just look at the workflow.

 

http://cl.ly/MAI3


  • Jono, Enhorn, drking and 5 others like this

#2 Enhorn

Enhorn

    Member

  • Member
  • PipPip
  • 26 posts
  • LocationStockholm, Sweden

Posted 15 January 2013 - 07:40 AM

Cool. It is indeed easy to add more languages. :-D



#3 mrcoffee

mrcoffee

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 15 January 2013 - 12:53 PM

Very cool workflow. Thx.



#4 Maciej Skrzypczak

Maciej Skrzypczak

    Member

  • Member
  • PipPip
  • 32 posts

Posted 15 January 2013 - 09:35 PM

This is what I was looking for. I can stop disturb David Ferguson to make such one. ;)


Hi, I'm Maciej Skrzypczak, editor at iMagazine - the one and only Polish magazine about Apple world.

@mcskrzypczakwww.imagazine.pl


#5 MrClaye

MrClaye

    Member

  • Member
  • PipPip
  • 21 posts
  • LocationFrance

Posted 26 January 2013 - 01:25 AM

This is an awesome workflow, thanks !

However, I noticed a small bug : when you type a " . ", the workflow doesn't consider possible words after



#6 Koto13

Koto13

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 27 January 2013 - 10:06 AM

Good work.  ;)



#7 Jono

Jono

    Member

  • Member
  • PipPip
  • 156 posts
  • LocationUK

Posted 04 February 2013 - 08:55 PM

Nice, thanks.



#8 npeeps

npeeps

    Member

  • Member
  • PipPip
  • 20 posts

Posted 05 February 2013 - 12:12 AM

This is really cool! Thanks!



#9 npeeps

npeeps

    Member

  • Member
  • PipPip
  • 20 posts

Posted 08 February 2013 - 08:31 PM

Is there perhaps a way of inserting the gender of the noun you are translating? For example: dog --> der Hund --> el perro 

 

That would be amazing :)


  • Domenic likes this

#10 AdamB

AdamB

    Newbie

  • Member
  • Pip
  • 1 posts
  • LocationPoland

Posted 08 February 2013 - 09:42 PM

Great workflow. Thanks !



#11 MJD

MJD

    Member

  • Member
  • PipPip
  • 55 posts
  • LocationNear the Arctic Circle

Posted 16 March 2013 - 11:32 PM

Love it, thanks.



#12 Domenic

Domenic

    Member

  • Member
  • PipPip
  • 39 posts

Posted 01 April 2013 - 02:54 PM

Great, thank you! :)

I added German and it works.

But every space is replaced by two backslashes:

Screenshot

 

Do you have any idea how to change this?

 

OT:How can I post screenshots so that they are displayed inside the forum?



#13 funtrix

funtrix

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 27 April 2013 - 01:59 PM

Unfortunate there seems to be a problem with the swedish characters "å", "ä" and "ö". Take a look at this screenshot http://cl.ly/image/3c0h2N2C0I20 

This word works great on the actually site so there seems to be a problem with your extension? 

Some word seems to work like "på". "över"

But words like "även", "ögon" doesn't work. 



#14 jink0421

jink0421

    Newbie

  • Member
  • Pip
  • 8 posts

Posted 18 September 2013 - 01:31 AM

Great workflow!

I added some other languages that I would need. There seems to be some error in Eastern language as well. 

 

4u1AO.png4u1vC.png

 

While English to Japanese/Korean seems to work perfectly fine on the left, the it doesn't seem like that's the case as you can see on the right. Instead of returning the result "hello" it's simply romanticizing the query for some reason. I am guessing it's the text encoding isn't properly supporting Eastern language. Any idea how it may be fixed? or is this inherently impossible to fix without completely re-writting the script?



#15 Florian

Florian

    Advanced Member

  • Member
  • PipPipPip
  • 289 posts

Posted 02 October 2013 - 05:24 AM

No one has fixed this workflow yet?  B)



#16 kopischke

kopischke

    Member

  • Member
  • PipPip
  • 45 posts
  • LocationThe Internetz

Posted 03 October 2013 - 01:26 AM

No one has fixed this workflow yet?   B)

 

Well, if you ask like that… Revised version that:

  • handles non 7-bit ASCII characters (aka “what them foreignas use”) correctly, both as input and as output,
  • handles phrases correctly (i.e. as phrases, not as multiple separate terms),
  • adds a Paste into foreground application action (Cmd modifier),
  • uses a central script file so that adding languages is a matter of adding a simple command to a new script filter (./translate '<language code>' '<language name>' "{query}"),
  • is certified 100 % awk and sed free (you saw that coming, right?).

google-translate-feedback.png

(note the Russian and Chinese translations have only been added to showcase the international support – by default, the workflow still only translates to French, English, and Spanish). As usual, repo is here, direct download here.


Edited by kopischke, 04 October 2013 - 11:05 PM.

  • Florian, arsenty and morocons like this

#17 kopischke

kopischke

    Member

  • Member
  • PipPip
  • 45 posts
  • LocationThe Internetz

Posted 03 October 2013 - 01:34 AM

Unfortunate there seems to be a problem with the swedish characters "å", "ä" and "ö". Take a look at this screenshot http://cl.ly/image/3c0h2N2C0I20 

This word works great on the actually site so there seems to be a problem with your extension? 

Some word seems to work like "på". "över"

But words like "även", "ögon" doesn't work. 

 

@funtrix the revised version should work fine (I tested “ögon").

 

Great workflow!

I added some other languages that I would need. There seems to be some error in Eastern language as well. 

 

While English to Japanese/Korean seems to work perfectly fine on the left, the it doesn't seem like that's the case as you can see on the right. Instead of returning the result "hello" it's simply romanticizing the query for some reason. I am guessing it's the text encoding isn't properly supporting Eastern language. Any idea how it may be fixed? or is this inherently impossible to fix without completely re-writting the script?

 

@jink0421 let me know if the revised version handles this correctly (Chinese worked fine in my superficial tests).


Edited by kopischke, 03 October 2013 - 01:41 AM.


#18 kopischke

kopischke

    Member

  • Member
  • PipPip
  • 45 posts
  • LocationThe Internetz

Posted 03 October 2013 - 01:36 AM

Great, thank you! :)

I added German and it works.

But every space is replaced by two backslashes:

Screenshot

 

Do you have any idea how to change this?

 

Make sure Alfred is not set to escape spaces in the script filter settings. The only checked escapes should be backquotes, backslashes and Dollar signs (as these are shell metacharacters that will be interpreted inside double quotes) as well as double quotes (as they end the quoting, obviously).


Edited by kopischke, 03 October 2013 - 01:37 AM.


#19 Cody Garner

Cody Garner

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 07 January 2014 - 08:07 AM

Thanks for the workflow. Is there any way to show the results phonetically? (e.g. when translating from English to Japanese)



#20 omdumond

omdumond

    Newbie

  • New Member
  • Pip
  • 1 posts

Posted 28 February 2014 - 10:01 AM

I am new to the workflow.  I went through the introduction pages on alfred's web site but I am still confused.  What I want to achieve is to translate email I receive in German to English.  It'd be helpful if I can select a block of text in the email, hit a hotkey combination, the text is sent to Google translate in my default browser and displayed the translated text there.

 

From what I can tell, this workflow seems to do the job.  I just don't know how to make it work.

 

When I import the workflow into Alfred (2.x), it said "Hotkeys for new wrokflows will be stripped for your safety."

 

I found a place to add hotkeys but I don't know what action or arguments to choose.

 

Sorry about being an absolutely newbie but I desperate need some help. Many thanks in advance.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users