lokalise / i18n-ally

🌍 All in one i18n extension for VS Code
https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally
MIT License
4k stars 323 forks source link

How to use DeepL for i18n-ally #700

Open DFJacobsen opened 2 years ago

DFJacobsen commented 2 years ago

Hi, i've been trying to get deepl to work with i18n-ally but i can't get it to work. Also, there seems to be no documentation on this. This is what i tried by looking through some issues in this repo:

  "i18n-ally.translate.engines": [
      "deepl",
      "google-cn",
      "google"
  ],
  "i18n-ally.translate.deepl.apiKey": "xxx-xxx-xxx-xxx-xxx",
  "i18n-ally.translate.deepl.enableLog": true,
  "i18n-ally.translate.deepl.useFreeApiEntry": true,

What am i doing wrong? Is there any proper documentation on this?

RuneClaeys commented 2 years ago

I could also use some clarification on this. I have the same configuration as @DFJacobsen. When I hit translate the following error is outputted. Seems to just be a permission error. But I'm quite sure the DeepL api key I used is stil the active key in my subscription.

Error: Request failed with status code 403
🌍 Translating "generic.feedback.error" (nl->fr)
Error: Request failed with status code 403
🌎⚠️ Failed to translate "generic.feedback.error" (nl->fr)
🐛 ERROR: Error: Request failed with status code 403
[object Object]
Error: Request failed with status code 403
    at createError (c:\Users\runec\.vscode\extensions\lokalise.i18n-ally-2.8.1\dist\extension.js:70162:15)
    at settle (c:\Users\runec\.vscode\extensions\lokalise.i18n-ally-2.8.1\dist\extension.js:70437:12)
    at IncomingMessage.handleStreamEnd (c:\Users\runec\.vscode\extensions\lokalise.i18n-ally-2.8.1\dist\extension.js:69512:11)
    at IncomingMessage.emit (events.js:327:22)
    at IncomingMessage.EventEmitter.emit (domain.js:467:12)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
[object Object]
abaumg commented 1 year ago

I documented the configuration parameters: https://github.com/lokalise/i18n-ally/wiki/Machine-Translation