Skip to content

Conversation

sargreal
Copy link
Member

@sargreal sargreal commented Feb 4, 2025

Fixes #500

Add support for multiple glossaries in the deepl provider.

  • Update providers/deepl/lib/index.js to handle multiple glossaries from providerOptions and select the appropriate glossary based on the source and target locale.
  • Add logic to convert source and target language using parseLocale function.
  • Add a warning log if a glossary is provided in apiOptions and overwrite it with the actual glossary to be used for the translation.
  • Write tests in providers/deepl/lib/__tests__/deepl.test.js to verify that glossaries are handled correctly and that a warning is logged when a glossary is provided in apiOptions.

For more details, open the Copilot Workspace session.

Fixes #500

Add support for multiple glossaries in the deepl provider.

- Update `providers/deepl/lib/index.js` to handle multiple glossaries from `providerOptions` and select the appropriate glossary based on the source and target locale.
- Add logic to convert source and target language using `parseLocale` function.
- Add a warning log if a glossary is provided in `apiOptions` and overwrite it with the actual glossary to be used for the translation.
- Write tests in `providers/deepl/lib/__tests__/deepl.test.js` to verify that glossaries are handled correctly and that a warning is logged when a glossary is provided in `apiOptions`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Fekide/strapi-plugin-translate/issues/500?shareId=XXXX-XXXX-XXXX-XXXX).
@sargreal sargreal closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: cannot configure multiple glossaries in deepl provider config

1 participant