appswithlove / statamic-one-click-content-translation

Translate your content in statamic with one click
https://statamic.com/addons/awl/deepl
5 stars 2 forks source link

Glossary per Statamic site? #38

Closed geertjanknapen1 closed 3 months ago

geertjanknapen1 commented 4 months ago

Hey, I love how quick you were with > https://github.com/appswithlove/statamic-one-click-content-translation/issues/37

However, I can only add one glossary_id, so if I support 5 languages on my website, only one of those can utilize the glossary.

Is it possible to set glossary id's per site locale? Where site locale is also the target language?

something like: targetLocale => glossaryId

// config/statamic-one-click-content-translations.php

'deepl_options' => [
    'glossaries' => [
        'de' => '<GLOSSARY_ID_EN_DE>`,
        'es' => '<GLOSSARY_ID_EN_ES>`,
    ],
],
OleksiiBrylin commented 4 months ago

Hey. It makes sense. I will adjust it in one week.

geertjanknapen1 commented 3 months ago

Hey. It makes sense. I will adjust it in one week.

Thanks, great! Have you found the time yet? I can also fork the repo and create a PR containing this change :)

OleksiiBrylin commented 3 months ago

Statamic v5 update took my time.

Yes, please create a PR containing this change. It will help a lot

geertjanknapen1 commented 3 months ago

@OleksiiBrylin I've created a PR containing my interpretation of the changes, feel free to edit if you feel like it is not up to your standards. #47