Tool jDeppL - A DeepL clipboard hook [v2.3.3]

asdasfa9

Member
Jul 2, 2018
145
381
A -like application written in Java for hooking clipboard text
to the DeepL translator website even without an API key by automating a browser through as a workaround.

Requirements:
  • Java 8 - Download from , or if you prefer . Standalone version with a bundled JRE is available.
  • An installed and supported web browser like Mozilla Firefox, Microsoft Edge, Google Chrome or Opera (Tested with Firefox 84.0, Edge 87.0.664.66 , and Chrome 87.0.4280.88).
    - Edit the config.toml file to configure which browser you have installed, set "webDriver" to either: "firefox", "edge", "chrome", "opera" or "ie" (I haven't tested opera, and ie seems to be having problems with its driver).
Caveats:
  • Since it uses the DeepL website for translation, it will have the same limits as the site. The DeepL website has an undisclosed request limit, which I've managed to hit once after using it all day long. If you're on a dynamic IP, all you have to do is reboot your router and restart the application and you should be able to send requests again.
Cache:
To create a new cache, create a new folder with the name of the cache inside the cache folder.​
For reading and manipulating a cache exported to .csv, you can use .​
The .csv file is TAB separated so use the following settings:​
- Unicode Csv -> Field Separator: <Tab> -> Quote: <None> -> Font: UTF-8​
reCsvSettings.png

You still need if you want to hook game text to the clipboard.
See the readme.txt file for the application's configurations.

Original post.

jDeppL01.png jDeppL02.png jDeppL03.png jDeppL04.png

Download:
v2.3.3: , (101 MB)
v2.3.3 Standalone: , (210 MB)
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:

xcrimsonx90

New Member
Sep 24, 2020
1
1
thank you so much for this app, works great while playing VN's too, i use it in conjuction with google translator and improves greatly the quality of the translation, again (yeah i know im being repetitive on this lol) i really apreciate your effort on this app thx!
 
  • Like
Reactions: asdasfa9

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.0.0
brings a bunch of improvements on the substitutions feature, a more reliable method of request, a new cache system, and a bunch of other tweaks.
- Added a language selection config. When a source and a target language is set, the application will pass the input directly in the URL instead of the input text area, forcing the translation to use the defined source and target language.
This should also solve the issue with sending a text that contains emojis using chrome and edge webdrivers.
And this should also make headless mode more reliable since languages won't unreasonably switch automatically.
- Implemented an experimental caching system using an embedded database, .
It would occasionally cache by mistake especially when the input text keeps changing too fast due to race condition.
If you think the current translated text displayed was wrongly cached, just resend the input by clicking Resend Input under Tools, or CTRL+R.
- Massive performance improvements. I found that polling events kills performance on old hardware, so I found some dirty hacks to switch to event listeners instead. It should also now be more responsive.
- Now allows the application to be used while offline, so that you can still use the translations you've already cached if you have no connection.
- Now uses tomlj library for ordered parsing of some configurations. Substitutions should now be performed in order.
- Moved the substitutions options under their own menu.
- Added a firstoccurrence section in substitutions for replacing only the first occurrence of a text.
- Added a pre-copy section in substitutions for replacing text just right after taking text from the clipboard, before copying it into the input box.
- Added a regex section to all substitutions.
- Added a Reload Substitutions function for reloading the substitutions file.
- Added an option to switch between substitution files.
- Added substitutionsEnabled config, a master toggle for all substitutions.
- Added a Resend Input function under the Tools menu.
- Added an Exit Without Saving function under the File menu for exiting the application without saving any changes to the config.
- Added an Always on Top toggle for the log window.
- Added new Look and Feels: System, FlatLight and FlatDark.
laf_System.png laf_CDESlashMotif.png laf_FlatLight.png laf_FlatDark.png
- Added lookAndFeelEnabled config for if you don't want to use any Look and Feel.
- Added showBorders config for the borders around the text areas.
- Replaced showInputLength with showBottomBar.
- Immediately romanize current input text when showing romaji.
- Fixed maxRomajiLength config not being read.
- Updated Selenium.
- Updated webdrivers.
- Updated JRE for the standalone version.
- Signed exe of the standalone version.
 
Last edited:

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.1.0
:
- Added monitorClipboardMinimized config for setting whether the clipboard should be monitored while the application is minimized.
- Added useClipboardPolling config as an alternative way of monitoring the clipboard in case the default one is messing up.
- Fixed auto as language source not working.
- Some tweaks to the substitution files.
 

jambonblanc

New Member
Nov 21, 2017
3
1
Thanks a lot for creating and updating this tool!

It really is a great help given how much more accurate deepl is than most other services.
And by adding in custom substitutions for expressions that constantly translate strangely or names that aren't properly separated by the hook, you get a pretty decent on the fly MTL.

I was just about to comment on how the new cache feature is awesome but created issues with the clipboard, but the 2.1 version seems to have fixed it, so thanks!
 

asdasfa9

Member
Jul 2, 2018
145
381
I was just about to comment on how the new cache feature is awesome but created issues with the clipboard, but the 2.1 version seems to have fixed it, so thanks!
I don't think the cache has any problem with the clipboard, the caching system is just that, quite indeterminate. There's no reliable way for me to tell if the cached text got the proper translation since the user could be sending requests rapidly and erratically, in which case you could Resend Input (CTRL+R) if you think the cached text got the wrong translation. I've placed some safeguards to avoid this, but it would still occasionally miss.

The added alternative method of clipboard reading is just for some rare/obscure cases where the default method is getting an error, like spawning 2 instances of the application. But no one really needs that.
 

-FibaG-

Member
Nov 9, 2018
282
470
Updated

v2.1.0
:
- Added monitorClipboardMinimized config for setting whether the clipboard should be monitored while the application is minimized.
- Added useClipboardPolling config as an alternative way of monitoring the clipboard in case the default one is messing up.
- Fixed auto as language source not working.
- Some tweaks to the substitution files.
Thank you man for awesome work of update your program, I was use old version 1,1 but it stop working when google update happen so I was looking for new version happy to see you still update this useful tool for us, I really I appreaciate you work mate. :love:

Edit: the new version work I don't see any problem yet.
 

asdasfa9

Member
Jul 2, 2018
145
381
Thank you man for awesome work of update your program, I was use old version 1,1 but it stop working when google update happen
This thing has nothing to do with Google, unless you're using Google Chrome, in which case it could just be an outdated webdriver problem.
Matching the ones in the webdrivers folder to the version of your installed browser should fix it.
You can get the webdrivers from the following links:
, , ,
 
  • Like
Reactions: -FibaG-

jambonblanc

New Member
Nov 21, 2017
3
1
What was happening in 2.0 was that with the cache enabled the clipboard was picking up everything twice and it was sometimes leading to a critical error where I had to restart the program.
I'm assuming it had something to do with how it was writing to the cache file.

With 2.1 that issue seems to have completely disappeared, but maybe it was something on my end?

Anyway, thanks again for this.

EDIT: So I found out what the problem was/is.
When using the old hook patcher for MV games from libellule, and the cache is enabled it leads to that issue.
However turning on the new clipboard method eliminates the problem.
This doesn't occur when using textractor, but for some specific games I prefer using the patcher, so I'll just leave the alternative clipboard reading enabled for those games.
 
Last edited:

asdasfa9

Member
Jul 2, 2018
145
381
EDIT: So I found out what the problem was/is.
When using the old hook patcher for MV games from libellule, and the cache is enabled it leads to that issue.
However turning on the new clipboard method eliminates the problem.
This doesn't occur when using textractor, but for some specific games I prefer using the patcher, so I'll just leave the alternative clipboard reading enabled for those games.
I see, the applications could be fighting each other for which gets ownership of the clipboard.
Well, I'm glad the added config fixed that.
Only downside to that method is that it could be a bit resource intensive since it would compare strings every interval, but that's only a problem for ancient hardware.
 
Last edited:

-FibaG-

Member
Nov 9, 2018
282
470
This thing has nothing to do with Google, unless you're using Google Chrome, in which case it could just be an outdated webdriver problem.
Matching the ones in the webdrivers folder to the version of your installed browser should fix it.
You can get the webdrivers from the following links:
, , ,
Yea it was webdrivers I use chrome so I think he got outdated.
 

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.1.1:
- Replace line breaks with spaces instead of removing them when using the text as a key for the cache.
- Fixed deeplOutputTimeoutMillis being used as seconds instead of millis.
 

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.2.0
:
- Moved useClipboardPolling and clipboardPollFreqMillis config under threading.
- Added useOutputPolling config.
- Some improvements on reading DeepL's output.
- Set useOutputPolling to true as the default. It's more reliable and shouldn't have much impact on performance.
- Fixed hideFrame not getting properly set on application launch.
- Don't check for skip characters in the output.
 
Last edited:
  • Like
Reactions: jambonblanc

gtohelo

New Member
Jul 6, 2017
1
0
Thanks for making this. However, after a few lines in using the old clipboard function the app gets a critical error saying the clipboard was unable to be accessed. With the new clipboard method, the app just stops working after a similar amount of time. I'm on the latest windows 10 version, using the standalone app.
 

asdasfa9

Member
Jul 2, 2018
145
381
Thanks for making this. However, after a few lines in using the old clipboard function the app gets a critical error saying the clipboard was unable to be accessed. With the new clipboard method, the app just stops working after a similar amount of time. I'm on the latest windows 10 version, using the standalone app.
useClipboardPolling stops too? What does it say?
And how often does this happen? Because I've been using it all day, even the default one.

Try v2.3.0.
 
Last edited:

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.3.0
:
- More foolproofing on the clipboard hooking.
- Don't poll for output if application is minimized and monitorClipboardMinimized is false.
- Added logMessages and logExceptions config.
- Updated edge and opera webdrivers.
 
Last edited:
  • Like
Reactions: brutusbeefcake
Nov 26, 2016
203
466
Yeah I had the same issue as gtohelo with constant CRITICAL ERROR issues but on 2.0.0. This was on the Standalone version. Popped in to see if there's a new build and there is (a few!). I'll try it out later and report back if it's still acting up.

Thanks regardless asdasfa9 . The translation accuracy and simplicity of this has been smooth af since switching over a few months back.

Update: CRITICAL ERROR no more. (y)
 
Last edited:
  • Like
Reactions: asdasfa9

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.3.1
:
- Fixed output getting stuck at "Translating..." when copying a no JP text, then copying the last valid translated text again until a different valid text is translated.
- Updated edge webdrivers.
 
  • Like
Reactions: Belcebu

asdasfa9

Member
Jul 2, 2018
145
381
Updated

v2.3.2
:
- Fixed output still getting stuck at "Translating..." in the rare case that the output is only one character long.
 

corndoggie117

New Member
Dec 29, 2020
2
0
Hey, just a question, but this is functionally the same as supplying DeepL with an API key? Is the website character limit substantially smaller?