Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of concept for automatic translation of a site #63

Closed
stoerr opened this issue Feb 22, 2024 · 0 comments · Fixed by #64
Closed

Proof of concept for automatic translation of a site #63

stoerr opened this issue Feb 22, 2024 · 0 comments · Fixed by #64
Assignees

Comments

@stoerr
Copy link
Member

stoerr commented Feb 22, 2024

We create an automated way to translate a whole site (AEM, Composum as a second step).
Basic idea: the other languages are a live copy of the basic language. The inheritance is broken whereever a text property is found that is translated. That way the translation can be updated later via the livecopy mechanisms. In #61 we created a translation prompt - that can be used to re-translate the properties, or the automatic mechanism.

@stoerr stoerr self-assigned this Feb 22, 2024
@stoerr stoerr linked a pull request Feb 22, 2024 that will close this issue
@stoerr stoerr changed the title Automatic translation of a site Proof of concept for automatic translation of a site Feb 23, 2024
@stoerr stoerr closed this as completed in #64 Mar 1, 2024
stoerr added a commit that referenced this issue Mar 1, 2024
Implementation of #63 . 
A quite basic interface to trigger an automatic translation is at

http://localhost:4502/apps/composum-ai/components/autotranslate/list.html
allows automatically translating a page tree in one go. It currently
assumes that it's a live copy of the original language (though that'd be
easy to remove) and cancels the live relationships and replaces the
texts by it's translation.

Documentation is in featurespecs/8AutomaticTranslation.md .

To create a translate it's necessary to create a livecopy of e.g.
/content/dam/wknd/en ,
/content/experience-fragments/wknd/language-masters/en ,
/content/wknd/language-masters/en and autotranslate them in that order.
For the normal site /content/wknd/de again the livecopy mechanism can be
used.

Currently the translation is done for properties that are "obviously"
text (have whitespaces and letters) and for some hardcoded property
names like jcr:title etc. The paths are changed as well to the
corresponding paths in the translated language.

It's not 100% clear whether using live copies for the different
languages makes sense or if we just use copying.

If the page is not too long all it's text fragments are translated in
one request. That improves speed and likely the translation quality. We
make provisions for later translation updates: the original and machine
translated text are saved, so that we can:
- automatically recognize where translations have to be updated because
of changes in the original text
- possibly support updating the translations by trying to have the AI
replicate any manual changes when re-translating a changed text
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 a pull request may close this issue.

1 participant