Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Yet if used in such a generalist way, the defined length for each segment has to be the same for the complete task and has to be defined in the task templateconfiguration.

If you need different counts per segment within the same task, you need to define them directly in the xliff file before importing it into translate5. Ask translate5s development team, if you need conversion of other file formats to xliff that support segment-based length restriction definitions.

...

  1. Define relevant system configuration settings (if not already done)
  2. Define
    1. task-template.xml
    2. pixel-mapping.xlsx (only if pixel-length check)
    3. Optionally define relevant parameters directly in xliff 1.2
  3. Use ZIP import package and include task-template.xml and if needed pixel-mapping.xlsx if needed

Example import package

View file
nameexample-package-length-restrictions.zip
height150

...

For length restrictions to be used in any case a task-template system configuration has to be provided for a task and length restrictions have to be activated in it for the taskset.

For pixel-based length restrictions to work some default settings also have to be provided in the Zf_configuration database table (system configuration; see below). Also the pixel-width definitions have to be provided as an Excel file (pixel-mapping.xml ) that is fed alongside the task-template to the import zip for the task.

All length restrictions can also be provided directly in xliff 1.2 format on trans-unit level. If they are present, they overwrite definitions made in the task templateconfiguration.

To use other custom formats that already contain all length restriction definitions on segment level please ask the translate5 development team to develop a custom import file filter.

...

Length check parameters definable in the task-template configuration(see the table bellow) and overwriteable in xliff 1.2

  • 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 task template 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 task template 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
    • 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)

Task template definitions

For length restrictions to be activated, a task template has to be used.

The <lengthRestriction></lengthRestriction> tag has to be present in the task template and the task template has to be provided to the imported zip package.

...

Config nameTypeDefaultDescription

runtimeOptions.lengthRestriction.size-unit

stringThe default is char (available options:char,pixel)

Defines how the unit of measurement size used for length calculation.

runtimeOptions.lengthRestriction.maxWidthinteger
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.minWidthinteger
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.maxNumberOfLinesinteger
How many lines the text in the segment is maximal allowed to have (can be overwritten in xliff\'s trans-unit)
runtimeOptions.lengthRestriction.pixelmapping.fontstring
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.fontSizeinteger
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

...