Skip to content
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

Add flash messages #158

Closed
wants to merge 2 commits into from
Closed

Conversation

voronkovich
Copy link
Contributor

Post created
Post updated
Post deleted

@@ -195,6 +195,18 @@
<source>post.no_comments</source>
<target>Будьте первыми кто прокомментирует эту запись.</target>
</trans-unit>
<trans-unit id="post.created_successfully">
<source>post.created_successfully</source>
<target>Запись успешно сохранена!</target>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better is создана instead of сохранена in this case to be consistent with English translation and translation key.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, @bocharsky-bw. I've fixed the translation.

bocharsky-bw added a commit to bocharsky-bw/demo that referenced this pull request Aug 30, 2015
@bocharsky-bw
Copy link
Contributor

👍

@javiereguiluz
Copy link
Member

@voronkovich thanks for working on this. Even if I don't like to display flash messages for when things go right ... I like this PR because it shows a complete example of how to display flash messages, and that's definitely something we want to do.

My only concern was that the original code was a bit overcomplicated for the demo application. That's why I took your work and made some simplifications in #163. I'm closing this PR then, but I reused your commits, so you'll get full credit for your work. Thanks!

@@ -7,6 +7,9 @@
#}
{% extends 'base.html.twig' %}

{# Import macros needed for displaying flash messages. See http://twig.sensiolabs.org/doc/tags/import.html #}
{% import 'macro/messages.html.twig' as messages %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macros should be imported in the template where they are used. Importing them in a parent template and expecting them to work in child templates is just a side effect of the Twig 1.x implementation, and does not work anymore in Twig 2

bocharsky-bw added a commit to bocharsky-bw/demo that referenced this pull request Sep 1, 2015
javiereguiluz added a commit that referenced this pull request Sep 7, 2015
This PR was merged into the master branch.

Discussion
----------

Add flash messages

This finishes #158 by simplifying its contents.

Commits
-------

3eefa76 Reworded the help note about flash messages
9a8d43d Check if the session exists before reading flash messages
d01311b Transformed the macro() of the Flash messages into a regular include() template
f481eef Refactored the template code related to macros
da04216 Fixed an issue with the translation file after the rebase
51f7262 Restored the content database
7507a50 Simplified the template code used to render flash messages
a46c948 Use 'success' as the name of the messages related to success messages
12bd670 Update Russian and English translations
0680841 Show flash messages after creating, updating and deleting posts
javiereguiluz added a commit that referenced this pull request Sep 7, 2015
This PR was merged into the master branch.

Discussion
----------

Update uk translations for flash messages

In addition to #158

Commits
-------

87fc8e0 Update uk translations for flash messages
sayjun0505 added a commit to sayjun0505/sym_proj that referenced this pull request Apr 16, 2023
sayjun0505 added a commit to sayjun0505/sym_proj that referenced this pull request Apr 16, 2023
This PR was merged into the master branch.

Discussion
----------

Update uk translations for flash messages

In addition to symfony/demo#158

Commits
-------

87fc8e0 Update uk translations for flash messages
mwhorse46 added a commit to mwhorse46/sym_proj that referenced this pull request Apr 16, 2023
mwhorse46 added a commit to mwhorse46/sym_proj that referenced this pull request Apr 16, 2023
This PR was merged into the master branch.

Discussion
----------

Update uk translations for flash messages

In addition to symfony/demo#158

Commits
-------

87fc8e0 Update uk translations for flash messages
muqeetsyed pushed a commit to muqeetsyed/symfony-webencore that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants