Skip to content

Commit f8776b2

Browse files
Use translate and blocktranslate template tags (#2114)
* rg " trans " --files-with-matches | xargs sed -i "s/ trans / translate /g" * rg " blocktrans " --files-with-matches | xargs sed -i "s/ blocktrans / blocktranslate /g" * rg " endblocktrans " --files-with-matches | xargs sed -i "s/ endblocktrans / endblocktranslate /g"
1 parent 04015c9 commit f8776b2

File tree

106 files changed

+974
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+974
-974
lines changed

evap/contributor/templates/contributor_evaluation_form.html

+26-26
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% load evaluation_filters %}
44

5-
{% block title %}{% trans 'Your EvaP' %} - {{ block.super }}{% endblock %}
5+
{% block title %}{% translate 'Your EvaP' %} - {{ block.super }}{% endblock %}
66

77
{% block breadcrumb_bar %}
88
<div class="breadcrumb-bar">
@@ -18,9 +18,9 @@
1818

1919
<div class="callout callout-info small">
2020
{% if editable %}
21-
{% blocktrans %}Please review the evaluation's details below, add all contributors and select suitable questionnaires. Once everything is okay, please approve the evaluation on the bottom of the page.{% endblocktrans %}
21+
{% blocktranslate %}Please review the evaluation's details below, add all contributors and select suitable questionnaires. Once everything is okay, please approve the evaluation on the bottom of the page.{% endblocktranslate %}
2222
{% else %}
23-
{% blocktrans %}You cannot edit this evaluation because it has already been approved.{% endblocktrans %}
23+
{% blocktranslate %}You cannot edit this evaluation because it has already been approved.{% endblocktranslate %}
2424
{% endif %}
2525
</div>
2626
<h3>
@@ -31,29 +31,29 @@ <h3>
3131
{% csrf_token %}
3232
<div class="card mb-3">
3333
<div class="card-body">
34-
<h5 class="card-title">{% trans 'Course data' %}</h5>
34+
<h5 class="card-title">{% translate 'Course data' %}</h5>
3535
<div class="d-flex">
36-
<label class="col-md-3 pe-4 form-label">{% trans 'Name (German)' %}</label>
36+
<label class="col-md-3 pe-4 form-label">{% translate 'Name (German)' %}</label>
3737
<div class="col-md-7 form-static-text">{{ evaluation.course.name_de }}</div>
3838
</div>
3939
<div class="d-flex">
40-
<label class="col-md-3 pe-4 form-label">{% trans 'Name (English)' %}</label>
40+
<label class="col-md-3 pe-4 form-label">{% translate 'Name (English)' %}</label>
4141
<div class="col-md-7 form-static-text">{{ evaluation.course.name_en }}</div>
4242
</div>
4343
<div class="d-flex">
44-
<label class="col-md-3 pe-4 form-label">{% trans 'Responsibles' %}</label>
44+
<label class="col-md-3 pe-4 form-label">{% translate 'Responsibles' %}</label>
4545
<div class="col-md-7 form-static-text">{{ evaluation.course.responsibles_names }}</div>
4646
</div>
4747
<div class="d-flex">
48-
<label class="col-md-3 pe-4 form-label">{% trans 'Degrees' %}</label>
48+
<label class="col-md-3 pe-4 form-label">{% translate 'Degrees' %}</label>
4949
<div class="col-md-7 form-static-text">
5050
{% for degree in evaluation.course.degrees.all %}
5151
<span class="badge bg-primary">{{ degree }}</span>
5252
{% endfor %}
5353
</div>
5454
</div>
5555
<div class="d-flex">
56-
<label class="col-md-3 pe-4 form-label">{% trans 'Course type' %}</label>
56+
<label class="col-md-3 pe-4 form-label">{% translate 'Course type' %}</label>
5757
<div class="col-md-7 form-static-text">
5858
<span class="badge bg-secondary">{{ evaluation.course.type }}</span>
5959
</div>
@@ -63,17 +63,17 @@ <h5 class="card-title">{% trans 'Course data' %}</h5>
6363
<div class="card mb-3">
6464
<div class="card-body table-responsive">
6565
<div class="d-flex">
66-
<h5 class="card-title me-auto">{% trans 'Evaluation data' %}</h5>
66+
<h5 class="card-title me-auto">{% translate 'Evaluation data' %}</h5>
6767
{% if evaluation.allow_editors_to_edit %}
6868
<div>
6969
<button type="button" class="btn btn-sm btn-light mb-3 createAccountRequestModalShowButton">
70-
{% trans 'Request creation of new account' %}
70+
{% translate 'Request creation of new account' %}
7171
</button>
7272
</div>
7373
{% else %}
7474
<div>
7575
<button type="button" class="btn btn-sm btn-light changeEvaluationRequestModalShowButton">
76-
{% trans 'Request changes' %}
76+
{% translate 'Request changes' %}
7777
</button>
7878
</div>
7979
{% endif %}
@@ -90,22 +90,22 @@ <h5 class="card-title me-auto">{% trans 'Evaluation data' %}</h5>
9090
<div class="card card-submit-area card-submit-area-3 text-center mb-3">
9191
<div class="card-body">
9292
{% if editable %}
93-
<button name="operation" value="preview" type="submit" class="btn btn-light">{% trans 'Preview' %}</button>
94-
<button name="operation" value="save" type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
93+
<button name="operation" value="preview" type="submit" class="btn btn-light">{% translate 'Preview' %}</button>
94+
<button name="operation" value="save" type="submit" class="btn btn-primary">{% translate 'Save' %}</button>
9595

9696
<confirmation-modal type="submit" name="operation" value="approve">
97-
<span slot="title">{% trans 'Approve evaluation' %}</span>
98-
<span slot="action-text">{% trans 'Approve evaluation' %}</span>
97+
<span slot="title">{% translate 'Approve evaluation' %}</span>
98+
<span slot="action-text">{% translate 'Approve evaluation' %}</span>
9999
<span slot="question">
100-
{% blocktrans trimmed %}
100+
{% blocktranslate trimmed %}
101101
Do you want to approve this evaluation? This will allow the evaluation team to proceed with the preparation, but you won't be able to make any further changes.
102-
{% endblocktrans %}
102+
{% endblocktranslate %}
103103
</span>
104104

105-
<button slot="show-button" type="button" class="btn btn-success">{% trans 'Save and approve' %}</button>
105+
<button slot="show-button" type="button" class="btn btn-success">{% translate 'Save and approve' %}</button>
106106
</confirmation-modal>
107107
{% endif %}
108-
<a href="{% url 'contributor:index' %}" class="btn btn-light">{% if edit %}{% trans 'Cancel' %}{% else %}{% trans 'Back' %}{% endif %}</a>
108+
<a href="{% url 'contributor:index' %}" class="btn btn-light">{% if edit %}{% translate 'Cancel' %}{% else %}{% translate 'Back' %}{% endif %}</a>
109109
</div>
110110
</div>
111111
</form>
@@ -115,14 +115,14 @@ <h5 class="card-title me-auto">{% trans 'Evaluation data' %}</h5>
115115
<div class="modal-dialog modal-xl" role="document">
116116
<div class="modal-content">
117117
<div class="modal-header">
118-
<h5 class="modal-title" id="previewModalLabel">{% trans 'Preview' %}</h5>
118+
<h5 class="modal-title" id="previewModalLabel">{% translate 'Preview' %}</h5>
119119
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
120120
</div>
121121
<div class="modal-body">
122122
{{ preview_html }}
123123
</div>
124124
<div class="modal-footer">
125-
<button type="button" class="btn btn-light" data-bs-dismiss="modal">{% trans 'Close' %}</button>
125+
<button type="button" class="btn btn-light" data-bs-dismiss="modal">{% translate 'Close' %}</button>
126126
</div>
127127
</div>
128128
</div>
@@ -133,12 +133,12 @@ <h5 class="modal-title" id="previewModalLabel">{% trans 'Preview' %}</h5>
133133
{% block modals %}
134134
{{ block.super }}
135135

136-
{% blocktrans asvar title with evaluation_name=evaluation.full_name %}Request account creation for {{ evaluation_name }}{% endblocktrans %}
137-
{% trans 'Please tell us which new account we should create. We need the name and email for all new accounts.' as teaser %}
136+
{% blocktranslate asvar title with evaluation_name=evaluation.full_name %}Request account creation for {{ evaluation_name }}{% endblocktranslate %}
137+
{% translate 'Please tell us which new account we should create. We need the name and email for all new accounts.' as teaser %}
138138
{% include 'contact_modal.html' with modal_id='createAccountRequestModal' user=request.user title=title teaser=teaser %}
139139

140-
{% blocktrans asvar title with evaluation_name=evaluation.full_name %}Request evaluation changes for {{ evaluation_name }}{% endblocktrans %}
141-
{% trans 'Please tell us what changes to the evaluation we should make.' as teaser %}
140+
{% blocktranslate asvar title with evaluation_name=evaluation.full_name %}Request evaluation changes for {{ evaluation_name }}{% endblocktranslate %}
141+
{% translate 'Please tell us what changes to the evaluation we should make.' as teaser %}
142142
{% include 'contact_modal.html' with modal_id='changeEvaluationRequestModal' user=request.user title=title teaser=teaser %}
143143
{% endblock %}
144144

0 commit comments

Comments
 (0)