Bug #53790
Translation handling in Flashmessages is inconsistent to Validation errors
Status: | New | Start date: | 2013-11-20 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Affected Flow version: | Git master |
Description
Example code:
Current of generating a flashmessage with an argument:
$this->addFlashMessage('This id %1s is already present in the Translation file', '', Message::SEVERITY_NOTICE, array($translationLabel->getLabelId()));
Problem is that the translation handler queried for e.g.:
This id oierjgu9her9gheru is already present in the Translation file
This makes translation of dynamic flashmessages impossible.
The better way would be to translate flashmessages similar to Validation errors:
$this->addFlashMessage('This id {0} is already present in the Translation file', '', Message::SEVERITY_NOTICE, array($translationLabel->getLabelId()));
Would result in querying the translation handler with
This id {0} is already present in the Translation file
This can be easily translated and i would be satisfied ;)