mothership-ec / cog

Cog
Other
2 stars 3 forks source link

Automatically translate flash messages #463

Closed thomasjthomasj closed 8 years ago

thomasjthomasj commented 9 years ago

This PR makes adding flash messages more convenient. Flash message should always be translation strings when in Mothership core, but you currently need to call $this->trans() on your message before passing it into the addFlash() method which is just a big stupid hassle. This PR puts that call in the Controller::addFlash() method, and adds an optional $params third parameter to the method for passing params to the translator