-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flash messages in CartBundle being ignored while sent in event data #670
Conversation
{ | ||
$this->session->getFlashBag()->add('error', $event->getMessage() ?: $this->translator->trans($this->messages[$event->getName()], array(), 'flashes')); | ||
$this->addFlash('success', $event->getMessage(), $event->getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if message is null? I prefer generic mesage over empty one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before: if empty use default defined in listener.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you replaced $event->getMessage() ?: $this->translator->trans($this->messages[$event->getName()]
with $event->getMessage()
. So it will be empty. Or I am missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umpirsky Please read whole diff not just part =P
https://github.com/Sylius/Sylius/pull/670/files#diff-5b60d6377212a0ea3b83ed2d6e933a66R94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stloyd lol, sorry. Perfect! :)
We also need to make all |
@umpirsky That it's not case of bugfix, please don't mix things that are not subject of the issue. If they need to be changed, please open new issue about it, let's keep bugfixes "clean" to faster fix issues =) |
@stloyd Nono, you break i18n here :) Message was translated before your fix, now they are in English. |
@umpirsky No, no, no =P Check spec =P |
OK, merge it. I will rebase and fix in #665 |
Fix flash messages in CartBundle being ignored while sent in event data
Thanks Joseph! |
No description provided.