Page tree

Versions Compared

Key

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

...

A display text can have multiple lines. translate5 supports to check, that a max number of lines is not exceeded and a max number of pixel or characters per line is not exceeded. Minimum count of characters or pixel is only supported so far, if no max line count is defined.

To support users editing segments for which a max. line count is defined, linebreaks will be inserted automatically at sensful positions when a user opens a segment being to long for editing. These "linebreak suggestions" must be accepted by the user by simply saving the segment.

Usage and configuration

Usage overview

...

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

...

  • 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
    • Font-size and used font of current task
      • Would be possible to overwrite them in xliff 1.2, yet this is not yet implemented (ask translate5s development team, if you need it)
Config nameDefinable levellevelsTypeDefaultDescription

runtimeOptions.lengthRestriction.size-unitsizeUnit

Task-import, client, systemstringThe default is char (available options:char,pixel)

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

runtimeOptions.lengthRestriction.maxWidthTask-import, client, systeminteger
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.minWidthTask-import, client, systeminteger
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.maxNumberOfLinesTask-import, client, systeminteger
How many lines the text in the segment is maximal allowed to have (can be overwritten in xliff\'s trans-unit)
runtimeOptions.lengthRestriction.pixelmapping.fontTask-import, client, systemstring
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.fontSizeTask-import, client, systeminteger
Contains a font-size, e.g. \"12\", that refers to the pixel-mapping.xlsx file (see documentation in translate5s confluence)

...