Skip to content

Commit b80d022

Browse files
committed
Added default transloation domains to template files and removed parameters to trans function
1 parent ec05bec commit b80d022

16 files changed

+56
-26
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password">
24
{{ form_widget(form) }}
35
<div>
4-
<input type="submit" value="{{ 'change_password.submit'|trans({}, 'FOSUserBundle') }}" />
6+
<input type="submit" value="{{ 'change_password.submit'|trans }}" />
57
</div>
68
</form>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<form action="{{ path('fos_user_group_edit', {'groupName': group_name} ) }}" {{ form_enctype(form) }} method="POST" class="fos_user_group_edit">
24
{{ form_widget(form) }}
35
<div>
4-
<input type="submit" value="{{ 'group.edit.submit'|trans([], 'FOSUserBundle') }}" />
6+
<input type="submit" value="{{ 'group.edit.submit'|trans }}" />
57
</div>
68
</form>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<form action="{{ path('fos_user_group_new') }}" {{ form_enctype(form) }} method="POST" class="fos_user_group_new">
24
{{ form_widget(form) }}
35
<div>
4-
<input type="submit" value="{{ 'group.new.submit'|trans([], 'FOSUserBundle') }}" />
6+
<input type="submit" value="{{ 'group.new.submit'|trans }}" />
57
</div>
68
</form>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<div class="fos_user_group_show">
2-
<p>{{ 'group.show.name'|trans([], 'FOSUserBundle') }}: {{ group.getName() }}</p>
4+
<p>{{ 'group.show.name'|trans }}: {{ group.getName() }}</p>
35
</div>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<form action="{{ path('fos_user_profile_edit') }}" {{ form_enctype(form) }} method="POST" class="fos_user_profile_edit">
24
{{ form_widget(form) }}
35
<div>
4-
<input type="submit" value="{{ 'profile.edit.submit'|trans({}, 'FOSUserBundle') }}" />
6+
<input type="submit" value="{{ 'profile.edit.submit'|trans }}" />
57
</div>
68
</form>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<div class="fos_user_user_show">
2-
<p>{{ 'profile.show.username'|trans({}, 'FOSUserBundle') }}: {{ user.username }}</p>
3-
<p>{{ 'profile.show.email'|trans({}, 'FOSUserBundle') }}: {{ user.email }}</p>
4+
<p>{{ 'profile.show.username'|trans }}: {{ user.username }}</p>
5+
<p>{{ 'profile.show.email'|trans }}: {{ user.email }}</p>
46
</div>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{% extends "FOSUserBundle::layout.html.twig" %}
22

3+
{% trans_default_domain 'FOSUserBundle' %}
4+
35
{% block fos_user_content %}
4-
<p>{{ 'registration.check_email'|trans({'%email%': user.email}, 'FOSUserBundle') }}</p>
6+
<p>{{ 'registration.check_email'|trans({'%email%': user.email}) }}</p>
57
{% endblock fos_user_content %}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{% extends "FOSUserBundle::layout.html.twig" %}
22

3+
{% trans_default_domain 'FOSUserBundle' %}
4+
35
{% block fos_user_content %}
4-
<p>{{ 'registration.confirmed'|trans({'%username%': user.username}, 'FOSUserBundle') }}</p>
6+
<p>{{ 'registration.confirmed'|trans({'%username%': user.username}) }}</p>
57
{% if app.session is not empty %}
68
{% set targetUrl = app.session.get('_security.' ~ app.security.token.providerKey ~ '.target_path') %}
7-
{% if targetUrl is not empty %}<p><a href="{{ targetUrl }}">{{ 'registration.back'|trans({}, 'FOSUserBundle') }}</a></p>{% endif %}
9+
{% if targetUrl is not empty %}<p><a href="{{ targetUrl }}">{{ 'registration.back'|trans }}</a></p>{% endif %}
810
{% endif %}
911
{% endblock fos_user_content %}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
12
{% block subject %}
23
{% autoescape false %}
3-
{{ 'registration.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }}
4+
{{ 'registration.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}) }}
45
{% endautoescape %}
56
{% endblock %}
67
{% block body_text %}
78
{% autoescape false %}
8-
{{ 'registration.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }}
9+
{{ 'registration.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}) }}
910
{% endautoescape %}
1011
{% endblock %}
1112
{% block body_html %}{% endblock %}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
{% trans_default_domain 'FOSUserBundle' %}
2+
13
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
24
{{ form_widget(form) }}
35
<div>
4-
<input type="submit" value="{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}" />
6+
<input type="submit" value="{{ 'registration.submit'|trans }}" />
57
</div>
68
</form>

0 commit comments

Comments
 (0)