Skip to content

Latest commit

 

History

History
97 lines (76 loc) · 5.36 KB

8.1AutomaticTranslationMigration.md

File metadata and controls

97 lines (76 loc) · 5.36 KB

Discussion of Migration for Automatic Translation

Table of contents

Background

The application integrates as an additional rollout configuration for Adobe Experience Manager (AEM) live copies, enabling seamless automated translation of content during the rollout process.

Technically, the application enhances the AEM Multi-Site Manager (MSM) by adding an automatic translation layer for each live copy created from the source content. When a page is rolled out, the content is automatically translated, allowing editors to work directly with localized versions. To facilitate manual modifications, editors can break the inheritance at the component level. Once inheritance is broken, the edited content becomes independent of further rollouts until the inheritance is re-enabled. This ensures that manual improvements made to the translated content are preserved during future rollouts.

The application supports both new and existing sites. For new sites, creating autotranslated live copies from scratch is straightforward. For existing sites with already developed language copies, the application facilitates migration by converting these language copies into live copies. This approach allows the integration of automated translation capabilities into pre-existing structures, while maintaining manual edits by breaking inheritance for previously modified components. This migration strategy ensures consistency between the source and target content while supporting efficient localization workflows.

General discussion

It's possible to turn a language copy of a site into a live copy by using a groovy script to add cq:LiveSyncConfig nodes to the language copy and cq:LiveRelationship mixins to the source pages. This way, new pages can be rolled out an automatically translated to the target language. This document discusses how to deal with previously translated pages that exist independently in the source language and target language.

Ideas for dealing with existing pages

  1. Do nothing. Thus, there is a page in the source language site and a page in the target language site. The pages are not connected in any way.
    • Is it possible to connect them?
  2. Change existing pages to live copies without breaking inheritance.
    • Overwrites the page completely on rollout.
  3. Change existing pages to live copies and break inheritance.
    • Suspend whole page. That means the editor has to break inheritance manually on every component where he wants to keep the texts.
    • Break inheritance on all components.

Things to investigate

  1. What can I do on the UI if there is a source page and target page that are unrelated yet?
  2. Meaning of mixins and where are they normally added?
  3. Why wasn't the page translated in the current setting (only page itself has a lice copy mixin) -> FIXED
  4. How can we go from an unrelated state to all inheritances broken state?

Investigation log

  • /content/gfps/cn/zh-cn/products-solutions/innovation/connectivity : mixin removed

    • No "Blueprint" tab as long as page is unrelated
    • Rollout from original page possible. 9:44 -> OK, new translation
  • /content/gfps/cn/zh-cn/products-solutions/innovation/cool-fit suspend whole page

    • adds mixin cq:LiveSyncCancelled . -> Rollout does not change anything.
    • Resume live copy including sync -> ??? why does that stay english?????
    • After second synchronization the page is newly translated into chinese.
  • /content/gfps/cn/zh-cn/products-solutions/innovation/pvc-u

    1. synchronize from page properties : "duringLivecopyCreation"= true in AutoTranslateLiveActionImpl wegen livecopyRelationship.getStatus().getLastRolledOut() == null . Problem: autosave = false, aber delayed execution!!! -> Fix: set that to true for delayed execution!
    2. synchronize again
  • Not tested yet: what does LiveRelationshipManager establishRelationship do?

More experiments needed:

  • attaching with new components or deleted components

Variants to deal with pre-translated pages

  1. Do not change anything about them (no cq:LiveRelationship mixin) -> they look like a normal page.
    • only way forward: manually edit them or roll out -> that'll wipe the page completely
  2. Set the page to cq:LiveSyncCancelled
    • At least it shows inheritance cancelled on page and in report
    • only way forward: reenable inheritance and roll out -> will wipe page completely
  3. Add cq:LiveRelationship and cq:LiveSyncCancelled to all components of page. E.g. http://localhost:5502/editor.html/content/gfps/cn/zh-cn/products-solutions/innovation/stress-less.html
    • needs reenabling inheritance on all components to get translations. BUT: translations have been checked / written by hand.
    • Perhaps workflow to reenable all and set all as properly translated?

Entirely other ideas

Perhaps we can create some kind of merge tool for that stuff where the inheritance was broken?