...
- size-unit
- If character-length or pixel-length based length check
- Possible values:
- pixel
- char
- minWidth
- Minimum length in number of pixel / characters
- Refers to the length of a complete trans-unit of an xliff file, even if it spans multiple segments.
- This means for minWidth set in a system configuration for let's say a word document, that the length restriction refers to a whole paragraph.
- If maxNumberOfLines is set, minWidth refers to the length of each line, otherwise minWidth refers to the trans-unit.
- With maxNumberOfLines set, trans-units must not span multiple segments!
- maxWidth
- Maximum length in number of pixel / characters
- Refers to the length of a complete trans-unit of an xliff file, even if it spans multiple segments.
- This means for maxWidth set in a system configuration for let's say a word document, that the length restriction refers to a whole paragraph.
- If maxNumberOfLines is set, maxWidth refers to the length of each line, otherwise maxWidth refers to the trans-unit.
- With maxNumberOfLines set, trans-units must not span multiple segments!
- translate5:maxNumberOfLines
- How many lines a segment (not a trans-unit) should maximally have
- If maxNumberOfLines is set,
- maxWidth refers to the length of each line, otherwise maxWidth refers to the trans-unit
- minWidth refers to the length of each line, otherwise maxWidth refers to the trans-unit
Trans-units must not span multiple segments!
If you need maxNumberOfLines to span multiple segments, contact translate5s development team
- For pixel-based length check:
- For each character for a certain font and a certain font-size the pixel-width
- Definitions in pixel-mapping.xlsx
- Font-size and used font of current task
- Definitions in task-template.xml
- Would be possible to overwrite them in xliff 1.2, yet this is not yet implemented (ask translate5s development team, if you need it)
- For each character for a certain font and a certain font-size the pixel-width
Config name | Type | Default | Description |
runtimeOptions.lengthRestriction.size-unit | string | The default is char (available options:char,pixel) | Defines how the unit of measurement size used for length calculation. |
runtimeOptions.lengthRestriction.maxWidth | integer | The count is based on the unit of measurement. If maxNumberOfLines is set, maxWidth refers to the length of each line, otherwise maxWidth refers to the trans-unit in the underlying xliff (which might span multiple segments) | |
runtimeOptions.lengthRestriction.minWidth | integer | The count is based on the unit of measurement. If maxNumberOfLines is set, minWidth refers to the length of each line, otherwise minWidth refers to the trans-unit in the underlying xliff (which might span multiple segments) | |
runtimeOptions.lengthRestriction.maxNumberOfLines | integer | How many lines the text in the segment is maximal allowed to have (can be overwritten in xliff\'s trans-unit) | |
runtimeOptions.lengthRestriction.pixelmapping.font | string | Contains the name of a font-family, e.g. \"Arial\" or \"Times New Roman\", that refers to the pixel-mapping.xlsx file (see documentation in translate5s confluence) | |
runtimeOptions.lengthRestriction.pixelmapping.fontSize | integer | Contains a font-size, e.g. \"12\", that refers to the pixel-mapping.xlsx file (see documentation in translate5s confluence) |
Special settings for pixel length restriction
...
- font: Contains the font-name as used in the task-templatedefine in runtimeOptions.lengthRestriction.pixelmapping.font
- fontSize: Contains the font-size as used in the task-templatedefined in runtimeOptions.lengthRestriction.pixelmapping.fontSize
- unicodeChar: Contains the value unicode code point value for the character, for which you want to define a pixel width. An easy way to find the code point is to use the site https://onlineutf8tools.com/convert-utf8-to-code-points and to enter the char you want to know the code point for in the left field.
- pixelWidth: The pixel width you want to define for the listed character, with the listed font in the listed font-size
- Character: This is just a reference column to be easily able to know, what the current row defines. It is not used during the length check.
Example pixel-mapping.xlsx file
View file | ||||
---|---|---|---|---|
|
Definitions in xliff 1.2
(overwrite corresponding definitions in
...
the configuration)
Please see "Definable parameters" for explanation.
...