Created attachment 919787 [details] bug_zanata Description of problem: Showing wrong warning in translation interface Version-Release number of selected component (if applicable): Zanata 3.4.2 (git-server-3.4.2-dirty) URL: https://translate.zanata.org/zanata/webtrans/translate?project=zanata-server&iteration=master&localeId=pt-BR&locale=en#view:doc;doc:zanata-war/src/main/resources/messages;untranslated:show;fuzzy:show;rejected:show Actual results: Warning: 1, Errors: 0 Unexpected variable: {messages['jsf.CopyTrans']} Expected results: No warning! Additional info: attached screenshot.
This is caused because the java variables validator is not appropriate for the type of variables used in these strings. The warning in this case is caused because of an apostrophe (') in the source string before the variable, where there is no apostrophe in the translation. In this case the source string is "Help: Set this project's default #{messages['jsf.CopyTrans'} settings.", and the apostrophe in "project's" makes the validator see the rest of the string as escaped, so it does not identify the variable "#{messages['jsf.CopyTrans'}" Since we do not have a specific validator for these variables, the workaround at the moment is to save translations despite the warning, and never set Java Variables validator above warning for projects that are not using Java MessageFormat strings. The solution is to create a validator that handles JSF/Seam variables properly.
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-199