Fast translation with Google Translator and MAC OSX
Lukasz Dorosz

Hi Lukasz, I only learnt about automator recently and tried to do this, but could not get it to work. When I add “run applescript” I get the following;

on run {input, parameters}

(* Your script goes here *)

return input

end run

am I supposed to delete all this and replace with your code:

on run {input, parameters} set output to "" & urldecode(input as string) return output end run on urldecode(x) set cmd to "'require \"cgi\"; puts CGI.escape('" do shell script "echo " & quoted form of x & " | ruby -e " & cmd end urldecode

or does it go in the (* your script goes here *) section, and do we need to keep the brackets and asterisks ? I’m guessing and really have no way of troubleshooting as I know nothing about code.

This would be an incredibly cool thing to have as I email and read a lot in Chinese and keep coming across obscure characters I am unlikely to study, and phrases that simply aren’t in standard dictionaries, like the apple dictionary, but that google translate can cope with.

Best regards,


Show your support

Clapping shows how much you appreciated John Dean’s story.