Difference between revisions of "Inline Codes Removal Step"

From Okapi Framework
Jump to navigation Jump to search
m (1 revision imported)
(No difference)

Latest revision as of 18:20, 4 June 2016


This step removes inline codes or content of inline codes in text units.

Takes: Filter Events. Sends: Filter Events.

Many text units contains inline codes, span of data that should be left untouched inside a translatable text, for example the tag <b> in a HTML paragraph. This steps allows you to make different types of removal of those codes.


What to remove — Select the type of data to remove. A code is made of two parts: its markers (always there) and its content (optional). For example, an inline code in XLIFF can be like this:

<bpt id="1">&lt;b&gt;</bpt>

The parts in blue are the marker part, the part in yellow is the content part.

The following options are available:

  • Remove code marker, but keep code content:
    This removes the code marker but preserve its content. In other words, the content of the code becomes part of the text.
  • Remove code content, but keep code marker:
    This remove the code content but preserve its marker. In other words, the inline code still exists but it has been generalized and the data of the original format cannot be retrieved from it anymore.
  • Remove code marker and code content:
    This removes the whole inline code, there is no trace of it left.

Replace line break codes with spaces (When removing content AND marker) — Set this option to replace codes with spaces where the code type = Code.TYPE_LB or the code's content contains any of the following expressions (case insensitive) or characters (<br>, <br />, <br/>, \n, \r, \u0085, \u2028, \u2029). For example, inline code in XLIFF: <bpt id="1">&lt;br&gt;</bpt> NOTE: This option only applies when the "Remove code marker and code content" option is selected above.

Strip codes in the source text — Set this option to apply the removal action selected to the source text.

Strip codes in the target text — Set this option to apply the removal action selected to the target text.

Apply to non-transltable text unit — Set this option to apply the removal action even to text unit marked as non-translatable. If this option is not set, all non-translatable text units are left untouched.


None known.