I started dabbling with FireFox add-ons yesterday. Pretty quickly I had published my first simple add-on. This post will be my documentation.
The premise is simple, I wanted to be able to highlight text then right-click and have a new Google Translate tab open with the text translated. I often highlight text, right-click then type ‘s’ to search in Google. I wanted to do the same (without switching FireFox’s search engine), but send the text to Google Translate.
The context menu shortcut key for Right-Click Translate is the letter ‘t‘.
It uses the new higher level API, so add-on can be installed without requiring FireFox to be restarted.
Here is the latest version of the add-on on mozilla.org https://addons.mozilla.org/en-US/firefox/addon/right-click-translate/
v0.1 Released version that translates to English only.
v0.2 Added preference support to change the target language to any supported by Google Translate
v0.3.0 Tab now opens beside current tab (instead of stuck at the end of all open tabs).
-still have not delved into fixing issue with spaces as it looks like a big job, will get to it when I have time.
v0.3.1 Issue uploading to addons.mozilla.org, had to increment the version number to get it working.
v0.3.2 Added icon to menu item to make it easier to find
- Full page translation if no text selected
- Customizable access key (maybe ‘t’ is already taken or you do not have it on your keyboard)
This plugin is pretty simple, I doubt any support will be required. However, feel free to leave a comment below if you are having trouble, find a bug, or have any suggestions.