I would be very interested to learn how to use this node translation system. It should be interesting to see the different styles of output it's capable of.
Some folks over at npm started a project to enable unlimited google translate requests, some of them went so far as to reverse engineer the token you'd use to authenticate requests. Im still trying to get that package to work, but I wanted to continue work on the app, so I found a similar package that supports sending the requests through a proxy.
You'll need to have Node.js and npm.
You must be registered to see the links
Once you have those installed open up a cmd/terminal and install packages the app needs by pasting these in commands.
npm i socks-proxy-agent
npm i express
npm i @paiva/translation-google
npm i follow-redirects
npm i papaparse
npm i minimist
npm i child_process
npm i fs
Once that's done you just need a proxy you can use to get around googles request limit. The Translate package supports socks, and I was already using a socks/tor package in Docker, so that's what I ran with.
You must be registered to see the links
You must be registered to see the links
After you've installed Docker the tor package can be added pasting the following command in cmd/terminal.
docker run -it -p 9050:9050 -d dperson/torproxy
OR
docker run -it -p 9050:9050 -d dperson/torproxy -l "<country>"
replacing <country> with a country code, Like: US or DE
the 9050 is the port that will be use to reroute requests, if for any reason you need port 9050 to be available for some other application make sure to cange it before running the command.
The last thing you need to do setup wise is get the Docker Container ID for the Tor Proxy, just paste the following into cmd/terminal.
docker ps
CONTAINER ID IMAGE
xxxxxxxxxxxx dperson/torproxy
It should spit out something like that, copy whatever is in place of the xs' and open Restart.bat in a text editor, replaces the xs' with your ID and save it.
The last thing you need to do is drop your .csv in the same folder as the app and click start.
It will automatically save the csv as MT_"original_csv_name" when its done, and "Saved" will be the last thing listed in the console.
Some Notes
This is by no means quick, Its averages about 1000 lines every 30 to 45 minutes. (Selene has like 60k+ lines).
There is an exception list, which is just a list of words it will force a translation for. It only triggers if the line as a whole is on the list.
It also skips lines its already translated before.
If you watch the console long enough you will see it spit out 1 of a few errors, You can usually ignore these. The most common reason it happens is because the translate package doesn't include a method to cancel/delete requests once they go out. The app assumes the proxy is dead, and restarts the docker container if it doesn't receive a response within 5 seconds. This causes an error because the connection is no longer available.
It may restart the Proxy multiple times before it finds one that is responding quick enough.
I think I've covered it all for the most part, but I'll be back online around this time tomorrow as well.