digitalpulsebe / craft-multi-translator

Translate Entry content using external services
Other
0 stars 1 forks source link

FR: Support for glossaries with the DeepL API? #9

Closed mersy closed 2 months ago

mersy commented 3 months ago

Will you support glossaries with the DeepL API?

https://developers.deepl.com/docs/api-reference/glossaries

JodebaDigitalPulse commented 3 months ago

hi @mersy,

I did not know this feature yet.

I guess you want to enable the usage of your existing glossaries when translating in the CMS. Do you think we can achieve this with a new setting to select all the glossaries you want to enable? So they will always be used for each translation.

Managing the glossaries may be too far out of scope for this plugin.

mersy commented 3 months ago

Hi, @JodebaDigitalPulse

Thank you for your comment.

Managing the glossaries may be too far out of scope for this plugin.

Yes, I feel that managing glossaries will need to be done using the DeepL API in a different way, not through Multi Translator plugin. For example, managing the glossaries as Craft CMS data and using the DeepL API to handle the glossaries by custom plugin.


Since this is also my first time researching this, I don't have a complete understanding of everything.

When you specify a glossary_id during translation,it seems that terms from the glossary are prioritized.

20240514-161330 https://developers.deepl.com/docs/api-reference/translate

However, it appears that the glossary_id is updated each time the glossary is updated, so I think this needs to be considered.

This might be the approach to take.

So, there seem to be the following patterns:

Saving the name of the glossary seems to be better for user. However, it seems that there might be many patterns, or even multiple patterns, for the combination of source_lang and target_lang, so it seems difficult to determine the best way to save the settings.

JodebaDigitalPulse commented 3 months ago

Thank you, I'll have a look at it, and discuss it with the team. I'll keep you updated. 👍

mersy commented 3 months ago

Thank you!!

JodebaDigitalPulse commented 2 months ago

Hi @mersy,

update the plugin to the latest version (there will be a migration to run as well) and you can test this new feature: https://github.com/digitalpulsebe/craft-multi-translator?tab=readme-ov-file#manage-glossaries

Let me know what you think.

Kind regards, Jonathan

mersy commented 2 months ago

Hi, @JodebaDigitalPulse

Sounds great!!

I'll try it later.

Thanks mersy

mersy commented 2 months ago

Hi, @JodebaDigitalPulse

I updated the plugin and tried out the glossary feature. I was able to confirm that the terms specified in the glossary are being used in the translation.

It's great! Thank you very much!

JodebaDigitalPulse commented 2 months ago

Good, thank you for testing! 😊