Skip to content

Commit 31d3f66

Browse files
committed
feat: improve translations of enrollment by domain admin
Add translations of the admin screen for enrollment by domain. fccn/nau-technical#580
1 parent 01ec242 commit 31d3f66

File tree

5 files changed

+73
-34
lines changed

5 files changed

+73
-34
lines changed

nau_openedx_extensions/enrollment_by_domain/models.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ class EnrollmentAllowedList(models.Model):
1414
code = models.CharField(
1515
max_length=100,
1616
unique=True,
17-
help_text=_("Unique code to identify this allowed list")
17+
help_text=_("Unique code to identify this allowed list"),
18+
verbose_name=_("Code"),
1819
)
1920
description = models.TextField(
2021
blank=True,
21-
help_text=_("Description of this allowed list")
22+
help_text=_("Description of this allowed list"),
23+
verbose_name=_("Description"),
2224
)
2325
custom_exception_message = models.TextField(
2426
blank=True,
25-
help_text=_("Custom message to show when enrollment is blocked. If empty, uses default message.")
27+
help_text=_("Custom message to show when enrollment is blocked. If empty, uses default message."),
28+
verbose_name=_("Custom Exception Message"),
2629
)
2730
created_at = models.DateTimeField(auto_now_add=True)
2831
updated_at = models.DateTimeField(auto_now=True)
@@ -43,11 +46,13 @@ class EnrollmentAllowedDomain(models.Model):
4346
allowed_list = models.ForeignKey(
4447
EnrollmentAllowedList,
4548
on_delete=models.CASCADE,
46-
related_name='domains'
49+
related_name='domains',
50+
verbose_name=_("Allowed List")
4751
)
4852
domain = models.CharField(
4953
max_length=255,
50-
help_text=_("Domain name (e.g., 'example.com')")
54+
help_text=_("Domain name (e.g., 'example.com')"),
55+
verbose_name=_("Domain"),
5156
)
5257
created_at = models.DateTimeField(auto_now_add=True)
5358

0 Bytes
Binary file not shown.

nau_openedx_extensions/locale/en/LC_MESSAGES/django.po

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PROJECT VERSION\n"
99
"Report-Msgid-Bugs-To: [email protected]\n"
10-
"POT-Creation-Date: 2025-12-23 14:54+0000\n"
10+
"POT-Creation-Date: 2025-12-23 23:10+0000\n"
1111
"PO-Revision-Date: 2021-02-15 15:56+0000\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language: en\n"
@@ -16,7 +16,7 @@ msgstr ""
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=utf-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
19-
"Generated-By: Babel 2.17.0\n"
19+
"Generated-By: Babel 2.15.0\n"
2020

2121
#: nau_openedx_extensions/certificate_export/views.py:23
2222
msgid "Export task started successfully."
@@ -63,7 +63,7 @@ msgstr ""
6363
msgid "Other"
6464
msgstr ""
6565

66-
#: nau_openedx_extensions/custom_registration_form/models.py:64
66+
#: nau_openedx_extensions/custom_registration_form/models.py:63
6767
msgid ""
6868
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
6969
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
@@ -156,6 +156,7 @@ msgid "Timestamps"
156156
msgstr ""
157157

158158
#: nau_openedx_extensions/enrollment_by_domain/admin.py:72
159+
#: nau_openedx_extensions/enrollment_by_domain/models.py:23
159160
msgid "Description"
160161
msgstr ""
161162

@@ -172,16 +173,16 @@ msgstr ""
172173
msgid "Duplicate selected allowed lists"
173174
msgstr ""
174175

175-
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:95
176-
#: nau_openedx_extensions/filters/pipeline.py:63
176+
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:94
177+
#: nau_openedx_extensions/filters/pipeline.py:62
177178
#, python-brace-format
178179
msgid ""
179180
"You need to activate your account before you can enroll in the course. "
180181
"Check your {email} inbox for an account activation link from "
181182
"{platform_name}."
182183
msgstr ""
183184

184-
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:233
185+
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:232
185186
msgid ""
186187
"You can't enroll on this course because your email domain is not allowed."
187188
" If you think this is an error, contact the course support."
@@ -191,33 +192,49 @@ msgstr ""
191192
msgid "Unique code to identify this allowed list"
192193
msgstr ""
193194

194-
#: nau_openedx_extensions/enrollment_by_domain/models.py:21
195+
#: nau_openedx_extensions/enrollment_by_domain/models.py:18
196+
msgid "Code"
197+
msgstr ""
198+
199+
#: nau_openedx_extensions/enrollment_by_domain/models.py:22
195200
msgid "Description of this allowed list"
196201
msgstr ""
197202

198-
#: nau_openedx_extensions/enrollment_by_domain/models.py:25
203+
#: nau_openedx_extensions/enrollment_by_domain/models.py:27
199204
msgid ""
200205
"Custom message to show when enrollment is blocked. If empty, uses default"
201206
" message."
202207
msgstr ""
203208

204-
#: nau_openedx_extensions/enrollment_by_domain/models.py:31
209+
#: nau_openedx_extensions/enrollment_by_domain/models.py:28
210+
msgid "Custom Exception Message"
211+
msgstr ""
212+
213+
#: nau_openedx_extensions/enrollment_by_domain/models.py:34
205214
msgid "Enrollment Allowed List"
206215
msgstr ""
207216

208-
#: nau_openedx_extensions/enrollment_by_domain/models.py:32
217+
#: nau_openedx_extensions/enrollment_by_domain/models.py:35
209218
msgid "Enrollment Allowed Lists"
210219
msgstr ""
211220

212221
#: nau_openedx_extensions/enrollment_by_domain/models.py:50
222+
msgid "Allowed List"
223+
msgstr ""
224+
225+
#: nau_openedx_extensions/enrollment_by_domain/models.py:54
213226
msgid "Domain name (e.g., 'example.com')"
214227
msgstr ""
215228

216229
#: nau_openedx_extensions/enrollment_by_domain/models.py:55
230+
msgid "Domain"
231+
msgstr ""
232+
233+
#: nau_openedx_extensions/enrollment_by_domain/models.py:60
217234
msgid "Enrollment Allowed Domain"
218235
msgstr ""
219236

220-
#: nau_openedx_extensions/enrollment_by_domain/models.py:56
237+
#: nau_openedx_extensions/enrollment_by_domain/models.py:61
221238
msgid "Enrollment Allowed Domains"
222239
msgstr ""
223240

@@ -232,7 +249,7 @@ msgid ""
232249
" %(custom_message)s"
233250
msgstr ""
234251

235-
#: nau_openedx_extensions/filters/pipeline.py:129
252+
#: nau_openedx_extensions/filters/pipeline.py:128
236253
msgid ""
237254
"You need to associate Autenticação Gov to your account or add NIF to your"
238255
" account."
@@ -262,8 +279,8 @@ msgstr ""
262279
msgid "Certificate Export"
263280
msgstr ""
264281

265-
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:111
266-
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:116
282+
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:110
283+
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:115
267284
msgid ""
268285
"This is an archived course and no longer allows activities to be carried "
269286
"out in order to obtain a certificate."
180 Bytes
Binary file not shown.

nau_openedx_extensions/locale/pt_PT/LC_MESSAGES/django.po

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PROJECT VERSION\n"
99
"Report-Msgid-Bugs-To: [email protected]\n"
10-
"POT-Creation-Date: 2025-12-23 14:54+0000\n"
10+
"POT-Creation-Date: 2025-12-23 23:10+0000\n"
1111
"PO-Revision-Date: 2025-07-17 15:32+0100\n"
1212
"Last-Translator: Ivo Branco <[email protected]>\n"
1313
"Language: pt_PT\n"
@@ -16,7 +16,7 @@ msgstr ""
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=utf-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
19-
"Generated-By: Babel 2.17.0\n"
19+
"Generated-By: Babel 2.15.0\n"
2020

2121
#: nau_openedx_extensions/certificate_export/views.py:23
2222
msgid "Export task started successfully."
@@ -63,7 +63,7 @@ msgstr "Trabalhador independente/empresário"
6363
msgid "Other"
6464
msgstr "Outro"
6565

66-
#: nau_openedx_extensions/custom_registration_form/models.py:64
66+
#: nau_openedx_extensions/custom_registration_form/models.py:63
6767
msgid ""
6868
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
6969
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
@@ -160,6 +160,7 @@ msgid "Timestamps"
160160
msgstr "Registos temporais"
161161

162162
#: nau_openedx_extensions/enrollment_by_domain/admin.py:72
163+
#: nau_openedx_extensions/enrollment_by_domain/models.py:23
163164
msgid "Description"
164165
msgstr "Descrição"
165166

@@ -176,8 +177,8 @@ msgstr "Duplicou com sucesso %(count)d lista(s) permitida(s)."
176177
msgid "Duplicate selected allowed lists"
177178
msgstr "Duplicar listas selecionadas"
178179

179-
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:95
180-
#: nau_openedx_extensions/filters/pipeline.py:63
180+
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:94
181+
#: nau_openedx_extensions/filters/pipeline.py:62
181182
#, python-brace-format
182183
msgid ""
183184
"You need to activate your account before you can enroll in the course. "
@@ -188,7 +189,7 @@ msgstr ""
188189
"Verifique no seu e-mail {email} o link de ativação da conta "
189190
"{platform_name}."
190191

191-
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:233
192+
#: nau_openedx_extensions/enrollment_by_domain/domain_filter.py:232
192193
msgid ""
193194
"You can't enroll on this course because your email domain is not allowed."
194195
" If you think this is an error, contact the course support."
@@ -201,37 +202,53 @@ msgstr ""
201202
msgid "Unique code to identify this allowed list"
202203
msgstr "Código único para identificar esta lista autorizada"
203204

204-
#: nau_openedx_extensions/enrollment_by_domain/models.py:21
205+
#: nau_openedx_extensions/enrollment_by_domain/models.py:18
206+
msgid "Code"
207+
msgstr "Código"
208+
209+
#: nau_openedx_extensions/enrollment_by_domain/models.py:22
205210
msgid "Description of this allowed list"
206211
msgstr "Descrição desta lista de autorizados"
207212

208-
#: nau_openedx_extensions/enrollment_by_domain/models.py:25
213+
#: nau_openedx_extensions/enrollment_by_domain/models.py:27
209214
msgid ""
210215
"Custom message to show when enrollment is blocked. If empty, uses default"
211216
" message."
212217
msgstr ""
213218
"Mensagem personalizada a mostrar quando o registo é bloqueado. Se estiver"
214219
" vazia, utiliza a mensagem predefinida mensagem."
215220

216-
#: nau_openedx_extensions/enrollment_by_domain/models.py:31
221+
#: nau_openedx_extensions/enrollment_by_domain/models.py:28
222+
msgid "Custom Exception Message"
223+
msgstr "Mensagem de exceção personalizada"
224+
225+
#: nau_openedx_extensions/enrollment_by_domain/models.py:34
217226
msgid "Enrollment Allowed List"
218227
msgstr "Lista de inscrições permitidas"
219228

220-
#: nau_openedx_extensions/enrollment_by_domain/models.py:32
229+
#: nau_openedx_extensions/enrollment_by_domain/models.py:35
221230
msgid "Enrollment Allowed Lists"
222231
msgstr "Listas de inscrições permitidas"
223232

224233
#: nau_openedx_extensions/enrollment_by_domain/models.py:50
234+
msgid "Allowed List"
235+
msgstr "Lista permitida"
236+
237+
#: nau_openedx_extensions/enrollment_by_domain/models.py:54
225238
msgid "Domain name (e.g., 'example.com')"
226239
msgstr "Nome de domínio (por exemplo, 'exemplo.com')"
227240

228241
#: nau_openedx_extensions/enrollment_by_domain/models.py:55
242+
msgid "Domain"
243+
msgstr "Domínio"
244+
245+
#: nau_openedx_extensions/enrollment_by_domain/models.py:60
229246
msgid "Enrollment Allowed Domain"
230247
msgstr "Inscrição Domínio permitido"
231248

232-
#: nau_openedx_extensions/enrollment_by_domain/models.py:56
249+
#: nau_openedx_extensions/enrollment_by_domain/models.py:61
233250
msgid "Enrollment Allowed Domains"
234-
msgstr "Domínios de registo permitidos"
251+
msgstr "Registo Domínios permitidos"
235252

236253
#: nau_openedx_extensions/filters/pipeline.py:75
237254
msgid "If you think this is an error, contact the course support."
@@ -246,7 +263,7 @@ msgstr ""
246263
"Não pode inscrever-se neste curso porque o seu domínio de e-mail não é "
247264
"permitido. %(custom_message)s"
248265

249-
#: nau_openedx_extensions/filters/pipeline.py:129
266+
#: nau_openedx_extensions/filters/pipeline.py:128
250267
msgid ""
251268
"You need to associate Autenticação Gov to your account or add NIF to your"
252269
" account."
@@ -278,8 +295,8 @@ msgstr "Ocorreu um erro. Por favor tente novamente mais tarde."
278295
msgid "Certificate Export"
279296
msgstr "Exportação de certificados"
280297

281-
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:111
282-
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:116
298+
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:110
299+
#: nau_openedx_extensions/management/commands/add_archived_course_message.py:115
283300
msgid ""
284301
"This is an archived course and no longer allows activities to be carried "
285302
"out in order to obtain a certificate."

0 commit comments

Comments
 (0)