pacmax beta

Alfred Pac by sigito on GitHub

Linguee

Alfred workflow to search for translations from Linguee.com

From their README

Linguee Workflow for Alfred

Demo

Linguee Search is an Alfred workflow that lets you search for translations on Linguee.com.

Download the workflow

⚠️ This workflow requires Alfred app with Powerpack.

The latest version of the workflow can be downloaded from GitHub releases.

Manually install the workflow

You can also build and install the workflow yourself. Just clone the repository and run the next command in Terminal from the directory with the cloned project:

make install

A new Linguee.Search.alfredworkflow workflow would be built from source and opened in Alfred.

Features

  • Rich search results for query translations.

  • Use l keyword to search in Alfred.

    • The keyword is configurable in the Alfred workflow settings.
  • Open the the translation page in a browser by hitting ↩ (Return) on the result entry.

  • Open an initial search query in a browser:

    • ⌘ ↩ (Command-Return) on any search result, or
    • ↩ (Return) on "Search on Linguee for '{query}'". This entry is always added as the last search result.
  • Search autocomplete on ↹ (Tab).

  • Copy the results with ⌘ C (Command-C).

    See (#copy-behavior) on the copy behavior options.

  • Display a selected result in a large type with ⌘ L (Command-L).

  • Quickly look at the translation page by tapping ⇧ (Shift) or ⌘ Y (Command+Y).

  • Automatic checks for updates.

    • Use check_for_updates variable to control this feature.
    • If a newer version of the workflow is available, an extra result row is added with an update prompt.
  • Linguee.com as a fallback search.

    Follow instructions in the workflow viewer in Alfred to add Linguee to the list of default fallbacks. See Alfred's help center article for more information about the default fallback feature.

Setting translation language pair

source_language and destination_language define the language pair used for the translation.

Default pair is English + German. To override this behavior, set the variables to a desired pair. For a full list of available language pairs please visit . The values of the variables must be a lowercased language name in English. E.g., "english", "german", "french".

Setting a global keyboard shortcut

There is an option to trigger the Linguee Search from anywhere, skipping typing of the command prefix (l in our case) in the shared Alfred search window. Unfortunately, Alfred does not import the hotkeys, thus a manual setup is necessary.

The workflow already contains an empty global keyboard shortcut configuration. You should:

  1. Open the workflows panel in Alfred settings.
  2. Select this workflow.
  3. Double-click on the "Hotkey" box in the workflow (alternatively right click and choose "Configure Object...").
  4. Press the key combination that should be used as a system-wide shortcut. E.g., ⇧ ⌘ L (Shift-Command-L).
  5. Click "Save".

By default the shortcut would searched for the selected text, or open a ready-to-go Linguee search in Alfred.

To change the assigned key combination, just repeat the steps described above.

More about hotkeys in Alfred available here.

Copy behavior

By default all of the translation information, including the initial search text, translations, and the results link, would be copied as a result of ⌘ C (Command-C) action.

Use copy_behavior variable to change default behavior. There are a few possible values it can be set to:

  • all (default) — copy all of the translation information;
  • url — copy the Linguee.com link to the translation page;
  • first-translation-only — copy the first translation only. In case there no translations available, the initial query would be copied instead.

Miscellaneous flags

  • check_for_updates – whether the workflow should periodically check for a new version.
    Possible values: true or false. Default: false.
  • disable_copy_text_promotion – disables inclusion of a URL to this workflow in the copied result text.
    Possible values: true or false. Default: false.
  • demo_mode – return a stubbed response with all states available.
    Possible values: true or false. Default: false.
    ⚠️ Setting this variable would make the workflow to always return stubbed values.

Known issues

LingueeOnAlfred will damage your computer and you should remove it to the trash (#13)

The workflow binary is not verified by Apple. Thus macOS would not recognize the binary and suggest to move it to trash.

In order to work this around, go to System Preferences > Security & Privacy, switch to General tab. In the Allow apps downloaded from: section select App Store and identified developers and then to the right of it tap an Open Anyway button.

On the next attempt to search with Linguee, a dialog would pop. Select Open and you are good to go!

License

Latest release

  • 1.3.04 years ago, 1.6 MBDownload

    Just internal changes:

    • switched implementation from Combine to async/await (#40);
    • built and tested with GitHub actions (#38).

    See Milestone 1.3.0 for all changes in this release.

13 earlier releases
  • 1.2.44 years ago, 1.6 MBDownload

    What's new:

    • shipped as a universal binary (#31).

    See Milestone 1.2.4 for all fixes in this release.

  • 1.2.35 years ago, 979 KBDownload

    Universal binary is temporarily disabled, only x86 arch is included (#31, #36). 1.2.2 accidentally included outdated binary.

  • 1.2.15 years ago, 1.6 MBDownload

    What's new:

    • Fixed wrongly displayed non-Latin characters (#35).

    See Milestone 1.2.1 for all fixes in this release.

  • 1.2.05 years ago, 1.6 MBDownload

    What's new:

    • shipped as a universal binary (#31).

    See Milestone 1.2.0 for all fixes in this release.

  • 1.1.05 years ago, 991 KBDownload

    New features:

    • set Linguee as a fallback search (#25);
    • configure copy behavior (#7).

    Other changes:

    • added hotkey and keyword configuration instructions in the Workflow;
    • reduced the new release caching period to 3 days (#28);
    • typo corrections.

    See Milestone 1.1.0 for all fixes in this release. Merged in https://github.com/sigito/Linguee-Workflow-for-Alfred/pull/30.

  • 1.0.15 years ago, 936 KBDownload
    • Typos corrections and internal changes.
    • Improved test coverage.

    All changes: https://github.com/sigito/Linguee-Workflow-for-Alfred/pull/29

  • 1.0.05 years ago, 930 KBDownload
    • Added support of language pair customization (#10). See Setting translation language pair for details.
    • Workflow archive now includes the version (#27).
    • Expanded available documentation (#8).

    See Milestone 1.0.0 for all fixes in this release.

  • 0.5.15 years ago, 922 KBDownload
    • Fixed version comparison (#26).
    • Updated swift-log package to 1.4.0.
  • 0.5.06 years ago, 931 KBDownload
    • Automatic checks for updates. Contlorred with the check_for_updates variable.
    • New icons. Thanks to Susan Kaltschmidt!
    • Includes a link to the workflow in the copied result. Controlled with the disable_copy_text_promotion variable.
    • Built with Swift 5.3.

    See Milestone 0.5.0 for all fixes in this release.

  • 0.4.06 years ago, 863 KBDownload
    • Note: new bundle ID com.samsoniuk.alfred.linguee-search.
    • Added a workflow description with a link to the github repository.
    • Changed the workflow category from "Tools" to "Productivity".
    • Copy selected search result with ⌘ C (Command-C) (#6).
    • Quick Look at the search result on ⇧ (Shift) or ⌘ Y (Command+Y) (#18).
    • Display a selected result in a large type with ⌘ L (Command-L) (#9).
    • Licensed under MIT (#17).

    See Milestone 0.4.0 for all fixes in this release.

  • 0.3.26 years ago, 852 KBDownload
    • Removed a redundant query parameter from a fallback URL.
  • 0.3.16 years ago, 852 KBDownload
    • Fixed search for text containing double quotes (#1).
    • Improved search URL creation logic.
  • 0.3.06 years ago, 847 KBDownload

    New:

    • Renamed the workflow to "Linguee Search".
    • Autocomplete support (hit TAB to populate the search field with selected result).
    • A direct search link is added as the last entry in the result list.
    • Opens linguee.com with the initial query text on CMD + Enter.
    • Script failures are now not valid.