Closed SuperSonicHub1 closed 3 years ago
Hello and thank you very much for this really detailed enhancement request!
I of course know about DeepL (seems like they are sometimes giving better translations than Google Translate) and I will try my best to implement it in future updates!
I just have some questions:
Dictionary
?// No idea what this means; random number? --> Yea I guess so, to verify the integrity of the response
The Formality
feature seems very interesting (and I didn't know about it at all)!
Animenosekai
@Animenosekai Sorry I took so long to respond!
Do you want to keep the HTML format for
Dictionary
?
I think it would make sense to translate the HTML to a Python dict, and have something like an _origin
key for people who want to parse the HTML themselves.
Is there any ID / token system?
After doing some testing in Insomnia, as long as you use the same ID, which can seemingly be any number, you'll be able to dodge 429s.
Hey @SuperSonicHub1 sorry for the late reply!
What do you think of d08de80 ?
I added DeepL (but it is not released yet on PyPI
)
Looking good! See my comments on the commit for more details.
Kyle Williams
Kyle Williams
On Wed, Feb 24, 2021 at 4:56 PM Animenosekai notifications@github.com wrote:
Hey @SuperSonicHub1 sorry for the late reply!
What do you think of d08de80 ?
I added DeepL (but it is not released yet on PyPI)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Hello (maybe soon good night because it is almost 4AM here) @SuperSonicHub1 !
Take a look at: 89b92cf !
I took into account your comments and I myself improved the code quality using Pylint.
Ok maybe I'll need to remove the type aliases/type hints because of the compatibility issues (the ones I wrote are only supported on Python 3.9 +)
What should I keep @SuperSonicHub1 ?
Remove 3.9-only typings. I really wish new types were back-ported or available as a PyPI library.
On Wed, Feb 24, 2021, 10:03 PM Animenosekai notifications@github.com wrote:
Ok maybe I'll need to remove the type aliases/type hints because of the compatibility issues (the ones I wrote are only supported on Python 3.9 +)
What should I keep @SuperSonicHub1 https://github.com/SuperSonicHub1 ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Animenosekai/translate/issues/5#issuecomment-785541371, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMTRVTMS2UBYAONPT43TAW4YVANCNFSM4XPXMRQQ .
@SuperSonicHub1 what do you think of 5d00c6a843e531bf6aa564bee13770a6a4107a13 ?
I read PEP 585 and tried to fix things accordingly.
Vermin now tells me that it should be compatible with Python >=3.2 !
Great work! Should be able to test DeepL today.
On Thu, Feb 25, 2021, 11:51 AM Animenosekai notifications@github.com wrote:
@SuperSonicHub1 https://github.com/SuperSonicHub1 what do you think of 5d00c6a https://github.com/Animenosekai/translate/commit/5d00c6a843e531bf6aa564bee13770a6a4107a13 ?
I read PEP 585 https://www.python.org/dev/peps/pep-0585/ and tried to fix accordingly.
Vermin now tells me that it should be compatible with Python >=3.2 !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Animenosekai/translate/issues/5#issuecomment-786045704, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMWAJ5MH7PSLNGZK37DTAZ5ZHANCNFSM4XPXMRQQ .
The only problem with DeepL is that they don't use any key/token system but their Rate Limit is very strict and I don't know why but they keep blocking me even though I've used it a few times
I know you're already using browser user-agents, so I wonder what the issue could be... I'll see if I can do some more interrogation of the API later today.
On Thu, Feb 25, 2021, 8:13 PM Animenosekai notifications@github.com wrote:
The only problem with DeepL is that they don't use any ID system but their Rate Limit is very strict and I don't know why but they keep blocking me even though I've used it a few times
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Animenosekai/translate/issues/5#issuecomment-786339598, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMQYWEIRMNL5YE2Y2BLTA3YSZANCNFSM4XPXMRQQ .
@SuperSonicHub1 Do you think that I can publish the current version?
I don't see why we can't. If we run into any issues post-publication, we can just make a patch.
Kyle Williams
On Fri, Feb 26, 2021 at 9:21 AM Animenosekai notifications@github.com wrote:
@SuperSonicHub1 https://github.com/SuperSonicHub1 Do you think that I can publish the current version?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Animenosekai/translate/issues/5#issuecomment-786675963, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMTVP4BXXLEI4MK5LCDTA6U6LANCNFSM4XPXMRQQ .
Should I close this issue?
Sure; in fact I'll do it for you.
On Sat, Feb 27, 2021, 5:51 PM Animenosekai notifications@github.com wrote:
Should I close this issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Animenosekai/translate/issues/5#issuecomment-787199858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDQCMTUK2BH4UURRTSYADLTBFZONANCNFSM4XPXMRQQ .
Strangely enough, I found this translation engine while watching a vTuber. This website is pretty complex, so strap in.
Wikipedia: https://en.wikipedia.org/wiki/DeepL_Translator Translator: https://www.deepl.com/translator
Supported Languages
From
To
Formality
This is where it starts to get interesting! Some languages that you can translate to can have differing levels of formality. All languages that do support it are labeled above.
Translating
This API seems to make use of JSON-RPC, which I'm not super familiar with, so assistance would be appreciated. URL:
https://www2.deepl.com/jsonrpc
HTTP Verb:POST
Example Request/Response
Here, we're translating
hello
in English to Japanese.Request Payload (JSON)
Response
Dictionary
Alongside translation, we also have access to a dictionary sent via an HTML fragment.
Example Request/Response
URL:
https://dict.deepl.com/english-japanese/search?ajax=1&source=english&onlyDictEntries=1&translator=dnsof7h3k2lgh3gda&delay=300&jsStatus=0&kind=full&eventkind=langChange&forleftside=true
HTTP Verb:POST
Request Body (Form Data)
Response