Max. and min. length restrictions (so far only supported for XLIFF 1.2 import files; also works across all segments of a trans-unit). Length restriction can be
- character based (number of characters)
- pixel based (number of pixel for a defined font and font size; used for translation of display texts)
Settings for a task can be done in the task-template.xml and pixel-mapping.xml (which must be included in the task's import-ZIP). Details see below.
Default settings must be provided in the config. Details see below.
Settings for Length Restrictions
General settings are set in the task-template. These can be overwritten by each trans-unit.
- If
maxNumberOfLines
is set, maxLength refers to the length of each line, otherwise maxLength refers to the trans-unit (which might span multiple segments). maxNumberOfLines
must refer to the lines in a single segment only! Trans-units must not span multiple segments then!
Settings for pixel-mapping
The mapping of characters and their pixel-lengths can be given:
- in pixel-mapping.xlsx
- or in import-XLF-files;
- default values are set in the config.
Each segment will check if there is a specific mapping for its import-file. If settings for the file do not exist, the general task-settings are used. If those don't exist, the config is used.
Example for pixel-mapping.xlsx:
Trans-Unit
Example:
<trans-unit id="4" translate5:maxNumberOfLines="2" minwidth="100" maxwidth="300" size-unit="pixel">
<source>Example for maximal 2 lines, minwidth 100, maxWidth 300.</source>
<target></target>
</trans-unit>
Please note:
- translate5 uses
translate5:maxNumberOfLines
, not themaxheight
-Element! (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#maxheight).
This is because with "pixel" as size-unit, the value ofmaxheight
would refer to the pixel-height of the trans-unit, not to the number of lines.
Task Template
see Task Templates
Default Config
Config name | Type | Default | Description |
runtimeOptions.segments.enableCountSegmentLength | boolean | 1 | If enabled, the segment character counter will appear when the segment is being edited. |
runtimeOptions.lengthRestriction.pixelMapping | map | {"8":"7", "9":"8", "10":"9", "11":"10", "12":"11", "13":"12", "14":"13", "15":"14", "16":"15", "17":"16", "18":"17", "19":"18", "20":"19"} | Default pixel-widths for font-sizes, example: {"12":"3", "13":"4", "14":"5"} |