Skip to content

Commit 072f182

Browse files
committed
add translation and collapse coursebook
1 parent 13613e7 commit 072f182

3 files changed

Lines changed: 65 additions & 52 deletions

File tree

frontend/locale/de_DE/LC_MESSAGES/django.po

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ msgstr "Soll der folgende Kommentar wirklich gelöscht werden?"
3535

3636
#: frontend/templates/frontend/content/addcontent.html:23
3737
#: frontend/templates/frontend/course/create.html:29
38+
#: frontend/templates/frontend/course/duplicate.html:29
3839
#: frontend/templates/frontend/course/edit.html:29
3940
msgid "Create"
4041
msgstr "Erzeugen"
4142

4243
#: frontend/templates/frontend/content/addcontent.html:24
43-
#: frontend/templates/frontend/content/detail.html:80
44+
#: frontend/templates/frontend/content/detail.html:86
4445
#: frontend/templates/frontend/course/create.html:30
46+
#: frontend/templates/frontend/course/duplicate.html:30
4547
#: frontend/templates/frontend/course/edit.html:30
4648
#: frontend/templates/frontend/profile/profile_edit.html:19
4749
msgid "Cancel"
@@ -52,23 +54,31 @@ msgstr "Abbrechen"
5254
msgid "Actions"
5355
msgstr "Aktionen"
5456

55-
#: frontend/templates/frontend/content/detail.html:43
57+
#: frontend/templates/frontend/content/detail.html:33
58+
#: frontend/templates/frontend/content/detail.html:35
59+
#: frontend/templates/frontend/course/coursebook.html:16
60+
#, fuzzy
61+
#| msgid "Courses"
62+
msgid "Coursebook"
63+
msgstr "Kurse"
64+
65+
#: frontend/templates/frontend/content/detail.html:49
5666
msgid "Back to course "
5767
msgstr "Zurück zum Kurs "
5868

59-
#: frontend/templates/frontend/content/detail.html:49
69+
#: frontend/templates/frontend/content/detail.html:55
6070
msgid "By"
6171
msgstr "Von"
6272

63-
#: frontend/templates/frontend/content/detail.html:59
73+
#: frontend/templates/frontend/content/detail.html:65
6474
msgid "Created at"
6575
msgstr "Erstellt am"
6676

67-
#: frontend/templates/frontend/content/detail.html:67
77+
#: frontend/templates/frontend/content/detail.html:73
6878
msgid "Delete"
6979
msgstr "Löschen"
7080

71-
#: frontend/templates/frontend/content/detail.html:71
81+
#: frontend/templates/frontend/content/detail.html:77
7282
#, python-format
7383
msgid ""
7484
"\n"
@@ -81,27 +91,20 @@ msgstr ""
8191
"Diese Aktion kann nicht rückgängig gemacht werden.\n"
8292
" "
8393

84-
#: frontend/templates/frontend/content/detail.html:83
85-
#: frontend/templates/frontend/course/create.html:30
86-
#: frontend/templates/frontend/course/duplicate.html:30
87-
#: frontend/templates/frontend/profile/profile_edit.html:19
88-
msgid "Cancel"
89-
msgstr "Abbrechen"
90-
91-
#: frontend/templates/frontend/content/detail.html:86
94+
#: frontend/templates/frontend/content/detail.html:89
9295
msgid "Confirm"
9396
msgstr "Bestätigen"
9497

95-
#: frontend/templates/frontend/content/detail.html:99
98+
#: frontend/templates/frontend/content/detail.html:105
9699
#: frontend/templates/frontend/course/topic_contents.html:29
97100
msgid "Rating"
98101
msgstr "Bewertung"
99102

100-
#: frontend/templates/frontend/content/detail.html:109
103+
#: frontend/templates/frontend/content/detail.html:115
101104
msgid "Comments"
102105
msgstr "Kommentare"
103106

104-
#: frontend/templates/frontend/content/detail.html:115
107+
#: frontend/templates/frontend/content/detail.html:121
105108
msgid "Add comment"
106109
msgstr "Kommentar hinzufügen"
107110

@@ -117,31 +120,30 @@ msgstr "Nächste"
117120
msgid "Previous"
118121
msgstr "Vorherige"
119122

123+
#: frontend/templates/frontend/course/coursebook.html:10
124+
msgid "Export"
125+
msgstr "Exportieren"
126+
127+
#: frontend/templates/frontend/course/coursebook.html:22
128+
#, fuzzy
129+
#| msgid "Your Courses"
130+
msgid "Your coursebook is empty"
131+
msgstr "Dein Kursbuch ist leer"
132+
120133
#: frontend/templates/frontend/course/create.html:11
121134
msgid "Create a new course"
122135
msgstr "Neuen Kurs anlegen"
123136

124-
#: frontend/templates/frontend/course/create.html:29
125-
#: frontend/templates/frontend/course/duplicate.html:29
126-
msgid "Create"
127-
msgstr "Erzeugen"
137+
#: frontend/templates/frontend/course/dropdown_topic.html:10
138+
msgid "Add Content"
139+
msgstr "Inhalte hinzufügen"
128140

129141
#: frontend/templates/frontend/course/duplicate.html:11
130142
#: frontend/templates/frontend/course/duplicate.html:19
131-
#: frontend/templates/frontend/course/view.html:25
143+
#: frontend/templates/frontend/course/view.html:31
132144
msgid "Duplicate Course"
133145
msgstr "Kurs duplizieren"
134146

135-
#: frontend/templates/frontend/course/view.html:36
136-
#: frontend/templates/frontend/course/view.html:27
137-
msgid "Delete Course"
138-
msgstr "Kurs löschen"
139-
140-
#: frontend/templates/frontend/course/view.html:63
141-
#: frontend/templates/frontend/course/dropdown_topic.html:10
142-
msgid "Add Content"
143-
msgstr "Inhalte hinzufügen"
144-
145147
#: frontend/templates/frontend/course/edit.html:11
146148
msgid "Edit course"
147149
msgstr "Kurs bearbeiten"
@@ -150,6 +152,10 @@ msgstr "Kurs bearbeiten"
150152
msgid "Edit Course"
151153
msgstr "Kurs hinzufügen"
152154

155+
#: frontend/templates/frontend/course/view.html:36
156+
msgid "Delete Course"
157+
msgstr "Kurs löschen"
158+
153159
#: frontend/templates/frontend/course/view.html:76
154160
msgid "No topics yet"
155161
msgstr "Bisher keine Themen"
@@ -287,6 +293,14 @@ msgstr "Kommentar erfolgreich gelöscht."
287293
msgid "Successfully edited Comment."
288294
msgstr "Kommentar erfolgreich bearbeitet."
289295

296+
#: frontend/views/content.py:28
297+
msgid "Content '{cleaned_data['type']}' successfully added"
298+
msgstr "Inhalt '{cleaned_data['type']}' erfolgreich hinzugefügt"
299+
300+
#: frontend/views/content.py:35
301+
msgid "An error occurred while processing the request"
302+
msgstr "Es trat ein Fehler beim Verarbeiten der Anfrage auf"
303+
290304
#: frontend/views/course.py:27
291305
msgid ""
292306
"Course '{cleaned_data['title']}' successfully created. All settings and "
@@ -299,19 +313,7 @@ msgstr ""
299313
msgid "Course '{cleaned_data['title']}' successfully created"
300314
msgstr "Kurs '{cleaned_data['title']}' erfolgreich angelegt"
301315

302-
#: frontend/views/content.py:28
303-
msgid "Content '{cleaned_data['type']}' successfully added"
304-
msgstr "Inhalt '{cleaned_data['type']}' erfolgreich hinzugefügt"
305-
306-
#: frontend/views/content.py:35
307-
msgid "An error occurred while processing the request"
308-
msgstr "Es trat ein Fehler beim Verarbeiten der Anfrage auf"
309-
310-
#: frontend/views/course.py:26
311-
msgid "Course '{cleaned_data['title']}' successfully created"
312-
msgstr "Kurs '{cleaned_data['title']}' erfolgreich angelegt"
313-
314-
#: frontend/views/course.py:52
316+
#: frontend/views/course.py:88
315317
msgid "Course '{cleaned_data['title']}' successfully edited"
316318
msgstr "Kurs '{cleaned_data['title']}' erfolgreich bearbeitet"
317319

frontend/templates/frontend/content/detail.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
{% endif %}
3131

3232
{% if favorite %}
33-
<a class="dropdown-item" href="{% url 'frontend:coursebook-remove' course.id topic.id content.id %}">{% fa5_icon 'times' 'far' %} Remove</a>
33+
<a class="dropdown-item" href="{% url 'frontend:coursebook-remove' course.id topic.id content.id %}">{% fa5_icon 'minus' 'far' %} {% trans 'Coursebook' %}</a>
3434
{% else %}
35-
<a class="dropdown-item" href="{% url 'frontend:coursebook-add' course.id topic.id content.id %}">{% fa5_icon 'plus' 'far' %} Add</a>
35+
<a class="dropdown-item" href="{% url 'frontend:coursebook-add' course.id topic.id content.id %}">{% fa5_icon 'plus' 'far' %} {% trans 'Coursebook' %}</a>
3636
{% endif %}
3737

3838
{% if isCurrentUserOwner or user.is_superuser or content.author == user %}

frontend/templates/frontend/course/coursebook.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@
44
{% load fontawesome_5 %}
55
{% load cc_frontend_tags %}
66

7-
<div>
7+
<div class="mt-3">
88
{% with user|get_coursebook:course as topic_contents %}
9-
<h2>Coursebook</h2>
109
{% if topic_contents|length > 0 %}
11-
{% include "frontend/course/topic_contents.html" %}
12-
{% else %}
13-
<p>Coursebook empty</p>
10+
<a href="" class="btn btn-primary float-right text-right">{% trans 'Export' %}</a>
1411
{% endif %}
12+
<button class="btn btn-primary float-left mr-1" type="button" data-toggle="collapse" data-target="#collapseCoursebook"
13+
aria-expanded="false" aria-controls="collapseCoursebook">
14+
{% fa5_icon 'bars' 'fas' %}
15+
</button>
16+
<h2>{% trans 'Coursebook' %}</h2>
17+
<div class="collapse show" id="collapseCoursebook">
18+
<div class="card card-body">
19+
{% if topic_contents|length > 0 %}
20+
{% include "frontend/course/topic_contents.html" %}
21+
{% else %}
22+
<p>{% trans 'Your coursebook is empty' %}</p>
23+
{% endif %}
24+
</div>
25+
</div>
1526
{% endwith %}
1627
</div>

0 commit comments

Comments
 (0)