Closed alexanderniebuhr closed 3 years ago
tested with 2.6.17 - not working
@terales @antfu sorry for tagging you guys Might have a Setup, issue but I doubt that for now. I would like to debug more, but I don't get the request to the DeepL API logged. But getting this done is higher in my priority list than my feature request. Just saying, currently this is a blocker, since we have to fall back to the least optimal google translation :/
Hey @OsirisFrik, could you help to take a look at this and see if it's persist on your side? Thanks.
I checked this and read the documentation, to use a DeepL free api require a free api key, my country is not allowed to contract DeepL, and I don't have any credit card of a allowed country to contract for test, but I can fix it just based in the docs.
@OsirisFrik @antfu I am using a free api key generated for my user, and it does throw the error 400.
@alexanderniebuhr I have make the logger print more information in #641. While I can't not reproduce myself, you can try with the latest version and share the error log? Thanks
πβ οΈ Failed to translate "page.login.headline" (de-DE->en-GB)
π ERROR: Error: Request failed with status code 400
Error: Request failed with status code 400
at createError (/Users/alexanderniebuhr/.vscode-insiders/extensions/lokalise.i18n-ally-2.6.24/dist/extension.js:116796:15)
at settle (/Users/alexanderniebuhr/.vscode-insiders/extensions/lokalise.i18n-ally-2.6.24/dist/extension.js:117071:12)
at IncomingMessage.handleStreamEnd (/Users/alexanderniebuhr/.vscode-insiders/extensions/lokalise.i18n-ally-2.6.24/dist/extension.js:116146:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
EDIT: can it be caused, because we use language identifiers with two parts, e.g. en-GB
?
As soon as I change i18n-ally.translate.engines
back to google
it works.
Not sure, can you try with de
-> en
?
yeah.. de -> en
works.. but de-DE -> en-GB
does not work.
Can you split these in code, since we do need to use full identifiers in our projects.
Here the docs what is supported source and target languages: https://www.deepl.com/docs-api/translating-text/request/
Actually it should give back a api response, but that api response from deepl is not logged, maybe caused by an error thrown before logging
Ah ok then. We could strip the second code when passing to deepl then. Thanks for investigating!
always happy to help :) This is also helping me in our projects π
Describe the bug
Using DeepL free API, fails with Online Translate with response code 400, with following settings
Extension Version
v2.6.13 (since newer version are not working)
Framework/i18n package you are using
svelte-i18n
Extension Log Go to
View
->Output
->i18n Ally
, and paste the content below. You should mask any sensitive information