Fix: DeepL translation doesn't work for Simplified Chinese#232
Merged
Jeehut merged 3 commits intoFlineDev:mainfrom Aug 26, 2021
mshibanami:fix-deepl-zh-simplified-support
Merged
Fix: DeepL translation doesn't work for Simplified Chinese#232Jeehut merged 3 commits intoFlineDev:mainfrom mshibanami:fix-deepl-zh-simplified-support
Jeehut merged 3 commits intoFlineDev:mainfrom
mshibanami:fix-deepl-zh-simplified-support
Conversation
Jeehut
approved these changes
Aug 26, 2021
Member
Jeehut
left a comment
There was a problem hiding this comment.
Thank you, code looks good to me. Merging! 🎉
Contributor
Author
|
Thanks! |
Member
|
Released in version 4.7.1. 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(No related issue)
Problem
Suppose you want to translate an English word "Hello" to Simplified Chinese with DeepL API via BartyCrouch.
Currently, BartyCrouch sends a request like this:
But DeepL doesn't allow
Zh-Hansfortarget_langnorsource_lang, so they always return 400 Bad Request.This is the documentation of what they allow: https://www.deepl.com/docs-api/translating-text/request/
Proposed Changes
ZHrather thanZh-Hansfortarget_langandsource_langZHis actually for Simplified Chinese but I have no strong opinion. Please feel free to suggest me doing this for Traditional Chinese too.target_langandsource_langto UPPER CASE from Capitalised CaseSo this PR will change the above URL into this: