Skip to content

Add additional data to translation files for validation

Background / User story

See trac#104.

What to change

  • Design: N/A
  • Research: N/A
  • Spec: N/A
  • Development:
    • Add isOptional boolean property. (not necessary)
    • Add maxLength integer property.
    • Add spec string array property.
    • Add checks to translation file validation
      • Is file UTF-8 encoded?
      • Is translated string identical to source string? (ignore for strings marked with isOptional or for en-* locales) (not advised due to Crowdin contributors readding removed strings)
      • Does translated string exceed maximum length specified by maxLength?
    • Clean up custom properties when using translation files outside of UI repository
      • Remove custom properties when building or uploading to Crowdin.
      • If spec exists, serialize array and append to description when uploading to Crowdin.
      • If maxLength exists, append "Note: This cannot be longer than N characters" to description when uploading to Crowdin.
      • If feasible, pass maxLength to Crowdin so that it can enforce the length restriction on its side as well.

Hints for testers

TBD

Hints for translators

TBD

Integration notes

TBD

Edited by Thomas Greiner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information