LoginSignup
17
10

More than 5 years have passed since last update.

Dashに日本語翻訳機能を付ける

Posted at

発端

ちょっとした調べ物の度にChromeのタブが増えていくのを憂いで先日Dashを導入したのですが、
英語のできない筆者にとって欠かせない翻訳アドイン的な機能がなかったので、作ってみました。

作り方

Automator

  • Spotlight > Automator > こちらこちらを参考にしつつ、以下のように設定して任意の名前で保存
  • なお作成したワークフローファイルは以下にできる。わかりづらいぞ
    • /Users/ユーザ名/Library/Servicies/xxx.workflow

automator.png

bash
cat | perl -MURI::Escape -lne 'print uri_escape($_)' | sed -e 's/^/https:\/\/translate.google.com\/?source=gtx_c#auto\/ja\//g'

ショートカット

  • Spotlight > ショートカット > サービスに先ほど作った機能が出てくるので、任意のショートカットを指定

shortcut.png

できあがり

  • Dashにて翻訳したい文字を選択 > 右クリック > Servicies or ショートカットキーでポップアップが立ち上がる

howto.png

translate.png

余談

  • Automator初めて触ったんですが、入出力周りの作り(というか説明)が謎で若干詰まりました...
  • 大した苦労もしていない割に、ポップアップの見た目がそれっぽくってウキウキです:ramen:
17
10
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
17
10