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(not necessary)isOptional
boolean property. - 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(not advised due to Crowdin contributors readding removed strings)isOptional
or foren-*
locales) - 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