File tree Expand file tree Collapse file tree 7 files changed +14
-11
lines changed
bundles/TwigBundle/Exception Expand file tree Collapse file tree 7 files changed +14
-11
lines changed Original file line number Diff line number Diff line change
1
+ # See https://symfony.com/doc/current/translation.html
1
2
framework :
2
3
default_locale : ' %locale%'
3
4
translator :
5
+ # Translations are defined using the ICU Message Format
6
+ # See https://symfony.com/doc/current/translation/message_format.html
4
7
default_path : ' %kernel.project_dir%/translations'
5
8
fallbacks :
6
9
- ' %locale%'
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ public function onCommentCreated(CommentCreatedEvent $event): void
52
52
53
53
$ subject = $ this ->translator ->trans ('notification.comment_created ' );
54
54
$ body = $ this ->translator ->trans ('notification.comment_created.description ' , [
55
- '% title% ' => $ post ->getTitle (),
56
- '% link% ' => $ linkToPost ,
55
+ 'title ' => $ post ->getTitle (),
56
+ 'link ' => $ linkToPost ,
57
57
]);
58
58
59
59
// See https://symfony.com/doc/current/mailer.html
Original file line number Diff line number Diff line change 3
3
{% block body_id ' admin_post_edit' %}
4
4
5
5
{% block main %}
6
- <h1 >{{ ' title.edit_post' | trans({' %id% ' : post .id }) }}</h1 >
6
+ <h1 >{{ ' title.edit_post' | trans({' id ' : post .id }) }}</h1 >
7
7
8
8
{{ include (' admin/blog/_form.html.twig' , {
9
9
form : form ,
Original file line number Diff line number Diff line change 13
13
{% block body_id ' error' %}
14
14
15
15
{% block main %}
16
- <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' % status_code% ' : status_code }) }}</h1 >
16
+ <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' status_code' : status_code }) }}</h1 >
17
17
18
18
<p class =" lead" >
19
- {{ ' http_error.description' | trans({ ' % status_code% ' : status_code }) }}
19
+ {{ ' http_error.description' | trans({ ' status_code' : status_code }) }}
20
20
</p >
21
21
<p >
22
- {{ ' http_error.suggestion' | trans({ ' % url% ' : path(' blog_index' ) })| raw }}
22
+ {{ ' http_error.suggestion' | trans({ ' url' : path(' blog_index' ) })| raw }}
23
23
</p >
24
24
{% endblock %}
25
25
Original file line number Diff line number Diff line change 13
13
{% block body_id ' error' %}
14
14
15
15
{% block main %}
16
- <h1 class =" text-danger" ><i class =" fa fa-unlock-alt" aria-hidden =" true" ></i > {{ ' http_error.name' | trans({ ' % status_code% ' : 403 }) }}</h1 >
16
+ <h1 class =" text-danger" ><i class =" fa fa-unlock-alt" aria-hidden =" true" ></i > {{ ' http_error.name' | trans({ ' status_code' : 403 }) }}</h1 >
17
17
18
18
<p class =" lead" >
19
19
{{ ' http_error_403.description' | trans }}
Original file line number Diff line number Diff line change 13
13
{% block body_id ' error' %}
14
14
15
15
{% block main %}
16
- <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' % status_code% ' : 404 }) }}</h1 >
16
+ <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' status_code' : 404 }) }}</h1 >
17
17
18
18
<p class =" lead" >
19
19
{{ ' http_error_404.description' | trans }}
20
20
</p >
21
21
<p >
22
- {{ ' http_error_404.suggestion' | trans({ ' % url% ' : path(' blog_index' ) })| raw }}
22
+ {{ ' http_error_404.suggestion' | trans({ ' url' : path(' blog_index' ) })| raw }}
23
23
</p >
24
24
{% endblock %}
25
25
Original file line number Diff line number Diff line change 18
18
{% block body_id ' error' %}
19
19
20
20
{% block main %}
21
- <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' % status_code% ' : 500 }) }}</h1 >
21
+ <h1 class =" text-danger" >{{ ' http_error.name' | trans({ ' status_code' : 500 }) }}</h1 >
22
22
23
23
<p class =" lead" >
24
24
{{ ' http_error_500.description' | trans }}
25
25
</p >
26
26
<p >
27
- {{ ' http_error_500.suggestion' | trans({ ' % url% ' : path(' blog_index' ) })| raw }}
27
+ {{ ' http_error_500.suggestion' | trans({ ' url' : path(' blog_index' ) })| raw }}
28
28
</p >
29
29
{% endblock %}
30
30
You can’t perform that action at this time.
0 commit comments