Show a popup window with the translation of the currently selected text
The spoon uses the https://www.deepl.com translator page
The selected text is copied into the source field.
The modal hotkey cmd+alt+ctrl+O replaces the selected text with the translation
Supported language codes are listed at https://www.deepl.com/translator
This is just an adaption of the Spoon PopupTranslateSelection written by Diego Zamboni Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/DeepLTranslate.spoon.zip
Signature | DeepLTranslate.logger |
---|---|
Type | Variable |
Description | Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon. |
Source | Source/DeepLTranslate.spoon/init.lua line 47 |
Signature | DeepLTranslate.popup_close_after_copy |
---|---|
Type | Variable |
Description | If true, the popup window will close after translated text is copied to pasteboard. Defaults to |
Source | Source/DeepLTranslate.spoon/init.lua line 41 |
Signature | DeepLTranslate.popup_close_on_escape |
---|---|
Type | Variable |
Description | If true, pressing ESC on the popup window will close it. Defaults to |
Source | Source/DeepLTranslate.spoon/init.lua line 36 |
Signature | DeepLTranslate.popup_size |
---|---|
Type | Variable |
Description |
|
Source | Source/DeepLTranslate.spoon/init.lua line 26 |
Signature | DeepLTranslate.popup_style |
---|---|
Type | Variable |
Description | Value representing the window style to be used for the translation popup window. This value needs to be a valid argument to |
Source | Source/DeepLTranslate.spoon/init.lua line 31 |
Signature | DeepLTranslate:bindHotkeys(mapping) |
---|---|
Type | Method |
Description | Binds hotkeys for DeepLTranslate |
Parameters |
|
Returns | |
Examples | |
Source | Source/DeepLTranslate.spoon/init.lua line 217 |
Signature | DeepLTranslate:translatePopup(text) |
---|---|
Type | Method |
Description | Display a translation popup with the translation of the given text |
Parameters |
|
Returns |
|
Source | Source/DeepLTranslate.spoon/init.lua line 119 |
Signature | DeepLTranslate:translateSelectionPopup() |
---|---|
Type | Method |
Description | Get the current selected text in the frontmost window and display a translation popup with the translation between the specified languages |
Parameters |
|
Returns |
|
Source | Source/DeepLTranslate.spoon/init.lua line 196 |