GSTranslator is a simple translator integrated with Gnome Shell. It uses Google Translate technology.
Short presentation video: youtu.be/wOMi71Vwvwg
- Gnome 3.4
- Python 2.7
- python-dbus (for Python 2.7)
- Copy directory
- As root, copy schema file
- Compile schemas (as root):
- Restart shell and enable extension
- You can copy
/usr/local/binand make it executable
chmod +x /usr/local/bin/gstranslator2_service.py
- Enable extension
- Adjust settings (preferences icon)
- Run GSTranslator2 service
By default this menu appear when you press <Super>d or click on "T" button. You can switch between languages using <Control>Left/<Control>Right keys. To get standard translation use Enter key or <Shift>Enter for expanded translation.
- service may hang for 5-10 seconds on one of the first words. Somehow urllib2.urlopen freezes for several seconds, but it does not report any error or warning. After that it responses immediately on the following words. Weird...
Gnome Shell extension communicates with GSTranslator service using DBus. It sends requests for translations. There are two types of requests: translate text from clipboard, translate text from menu entry. In response service written in Python, returns label with translation.