Show a popup window with the translation of the currently selected (or other) text
Supported language codes are listed at https://cloud.google.com/translate/docs/languages
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/PopupTranslateSelection.spoon.zip
Signature | PopupTranslateSelection.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/PopupTranslateSelection.spoon/init.lua line 36 |
Signature | PopupTranslateSelection.popup_close_on_escape |
---|---|
Type | Variable |
Description | If true, pressing ESC on the popup window will close it. Defaults to |
Source | Source/PopupTranslateSelection.spoon/init.lua line 31 |
Signature | PopupTranslateSelection.popup_size |
---|---|
Type | Variable |
Description |
|
Source | Source/PopupTranslateSelection.spoon/init.lua line 21 |
Signature | PopupTranslateSelection.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/PopupTranslateSelection.spoon/init.lua line 26 |
Signature | PopupTranslateSelection:bindHotkeys(mapping) |
---|---|
Type | Method |
Description | Binds hotkeys for PopupTranslateSelection |
Parameters |
|
Returns | |
Examples | |
Source | Source/PopupTranslateSelection.spoon/init.lua line 112 |
Signature | PopupTranslateSelection:translatePopup(text, to, from) |
---|---|
Type | Method |
Description | Display a translation popup with the translation of the given text between the specified languages |
Parameters |
|
Returns |
|
Source | Source/PopupTranslateSelection.spoon/init.lua line 46 |
Signature | PopupTranslateSelection:translateSelectionPopup(to, from) |
---|---|
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/PopupTranslateSelection.spoon/init.lua line 97 |