LoginSignup
138
132

More than 5 years have passed since last update.

コマンドラインからGoogle Translationを使える termit が便利

Last updated at Posted at 2013-10-29

github

コマンドラインからGoogle Translationを使用して翻訳することができます。コミットメッセージを考えるときなんかに便利!

gem install termit

English to Japanese

$ termit en ja "Convention over configuration (also known as coding by convention) is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, but not necessarily losing flexibility."
=> 設定(これも慣例によりコーディングとして知られている)上の条約は、シンプルさを獲得し、開発者が行う必要があることを意思決定の数を減少させるが、必ずしも柔軟性を失っていないことを目的ソフトウェア設計パラダイムである。

Japanese to English

$ termit ja en "Ruby on Rails(ルビーオンレイルズ)は、オープンソースのWebアプリケーションフレームワークである。"
=> Ruby on Rails ( Ruby on Rails ) is a Web application framework of open source .

同意語機能

-s (synonyms) フラグを渡すと同意語が存在する場合はそれを表示します。

$ termit en ja -s 'commit'
=> コミット
=> Synonyms: コミット, 犯す, 委託, 働く, 演じる, 預ける, 作る

音声読み上げ機能

-t (talk) フラグを渡すと翻訳した文字列を読み上げてくれます。

$ termit ja en 'こんにちは' -t
=> Hello
# Hello と読み上げられる

この機能を使うにはmpg123が必要です。

Ubuntu:

$ sudo apt-get install mpg123

MacOSX:

$ brew install mpg123
138
132
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
138
132