Bug #53790

Translation handling in Flashmessages is inconsistent to Validation errors

Added by Kay Strobach over 5 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-11-20
Due date:
% Done:

0%


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 ;)

Also available in: Atom PDF