AOMARKERS appearing in output


In Language Studio AOMarkers are markers that are set so that certain parts are not affected by translation, such as placeholders or punctuation. When the translation has finished these markers are then returned back to their original format.


However, there have been a couple of rare instances where rules with regular expressions can cause a conflict with the markers. One of the reasons this may happen is due to the following:


For placeholders that appear in the source, these are replaced with AOMarkers in the pre-translation steps in the translation workflow so that the placeholders aren't translated. In the post-translation steps, these AOMARKERS are replaced back as placeholders.

What can happen is some of the text in these AOMarkers can get picked up an NTT file or glossary if the regex isn't set properly.


For example:


1. We have a placeholder in the input/

Input - Table  {1} - Other referenced items


2. We have a regular express that says if a letter is followed by a number, then we do not want to translate it.
NTT -   ([A-Z]\d{3,4})    rcs


3. In step 5 (extracting the source for translation), the placeholder {1} is replaced by an AOMarker. In step 9, this AOMarker has been affected by the NTT, as it reads that a part of the marker is an NTT as specified in the NTT, AOMARK107AO.
Translation Workflow -
                     05:etu    Table  _AOMARK107AO_  - Other referenced items
                     07:ptc    Table  _AOMARK107AO_  <wall/>–<wall/> Other referenced items
                     09:ntt    Table  _AOMAR<aotran type="ntt" translation="K107">x</aotran>AO_  <wall/>-<wall/> Other referenced items

4. So, when the marker goes through the translation steps, it has now been split into two separate translation parts, so that the AOMarker is not recognised as being a marker, so it is not put back as a placeholder, but as 3 words, _AOMAR K107 AO_


How to Fix

In this instance, what you need to do is do the following for regular expressions, and add a boundary before and the end of the regex so that only whole segments are picked up by the NTT and NOT part of a word.

1. Now you can see that the boundaries have been added around the regex.

New NTT  -              \b([A-Z]\d{3,4})\b    rcs

Previous NTT -         ([A-Z]\d{3,4})    rcs


2. Now in Step 9, the AOMarker hasn't been broken by the regex.
Translation Workflow -
                     05:etu    Table  _AOMARK107AO_  - Other referenced items
                     07:ptc    Table  _AOMARK107AO_  <wall/>–<wall/> Other referenced items
                     09:ntt    Table  _AOMARK107AO_  <wall/>-<wall/> Other referenced items


Analysis:


What the \b does is make sure that K107 will only get picked up by the NTT if it is on it's own.

Think of this example below:

The cat scattered his food all over the room.


Using regex - \bcat\b will match the word cat but not the cat in scattered.

Here is the new output examples below. Do note, the marker is showing in the debugger file below, for actual output, you will see the placeholder instead.

TUID:1
05:etu    Table  _AOMARK107AO_  - Other referenced items
07:ptc    Table  _AOMARK107AO_  <wall/>–<wall/> Other referenced items
09:ntt    Table  _AOMARK107AO_  <wall/>-<wall/> Other referenced items
11:glo    Table  _AOMARK107AO_  <wall/>-<wall/> Other referenced items
13:tok    table  _AOMARK107AO_ <wall/> - <wall/> other referenced items
15:etm    table  _AOMARK107AO_ <wall/> - <wall/> other referenced items
16:tx    ตาราง |0-0,0, 0-0 | <unknown>_AOMARK107AO_</unknown> |1-1,0, 0-0 | - |2-2,0, 0-0 | รายการ ที่ อ้างอิง |4-5,0, 0-2 1-0 | อื่น |3-3,0, 0-0 |
17:txu    ตาราง |0-0,0, 0-0 | <unknown>_AOMARK107AO_</unknown> |1-1,0, 0-0 | - |2-2,0, 0-0 | รายการ ที่ อ้างอิง |4-5,0, 0-2 1-0 | อื่น |3-3,0, 0-0 |
19:cap    ตาราง <unknown>_AOMARK107AO_</unknown> - รายการ ที่ อ้างอิง อื่น
21:rim    ตาราง _AOMARK107AO_ - รายการ ที่ อ้างอิง อื่น
22:det    ตาราง_AOMARK107AO_-รายการที่อ้างอิงอื่น
24:pta    ตาราง_AOMARK107AO_-รายการที่อ้างอิงอื่น


TUID:2
05:etu    Table K107  - Other referenced items
07:ptc    Table K107  <wall/>–<wall/> Other referenced items
09:ntt    Table <aotran type="ntt" translation="K107">x</aotran>  <wall/>-<wall/> Other referenced items
11:glo    Table <aotran type="ntt" translation="K107">x</aotran>  <wall/>-<wall/> Other referenced items
13:tok    table <a translation="K107">x</a> <wall/> - <wall/> other referenced items
15:etm    table <a translation="K107">x</a> <wall/> - <wall/> other referenced items
16:tx    ตาราง |0-0,0, 0-0 | K107 |1-1,0, | - |2-2,0, 0-0 | รายการ ที่ อ้างอิง |4-5,0, 0-2 1-0 | อื่น |3-3,0, 0-0 |
17:txu    ตาราง |0-0,0, 0-0 | K107 |1-1,0, | - |2-2,0, 0-0 | รายการ ที่ อ้างอิง |4-5,0, 0-2 1-0 | อื่น |3-3,0, 0-0 |
19:cap    ตาราง K107 - รายการ ที่ อ้างอิง อื่น
21:rim    ตาราง K107 - รายการ ที่ อ้างอิง อื่น
22:det    ตาราง K107-รายการที่อ้างอิงอื่น
24:pta    ตาราง K107-รายการที่อ้างอิงอื่น