Created
January 19, 2016 15:42
-
-
Save moguno/b3e986a2d95a21436133 to your computer and use it in GitHub Desktop.
mikutterでTLをGoogle翻訳するやつ。
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
#coding: utf-8 | |
Plugin.create(:"translate_query_to_google") { | |
require "cgi" | |
command(:translate_query_to_google, | |
name: _('グーグルで翻訳'), | |
condition: Plugin::Command[:HasOneMessage], | |
visible: true, | |
role: :timeline) { |opt| | |
Gtk::openurl("https://translate.google.co.jp/#auto/ja/#{CGI::escape(opt.messages.first.message.to_s)}") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment