Who knows .js - Forum

Forum Navigation
You need to log in to create posts and topics.

Who knows .js

There are files with .js. I assume this is sending and receiving data from the translation server. Can someone write a function for VisualNeoWin from this and other data? File(s) attached.

Uploaded files:
  • You need to login to have access to uploads.
zmWorks7 has reacted to this post.
zmWorks7

Hello, @mishem

These services have URLs,  Like below:

https://translate.googleapis.com/translate_a/single?client=gtx&sl=%5Bsourcelanguagecode%5D&tl=%5Btargetlangaugecode%5D&dt=t&dt=rm&q=%5Btext%5D

You can use Visual Neo Win internet GET command and there can set your variables as parameters. The response you will get in return will be in JSON, So you will need to parse that.

Thanks,

Zaeem.

luishp has reacted to this post.
luishp

@zmworks7

Thank you for your reply.
I did. But there are services that check ID, there are those that check the time stamp, etc. I was hoping this script would do it all automatically.

For example, there is a deepl that needs to send a POST request in the form of

https://www2.deepl.com/jsonrpc

{"id": 2, "jsonrpc": "2.0", "method": "LMT_handle_jobs", "params": {"jobs": [{"kind": "default", "raw_en_sentence": "Русский язык."}], "lang": {"user_preferred_langs": ["EN", "EN"], "source_lang_user_selected": "RU", "target_lang": "EN"}, "priority": 1, "timestamp": 1637746932821}}

He's returning a response

{"jsonrpc":"2.0","id":2,"result":{"translations":[{"beams":[{"postprocessed_sentence":"Russian language.","num_symbols":5},{"postprocessed_sentence":"Russian.","num_symbols":4}],"quality":"normal"}],"target_lang":"EN","source_lang":"RU","source_lang_is_confident":false,"detectedLanguages":{"RU":0.9403279999999999,"BG":0.000053,"unsupported":0.059619}}}

No matter how I tried to send through VisualNeo, an error would come back.
There's also a good service called Babilon.
Yandex blocks very often because of the large number of requests. Et cetera.

I wanted to make automatic translation in Plugininfo, but after about 200-300 requests service blocking begins. The idea was to collect as many translation services as possible and change them so that they could not track that the translation is in auto mode.

I was hoping that with these scripts this could be arranged.

Vadim has reacted to this post.
Vadim