Update glossary handling to match new multilingual glossary/ dictionary structure introduced by DeepL
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3528324. --> Reported by: [steffenr](https://www.drupal.org/user/244597) Related to !54 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>DeepL released the v3 endpoint for its glossary functionality and changed the handling of glossaries. The data structure was changed, so that a single glossary can include multiple dictionaries with a given language combination and its entries.</p> <p>Further information can be found here: <a href="https://github.com/DeepLcom/deepl-php?tab=readme-ov-file#glossaries">https://github.com/DeepLcom/deepl-php?tab=readme-ov-file#glossaries</a><br> By releasing the new endpoint, they also reduced the available glossaries for <strong>free</strong> users to <strong>only 1</strong>. This major change can be overcome by having multiple dictionaries within the glossary. </p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>follow the <a href="https://github.com/DeepLcom/deepl-php/blob/main/upgrading_to_multilingual_glossaries.md">migration guide</a> and rewrite the exisiting DeeplGlossaryApi methods</li> <li>introduce dictionaries as new entity, which are now part of a multilingual glossary</li> <li>handling for free/ pro accounts <ul> <li>free users cannot add more than one glossary</li> <li>pro users can add up to 1000 glossaries</li> </ul> </li> <li>update sync functionality to create glossary/ dictionaries <ul> <li>free accounts: in case of having multiple glossaries for a given language combinations those should be merged into a single dictionary</li> <li>pro account: multiple glossaries will be synced as usual - but contain a single dictionary with its entries</li> <li>update general creation workflow for glossaries and dictionaries</li> </ul></li> </ul> <li>update existing unit tests</li> <p>&nbsp;</p> <h3 id="summary-ui-changes">User interface changes</h3> <ul> <li>update listing of glossaries and show number of dictionaries within the glossary</li> <li>add listing of dictionaries for a given glossary</li> <li>add simple search functionality within a dictionary</li> </ul> <p>&nbsp;</p> <h3 id="summary-data-model-changes">Data model changes</h3> <ul> <li>remove existing entity type <strong>deepl_glossary</strong> and related functionality</li> <li>introduce new entity type DeeplMultilingualGlossary</li> <li>introduce new entity type DeeplMultilingualGlossaryDictionary</li> <li>add related functionality (forms, views integration, etc..) as already done in 2.2x</li> </ul>
issue