Red Hat Bugzilla – Bug 768802
Newline validation on leading and trailing string.
Last modified: 2012-04-23 00:33:15 EDT
Description of problem:
Message strings often contain escape sequences like newlines or tabs and any mismatch in their position or number may result in an error to be generated for the translation file.
This story is just for leading and trailing newline.
This will be for '\n' sequence.
Implemented in 1.5. See https://github.com/zanata/zanata/commit/d4e942d8d1d6420f561d003c6e181e6744894e87
Does not detect when newlines are present in the target but not the source. Validation should detect these cases given that any mismatch could result in an error.
Properly detects when leading and trailing newlines are present in the source but not the target.
A number of strings in Hibernate Core have a trailing newline followed by 8 spaces. This looks like a trailing newline but is technically just trailing whitespace and is not reported as missing by this validator - it is unclear how this should be treated, this could require an enhancement in the future for validating arbitrary leading/trailing whitespace.
Implemented fix. See https://github.com/zanata/zanata/commit/8c5e2aee6e66704623c9a1dc18701786d600ff58
- updated to use localisable message strings
- updated tag order algorithm to detect single moved tag
- updated printf matching regex to match most standard variable patterns
UI updates, see:
*** Bug 746140 has been marked as a duplicate of this bug. ***