Skip to content

Improving flash messages #1863

Closed
Closed
@stof

Description

@stof

Currently, flash messages are stored as a simple key/value pair. But this implementation has many drawbacks:

  • The key has to be unique, thus making it impossible to use it to indicate a category of flash message (error, notice, success...) as you could have only one for each category. @lsmith77 suggested to allow having an array of flash messages for each key.
  • There is no way to know the adequate translation domain. This makes their internationalization pretty hard as you cannot easily use the translations provided by a shared bundle for its own flash message. IMO we should have the possibility to store the translation domain in each flash message.

@fabpot what do you think about a refactoring of the flash messages for 2.1 to improve these points, making them far easier to use ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions