Giter Club home page Giter Club logo

screentranslator's Introduction

Screen Translator

The project is almost abandoned. I don't have time for it and I can only fix minor issues

Introduction

This software allows you to translate any text on screen. Basically it is a combination of screen capture, OCR and translation tools. Translation is currently done via online services.

Installation

Windows: download archive from github releases page, extract it and run .exe file.

If the app fails to start complaining about missing dlls or there are any update errors related to SSL/TLS then install or repair vs_redist*.exe from the release archive.

Linux: download .AppImage file from github releases, make executable (chmod +x <file>) and run it.

OS X: currently not supported.

App translation

To install Hebrew translation of the app (thanks to Y-PLONI), download this file and place it into the translations folder next to screen-translator.exe.

Setup

The app doesn't have a main window. After start it shows only the tray icon.

If the app detects invalid settings, it will show the error message via system tray. It will also highlight the section name in red on the left panel of the settings window. Clicking on that section name will show a more detailed error message in the right panel (also in red).

The packages downloaded from this site do not include resources, such as recognition language packs or scripts to interact with online translation services.

To download them, open the settings window and go to the Update section. In the right panel, expand the recognizers and translators sections. Select preferred items, then right click and choose Install/Update. After the progress bar reaches 100%, the resource's state will change to Up to Date.

You must download at least one recognizers resource and one translators resource.

After finishing downloads, go to the Recognition section and update the default recognition language setting (the source to be translated). Then go to the Translation section, update the default translation language setting (the language to be translated into) and enable some or all translation sevices (you may also change their order by dragging).

After that all sections in the left panel should be black. Then click Ok to close settings.

Usage

  1. Run program (note that it doesn't have main window).
  2. Press capture hotkey.
  3. Select region on screen. Customize it if needed.
  4. Get translation of recognized text.
  5. Check for updates if something is not working.

FAQ

By default resources are downloaded to the one of the user's folders. If Portable setting in General section is checked, then resources will be downloaded to the app's folder.

Set QTWEBENGINE_DISABLE_SANDBOX=1 environment variable when fail to start due to crash.

Answers to some frequently asked questions can be found in issues or wiki

Limitations

  • Can not capture some dynamic web-pages/full screen applications

Dependencies

Build from source

Look at the scripts (python3) in the share/ci folder. Normally, you should only edit the config.py file.

Build dependencies at first, then build the app.

Attributions

screentranslator's People

Contributors

onemoregres avatar ratevandr 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  avatar  avatar  avatar  avatar  avatar

screentranslator's Issues

GUI won't launch on Linux (AppImage)

When running the AppImage from the terminal, the process starts with no errors but the GUI never launches. As such, the program cannot be used.

Capture saved area feature wont work

Describe the bug
I capture an area and if I try to select "Capture saved area" it is greyed out and non selectable

To Reproduce
Steps to reproduce the behavior:

  1. Capture an area of the screen
  2. Try click on Capture saved area but it is greyed out and non selectable
  3. nothing happends

Expected behavior
You can select Capture saved area

Screenshots
Capture

Desktop (please complete the following information):

  • OS: [windows 10]
  • App version: 3.0 [e.g. ersion (windows only): [win32]

How come the japanese transaltions are so bad

秀尽学圏の皆さル、 おはようごさいます。
聞もなく泪掃活動を關始します。

Screen translator: I ’m so happy with you. We will start crushed life without orchids.

google translation: Good morning to all the students in the school.
The cleanup activities will begin without any questions.

How come the translations are so inacurate? (There are more examples I have than just this)

Do I have to drag my mouse all the time?

Is there a way to make to so I when I press the hot key it only a specified part of the screen is translated instead of having to constatly drag my mouse to translate it?

jpn_vert Language Package Catastrophic Errors

Describe the bug
When Using the jpn_vert language setting, the output of the OCR is gibberish. This is then correctly passed the the translator, which understandably returns more gibberish.

To Reproduce
Using Packages Japanese and jpn_vert. (Assuming this is the correct package per comments on Issue #36)

Steps to reproduce the behavior:

  1. Open this Test Image in Browser: https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/0defd578-acc6-4efd-a77f-42187cfab2e8/02-japanese-02.jpg

  2. With the Japanese Package selected, run translation on both Horizontal and Vertical Sections.
    a. Horizontal Section
    image
    b. Vertical Section
    image
    This returns correctly, although the input from the OCR to the Translator on the vertical section is grammatically broken.

  3. Repeat Step 2 with the jpn_vert Package
    a. Horizontal Section
    image
    b. Vertical Section
    image
    Output from OCR is Garbled

  4. See error?

Expected behavior
Should return the same translation, for the correct version of text.

Logs
Note: During the log file recording I first ran the jpn_vert package, then the Japanese package.
screen-translator-2021-03-20-00-41-16.txt
Added a .txt to allow GitHub upload.

Screenshots
Added In-Line

Desktop (please complete the following information):

  • OS: Windows 10
  • App version (release archive name): 3.1.2-win64

Additional context
N/A

Suggestion: Make the Workflow More Visible

I suggest moving the "program workflow" out of the About and somewhere more obvious.

My first thought would be just keep it always visible on the Settings pane. You have tons of UI space below the 7 categories on the left.

Screen translator won't work, failed to init OCR engine: init failed

Describe the bug
I installed the program, installed all all the updates required (recognition, translators, etc.) and tried to translate something but the error "Failed to init OCR engine: init failed" appeared and no matter what I do it still is the same. I went to show translators and in all of them the url is about: blank

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'ctrl+alt+z'
  2. Click on 'the text I wanted to translate and drag to take a capture'
  3. See error 'Failed to init OCR engine: init failed'

Expected behavior
wll I expected a window to pop out and show the translation instead of the error message

Logs
It won't let me take a capture during recording the logs, so I can't send them

Screenshots
image

Desktop (please complete the following information):

  • OS: windows 10
  • Desktop environment (linux only): [e.g. KDE, Gnome]
  • App version (release archive name): 3.2.0-win32

Additional context
Add any other context about the problem here.

Правки распознанного текста/Яндекс API

Перестали работать правки текста. Правлю, распознаю, а текст сбрасывается до изначально распознанного. Все обновления последней версии.
Возможно ли подключить Яндекс API, как это реализовано в XUnity.AutoTranslator. Или возможно есть другой способ обхода автоматических запросов Яндекса?

Nothing's working.

Every time I highlight an area of text for translation, the application itself starts to translate and if I move the cursor over it in the tray, it simply closes. The settings seem to have been set correctly, and when selected it shows "eng to ru".
Used both deepl and yandex. Everything was updated to the latest version.
I'm attaching the log.
stLOG.txt

Vertical text

Is there a way to set ScreenTranslator to expect vertical text, commonly used in Japanese for example?

Program crash with Optimized Library Version

Hello and thanks for this program.

Describe the bug
When I select the text to translate the program closes.

To Reproduce
Steps to reproduce the behavior:

  1. Start the program
  2. Use the Ctrl + Alt + Z shortcut
  3. Select the area to translate with the left click
  4. The program closes

Expected behavior
Get the translated text.

Logs
2020-07-26T23:56:11 11468 :0 DEBUG Created page scriptName= "google.js"
2020-07-26T23:56:11 11224 :0 DEBUG Cleared OCR engines
2020-07-26T23:56:21 11468 :0 DEBUG captured Task(Gen=35, pix=QSize(336, 36), rec="", cor="", tr="", lang=eng-spa, err="")
2020-07-26T23:56:21 11224 :0 DEBUG Start recognize QPixmap(QSize(336, 36),depth=32,devicePixelRatio=1,cacheKey=0x2c0900000024)
2020-07-26T23:56:21 11224 :0 DEBUG Create OCR engine "eng"
2020-07-26T23:56:21 11224 :0 DEBUG Loaded tesseract library "tesseract-optimized.dll"
2020-07-26T23:56:21 11224 :0 DEBUG Created Tesseract api 0x20dbe36c140
2020-07-26T23:56:22 11224 :0 DEBUG Inited Tesseract api 0
2020-07-26T23:56:22 11224 :0 DEBUG Added OCR engine "eng"
2020-07-26T23:56:22 11224 :0 DEBUG Converted Pix 0x20dc3c88040
2020-07-26T23:56:22 11224 :0 DEBUG Created gray Pix 0x20dc3c87d70
2020-07-26T23:56:22 11224 :0 DEBUG Removed converted Pix
2020-07-26T23:56:22 11224 :0 DEBUG Scaled Pix for OCR scale= 3.47222 scaled= 0x20dc3c878c0
2020-07-26T23:56:22 11224 :0 DEBUG Removed unscaled Pix
2020-07-26T23:56:22 11224 :0 DEBUG Preprocessed Pix for OCR 0x20dc3c878c0
2020-07-26T23:56:22 11224 :0 DEBUG Set Pix to engine

Desktop (please complete the following information):

  • OS: windows 10
  • App version: ScreenTranslator-3.1.0-win64

Additional context
Recognition selected: English with Optimezed Lybrary Version
Translator: google.js
All updated
When I select the Compatible Lybrary Version everything works but a little slow.

Regards.

Incorrect screen capture on linux system

In Manager.cpp you can replace

QPixmap pixmap = screen->grabWindow (0, geometry.x (), geometry.y (),
                                         geometry.width (), geometry.height ());

to

QPixmap pixmap = screen->grabWindow (0, 0, 0,
                                         geometry.width (), geometry.height ());

Translate result is the same language that I just circled

Describe the bug
Translate result is the same language that I just circled
To Reproduce
Steps to reproduce the behavior:

  1. select the thing that I wanted to translate
  2. wait for it
  3. and it shows the same language same line

Expected behavior
show the translation language that I select

issue:
bug

ScreenTranslator settings:
Settings 2020_12_6 下午 05_46_56
Settings 2020_12_6 下午 05_47_00
Settings 2020_12_6 下午 05_47_07
Settings 2020_12_6 下午 05_47_11

Desktop (please complete the following information):
-OS: Windows 10
-App version: ScreenTranslator-3.1.0-win64

Windows installer for 3.0 version

Hey,
First big thank you for such nice tool.
I used for a while version 2. and happy to see new release 3.0.
As i see there are only files for 32 and 64 version for Windows.
Could you please make installer for them? i've tried to use just files and start translator, but there is no recognition data and no translation data in folders.

Will be great to have automatically installed all required data.

Thank you

AppImage fails to run on Ubuntu xenial

Hi, thanks for making an AppImage. However it does not run on Ubuntu xenial:

Got keys from plugin meta data ("jpg", "jpeg")

QFactoryLoader::QFactoryLoader() checking directory path "/run/firejail/appimage/.appimage-9188/usr/bin/imageformats" ...

loaded library "/run/firejail/appimage/.appimage-9188/usr/plugins/imageformats/libqgif.so"

loaded library "/run/firejail/appimage/.appimage-9188/usr/plugins/imageformats/libqico.so"

loaded library "/run/firejail/appimage/.appimage-9188/usr/plugins/imageformats/libqjpeg.so"

"No translators loaded from\n/home/travis/.local/share/Gres/ScreenTranslator/assets/translators\n(google.js)"

QFactoryLoader::QFactoryLoader() checking directory path "/run/firejail/appimage/.appimage-9188/usr/plugins/accessiblebridge" ...

QFactoryLoader::QFactoryLoader() checking directory path "/run/firejail/appimage/.appimage-9188/usr/bin/accessiblebridge" ...

NUMBER_OF_WINDOWS: 0

How was this AppImage produced?

Detailed log:
https://travis-ci.org/github/AppImage/appimage.github.io/builds/687744827?utm_source=github_status&utm_medium=notification

Reference:
AppImage/appimage.github.io#1998

How to add recognizer? I select a language in the update tab and hit apply, the message says "no action selected".

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Application log file recorded during an error.
To start recording a log file, open the settings window,
enable the 'write trace file' option and apply the settings.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. windows 10, ubuntu 18.04]
  • Desktop environment (linux only): [e.g. KDE, Gnome]
  • App version (release archive name): [e.g. 3.0.0-win32, 3.0.0-compatible-win64]

Additional context
Add any other context about the problem here.

RCC: Error in 'Recources.qrc': Cannot find file 'translations/translation_en.qm'

в описании нет

первая ошибка, вроде разобрался

root@net:/opt/ScreenTranslator# qmake
RCC: Error in 'Recources.qrc': Cannot find file 'translations/translation_en.qm'
RCC: Error in 'Recources.qrc': Cannot find file 'translations/translation_ru.qm'
root@net:/opt/ScreenTranslator#
root@net:/opt/ScreenTranslator/translations# ls
translation_en.ts translation_ru.ts
root@net:/opt/ScreenTranslator/translations# cp translation_en.ts translation_en.qm
root@net:/opt/ScreenTranslator/translations# cp translation_ru.ts translation_ru.qm

вторая ошибка

Recognizer.cpp:3:31: fatal error: tesseract/baseapi.h: Нет такого файла или каталога
#include <tesseract/baseapi.h>
^
compilation terminated.
Makefile:598: ошибка выполнения рецепта для цели «Recognizer.o»
make: *** [Recognizer.o] Ошибка 1

разобрался, заглянул в папку скрипты

sudo apt-get install libxcb-util0-dev fakeroot libtesseract-dev libleptonica-dev qt5-qmake libqt5webkit5-dev libqt5x11extras5-dev qttools5-dev-tools g++

не хватало
НОВЫЕ пакеты, которые будут установлены:
libleptonica-dev libtesseract-dev libtesseract3

третья ошибка
root@net:/opt/ScreenTranslator# ./ScreenTranslator
Error opening data file /usr/share/tesseract-ocr/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.Failed loading language 'eng'
Tesseract couldn't load any languages!

доустановил
apt install tesseract-ocr-eng
Настраивается пакет tesseract-ocr-eng (3.04.00-1)

скомпилилось все под вынь 10 wsl bash

автор, не бросай разработку) полезная утилита) спасибо

Suggestion: Set a Default Recognizer and Translator

I nearly gave up on this program after fighting it for 30min+ trying to get it to translate anything. And yes, that's with the instructions hidden in the About box.

My suggestion would be to provide more defaults so that the program does something out of the gate. This way the user has a better idea of what to do to make the program work. Include the recognizer for Chinese (or something, Cherokee if you desperately want to keep the initial install small). Translators are tiny, choose one as a default and include it! (Note: it's completely unclear why you would need more than 1 translator, what the differences between them are, and why or when you would want to use multiple.)

I can imagine some pushback on including a 2-9MB default language. An alternative would be simply changing the font color to red for areas of the Settings UI that are missing. I.e. things that need to be set for the program to function in the first place. So the default install would look like: Update in red, and under Update, "recognizers" would be in red (since there are none to start), and "translators" would be in red (if you don't include any). Until those are set, the program doesn't work but it's not always clear exactly why.

Add Some Kind of Signalling for "Processing..."

The program in general doesn't communicate enough. When you Left-click select something, put a little "Processing..." somewhere, or change the cursor, or anything at all, so you know something is happening. Perhaps the best solution would simply be to keep the red rectangle visible. Sometimes you can't tell if the program isn't working (i.e. will never respond) or if it's processing (i.e. your translation is coming).

Similar issue when Updating. You click Install/Update, but nothing immediately happens, there's no reinforcement. Once you figure out you have to click Apply updates, there's no reinforcement telling you that anything is happening. It takes 5-10 seconds for green progress bars to start appearing (on a modern computer and fast internet connection), but the user may have left the window at this point.

There is no thing in update tab.

version: 3.1.2 I tried also 3.1.0

when I open the app and go to setting and click on update to install translate I can't see any option

Ability to choose language in hotkeys

First of all, thank you for such nice utility.

Could you please make addtional feature to have hot keys for different languages.
Actually im using utility as screen grabber and copy text without translation.
Sometimes it is russian, sometimes - english.
And now i need to go to settings and change recognition language everytime.

is it possible?

Thank you

Невозможно обновить языки\добавить\изменить переводчики.

Здравствуйте!
Приложение постоянно предлагает мне обновится, хотя во вкладке "обновлений" абсолютно пусто. Тоже самое и со вкладкой "переводчики". Версия(3.1.1\x64).
В настройках ничего не менял\запускал от администратора\ - что я сделал не так?

Suggestion: Clarify How to Update and/or Improve the UI

The biggest UI issue I came across is that it's not clear how to Update anything in the first place. It took me a while to figure out that the only way to do that is by right-clicking on any given line. There's an Apply Updates button, but that misleads you, as it doesn't do anything until after you've right-clicked, "Install/Update".

How about putting checkboxes beside each downloadable thing (with a checkmark for things that are already downloaded), the way the Translation tab has checkboxes for which translators you want to use? If not, at least mention somewhere how to update things (i.e., right-click).

Secondarily, if we right-click Install/Update, just install the updates immediately. Currently it does nothing until you click Apply Updates, which just feels wrong to me.

Languages on demand (Online version)

Instead of downloading everything and choosing through 1gb of languages for the OCR can it sees if it already have the language and if not, access an server to detect the language and get a response with the file for that?

Error prevents apllication from opening

Describe the bug
An eroor pops ups saying that numerous .dll files are missing even though the git hub page doesnt tell me how to download any of this.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'the exe
  2. See error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [Windows 10]
  • App version: 3.0.0
  • App bitness version (windows only): [Win64]

Translating japanese dosnt work

I try to translate japanese but when ever I do it for some reason gives me a comprehensional mess. For example if when I translated this "動いていない" it gave me this "@ MA'CLWZCU" as a translation. Can anyone help me?

Ошибка загрузки страницы для перевода

Сначала все было нормально потом при обновлении скачались еще переводчики, и программа стала ругаться. Пробывал переустановить, все равно вылазит эта ошибка "Ошибка загрузки страницы для перевода"

Selecting Area and other ideas.

Hello, your application is great, I am trying to beat Yakuza 0 with this app, can you add automatic translation options from the selected window in real time? Add an additional tab in the options with editing colors of selected background, font color and choosing the font and size of text, for example, background in black and white text written with arial black 18 (like on Youtube), and the option to remove the preview of the original language, select area and everything will be translated automatically? Such a possibility would be great, there are so many great Visual Novel games in English. I know I could learn English but it is not so easy when you did not have it in school, half of what I know, I learned from games but I am still weak in this language. Thanks for your time, work and have a good day or night 👍 PS:
I think there are many people who have been looking for a tool like this. Because I have met people who were looking for a translator on the fly. You can make something bigger with this app 💃
translate

Any recommend guides/tutorials for building this project on windows?

I am interested in this project and want to do some contribution if possible.
Is there any guides/tutorials for building the project on windows so I can have a quicker start?

I mostly use c# and node.js at work and aren't familiar with typical c++ program development workflows, any guides or recommendation(such as: which compiler/IDE , how to install dependencies...etc) for setting up the project will be highly appreciated 🙂!

Error in recurring translations

Hi, the program always shows an error on the second translation attempt. (timed out)

Steps to reproduce the behavior:

  1. Right click and save translated area
  2. Try to capture the saved area again
  3. See error timed out (and the previously translated text is displayed again, only original text)

Expected behavior
The new translation with the previously selected area

Logs
I do not know where the log file is saved, sorry.

Screenshots
1
2
3
4

Desktop (please complete the following information):

  • OS: Windows 10
  • App version 3.1.0

Would be Useful to Enable Copying Original Text to Clipboard (After it's OCR'd)

Currently the translation pops up, but there's no way to interact with the popup. It's all or nothing, either the transaltion is good and comprehensible, or not. I often find myself wanting to copy the original text to the clipboard once it's been converted from image to text.

One option would be to make the popup more interactable, so we can text-select and copy to clipboard.

An alternative would be a simple option you turn on or off in the settings. If it's on, whenever the popup is processing/appears, the original text is copied to the clipboard (after it's been OCR'd).

It does not work at all.

Firstly, hi i am the guy who opened the linux ocr issue, hope it is nice to see me again :D Anyways, my problem is whenever I capture anywhere after then capture program says it has stopped working.
To Reproduce
Steps to reproduce the behavior:
Click capture and select are and app will be gone.

screen-translator-2020-08-14-22-30-14.zip
Logs
Application log file recorded during an error.
To start recording a log file, open the settings window,
enable the 'write trace file' option and apply the settings.

Desktop (please complete the following information):
Windows 7, latest version, updates are done.

Additional context
BTW, did you add multiple meaning feature?

Text to Speech for the untranslated text

Is your feature request related to a problem? Please describe.
Often I'd like to better understand how to pronounce the text. This is useful for learning, and is a technique used by learning tools like LingQ.

Describe the solution you'd like
When highlighting a word/words for translation, in addition to providing the translation, a TTS engine reads the original text aloud.

Thanks for considering this!

Program crash

Describe the bug
Crash program if in path to program folder we have russain (all not english?) characters.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Setting
  2. Click on update (Russian and English recognition, Google.js translator)
  3. Click "Apply"
  4. Crash with log: [0712/010815.239:ERROR:icu_util.cc(170)] Invalid file descriptor to ICU data received.

After this program crasing on start.

How I fixed this problem: place folder of program into path WITHOUT russian characters.

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.