pacmax beta

Alfred Pac by AlexanderWillner on GitHub

deepl 2

DeepL Alfred Workflow

From their README

Alfred DeepL Translation Workflow

Codacy Badge download

Usage

To activate this workflow use the default keyword dl, enter the passage you wanna get translated and end the input with . (not needed if you've an API key). The source language will be inferred automatically and the target language can be configured.

Search

After 1-2 seconds you get the translation. This is just an example.

Result

Press ↩ to copy the result or ⌘ + ↩ to show result as big screen overlay. You can also translate any selected text within macOS by pressing ⌃ + ⌥ + ⌘ + d.

Other languages are supported as well:

Chinese

To quickly change the target language, you can use the dll keyword:

Result

Caveats

Please note that the DeepL API is designed to translate up to 600 characters per minute and per customer only. This fact and generally some longer sentences might result in the message Error: Too many requests. (see #5). However, you can also get a (free or paid) API key and configure it in the settings (see screenshot below).

Installing the Workflow

  1. Simply download the last release
  2. Unzip the file on your computer
  3. Install Deepl-Translate.alfredworkflow by double-clicking the workflow file and clicking on "Import".

You'll now see the workflow listed in the left sidebar of your Workflows preferences pane.

Once imported, you may want to take a quick look at the workflow settings and setup what keyword you want to use. Further, you can change the target language in the settings as shown in this screenshot:

Config

Command Line

$ # DEEPL_TARGET="FR"
$ ./deepl.sh -l DE "This is just an example."
{
  "items": [
    {
      "uid": null,
      "arg": "Dies ist nur ein Beispiel.",
      "valid": "yes",
      "autocomplete": "autocomplete",
      "title": "Dies ist nur ein Beispiel."
    },
    {
      "uid": null,
      "arg": "Das ist nur ein Beispiel.",
      "valid": "yes",
      "autocomplete": "autocomplete",
      "title": "Das ist nur ein Beispiel."
    },
    {
      "uid": null,
      "arg": "Dies ist nur ein Beispiel dafür.",
      "valid": "yes",
      "autocomplete": "autocomplete",
      "title": "Dies ist nur ein Beispiel dafür."
    },
    {
      "uid": null,
      "arg": "Dies ist nur ein exemplarisches Beispiel.",
      "valid": "yes",
      "autocomplete": "autocomplete",
      "title": "Dies ist nur ein exemplarisches Beispiel."
    }
  ]
}

Important configuration variables

  • DEEPL_KEY: the DeepL API key
  • DEEPL_PRO: in case you have a professional DeepL account
  • DEEPL_POSTFIX: the character to the input should end with to mitigate #5
  • DEEPL_TARGET: the target language of the default dl keyword

Builing the workflow

To create a modified version of the workflow, edit the files and run make workflow to create an updated workflow.

Disclaimer

DeepL is a product from DeepL GmbH. More info: deepl.com/publisher.html

This package has been heavily inspired by m9dfukc's DeepL Alfred Workflow.

Latest release

  • 2.2.22 years ago, 7.8 KBDownload

    #37 : Formality should be a Popup Selection

19 earlier releases
  • 2.2.12 years ago, 7.7 KBDownload
    • #39 Fix: New parameter formality does not work without API
    • #38 Enhance: Make dll argument optional
    • Run dynamic tests before releasing a new workflow
  • 2.22 years ago, 7.7 KBDownload
    • #36: New command dll to quickly switch languages
    • #34: New parameter to specify formality
    • #33: Fix an issue translating text that includes the character &
  • 2.12 years ago, 7.0 KBDownload
    • #29: add error handling (e.g. notify user if API key is wrong)
  • 2.0.22 years agoDownload
    • #29 more debugging information
  • 2.0.12 years ago, 6.8 KBDownload
    • #29 Start debugging
  • 2.0.02 years ago, 6.8 KBDownload
  • 1.132 years ago, 6.7 KBDownload
    • Remove jq, as it is against the policy and is resolved by Alfred automatically

    Full Changelog: https://github.com/AlexanderWillner/deepl-alfred-workflow2/compare/v1.12...v1.13

  • 1.122 years ago, 410 KBDownload
    • Fixed #29: translation does not work
    • Fixed #28: add universal binary
  • 1.113 years ago, 302 KBDownload

    Last release this year ;)

    • Fixed #25 : last character is removed in translation
  • 1.103 years ago, 302 KBDownload
    • #24 Removing OneUpdater in v5 for Alfred Gallery
  • 1.94 years ago, 303 KBDownload
    • #23 : Support for Alfred 5 User Configuration (Thanks to @vitorgalvao!)
  • 1.84 years agoDownload
    • #21 : added an option to change the prefix from "." to anything else
    • various fixes
  • 1.74 years agoDownload
    • #20 : added an option the add a free/paid API key
  • 1.64 years agoDownload

    #17 try to avoid / fix permission errors

  • 1.415 years agoDownload

    #16 : disabled auto-update

  • 1.405 years agoDownload

    #11: Do not escape single quotes for the query.

  • 1.305 years agoDownload

    Fixed #14 and signed the binary.

  • 1.205 years agoDownload

    Fixing #13: updated version strings, updated workflow, minor fixes

  • 1.195 years agoDownload
    • Fixed #12: adopting to new API request.