Advertisement
Guest User

DeepL Auto VN Translation txt

a guest
May 22nd, 2020
2,998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. It seems the website lets you translate things however much you want, so for now this bypasses the API usage limit problem with Textractor's DeepL extension.
  2. This can be used on the latest Firefox or Chrome.
  3.  
  4. How does it work?
  5.  
  6. Textractor copies the Japanese text to the clipboard.
  7. The clipboard's contents are pasted into DeepL with the extension.
  8. DeepL translates the Japanese line to English.
  9. The userscript detects that the translation has finished, and copies the translated English text to the clipboard.
  10. The clipboard's contents are displayed on the Extra Window extension in Textractor during this whole process.
  11.  
  12. How do I set it up?
  13.  
  14. Firefox users:
  15. Open Firefox
  16. Get the GreaseMonkey addon: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
  17. Click the GreaseMonkey icon at the top right, select "New user script..."
  18. Delete all text inside the GreaseMonkey script editor.
  19. Open "DeepL - Auto VN Translation/userscript/userscript.js" with a text editor.
  20. Copy all the text inside.
  21. Paste it into the GreaseMonkey script editor.
  22. Click the save icon at the top left.
  23. You now have the userscript set up.
  24. Go to about:debugging
  25. Click "This Firefox".
  26. Click "Load Temporary Add-on..."
  27. Select "DeepL - Auto VN Translation/extension/manifest.json"
  28. You now have the extension set up.
  29.  
  30. Chrome users:
  31. Open Chrome
  32. Get the TamperMonkey extension: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
  33. Click the TamperMonkey icon at the top right, select "Create a new script..."
  34. Delete all text inside the TamperMonkey script editor.
  35. Open "DeepL - Auto VN Translation/userscript/userscript.js" with a text editor.
  36. Copy all the text inside.
  37. Paste it into the TamperMonkey script editor.
  38. Go to File > Save.
  39. You now have the userscript set up.
  40. Go to chrome://extensions/
  41. Enable "Developer Mode" at the top right.
  42. Select "Load Unpacked"
  43. Select "DeepL - Auto VN Translation/extension/"
  44. You now have the extension set up.
  45.  
  46. Now it's time to download Textractor.
  47. Go here: https://github.com/Artikash/Textractor/releases/latest
  48. Download the English-Only zip file.
  49. Extract it somewhere.
  50.  
  51. This completes the set up.
  52.  
  53. How do I use it?
  54.  
  55. Watch this:
  56.  
  57. https://files.catbox.moe/k8auxe.webm
  58.  
  59. The video is from an older version but setup stays the same.
  60. Also, it may be safe to also remove the "Remove Repeated Phrases" extension for the x64 version
  61. since it messed up an English sentence for me at one point.
  62.  
  63. I forgot to have my mouse recorded as well, but you should be able to understand what I did.
  64.  
  65. Notes (4-24-20):
  66.  
  67. Every issue I noticed mentioned so far on /vn/ has been fixed.
  68.  
  69. You can now ctrl through boring garbage without having to worry about all the paragraphs
  70. of text getting pasted into DeepL. I've done this by limiting sentences to 200 characters.
  71. This can be changed in "extension/fg/insert.js".
  72.  
  73. Elipses should no longer completely break DeepL, but translation still
  74. seems slow when their alternative is present in the sentence.
  75.  
  76. For people who get the "undefined" English translation bug, you should move over to GreaseMonkey.
  77. The only time I encountered this problem was on one machine using TamperMonkey.
  78. Once I installed the userscript with GreaseMonkey instead, the problem was gone.
  79. TamperMonkey seems to occasionally have a problem with the GM.setClipboard function.
  80. If you're using Chrome you will have to use Firefox instead.
  81.  
  82. I have cleaned up "extension/fg/insert.js" and "userscript/userscript.js" so that
  83. they are easier to understand and hopefully easier to modify.
  84. The commented sections are the areas that do most of the work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement