WS-Na / alfred-quick-translate

Translation Workflow for Alfred 4. You can quickly translate from the launcher. Google Translate and DeepL translation are supported. Multi-language translation supported. / Alfred4対応の翻訳ワークフローです。ランチャーからサクッと翻訳できます。Google翻訳とDeepL翻訳に対応。多言語翻訳対応。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

English | 日本語

Alfred Quick Translate

  • Translations for Alfred 4 Workflow. (*Powerpack is required.)
  • This workflow uses translate-shell.
  • Icon is iconfinder.
  • You can choose a translation engine.
    • Google(default), DeepL
    • If you use DeepL, you need to register with DeepL API to get the key.
  • You can now choose which language to translate into

Features

Translate and paste the text

Translate and search directly

Selecting and translating text

Automatic saving of translated logs (~/translate_log2.yml)

Since the log file is in Yaml, you can parse it with the yq command.

$ brew install python-yq
$ cat  ~/translate2_log.yml | yq .

Automatically saves to the clipboard as well.
The clipboard feature of Alfred is useful for searching the history.

No matter which features you use, the pre- and post-translation texts are stored in the log file, and it automatically saved the clipboard both.

Install

1: Install Alfred, buy Powerpack and activate it.

2: Installing various commands

brew install translate-shell jq coreutils curl

3: Download quick-translate.alfredworkflow from releases

4: Click on the downloaded quick-translate.alfredworkflow to open it and click on import to launch Alfred.

Language and translation engine settings

After installing the workflow, click on the icon in the upper right corner to open the configuration screen. This screen allows you to select a translation engine and language. See About the Workflow on the left for more configuration information.

When using DeepL

  1. Register with DeepL API to get the API key.
  2. Type deepl in the engine and Enter the API key in the deepl_api_key.

Hotkey settings.

From Workflows in Alfred's Preferences When you open Quick Translate, you can set a hotkey for each feature like this. Initially, Hotkey is blank, so you can assign a key of your choice and use it

Usage

When you want a quick translation

Launch the translation launcher with the key you assigned in the Hotkey settings. As you type in the text, it translates in real-time. You can press Enter to paste the translation into an editor.

When you want to translate and search on Google

Launch the translation launcher with the key you assigned in the Hotkey settings. After typing the text in the translation launcher, You can Google the translated text with cmd + Enter.

When you want to select and translate text

Select the text you want to translate and enter the key you assigned to Hotkey.

When in the browser, you can use Google Translate. But if you use Alfred Quick Transrate, when you want to read comments on the source code of not the native language, and useful when you want to translate chat messages and so on immediately.

About

Translation Workflow for Alfred 4. You can quickly translate from the launcher. Google Translate and DeepL translation are supported. Multi-language translation supported. / Alfred4対応の翻訳ワークフローです。ランチャーからサクッと翻訳できます。Google翻訳とDeepL翻訳に対応。多言語翻訳対応。


Languages

Language:Shell 98.6%Language:Makefile 1.4%