-
-
Save Swisyn/433616355989287a3fc0b5ed6109fd6c to your computer and use it in GitHub Desktop.
Google Translate Automator Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set output to "http://translate.google.com/translate_t?sl=auto&tl=uk&text=" & urldecode(input as string) | |
return output | |
end run | |
on urldecode(x) | |
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'" | |
do shell script "echo " & quoted form of x & " | ruby -e " & cmd | |
end urldecode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment