Record format at the TextFlow level for reliable validation

Description

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 with printf (or a special comment xgettext: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.html

We 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.

Status

Assignee

David Mason

Reporter

Sean Flanigan

Labels

Tested Version/s

None

Priority

unspecified
Configure