Skip to content

Commit dc7ea4c

Browse files
committed
Fix multi-line {% trans %} tags in templates
1 parent 242d216 commit dc7ea4c

File tree

11 files changed

+45
-48
lines changed

11 files changed

+45
-48
lines changed

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ known_first_party=ej
1818
multi_line_output=3
1919
default_section=THIRDPARTY
2020

21-
[*.{html,json,yml}]
21+
[*.{html,json,yml,jinja2}]
2222
indent_style = space
23-
indent_size = 2
23+
indent_size = 4
24+
line_length = 150
2425

2526
[*.{css,scss}]
2627
indent_style = space

locale/pt_BR/LC_MESSAGES/django.mo

-4 Bytes
Binary file not shown.

locale/pt_BR/LC_MESSAGES/django.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: ej\n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2019-07-14 18:19-0300\n"
6-
"PO-Revision-Date: 2019-07-14 18:21-0300\n"
6+
"PO-Revision-Date: 2019-07-23 14:34-0300\n"
77
"Last-Translator: Fábio Mendes <[email protected]>\n"
88
"Language-Team: Brazilian Portuguese\n"
99
"Language: pt_BR\n"
@@ -1591,7 +1591,7 @@ msgstr "EJ - Uma plataforma de participação social."
15911591

15921592
#: src/ej/templates/jinja2/pages/home.jinja2:14
15931593
msgid "Create opinion surveys"
1594-
msgstr "Crie consultas de opinião."
1594+
msgstr "Crie consultas de opinião"
15951595

15961596
#: src/ej/templates/jinja2/pages/home.jinja2:15
15971597
msgid "Try it now!"
@@ -2322,7 +2322,7 @@ msgstr "Participar"
23222322

23232323
#: src/ej_profiles/jinja2/ej_profiles/contributions.jinja2:71
23242324
msgid "Empty."
2325-
msgstr "Esvaziar."
2325+
msgstr "Vazio."
23262326

23272327
#: src/ej_profiles/jinja2/ej_profiles/detail.jinja2:5
23282328
msgid "Info"

src/ej_clusters/jinja2/ej_clusters/index.jinja2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
{% else %}
2929
<div class="pad-x3 rounded-3 color-negative border-1">
3030
<h2 class="h3 center">{{ _('Error') }}</h2>
31-
<p class="center">{% trans %}Could not determine the opinion groups for this
32-
conversation.{% endtrans %}</p>
31+
<p class="center">{{ _('Could not determine the opinion groups for this conversation.') }}</p>
3332
</div>
3433
{% if has_edit_perm %}
35-
<p class="center margin-3">{% trans link=edit_link %}You can edit the clusterization options for this
36-
conversation {{ link }}.{% endtrans %}</p>
34+
<p class="center margin-3">
35+
{% trans link=edit_link %}You can edit the clusterization options for this conversation {{ link }}.{% endtrans %}
36+
</p>
3737
{% endif %}
3838
{% endif %}
3939
{% endblock %}

src/ej_conversations/jinja2/ej/role/conversation-comment-form.jinja2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<h3>{% trans %}Ooops!{% endtrans %}</h3>
66
<p>{% trans %}You reached the limit of comments in this conversation.{% endtrans %}</p>
77
{% else %}
8-
<p>{% trans %}Include something new and avoid similar opinions. You can post up to
9-
<span class="text-accent">{{ n_comments }}</span> comments.{% endtrans %}</p>
8+
<p>{% trans %}Include something new and avoid similar opinions.{% endtrans %}
9+
{% trans %}You can post up to <span class="text-accent">{{ n_comments }}</span> comments.{% endtrans %}</p>
1010
<form method="post" up-target="{{ target or 'main' }}" up-transition="move-to-right/fade-in">
1111
{{ csrf_input }}
1212
<input type="hidden" name="action" value="comment">
13-
{{ form.non_field_errors()}}
13+
{{ form.non_field_errors() }}
1414
{{ form.content.errors }}
1515
{{ form.content }}
1616
<div class="comment-form__count"><span>0</span> / 240</div>

src/ej_conversations/jinja2/ej_conversations/create.jinja2

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
{# ADD COMMENTS #}
2424
<h1 class="h2 text-accent center">{{ _('Initial comments') }}</h1>
2525
<p class="center">
26-
{% trans %}Add as many comments as you like (including none).{% endtrans %}{{ ' ' }}
27-
{% trans %}Remember to give a minimum context and something for other users to
28-
explore.{% endtrans %}{{ ' ' }}
29-
{% trans %}You can add as many comments as you want later.{% endtrans %}
26+
{{ _('Add as many comments as you like (including none).') }}{{ ' ' }}
27+
{{ _('Remember to give a minimum context and something for other users to explore.') }}{{ ' ' }}
28+
{{ _('You can add as many comments as you want later.') }}
3029
</p>
3130
<input type="hidden" name="comments_count" value="3">
3231
<div id="comment-list">

src/ej_conversations/jinja2/ej_conversations/detail.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
{% if conversation.is_hidden %}
1515
<div class="color-negative margin-3 pad-x3 pad-y2 rounded-3 center">
1616
<h2>{{ _('Warning!') }}</h2>
17-
<p>{% trans here=edit_link() %}This conversation is hidden. Click {{ here }} to edit and make it visible
18-
again.{% endtrans %}</p>
17+
<p>{% trans %}This conversation is hidden.{% endtrans %}
18+
{% trans here=edit_link() %} Click {{ here }} to edit and make it visible again.{% endtrans %}</p>
1919
</div>
2020

2121
{% else %}

src/ej_conversations/jinja2/ej_conversations/moderate.jinja2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
{% block content %}
66
{{ conversation|role('balloon', actions=False) }}
7-
<p><a href="{{ conversation.get_absolute_url() }}" title="{{ _('Back to conversation') }}" class="lowercase bold text-brand">
7+
<p><a href="{{ conversation.get_absolute_url() }}" title="{{ _('Back to conversation') }}"
8+
class="lowercase bold text-brand">
89
<i class="fa fa-chevron-left"></i>{% trans %}Back to conversation{% endtrans %}
910
</a></p>
1011
<h1 class="h2 text-accent center">{{ _('Comments') }}</h1>
@@ -26,8 +27,8 @@
2627

2728
{% if comments %}
2829
<p class="margin-t3">
29-
{% trans count=n, n=n_strong %}Found {{ n }} comment.
30-
{% pluralize %}Found {{ n }} comments.{% endtrans %}
30+
{% trans count=n, n=n_strong %}Found {{ n }} comment.{% endtrans %}
31+
{% trans count=n, n=n_strong %}{% pluralize %}Found {{ n }} comments.{% endtrans %}
3132
</p>
3233

3334
{# Rejection reason form #}

src/ej_rocketchat/jinja2/ej_rocketchat/index.jinja2

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{% block content %}
66
<div class="measure margin-xauto margin-t3">
77
<h1 class="h2 text-accent">{{ _('Administrative login') }}</h1>
8-
<p>{% trans %}Administrative users do not have user accounts in Rocket.Chat. Instead, they all control
9-
the common administrative account for Rocket.Chat.{% endtrans %}</p>
8+
<p>{% trans %}Administrative users do not have user accounts in Rocket.Chat.{% endtrans %}
9+
{% trans %}Instead, they all control the common administrative account for Rocket.Chat.{% endtrans %}</p>
1010
<h2 class="h3 text-accent">{{ _('Login') }}</h2>
1111
<p>{{ _('Please type the Rocket.Chat admin password') }}</p>
1212
<form method="post">
@@ -16,31 +16,30 @@
1616
</form>
1717

1818
<h2 class="h3 text-accent">{{ _('Configuration') }}</h2>
19-
<p>{% trans %}You can make the home page point to /talks/intro/ by copying the following fragment
20-
into Rocket.Chat's <em>Administration > Layout > Content</em> panel.{% endtrans %}</p>
19+
<p>{{ _("You can make the home page point to <code>/talks/intro/</code> by copying the following fragment into Rocket.Chat's <em>Administration > Layout > Content</em> panel.") }}</p>
2120
<pre><code>{{ "".__class__(code())|e }}</code></pre>
2221
</div>
2322
{% endblock %}
2423

2524

2625
{% macro code() %}
27-
<!DOCTYPE html>
28-
<html lang="pt-br">
29-
<style>
30-
iframe {
31-
width: 100%;
32-
height: 100vh;
33-
}
26+
<!DOCTYPE html>
27+
<html lang="pt-br">
28+
<style>
29+
iframe {
30+
width: 100%;
31+
height: 100vh;
32+
}
3433
35-
.content {
36-
margin: 0 !important;
37-
padding: 0 !important;
38-
}
39-
</style>
40-
<body>
41-
<iframe src="{{ base_url }}{{ url('rocket:intro') }}">
42-
Bem vindos ao EJ!
43-
</iframe>
44-
</body>
45-
</html>
34+
.content {
35+
margin: 0 !important;
36+
padding: 0 !important;
37+
}
38+
</style>
39+
<body>
40+
<iframe src="{{ base_url }}{{ url('rocket:intro') }}">
41+
Bem vindos ao EJ!
42+
</iframe>
43+
</body>
44+
</html>
4645
{% endmacro %}

src/ej_rocketchat/jinja2/ej_rocketchat/register.jinja2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
{% block content %}
77
<div class="measure margin-xauto margin-t3">
88
<h1 class="h2 text-accent">{{ _('Rocket.Chat user name') }}</h1>
9-
<p>{% trans %}You need a unique username to use the Rocket.Chat panel.
10-
Please select the username and we will create an account for you.
11-
{% endtrans %}</p>
9+
<p>{{ _('You need a unique username to use the Rocket.Chat panel. Please select the username and we will create an account for you.') }}</p>
1210
<form method="post">
1311
{{ csrf_input }}
1412
{{ form.as_p() }}

0 commit comments

Comments
 (0)