Giter VIP home page Giter VIP logo

crow-translate / crow-translate Goto Github PK

View Code? Open in Web Editor NEW
1.7K 31.0 158.0 27.69 MB

A simple and lightweight translator that allows you to translate and speak text using Google, Yandex Bing, LibreTranslate and Lingva.

Home Page: https://crow-translate.github.io/

License: GNU General Public License v3.0

CMake 5.27% Shell 0.09% C++ 94.63%
qt5 windows linux google yandex bing translator dbus-api ocr libretranslate

crow-translate's Introduction

Crow Translate logo Crow Translate

GitHub (pre-)release Crowdin

Crow Translate is a simple and lightweight translator written in C++ / Qt that allows you to translate and speak text using Google, Yandex, Bing, LibreTranslate and Lingva translate API. You may also be interested in my library QOnlineTranslator used in this project.

Content

Screenshots

Plasma

Main

Plasma Mobile

Main

Windows 10

Main

Features

  • Translate and speak text from screen or selection
  • Support 125 different languages
  • Low memory consumption (~20MB)
  • Highly customizable shortcuts
  • Command-line interface with rich options
  • D-Bus API
  • Available for Linux and Windows

Default keyboard shortcuts

You can change them in the settings. Some key sequences may not be available due to OS limitations.

Wayland does not support global shortcuts registration, but you can use D-Bus to bind actions in the system settings. For desktop environments that support additional applications actions (KDE, for example) you will see them predefined in the system shortcut settings. You can also use them for X11 sessions, but you need to disable global shortcuts registration in the application settings to avoid conflicts.

Global

Key Description
Ctrl + Alt + E Translate selected text
Ctrl + Alt + S Speak selected text
Ctrl + Alt + F Speak translation of selected text
Ctrl + Alt + G Stop speaking
Ctrl + Alt + C Show main window
Ctrl + Alt + I Recognize text in screen area
Ctrl + Alt + O Translate text in screen area

In main window

Key Description
Ctrl + Return Translate
Ctrl + R Swap languages
Ctrl + Q Close window
Ctrl + S Speak source / pause text speaking
Ctrl + Shift + S Speak translation / pause text speaking
Ctrl + Shift + C Copy translation to clipboard

CLI commands

The program also has a console interface.

Usage: crow [options] text

Option Description
-h, --help Display help
-v, --version Display version information
-c, --codes Display language codes
-s, --source <code> Specify the source language (by default, engine will try to determine the language on its own)
-t, --translation <code> Specify the translation language(s), splitted by '+' (by default, the system language is used)
-l, --locale <code> Specify the translator language (by default, the system language is used)
-e, --engine <engine> Specify the translator engine ('google', 'yandex', 'bing', 'libretranslate' or 'lingva'), Google is used by default
-p, --speak-translation Speak the translation
-u, --speak-source Speak the source
-f, --file Read source text from files. Arguments will be interpreted as file paths
-i, --stdin Add stdin data to source text
-a, --audio-only Print text only for speaking when using --speak-translation or --speak-source
-b, --brief Print only translations
-j, --json Print output formatted as JSON

Note: If you do not pass startup arguments to the program, the GUI starts.

D-Bus API

io.crow_translate.CrowTranslate
├── /io/crow_translate/CrowTranslate/Ocr
|   └── method void io.crow_translate.CrowTranslate.Ocr.setParameters(QVariantMap parameters);
└── /io/crow_translate/CrowTranslate/MainWindow
    |   # Global shortcuts
    ├── method void io.crow_translate.CrowTranslate.MainWindow.translateSelection();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.speakSelection();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.speakTranslatedSelection();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.playPauseSpeaking();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.stopSpeaking();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.open();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.copyTranslatedSelection();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.recognizeScreenArea();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.translateScreenArea();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.delayedRecognizeScreenArea();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.delayedTranslateScreenArea();
    |   # Main window shortcuts
    ├── method void io.crow_translate.CrowTranslate.MainWindow.clearText();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.cancelOperation();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.swapLanguages();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.openSettings();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.setAutoTranslateEnabled(bool enabled);
    ├── method void io.crow_translate.CrowTranslate.MainWindow.copySourceText();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.copyTranslation();
    ├── method void io.crow_translate.CrowTranslate.MainWindow.copyAllTranslationInfo();
    └── method void io.crow_translate.CrowTranslate.MainWindow.quit();

For example, you can show main window using dbus-send:

dbus-send --type=method_call --dest=io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow io.crow_translate.CrowTranslate.MainWindow.open

Or via qdbus:

qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow io.crow_translate.CrowTranslate.MainWindow.open
# or shorter
qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow open

Global shortcuts in wayland

Wayland doesn't provide API for global shortcuts and you need to register them by yourself.

KDE

KDE have a convenient feature to define shortcuts in .desktop file and import them in settings. These shortcuts are already enabled and should work by default.

GNOME

For GNOME you need to manually set D-Bus commands as global shortcuts. For example, to translate selected text use the following:

qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection

You can set a hotkey for this command in GNOME system settings.

Dependencies

Required

Optional

External libraries

This project uses the following external libraries, which included as git submodules:

  • QOnlineTranslator - provides free usage of Google, Yandex and Bing translate API.
  • QGitTag - uses the GitHub API to provide information about releases.
  • QHotkey - provides global shortcuts for desktop platforms.
  • QTaskbarControl - to create a taskbar/launcher progress for all desktop platforms.
  • SingleApplication - prevents launch of multiple application instances.

Icons

Fluent icon theme is bundled to provide icons on Windows and fallback icons on Linux.

circle-flags icons are used for flags.

Installation

Downloads are available on the Releases page. Also check out the website for other installation methods.

Note: On Linux to make the application look native on a non-KDE desktop environment, you need to configure Qt applications styling. This can be done by using qt5ct or adwaita-qt5 or qtstyleplugins. Please check the appropriate installation guide for your distribution.

Note: Windows requires Microsoft Visual C++ Redistributable 2019 to work.

Building

Building executable

You can build Crow Translate by using the following commands:

mkdir build
cd build
cmake .. # Or `cmake -D CMAKE_BUILD_TYPE=Release ..` for single-configuration generators such as Ninja or GNU Make
cmake --build . # Or `cmake --build . --config Release` for multi-config generators such as Visual Studio Generators or Xcode

You will then get a binary named crow.

Building a package using CPack

CMake can create specified package types automatically.

If you use Makefile, Ninja, or Xcode generator you can use package target:

mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CPACK_GENERATOR=DEB .. # You can specify several types of packages separated by semicolons in double quotes, for example: `CPACK_GENERATOR="DEB;ZIP;NSIS"`
cmake --build . --target package

Or you can use CPack utility for any generators:

mkdir build
cd build
cmake .. # Or `cmake -D CMAKE_BUILD_TYPE=Release ..` for single-configuration generators such as Ninja or GNU Make
cpack -G DEB # Or `cpack -G DEB -C Release` for multi-config generators such as Visual Studio Generators or Xcode

On Windows you need VCPKG to bundle all necessary DLLs.

Build parameters

  • WITH_PORTABLE_MODE - Enable portable functionality. If you create file named settings.ini in the app folder and Crow will store the configuration in it. It also adds the “Portable Mode” option to the application settings, which does the same.
  • WITH_KWAYLAND - Find and use KWayland library for better Wayland integration.

Build parameters are passed at configuration stage: cmake -D WITH_PORTABLE_MODE ...

Localization

To help with localization you can use Crowdin or translate files in data/translations with Qt Linguist directly. To add a new language, write me on the Crowdin page or copy data/translations/crow-translate.ts to data/translations/crow-translate_<ISO 639-1 language code>_<ISO 3166-1 country code>.ts, translate it and send a pull request.

crow-translate's People

Contributors

bodqhrohro avatar crissium avatar dmnmsc avatar eljamm avatar endolith avatar flyvint avatar gasinvein avatar glaumar avatar gostsdmitry avatar hugok79 avatar idesmi avatar kapsh avatar literacyfanatic avatar mnhauke avatar molokal avatar napcok avatar rainbowhxch avatar ricardo-simoes avatar sdip15fa avatar shatur avatar sikmir avatar sixg0000d avatar tim77 avatar trailblazing avatar transifex-integration[bot] avatar veksha avatar victorhck avatar virendracarpenter avatar volkmilit avatar wbs306 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crow-translate's Issues

Crash on Exit [Windows]

I experience crashes when I exit Crow Translate but I do not know whether there might be a bug in the program or my system is to blame. When exiting Crow Translate I sometimes get the following error message:

Crow Translate has stopped working
A problem caused the program to stop working correctly. Please close the program.

screen:

Crow Translate 2 2 2 - 2019-10-23 - error - 001

I will suggest how to try to reproduce the problem:

  1. start Crow Translate;
  2. maximize it from system tray;
  3. copy some chunk of text from a web browser;
  4. paste the text into Crow Translate and get it translated;
  5. clear the text boxes using Clear button;
  6. close Crow Translate to system tray;
  7. exit Crow Translate from system tray (Exit command);

This happens under Windows 8 x64.

A question is Crow Translate version 2.2.2 (crow-translate-2.2.2-win64.exe) x64-bit only? If so, why does it suggest to install in Program Files (x86) in stead of in Program Files?

Yandex translation issue

I'm trying to use the windows latest version... It is not working when I choose Yandex translation.
It said
"Error: Engine systems have detected suspicious traffic from your computer network. Please try your request again later."

Google and Bing are working though...

Fails to build from latest master

Steps to reproduce

git clone --recursive https://github.com/crow-translate/crow-translate
cd crow-translate
qmake-qt5
make -j4

Result

make fails with messages like

/usr/x86_64-pc-linux-gnu/include/qt5/QtCore/qvector.h:607:33: error: no matching function for call to 'QExample::QExample()'
/usr/x86_64-pc-linux-gnu/include/qt5/QtCore/qvector.h:607:33: error: no matching function for call to 'QOption::QOption()'

build.log

Bisected this to c0612c5

Translate selection shorctut does not work

Hi,
os : ubuntu 19.4 | Gnome GNOME Shell 3.32.2

selected text doesnot work... has any flag to get log of the program ?
i don't know just what happend... ( shortcut does execute ? read selection text has problem... ? or something else )

i can use cli and it's work ( also open main windows and translate on them does work )

please add a flag to debug.
also can add some place to cach all of voice ?

Portable Version [Windows]

Preamble

After using QTranslate (desktop program) and Translate Man (browser extension- Chromium, Firefox) for quite some time, several days ago I came across Crow Translate (on AlternativeTo). QTranslate is a well-designed and mature program but it is neither cross platform nor open source. As sooner or later I will have to switch from Windows to Linux (Windows 8 will be my last Windows version as I have not even considered updating to spyware Windows 10) I decided to have a look at Crow Translate. Screenshots and programming language usually can tell a lot so even before testing Crow Translate I supposed I would like the program- native (written in C++, no .NET, no Java, no abominations like JavaScript/Electron), cross platform and open source, clean interface, decent customization options. Testing Crow Translate just confirmed my expectations- the program is a keeper. Yet it does not (yet) have one of the virtues of QTranslate- portable version.

Request

As I mentioned above QTranslate has a portable version- one needs just to download the archive, extract it, run the executable and all settings will be saved in a configuration file (Options.json) in a sub-folder (Data) inside program folder. As the portable version of QTranslate does not write neither to Windows Registry nor to AppData the user can easily move the program from machine to machine with all its settings.

Currently Crow Translate saves settings to Windows Registry:

HKEY_CURRENT_USER\Software\Crow\Crow Translate

The most important about portable version of a program (or a program running in portable mode) is that all settings are saved in a configuration file (Config, INI, JSON, XML, etc) inside program folder and nothing is written neither in AppData nor in Windows Registry. Portability can be implemented in different ways, I will provide several examples below:

  1. portable version - separate portable version- the program is packed in archive, the user extracts the archive and runs the executable, settings are saved in a configuration file in program folder;
  2. command-line argument - if crow.exe is started with a specific parameter, for example crow.exe -portable, settings are saved in a configuration file in program folder;
  3. portable flag - specific file in program folder (for example portable without extension or portable.txt) triggers portable mode, when Crow Translate starts it checks program folder for such file and if it is there settings are saved in a configuration file in program folder;
  4. configuration file - when Crow Translate starts it checks program folder for a configuration file and if it is there the program uses it;
  5. special sub-folder - when Crow Translate starts it checks program folder for a special sub-folder (for example Data or Settings) and if it is there it saves settings in a configuration file in this sub-folder;
  6. executable name - if the executable is renamed from crow.exe to crow-portable.exe the program starts in portable mode, settings are saved in a configuration file in program folder;
  7. option in settings - new check box- Portable mode, which, if selected, forces the program to save settings in a configuration file in program folder;
  8. portable installation - when the program is installed beside normal installation it offers also portable installation (extraction), which just extracts the files to a folder specified by the user and settings are saved in a configuration file in program folder;

There may be other ways of triggering portable mode but I suppose the ones I suggested above are the most common. I prefer methods 1, 3, 4 and 5 but any of them would do once Crow Translate can save settings to configuration file and load settings from configuration file (and thus not using Windows Registry for saving/loading settings).

Advantage

I think that portable programs (or programs running in portable mode) have several advantages:

  • mobility - portable programs can be easily transferred from machine to machine with all their data and settings;
  • backup - portable programs are easy to back up to external drives or to cloud services (in case one needs to re-install OS);
  • testing - portable programs facilitate testing- one can test different versions (stable, alpha, beta) with different settings;

So I will be glad if you consider implementing portable mode for Crow Translate in future releases. I believe that if there is portable version of Crow Translate (or it can run in portable mode) this would add more flexibility to the already quite promising program.

Unable to build on Arch Linux

it says I miss something and actually it did not exist in the project source code folder

~>> ddqi@ddqi-pc  ~/tmp/crow-translate-2.0.0  qmake
Cannot read /home/ddqi/tmp/crow-translate-2.0.0/src/qonlinetranslator/qonlinetranslator.pri: No such file or directory
Cannot read /home/ddqi/tmp/crow-translate-2.0.0/src/qgittag/qgittag.pri: No such file or directory
Cannot read /home/ddqi/tmp/crow-translate-2.0.0/src/third-party/qhotkey/qhotkey.pri: No such file or directory
Cannot read /home/ddqi/tmp/crow-translate-2.0.0/src/third-party/singleapplication/singleapplication.pri: No such file or directory
Updating '/home/ddqi/tmp/crow-translate-2.0.0/data/translations/crow_ru.qm'...
    Generated 289 translation(s) (289 finished and 0 unfinished)
~>> ddqi@ddqi-pc  ~/tmp/crow-translate-2.0.0  make 
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DQAPPLICATION_CLASS=QApplication -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o main.o src/main.cpp
src/main.cpp:21:10: 致命错误:singleapplication.h:没有那个文件或目录
 #include "singleapplication.h"
          ^~~~~~~~~~~~~~~~~~~~~
编译中断。
make: *** [Makefile:1184:main.o] 错误 1

Can't install or update on Windows 10

v 2.2.2 , 2.2.1 also - Win 10

1 / I execute the installation file (the application is closed)
2019-10-28_11h23_23
or, from the software I run the update
2/ every time there is this error message when the files are copied to the folder
"impossible to write"

3/ I solved this problem by activating the administrator mode of Windows 10 by opening the installation file
I am stuck for the update from the application.
(by opening a software in administrator mode, there is some software that creates another folder with user data and I could notice the loss of my software user settings) (by disabling the administrator mode my user data is retrieved)

I think it would be necessary before the update from the application and the opening of the installation file cause the display of the window to ask to activate the administrator mode (to allow the software to bring changes).
Generally this method is used by the software, I could see it and AntDM uses this method.

I do not know if I can reproduce this problem under Windows 7 or Windows 8 but if my memory does not fail me, with AntDM, it seems to me that with Windows 7 there was not this problem.

GUI only launches on second try

First launch only starts the background process. Second launch launches the GUI and "The application is already running" warning. Also happens with global shortcuts.

System: Manjaro KDE
App source: AUR

Build on linux error 2.2.0

Hello, i building on ROSA Linux R11 crow-translation v2.2.0 and crash on error

/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib64/qt5/mkspecs/linux-g++-64 -o playerstoppedtransition.o src/transitions/playerstoppedtransition.cpp
src/cli.cpp: In member function 'void Cli::printTranslation()':
src/cli.cpp:198:30: error: expected unqualified-id before '[' token
             for (const auto &[word, gender, translations] : it.value()) {
                              ^
src/cli.cpp:198:30: error: expected ';' before '[' token
src/cli.cpp:198:31: error: 'word' was not declared in this scope
             for (const auto &[word, gender, translations] : it.value()) {
                               ^
src/cli.cpp:198:37: error: 'gender' was not declared in this scope
             for (const auto &[word, gender, translations] : it.value()) {
                                     ^
src/cli.cpp:198:45: error: 'translations' was not declared in this scope
             for (const auto &[word, gender, translations] : it.value()) {
                                             ^
src/cli.cpp: In lambda function:
src/cli.cpp:198:59: error: expected '{' before ':' token
             for (const auto &[word, gender, translations] : it.value()) {
                                                           ^
src/cli.cpp: In member function 'void Cli::printTranslation()':
src/cli.cpp:198:59: error: expected ';' before ':' token
src/cli.cpp:198:59: error: expected primary-expression before ':' token
src/cli.cpp:198:59: error: expected ')' before ':' token
src/cli.cpp:198:59: error: expected primary-expression before ':' token
src/cli.cpp:214:30: error: expected unqualified-id before '[' token
             for (const auto &[example, description] : it.value()) {
                              ^
src/cli.cpp:214:30: error: expected ';' before '[' token
src/cli.cpp:214:31: error: 'example' was not declared in this scope
             for (const auto &[example, description] : it.value()) {
                               ^
src/cli.cpp:214:40: error: 'description' was not declared in this scope
             for (const auto &[example, description] : it.value()) {
                                        ^
src/cli.cpp: In lambda function:
src/cli.cpp:214:53: error: expected '{' before ':' token
             for (const auto &[example, description] : it.value()) {
                                                     ^
src/cli.cpp: In member function 'void Cli::printTranslation()':
src/cli.cpp:214:53: error: expected ';' before ':' token
src/cli.cpp:214:53: error: expected primary-expression before ':' token
src/cli.cpp:214:53: error: expected ')' before ':' token
src/cli.cpp:214:53: error: expected primary-expression before ':' token
g++ -c -O2 -Wa,--compress-debug-sections -gdwarf-4 -fvar-tracking-assignments -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -ffat-lto-objects -fno-delete-null-pointer-checks -fstack-protector --param=ssp-buffer-size=4 -fPIC -DPIC -fPIC -std=gnu++1z -Wall -W -D_REENTRANT -fPIC -DQ_TASKBAR_CONTROL_EXPORT= -DQAPPLICATION_CLASS=QApplication -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -Isrc/qonlinetranslator/src -Isrc/qgittag/src -Isrc/third-party/qhotkey/QHotkey -Isrc/third-party/qtaskbarcontrol -Isrc/third-party/singleapplication -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtX11Extras -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib64/qt5/mkspecs/linux-g++-64 -o settingsdialog.o src/settings/settingsdialog.cpp
make: *** [Makefile:936: cli.o] Error 1
make: *** Waiting for unfinished jobs....
error: Неверный код возврата из /var/tmp/rpm-tmp.25404 (%build)


Ошибки сборки пакетов:
    Неверный код возврата из /var/tmp/rpm-tmp.25404 (%build)

Qt 5.11

[Windows] 2.2.1 build has no sys tray icon

With 2.2.1 update, system tray icon has gone. Only way to activate the window is via shortcut.
I checked the settings and it's the same as before, so I'm guessing there is a problem with the new build?

Ubuntu package

Missing .deb package release and option update inside software

Portugal flag instead of Brazilian

In Settings (gear icon) > General > Language the option for "Português (Brasil)" shows the flag of Portugal instead of the Brazilian flag.

Add the ability to control the app via CLI

I really like this app. The most used feature for me is the text speaking shortcut (control+alt+f). An icon (in Linux panel or above all windows) that speak the translation of the selected text would be more practical than the shortcut.
I don't know if there are some way to create a launcher for a keyboard shortcut on Linux...

Esc shortcut

Please add an 'Esc' hot key to empty the window at once instead of using "Backspace" button to delete letter by letter.

Error: Dependency is not satisfiable: libqt5core5a

Hello
I downloaded the correct deb file for my system (Linux Mint 18.3) but I get the above error every time. My system already has the libqt5core5 file, perhaps not the correct version, but I cannot install a more recent version (I nearly ruined my Linux installation trying to manually install the file!). The create-package.sh didn't seem to work either. It just creates 3 very small files (total about 8kb in size) outside the crow-translate-2.1.0 folder. Excuse me if I haven't given enough info or explained correctly. I'm semi-Linux literate. Thanks

https://github.com/crow-translate/crow-translate#automatic-script

Add a remove button for languages

Thanks for this application ( discover on the PCLinuxOS Magazine April 2019 ).

Crow Translate version 2.1.0 in the repository.

Can we have also a button to remove languages that we added before ?

crowtranslate-remove-button

In my linux system ( PCLinuxOS ), the only way I found is to :

go to my home folder
shows hidden files
go to .config folder
delete the crow folder

Start or restart the application.

PS : the reset config keeps all language add before.

Thanks

Add clear field icon

Please, add clear this field icon / option, as it is possible on original Bing / Google translators sites.

I marked this in red color:
https://imgur.com/MPH8e8r

It makes use more comfortable, because user doesn't need to mark the whole text before deleting and pasting a new one.

Functional suggestion: replace the selected text with the translation.

QTranslate has this very practical feature. I would like you to add it to your application.

  1. We select the text
  2. With keyboard shortcuts, the window is displayed with the translation.
  3. I would like to add a button to close this window and replace the selected text with the translation.

Toggle main window with same key

It would be great if we can toggle main window with same key instead of closing with Esc.
Like this: If window active, same key closes; else, activate main window.

[Fedora 31] Nothing provides qt-gstreamer

It is not possible to install the package from the COPR on Fedora 31:
sudo dnf install crow-translate
Error:
Problem: conflicting requests

  • nothing provides qt-gstreamer needed by crow-translate-2.2.1-2.fc31.x86_64
  • nothing provides qt-gstreamer needed by crow-translate-2.2.2-1.fc31.x86_64

Cannot ./create-package.sh on Ubuntu 19.04

Log:

$ ./create-package.sh 
Installing dependencies...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
devscripts is already the newest version (2.19.4).
libqt5x11extras5-dev is already the newest version (5.12.2-1).
qtmultimedia5-dev is already the newest version (5.12.2-1).
qttools5-dev-tools is already the newest version (5.12.2-1).
qt5-default is already the newest version (5.12.2+dfsg-4ubuntu1.1).
qt5-qmake is already the newest version (5.12.2+dfsg-4ubuntu1.1).
qtbase5-dev is already the newest version (5.12.2+dfsg-4ubuntu1.1).
qtbase5-dev-tools is already the newest version (5.12.2+dfsg-4ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
.github/
...
[snip]
...
src/updaterdialog.ui
 dpkg-buildpackage -us -uc -ui -i
dpkg-buildpackage: info: source package crow-translate
dpkg-buildpackage: info: source version 2.2.2-1
dpkg-buildpackage: info: source distribution buster
dpkg-buildpackage: info: source changed by Hennadii Chernyshchyk <[email protected]>
 dpkg-source -i --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 8)
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i failed

Unbale to install

Hi i really love crow translate it's simple and easy to use, i can install it from manjaro with Aur but i just change to ubuntu 19.04 try to install it but fail i got this error

WARNING: Project ERROR: Unknown module(s) in QT: winextras

is there any deb package i can use

thanks

Error when make package on Debian

  1. Download https://github.com/crow-translate/crow-translate/releases/tag/2.2.1
  2. Run create-package.sh
  3. Have error:

make[1]: вход в каталог «/home/vasya/Загрузки/crow-translate-2.2.1»
/usr/lib/qt5/bin/uic src/playerbuttons.ui -o ui_playerbuttons.h
/usr/lib/qt5/bin/uic src/settings/settingsdialog.ui -o ui_settingsdialog.h
/usr/lib/qt5/bin/uic src/mainwindow.ui -o ui_mainwindow.h
/usr/lib/qt5/bin/uic src/popupwindow.ui -o ui_popupwindow.h
/usr/lib/qt5/bin/uic src/addlangdialog.ui -o ui_addlangdialog.h

g++ -c -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -W -D_REENTRANT -fPIC -DQAPPLICATION_CLASS=QApplication -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Isrc -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o src/main.cpp
In file included from src/main.cpp:21:
src/mainwindow.h:24:10: fatal error: qonlinetranslator.h: Нет такого файла или каталога
#include "qonlinetranslator.h"
_______^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

make[1]: *** [Makefile:700: main.o] Ошибка 1
make[1]: выход из каталога «/home/vasya/Загрузки/crow-translate-2.2.1»
dh_auto_build: make -j1 returned exit code 2
make: *** [debian/rules:3: build] Ошибка 25
dpkg-buildpackage: ошибка: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i failed
rm -f qrc_resources.cpp
rm -f moc_predefs.h
rm -f moc_cli.cpp moc_playerbuttons.cpp moc_settingsdialog.cpp moc_appsettings.cpp moc_shortcutsmodel.cpp moc_shortcutsview.cpp moc_mainwindow.cpp moc_popupwindow.cpp moc_langbuttongroup.cpp moc_addlangdialog.cpp moc_sourcetextedit.cpp moc_translationedit.cpp moc_trayicon.cpp
rm -f ui_playerbuttons.h ui_settingsdialog.h ui_mainwindow.h ui_popupwindow.h ui_addlangdialog.h
rm -f main.o cli.o playerbuttons.o languagedetectedtransition.o playerstoppedtransition.o settingsdialog.o appsettings.o shortcutitem.o shortcutsmodel.o shortcutsview.o mainwindow.o popupwindow.o langbuttongroup.o addlangdialog.o sourcetextedit.o retranslationtransition.o textemptytransition.o translatorabortedtransition.o translatorerrortransition.o translationedit.o trayicon.o qrc_resources.o moc_cli.o moc_playerbuttons.o moc_settingsdialog.o moc_appsettings.o moc_shortcutsmodel.o moc_shortcutsview.o moc_mainwindow.o moc_popupwindow.o moc_langbuttongroup.o moc_addlangdialog.o moc_sourcetextedit.o moc_translationedit.o moc_trayicon.o
rm -f *~ core *.core
rm: невозможно удалить 'crow': Нет такого файла или каталога

Recursive clone doesn't work

Some repo permissions seem to be broken:

$ git clone --recursive https://github.com/crow-translate/crow-translate.git
Cloning into 'crow-translate'...
remote: Enumerating objects: 253, done.
remote: Counting objects: 100% (253/253), done.
remote: Compressing objects: 100% (164/164), done.
remote: Total 2752 (delta 152), reused 175 (delta 83), pack-reused 2499
Receiving objects: 100% (2752/2752), 23.93 MiB | 5.16 MiB/s, done.
Resolving deltas: 100% (1741/1741), done.
Submodule 'src/qgittag' ([email protected]:crow-translate/QGitTag.git) registered for path 'src/qgittag'
Submodule 'src/qonlinetranslator' ([email protected]:crow-translate/QOnlineTranslator.git) registered for path 'src/qonlinetranslator'
Submodule 'src/third-party/pvs-studio' (https://github.com/viva64/pvs-studio-qmake-examples.git) registered for path 'src/third-party/pvs-studio'
Submodule 'src/third-party/qhotkey' (https://github.com/Skycoder42/QHotkey.git) registered for path 'src/third-party/qhotkey'
Submodule 'src/third-party/singleapplication' (https://github.com/itay-grudev/SingleApplication.git) registered for path 'src/third-party/singleapplication'
Cloning into '/tmp/crow-translate/src/qgittag'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:crow-translate/QGitTag.git' into submodule path '/tmp/crow-translate/src/qgittag' failed
Failed to clone 'src/qgittag'. Retry scheduled
Cloning into '/tmp/crow-translate/src/qonlinetranslator'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:crow-translate/QOnlineTranslator.git' into submodule path '/tmp/crow-translate/src/qonlinetranslator' failed
Failed to clone 'src/qonlinetranslator'. Retry scheduled
Cloning into '/tmp/crow-translate/src/third-party/singleapplication'...
remote: Enumerating objects: 6, done.        
remote: Counting objects: 100% (6/6), done.        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 379 (delta 0), reused 3 (delta 0), pack-reused 373        
Receiving objects: 100% (379/379), 132.67 KiB | 1.79 MiB/s, done.
Resolving deltas: 100% (198/198), done.
Cloning into '/tmp/crow-translate/src/third-party/pvs-studio'...
remote: Enumerating objects: 23, done.        
remote: Total 23 (delta 0), reused 0 (delta 0), pack-reused 23        
Cloning into '/tmp/crow-translate/src/qonlinetranslator'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:crow-translate/QOnlineTranslator.git' into submodule path '/tmp/crow-translate/src/qonlinetranslator' failed
Failed to clone 'src/qonlinetranslator' a second time, aborting
Cloning into '/tmp/crow-translate/src/qgittag'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:crow-translate/QGitTag.git' into submodule path '/tmp/crow-translate/src/qgittag' failed
Failed to clone 'src/qgittag' a second time, aborting
Cloning into '/tmp/crow-translate/src/third-party/qhotkey'...
remote: Enumerating objects: 4, done.        
remote: Counting objects: 100% (4/4), done.        
remote: Compressing objects: 100% (4/4), done.        
remote: Total 1311 (delta 0), reused 2 (delta 0), pack-reused 1307
Receiving objects: 100% (1311/1311), 2.13 MiB | 7.38 MiB/s, done.
Resolving deltas: 100% (939/939), done.

Version 2.2.2 Unavailable for Windows

The latest version of Crow Translate- 2.2.2, is not available for download for Windows, screen:

Crow Translate 2 2 1 - 2019-02-27 - 005

The latest available version for Windows is 2.2.1.

However the update check finds new version (2.2.2), screen:

Crow Translate 2 2 1 - 2019-02-27 - 007

Was this a wrong upload or there is a special reason why version 2.2.2 was not released for Windows?

Add close button to popup window

Tapping on empty place does not work in some situations, for instance, when I change foreground window to another and trying to click on it. That's happening in wayland.

Configurable font size

thanks for this program
i have ideas
please added button on settings for change size font's
thanks

Wrong Mail Address in About

The mail address in About is wrong, when one clicks the mail link it opens in the mail client a different mail address (actually the mail address of the developer of a famous open source torrent client), screen:

Crow Translate 2 2 1 - 2019-02-27 - 003

To confirm the problem just start Crow Translate, open Settings, go to About, click the mail link and see what mail address opens in the mail client.

Adding custom translator sites and store words

Здравствуйте, Геннадий.
Hi, Hennadii.
Is it possible to implement adding custom translator sites and storing custom words with some notes?
There was Firefox add-on named DictionaryTip which has been long years ago abandoned but still functioning good. It doesn't use API but passes searching words or phrases via URL-string into web-version of Translator site and displays it in separate window(frame).

Screenshot of the main window(frame):

2019-03-02_123528

Settings window:

2019-03-02_123219

WordList window:

2019-03-02_124025

Reset settings change the Type of Proxy server

Hi

crow-translate 2.1.0

By default the setting connection Type is : Use system settings
Connection-before-reset-settings

After a click on the Reset settings button, Type is : SOCKS5
Connection-after-reset-settings

Consequence : lost connection, Host translate.googleapis.com not found
after-reset

To resolve : Change SOCKS5 to Use system settings

System Linux : PCLinuxOS

Not building on Debian Stretch

I'm using the build script which installs the dependencies so I'm not sure what the problem is. The errors are:

In file included from src/main.cpp:22:0:
src/appsettings.h:160:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultTranslateSelectionHotkey()’ is not a literal type
     constexpr const char *defaultTranslateSelectionHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:31:7: note: ‘AppSettings’ is not literal because:
 class AppSettings : private QSettings
       ^~~~~~~~~~~
src/appsettings.h:31:7: note:   ‘AppSettings’ has a non-trivial destructor
src/appsettings.h:165:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultPlaySelectionHotkey()’ is not a literal type
     constexpr const char *defaultPlaySelectionHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:170:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultPlayTranslatedSelectionHotkey()’ is not a literal type
     constexpr const char *defaultPlayTranslatedSelectionHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:175:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultStopSelectionHotkey()’ is not a literal type
     constexpr const char *defaultStopSelectionHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:180:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultShowMainWindowHotkey()’ is not a literal type
     constexpr const char *defaultShowMainWindowHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:185:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultCopyTranslatedSelectionHotkey()’ is not a literal type
     constexpr const char *defaultCopyTranslatedSelectionHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:191:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultTranslateHotkey()’ is not a literal type
     constexpr const char *defaultTranslateHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:196:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultCloseWindowHotkey()’ is not a literal type
     constexpr const char *defaultCloseWindowHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:201:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultPlaySourceHotkey()’ is not a literal type
     constexpr const char *defaultPlaySourceHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:206:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultStopSourceHotkey()’ is not a literal type
     constexpr const char *defaultStopSourceHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:211:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultPlayTranslationHotkey()’ is not a literal type
     constexpr const char *defaultPlayTranslationHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:216:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultStopTranslationHotkey()’ is not a literal type
     constexpr const char *defaultStopTranslationHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/appsettings.h:221:27: error: enclosing class of constexpr non-static member function ‘const char* AppSettings::defaultCopyTranslationHotkey()’ is not a literal type
     constexpr const char *defaultCopyTranslationHotkey()
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:701: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory '/tmp/crow-translate'
dh_auto_build: make -j1 returned exit code 2
debian/rules:3: recipe for target 'build' failed
make: *** [build] Error 25
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -i failed
rm -f qrc_resources.cpp
rm -f moc_qonlinetranslator.cpp moc_qgittag.cpp moc_qhotkey.cpp moc_qhotkey_p.cpp moc_singleapplication.cpp moc_singleapplication_p.cpp moc_settingsdialog.cpp moc_mainwindow.cpp moc_popupwindow.cpp moc_appsettings.cpp moc_langbuttongroup.cpp moc_addlangdialog.cpp
rm -f ui_settingsdialog.h ui_mainwindow.h ui_popupwindow.h ui_addlangdialog.h
rm -f qonlinetranslator.o qexample.o qoption.o qgitasset.o qgittag.o qhotkey.o qhotkey_x11.o singleapplication.o singleapplication_p.o main.o settingsdialog.o mainwindow.o popupwindow.o appsettings.o langbuttongroup.o addlangdialog.o qrc_resources.o moc_qonlinetranslator.o moc_qgittag.o moc_qhotkey.o moc_qhotkey_p.o moc_singleapplication.o moc_singleapplication_p.o moc_settingsdialog.o moc_mainwindow.o moc_popupwindow.o moc_appsettings.o moc_langbuttongroup.o moc_addlangdialog.o
rm -f *~ core *.core
rm: cannot remove 'crow': No such file or directory

Add preferred languages

The ideal (for me) would be like in qtranslator (windows). can you add an option if text ISN'T in italian (for example), translate to italian. if text is in italian, tranlate in english. thank you

Error Message "TLS initialization failed"

OS: Windows 10 Pro x64
Version: Crow-Translate-2.1.0-win64

When I try to translate something using Google or Yandex the message "TLS initialization failed" show on the output instead of the translation.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.