RicardoRagel / drawer-translate

A lightweight on-screen translator app powered by different Machine Translation APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

Open-source cross-platform desktop application to translate text using different machine translation APIs. It has been developed under the idea of it doesn't interfer with the rest of our work, so the app is a window placed at the bottom of the screen that can be resized, minimized, hidden or auto-hidden.

It is a simple Qt Application with a front-end developed using QML.

For more information, visit the application website.

Download it!

You can get it from the website downloads page or visiting the latest release page. You will find there the Windows installer and the Linux AppImage of the latest app version. Don't forget to give permission execution to the AppImage before try to run it.

Dependencies

  • OS: Linux and Windows. Tested on Ubuntu (16.04, 18.04 and 20.04) and Windows 10.

  • Qt & QtCreator. Created using Qt 5.14.1

Windows

  • OpenSSL. Install 64 or 32 bits version depending on your Qt C++ compiler.

Linux

  • OpenSSL. Included in this repository as third-party libraries.

  • GStreamer. Qt Audio module (QMediaPlayer) use it as backend, so you need to install it to be able to play the text sounds:

    sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

Compilation

Just open the Qt project file drawer_translate.pro using QtCreator, configure it using the default settings for your favorite compiler and build the project.

Translation APIs

Drawer Translate offers translations from and to different languages using different machine-translation APIs:

  • LibreTranslate - Free and Open Source machine translation API made by UAV4GEO and powered by Argos Translate.
  • Apertium - Free and Open Source machine translation platform, initially aimed at related-language pairs but expanded to deal with more divergent language pairs (such as English-Catalan).
  • MyMemory by Translated Labs- Free and professional translations within the world's largest database of professionally translated content. This database was created from a collection of publicly available bilingual documents of the European Union and the United Nations, and contains more than 40 billion words.
  • GoogleTranslate - Google Cloud translation API. Nowadays is not free and you need a Key to use the API, but you can get a trial to use it for some months.

Settings

Drawer translate provides a settings windows where you can select between the previous translation APIs, the source and target languges (depending on which API you selected) and some other features:

  • Translate on selection: Allows this app to translate directly the selected text in another apps. For now, it only works in Linux systems.
  • Translate on copy: Allows this app to translate directly the clipboard incoming text. So, you just need to copy some text (Ctrl+C) to get the translation.
  • Auto-hide window: Hides the app window when you move out of the application.
  • Appearance: As we are not all from the same soccer team, you can also select the colors that you prefer for this app background, foreground and text.

All this seetings are saved on your computer and can be edited manually (something important if you have selected all colors equal to white 😅):

  • C:\Users\<USER>\AppData\Roaming\DrawerTranslate/DrawerTranslate.ini on Windows.
  • ~/.config/DrawerTranslate/DrawerTranslate.ini on Linux.

Known and fixed issues

  1. QNetworkManager library throws the following errors on Windows:

    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed

    Fix: Install OpenSSL on the system (C:\Windows\System32). Reference

  2. QMediaPlayer library throws the following warning on Linux when try to play a text sound:

    Warning: "No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)2, layer=(int)3, rate=(int)24000, channels=(int)1, parsed=(boolean)true'."
    Error: "Your GStreamer installation is missing a plug-in."

    Fix: Install GStreamer.

About

A lightweight on-screen translator app powered by different Machine Translation APIs


Languages

Language:QML 57.3%Language:C++ 37.6%Language:Shell 2.2%Language:Batchfile 1.4%Language:QMake 1.3%Language:Qt Script 0.3%