使用齿轮的quickaction
双击run Application
on run {input, parameters}
set output to "https://translate.google.cn/#auto/zh-CN/" & urldecode(input as string)
tell application "Google Chrome" to open location 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
拷贝进去覆盖,按command + s保存
就可以了