Affects Version/s: None
Fix Version/s: 1.5.0
Example: The string can not exceed %42% characters. - the %'s shouldn't be there. The translation parameters are not %-wrapped, which means the %'s that exist in the translation string won't be removed when parameters are inserted.
These strings end up in the Symfony Translator which uses http://php.net/manual/en/function.strtr.php and that makes no assumptions about %'s, it simply replaces strings verbatim. So if strings are %-wrapped in the translation string, they must also be so in the parameters: http://symfony.com/doc/2.7/components/translation/usage.html#message-placeholders
The kernel fix for this triggers an error in repository-forms, which does automatic %-wrapping. The repository-forms PR fixes this.
STEPS TO REPRODUCE (REST):
- Use a content type with a textline that has min/max length set
- Using REST, create a content of this type, submitting a string of invalid length for the textline
- See that the error message in the REST response has %'s around the integer value
STEPS TO REPRODUCE (REPOSITORY-FORMS)
- Apply the kernel fix
- Use the same content type as above
- Use UGC/nodraft feature to create content of this type: http://example.com/content/create/nodraft/my_type_identifier/eng-GB/2
- Submit a string of invalid length
- See that the error message contains %size% instead of the actual number
- Apply the repository-forms fix, see that it works now