The auto-translation process
Auto-translation is transparent while in use, but the behind-the-scenes process includes multiple steps of content comparison and evaluation.
In CCMS Web, the auto-translation process takes place outside of the CCMS itself. It is an Output Generator process that operates on the files in the localization kit. Here is a high-level overview of how it works.
- To use auto-translation, some setup in the system configuration and the Output Generator is necessary. Contact your System Administrator to ensure auto-translation is properly enabled.
- All segments in the Authoring content must have an
@ixia_locid
attribute so the process can compare them to the equivalent segments in previous translations. If the trigger that adds@ixia_locid
was recently enabled, you might have to check out and release the objects (or change their status) to trigger the addition of@ixia_locid
.
To use auto-translation after it has been properly configured, you do not have to do anything during the translation process. Everything is automatic.
Let's assume that you previously translated a map containing TopicA (revision 5) to French. You imported the translated content, generated your outputs, and did everything else you need to do.
Several months later, you've made a number of edits to TopicA in Authoring, so that it is now at revision 10. You create another Translation Manifest and Localization Manifest. Initally, the Localization Manifest does not reflect that TopicA was previously translated, because at this point Topic A is a virtual topic based solely on Authoring.
You generate the localization kit. Behind the scenes, quite a lot happens to find previously-translated content. If you're interested in some of those details, see The full auto-translation process, below.
After the kit is generated and you download it, let's say you open TopicA in a text editor. You see a mix of English (the source language) and French (the target language). Each segment that was previously translated and has not changed is in French. Each segment that is either new or changed since the previous translation is in English.
This mixed content is what you send to your LSP.
How auto-translation treats segments
When auto-translation detects that a segment has changed, it does not "bring forward" any previously-translated text into the segment.
For example, take this paragraph in Authoring revision 5 of TopicA:
<p ixia_locid="5">Spread a heavy coat of oil on the surface.</p>
This entire paragraph is a single segment, as it is enclosed in a single set of tags
with a single @ixia_locid
attribute.
You translate revision 5 to French:
<p ixia_locid="5">Étalez une couche épaisse d'huile sur la surface.</p>
Later, you edit the paragraph like this in Authoring revision 7:
<p ixia_locid="5">Spread a generous coat of oil on the surface.</p>
When you re-translate the topic, the auto translation process compares this segment in revision 7 to the same segment in revision 5. It detects that the word "heavy" was replaced with the word "generous." However, because the change is within the segment, auto-translation does not carry it forward into the file in the localization kit. The untranslated paragraph appears in the file in the localization kit.
On the other hand, say the paragraph were this in revision 5:
<p ixia_locid="5">Spread a <ph ixia_locid="6">heavy</ph> coat of oil on the surface.</p>
where the adjective is a separate <ph>
segment within the larger
<p>
segment. You translate to French:
<p ixia_locid="5">Étalez une couche <ph ixia_locid="6"épaisse</ph> d'huile sur la surface.</p>
and you edit it in revision 7:
<p ixia_locid="5">Spread a <ph ixia_locid="6">generous</ph> coat of oil on the surface.</p>
In this case only the changed word is in English in the file in the localization kit:
<p ixia_locid="5">Étalez une couche <ph ixia_locid="6">generous</ph> d'huile sur la surface.</p>
The rest of the segment, being unchanged from revision 5, "brings forward" the translation of revision 5 into revision 7.
For this reason, if there are terms or phrases that, once translated, you never want re-translated, it's a good idea to ensure they are their own segment. The best way to do this is by using keys or conrefs.
The full auto-translation process
The full process that auto-translate uses to identify previous translations and determine what to "bring forward" is complex and you do not need to understand it to use auto-translation effectively. However, if you are curious, here is a somewhat simplified explanation.
This auto-translation process is performed on the files in the localization kit while it is being processed by the Output Generator. To be more exact, the Output Generator first creates the localization kit, then the auto-translation process identifies the content to be "brought forward" and overwrites the files in the initial localization kit to create the final localization kit. All this happens before the kit is made available to you on the My Kits/Imports page.
Step One: Determine if the file is eligible for auto-translation
For each file in the initial localization kit, the process first determines whether or not it is a candidate for auto-translation.
- The process checks that the file ends has one of the following extensions: .ditamap, .dita, or .xml. If so, the process continues to parse the file. If not, the process skips the file.
- If the parse is successful, the process checks the root element to see if the
file is to be translated (i.e. the root element has no
@translate
attribute or hastranslate="yes"
). If so, the process continues to parse the file. If not, the process skips the file. - Next, the process checks that the filename contains a
"_"
to indicate the revision. If so, the auto-translate function is launched, and a copy of the file is created, modified, and saved. If not, the process skips the file.
Step Two: Find the correct previous translation of the file
If a file is determined to be a candidate for auto-translation, the process tries to find previous translations of the file. If they exist, the process selects the last one—the most recent. For example, if revision 10 of TopicA is included in the current localization kit, the process looks for previous translations of TopicA. It finds revision 3 and revision 5. Revision 5 is the most recent, so any eligible translated content will be "brought forward" from that revision.
If no previous translations of the same file exist, the process looks to see if the file was cloned from another file and if so, it looks for previous translations of the clonedFrom file as a fallback.
Step Three: Evaluate each segment in the previous translation
After determining the appropriate previous translation for comparison, the process compares each node in the current file with the corresponding node in the previous translation.
For each segment in the current file:
- The process retrieves the value of the
@ixia_locid
attribute. - The process looks in the previous translation for a segment with the same
@ixia_locid
value. If there is none, the segment is considered new. It remains in the source language. If there is one, the process evaluates the@translate
attribute. - If the segment has
translate="no"
in either the current file or the previous translation, thentranslate="no"
is added to the segment in the modified copy of the file. If the segment hastranslate="yes"
in either the current file or the previous translation, thentranslate="yes"
is added to the segment in the modified copy of the file. - If the segment in the modified copy of the file has
translate="no"
, it remains in the source language. If the segment hastranslate="yes"
or does not have the@translate
attribute at all, the segment is eligible for replacement. - If the segment in the modified copy is eligible for replacement, the process compares its content to the content of the previous translation. If the content is exactly the same, the process "brings forward" the translated text from the matching segment in the previous translation into the modified copy. If the content is not exactly the same, the segment remains in the source language. To understand this comparison better, see How auto-translation treats segments, above.
The result is an updated file in the localization kit that includes all eligible previously translated content.
When all segments in all files have been processed and "brought forward" as appropriate, the localization kit is made available to you on the My Kits/Imports page.