Reformatter

When you generate the target files in OmegaT, the tool parses the source file again and produces a target file where only the text is replaced by translations, while the tags remain in the same place. For those who read the target file in a WYSIWYG editor, this means that they should see exactly the same format, with the same fonts and attributes at the same location, which is what they probably want.

But this also means that OmegaT does not enable to add attributes to a string during the translation process.

 

Some languages have as a convention to put in italics the terms coming from the original language and which, for some reason, are not to be translated. But OmegaT does not allow to add tags which are not present in the original text, so it gives no solution to this problem.

Finally we implemented the following solution:

  • During the translation process, the user can add some “pseudo-tags”: for that purpose we use some characters which exist in Unicode but are rarely used. Not only they cannot conflict with OmegaT tags, but they are not in the keyboard, so there is a very small chance that they are used by the translator for another purpose.
    Since they are not in the keyboard, the user must activate contextual menus to add them:
     

    When a text is selected, using the menu enables to encapsulate it in the opening and closing pseudo-tags.

    If not, the menu will contain one entry for opening and one for closing pseudo-tag.

    If you select a text which is already encapsulated in pseudo-tags, then the menu enables to remove them.

  • During the target files generation,

    • In DGT-OmegaT 3.4 to 3.5, a script will be run which tries to transform these pseudo-tags to the corresponding tags in the target format. For the moment, this feature is only implemented for the DOCX and HTML formats and is mainly experimental: we do our best to keep an implementation as simple as possible, but due to the fact that OpenXML is a very complex schema, we perfectly know that the result is sometimes not correct. Let's consider this feature as mainly experimental for the moment.

    • In DGT-OmegaT 3.6 and 3.7, the conversion for OpenXML is implemented directly in the StaX filters (and work only with these filters). Result should be the same but difficulties as well, so please test to check if the behaviour differs or not.

Add new comment