Description of problem: For any java variable that appears in a string after an odd number of apostrophe ("'") characters, the variable is not recognised for validation. This can cause confusing messages of added or missing variables when using words containing apostrophes. Variables that are after an even number of apostrophes are validated as normal. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Sign in and enter a workspace that has java style variables ( %{name} ) 2.Copy a source string with variables to the target 3.Add a single apostrophe at the beginning of the string 4.Add another apostrophe next to the first Actual results: 3.Validation shows all variables are missing 4.Validation does not show missing variables Expected results: Validation does not show missing variables at step 3 or 4 Additional info: Caused by validator considering string 'quoted' between apostrophes and intentionally not validating.
Removed quote analysis from the validation. See: https://github.com/zanata/zanata/commit/503002118d3f9634c7bdd73cdca8afe9c727e2a4
Reverting this change as Java validation was working as expected. The bug was reported while attempting to validate Ruby code using the Java validator. A ruby variable validator should be implemented instead. See: https://github.com/zanata/zanata/commit/6a5b10a64b70031d21bc3287cdffbcc27c364de9
(Mid-air collision...) Actually, the validator was working as it should: apostrophes (single quotes) are used for escaping in Java MessageFormat: http://docs.oracle.com/javase/1.4.2/docs/api/java/text/MessageFormat.html To get a single quote with MessageFormat, you actually have to use two in a row. Anything inside a quoted area that looks like a variable expansion will be output verbatim by MessageFormat, ie not treated as a variable. The string given in the steps to reproduce ("%{name}") appears to be a Ruby string, not a Java string. Until we implement a Ruby validator in the editor, it's best just to disable the Java validator for Ruby projects. We should revert the above commit, please. The quote analysis is fine.
*** This bug has been marked as a duplicate of bug 872039 ***