Issues
3 of 3
Record format at the TextFlow level for reliable validation
Description
Details
Details
Assignee
Former user
Former user(Deactivated)Reporter
Sean Flanigan
Sean FlaniganLabels
Tested Version/s
None
Components
Priority

More fields
More fields
Created 8 July 2016 at 01:39
Updated 8 July 2016 at 01:40
Activity
Show:
The Gettext file format supports flags on individual strings, which can mark a string as, say,
c-format
, depending on whether that string is used withprintf
(or a special commentxgettext:c-format
is used). This allows gettext tools to perform printf validations, without getting false positives every time a percent sign "%" appears in a string. See https://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.htmlWe should allow Zanata to store similar information about individual TextFlows, so that we can eg, hard-enforce validations for the right strings (ZNTA-301), and avoid spurious warnings for others (ZNTA-944).
Some formats we should know about: HTML (tag validation), XML (tag/entity validation), Java Formatter, C-printf, XSI-printf, Python-printf(ZNTA-1212), EL (ZNTA-136). See the implementations of
org.zanata.webtrans.shared.model.ValidationAction
for all our current validators. We should make it easy to add more formats, even if the validators come later.