Introduction

As part of improving a client’s translation process, we’ve recently demonstrated a proof-of-concept that helps their own language review team to better assess the quality of translations by seeing them “in-context” on a preview site – whilst still part of an overall translation job in TMS.

To see why context is important, I’d encourage you read Alvin’s article SDL Web Translation Preview and Why Context Matters.

The SDL Web 8.5-only solution I’ll outline below uses many of the features discussed by Lars Møllebjerg at TDS 2016 in his Translation Review & Preview talk, but without a lot of the complexity such as the cloud-based service, authentication etc.

Problem

Currently our client’s overall process suffers because their language review team have to review translations twice (the two yellow boxes in the Reviewers row above) – once in TMS via the bilingual side-by-side view where they pass comment and any changes can made (by other users) and captured in translation-memory; then reviewed again, once a translation has been returned back into SDL Web and published to a preview site, where they can now see a translation “in-context”.

The reason being that the language review team feel that viewing the translation solely in TMS denies them context – seeing how content works alongside other content in its final resting place is critical to ensuring a high quality translation.

Translation Review Workflow

We had initially demonstrated the full Translation Review Workflow that allows SDL Web users to both see translations “in-context” on a preview site as well as utilise workflow to allow them to accept or reject a translation (with comments) – all within a single TMS job.

However the implementation of this in XPM wasn’t warmly received – so we decided move back to enhancing the experience from TMS where our users felt most comfortable.

Solution

The language review team where happy to use TMS as their focal point for review, they just needed away to see the current translation “in-context”.

 The “Preview” button in TMS is customizable (to a degree) in that it can execute arbitrary XSLT against the Xml of the component translation file. If we could get links to pages where the component is used into this Xml it would be straight forward to render them.
 The Translation Review Workflow already provides a mechanism for SDL Web to pull down translations from TMS and the new Publish to Preview functionality in SDL Web 8.5 for Translation Manager enables content to be published to a preview site when translated content actually gets retrieved.


We only care about components here. Only components are ever sent for translation.

This is how it the proof-of-concept breaks-down:

In SDL Web: 

  1. Target publications Translation settings where updated to enable Publish to Preview – publishing pages to a different publication (the web publication in the Blueprint) upon translation retrieval. This is triggered by the PREVIEW activity in the Translation Review Workflow below.



    As only components are translated in our world, this publishing uses standard SDL Web rules which state when the item being published is a component … if a component has already been published and is embedded on a Page, all Pages in which the component is used are republished.

    Authors must use the components on a page and publish that page to a global English site to ensure the above rule is observed.
  1. The Translation Review Workflow was installed and attached to several “guinea pig” schemas. For our purposes only the RETRIEVE & PREVIEW activities are of interest.



    The workflow moves into the PREVIEW activity upon TMS workflow moving into its Translation Content Retrieval for Preview step – which would happen after translations are added in TMS.

  2. Event system code in SDL Web subscribes to the IItemSendEventArgs events on ITranslationJob subjects in the initiated phase. This event is triggered when items are to be sent into an external Translation Management System.



    1. To generate URLs to the pages that components are used on – we lean on a TOM.NET API method that under pins “View on Site” in the CME – ResolveContainingPages(). Which resolves pages that are using directly or indirectly a given component based on ResolveContainingPagesInstruction.



    2. Given the result of the above, when then call GetPublishUrl() passing the “Preview” purpose we use in our preview target to return the actual URLs for these pages.



    3. Finally with the results of the above, we simply crafted our own custom Xml to contain the URLs and injected it into the IItemSendEventArgs.Item.ItemXml property. Given the event we’re subscribing to and the phase, our custom data is then sent into TMS.



      Example Xml sent to TMS:



In TMS:

  1. A TMS workflow is setup to support the proof-of-concept which has the Translated Content for Preview step and Review in Language Cloud step as we wanted to also demo this working in SDL ManTra.

    As mentioned, it’s the Translated Content for Preview step that triggers the workflow in SDL Web to pull down translation content and publish it.



  2. We used a custom XSLT uploaded as preprocessing resource to pick out the custom Xml and present a table of links pointing back to the preview site where this (by now, hopefully published) translated content can be seen.



  3. A small piece of JS was also included within the web application itself so that when a link from the above is clicked we can scroll down to the content. This code simply tries to find the TCM ID we pass in amongst the special XPM HTML comment mark-up surrounding component presentations.

What happens

To give the above some context here’s how it all co-ordinates:

  1. New components are created by authors and published to global English preview site to check everything’s OK.

  2. Components are sent for translation from SDL Web.

    • Its schema has the Translation Review Workflow attached so a new workflow process is kicked off for each component and moves into RETRIEVE to monitor progress in TMS.
    • The event system code is triggered and the page URLs resolved where the components are used and added into the Xml sent to TMS.

  3. Translators translate component content into the target language in TMS. Once complete, the TMS workflow moves to Translated Content for Preview.

  4. The Translation Review Workflow process running in SDL Web for this component moves onto PREVIEW, which triggers Publish to Preview settings on target publications to publish the component (and therefore its pages) upon translation retrieval.

  5. TMS moves onto the Review in Language Cloud workflow step.

  6. A member of the Language Review team logs onto TMS or ManTra, opens the component file and click “Preview” – the custom XSLT renders the page URLs on screen with instructions.

  7. This user clicks a link (which carries the component TCM as a query string param), a new tab opens loading the preview site. Once loaded, the JS script automatically scrolls the page to the point where the component content exists on the page.

Et voilà!

The Language review team continue as before to use TMS or ManTra to pass comment on translation quality – but this time they can see the translation within the preview site.

Room for improvement?

Absolutely!
But right now we’re setting this up to handover to our client so they can really “kick the tyres” on it and uncover the issues.

Anonymous