OneMoreGres / ScreenTranslator

Screen capture, OCR and translation tool.
MIT License
942 stars 122 forks source link

error with all traductor, not possible trad #138

Open Codexshield opened 1 year ago

Codexshield commented 1 year ago

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

When I want to translate a page or an area using my keyboard shortcut, I get an error message in my notifications.

To reproduce The steps to reproduce the behavior: Choose that the application recognizes and detects the English language, then ask it to translate into French using the deepl translator.

**Expected behavior: Normally, the message should not translate and should put a notification that a translation problem has occurred with an error naming deepl.js

**To start recording a trace file, open the settings window, activate the 'write trace file' option and apply the settings.

Screenshots If applicable, add screenshots to help explain your problem! image

Desktop (please fill in the following information): - OS: I am on windows 11 64bits

Additional context Add any additional context about the problem here.

Codexshield commented 1 year ago

Also here is the error report what it says


2023-02-01T23:56:35 27308 :0 DEBUG updateSettings
2023-02-01T23:56:35 27308 :0 DEBUG Created page scriptName= "deepl.js"
2023-02-01T23:56:36 27308 :0 CRIT Failed to register global hotkey: hotKey.toString()= "Alt+W"
2023-02-01T23:56:36 27308 :0 CRIT Failed to register global hotkey: hotKey.toString()= "Ctrl+Alt+S"
2023-02-01T23:56:36 27308 :0 CRIT Failed to register global hotkey: hotKey.toString()= "Ctrl+Alt+X"
2023-02-01T23:56:36 27308 :0 CRIT Failed to register global hotkey: hotKey.toString()= "Ctrl+Alt+C"
2023-02-01T23:56:36 27308 :0 CRIT Failed to register global hotkey: hotKey.toString()= "Ctrl+Alt+Q"
2023-02-01T23:56:36 27308 :0 DEBUG updateSettings
2023-02-01T23:56:36 27308 :0 DEBUG Created page scriptName= "deepl.js"
2023-02-01T23:56:39 27308 :0 DEBUG captured Task(Gen=2, pix=QSize(659, 66), rec="", cor="", tr="", lang=eng-fra, err="")
2023-02-01T23:56:39 17840 :0 DEBUG Start recognize QPixmap(QSize(659, 66),depth=32,devicePixelRatio=1,cacheKey=0x66200000042)
2023-02-01T23:56:39 17840 :0 DEBUG Pix 1 Converted 0x2d1c8a83f20
2023-02-01T23:56:39 17840 :0 DEBUG Pix 2 Gray 0x2d1c8a83e30
2023-02-01T23:56:39 17840 :0 DEBUG Pix 3 Scaled 0x2d1c8a83340
2023-02-01T23:56:39 17840 :0 DEBUG Pix 4 Test Color Otsu 0x2d1c8a83340
2023-02-01T23:56:39 17840 :0 DEBUG Pix 5 Inverted 0x2d1c8a83610
2023-02-01T23:56:39 17840 :0 DEBUG Pix 6 Unshapred 0x2d1c8a83340
2023-02-01T23:56:39 17840 :0 DEBUG Pix 7 Binarized 0x2d1c8a83f20
2023-02-01T23:56:39 17840 :0 DEBUG Pix 8 Result 0x2d1c8a83f20
2023-02-01T23:56:39 17840 :0 DEBUG Preprocessed Pix for OCR 0x2d1c8a83f20
2023-02-01T23:56:39 17840 :0 DEBUG Set Pix to engine
2023-02-01T23:56:40 17840 :0 DEBUG Received recognized text
2023-02-01T23:56:40 17840 :0 DEBUG Cleared engine
2023-02-01T23:56:40 17840 :0 DEBUG Cleared recognized text buffer
2023-02-01T23:56:40 27308 :0 DEBUG recognized Task(Gen=2, pix=QSize(659, 66), rec="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", cor="", tr="", lang=eng-fra, err="")
2023-02-01T23:56:40 27308 :0 DEBUG corrected Task(Gen=2, pix=QSize(659, 66), rec="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", cor="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", tr="", lang=eng-fra, err="")
2023-02-01T23:56:40 27308 :0 DEBUG Started translation at "deepl.js" Task(Gen=2, pix=QSize(659, 66), rec="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", cor="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", tr="", lang=eng-fra, err="")
2023-02-01T23:56:40 27308 :0 DEBUG "userscript:deepl.js" : 20 "start translate Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them en fr"
2023-02-01T23:56:40 27308 :0 DEBUG "userscript:deepl.js" : 59 "setting url https://www.deepl.com/translator#en/fr/Welcome%20to%20the%20server.%0ABefore%20you%20get%20started%20make%20sure%20you%20read%20the%20%23%20rules%20and%20are%20familiar%20with%20them"
2023-02-01T23:56:40 27308 :0 DEBUG "https://static.deepl.com/js/translator_late.min.$09aa7b.js" : 2 "DeepL Translator "
2023-02-01T23:56:40 27308 :0 DEBUG "https://static.deepl.com/js/translator_late.min.$09aa7b.js" : 2 "Welcome to DeepL.com!"
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Sending to DAP went wrong. [object Object]"
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Uncaught (in promise) Sending to DAP went wrong."
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Sending to DAP went wrong. [object Object]"
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Uncaught (in promise) Sending to DAP went wrong."
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Sending to DAP went wrong. [object Object]"
2023-02-01T23:56:41 27308 :0 DEBUG "https://static.deepl.com/js/utils.chunk.$452967.js" : 2 "Uncaught (in promise) Sending to DAP went wrong."
2023-02-01T23:56:55 27308 :0 DEBUG translated Task(Gen=2, pix=QSize(659, 66), rec="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", cor="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", tr="", lang=eng-fra, err="All translators failed\ndeepl.js: timed out")
2023-02-01T23:56:55 27308 :0 DEBUG finishTask Task(Gen=2, pix=QSize(659, 66), rec="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", cor="Welcome to the server.\nBefore you get started make sure you read the # rules and are familiar with them", tr="", lang=eng-fra, err="All translators failed\ndeepl.js: timed out")
2023-02-01T23:56:55 27308 :0 CRIT "All translators failed\ndeepl.js: timed out"```
OneMoreGres commented 1 year ago

I've updated the DeepL translator script. You can check it now