Skip to content

Commit

Permalink
Replace translated f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Badatos committed Dec 11, 2024
1 parent ef486d5 commit c9f066f
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
7 changes: 2 additions & 5 deletions pod/ai_enhancement/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@ class Meta:
"aria-describedby": "id_titleHelp",
},
),
help_text=_(
"""
Please choose a title between 1 and 250 characters.
"""
),
help_text=_("Please choose a title between 1 and %(max)s characters.")
% {"max": 250},
)

description = forms.CharField(
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
35 changes: 16 additions & 19 deletions pod/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pod\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-11 11:35+0000\n"
"POT-Creation-Date: 2024-12-11 14:19+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: obado <[email protected]>\n"
"Language-Team: Pod Team [email protected]\n"
Expand Down Expand Up @@ -101,15 +101,11 @@ msgstr "La discipline proposée par l’IA Aristote."
msgid "Title"
msgstr "Titre"

#: pod/ai_enhancement/forms.py
msgid ""
"\n"
" Please choose a title between 1 and 250 characters.\n"
" "
msgstr ""
"\n"
" Veuillez entrer un titre contenant entre 1 et 250 caractères.\n"
" "
#: pod/ai_enhancement/forms.py pod/playlist/forms.py pod/quiz/forms.py
#: pod/quiz/models.py
#, python-format
msgid "Please choose a title between 1 and %(max)s characters."
msgstr "Veuillez entrer un titre contenant entre 1 et %(max)s caractères."

#: pod/ai_enhancement/forms.py pod/live/models.py pod/main/forms.py
#: pod/main/models.py pod/playlist/forms.py pod/playlist/models.py
Expand Down Expand Up @@ -4795,7 +4791,7 @@ msgstr "Dernières vidéos"
msgid "Most views"
msgstr "Les plus vues"

#: pod/main/models.py
#: pod/main/models.py pod/video/models.py
msgid "Order"
msgstr "Ordre"

Expand Down Expand Up @@ -6514,7 +6510,7 @@ msgstr ""
" <p>Vous avez besoin de ce mot de passe pour entrer : "
"<strong>%(password)s</strong></p>\n"
" <p>Cordialement</p>\n"
" "
" "

#: pod/meeting/views.py
#, python-format
Expand Down Expand Up @@ -6609,7 +6605,7 @@ msgstr ""
#: pod/meeting/webinar.py
#, python-format
msgid "Webinar mode has been successfully stopped for “%(name)s” meeting."
msgstr "Le mode webinaire a bien été démarré pour la réunion « %(name)s »."
msgstr "Le mode webinaire a bien été arrêté pour la réunion « %(name)s »."

#: pod/meeting/webinar.py
#, python-format
Expand All @@ -6634,15 +6630,15 @@ msgstr "Trop de webinaires"
msgid ""
"There are too many webinars (%(nb_webinars)s) for the number of live "
"gateways allocated (%(nb_live_gateways)s). The next meeting has been created "
"but not like a webinar:%(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"but not like a webinar: %(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"Please fix the problem either by increasing the number of live gateways or "
"by modifying/deleting one of the affected webinars (with the users’ "
"agreement).\n"
"Other webinars: %(names_webinars)s"
msgstr ""
"Il y a trop de webinaires (%(nb_webinars)s) pour le nombre de passerelles de "
"live allouées (%(nb_live_gateways)s). La prochaine réunion a été créée mais "
"pas comme un webinaire :%(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"pas comme un webinaire : %(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"Veuillez résoudre le problème en augmentant le nombre de passerelles de live "
"ou en modifiant/supprimant l’un des webinaires concernés (avec l’accord des "
"utilisateurs).\n"
Expand Down Expand Up @@ -6690,10 +6686,6 @@ msgstr "Informations générales"
msgid "Security informations"
msgstr "Informations de sécurité"

#: pod/playlist/forms.py pod/quiz/forms.py pod/quiz/models.py
msgid "Please choose a title between 1 and 250 characters."
msgstr "Veuillez entrer un titre contenant entre 1 et 250 caractères."

#: pod/playlist/forms.py pod/playlist/models.py
msgid "Please choose a description. This description is empty by default."
msgstr "Veuillez choisir une description. Celle-ci est vide par défaut."
Expand Down Expand Up @@ -7194,6 +7186,11 @@ msgid "The data sent to create the playlist are invalid."
msgstr ""
"Les données envoyées pour créer la liste de lecture ne sont pas valides."

#: pod/playlist/views.py
#, python-format
msgid "Edit playlist “%(name)s”"
msgstr "Modifier la liste de lecture « %(name)s »"

#: pod/playlist/views.py
msgid "JSON in wrong format"
msgstr "JSON au mauvais format"
Expand Down
22 changes: 11 additions & 11 deletions pod/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pod\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-11 11:35+0000\n"
"POT-Creation-Date: 2024-12-11 14:19+0000\n"
"PO-Revision-Date: 2024-07-04 17:54+0200\n"
"Last-Translator: obado <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -101,11 +101,10 @@ msgstr ""
msgid "Title"
msgstr "Titel"

#: pod/ai_enhancement/forms.py
msgid ""
"\n"
" Please choose a title between 1 and 250 characters.\n"
" "
#: pod/ai_enhancement/forms.py pod/playlist/forms.py pod/quiz/forms.py
#: pod/quiz/models.py
#, python-format
msgid "Please choose a title between 1 and %(max)s characters."
msgstr ""

#: pod/ai_enhancement/forms.py pod/live/models.py pod/main/forms.py
Expand Down Expand Up @@ -6228,7 +6227,7 @@ msgstr ""
msgid ""
"There are too many webinars (%(nb_webinars)s) for the number of live "
"gateways allocated (%(nb_live_gateways)s). The next meeting has been created "
"but not like a webinar:%(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"but not like a webinar: %(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"Please fix the problem either by increasing the number of live gateways or "
"by modifying/deleting one of the affected webinars (with the users’ "
"agreement).\n"
Expand Down Expand Up @@ -6269,10 +6268,6 @@ msgstr ""
msgid "Security informations"
msgstr ""

#: pod/playlist/forms.py pod/quiz/forms.py pod/quiz/models.py
msgid "Please choose a title between 1 and 250 characters."
msgstr ""

#: pod/playlist/forms.py pod/playlist/models.py
msgid "Please choose a description. This description is empty by default."
msgstr ""
Expand Down Expand Up @@ -6741,6 +6736,11 @@ msgstr ""
msgid "The data sent to create the playlist are invalid."
msgstr ""

#: pod/playlist/views.py
#, python-format
msgid "Edit playlist “%(name)s”"
msgstr ""

#: pod/playlist/views.py
msgid "JSON in wrong format"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion pod/meeting/webinar_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def send_email_webinars(
message = _(
"There are too many webinars (%(nb_webinars)s) for the number of "
"live gateways allocated (%(nb_live_gateways)s). "
"The next meeting has been created but not like a webinar:%(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"The next meeting has been created but not like a webinar: %(id)s %(name)s [%(start_at)s-%(end_at)s].\n"
"Please fix the problem either by increasing the number of live gateways "
"or by modifying/deleting one of the affected webinars "
"(with the users’ agreement).\n"
Expand Down
4 changes: 3 additions & 1 deletion pod/playlist/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class Meta:
"aria-describedby": "id_nameHelp",
},
),
help_text=_("Please choose a title between 1 and 250 characters."),
help_text=_(
"Please choose a title between 1 and %(max)s characters."
) % {"max": 250}
)
description = forms.CharField(
label=_("Description"),
Expand Down
2 changes: 1 addition & 1 deletion pod/playlist/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def handle_get_request_for_add_or_edit_function(request: WSGIRequest, slug: str)
or request.user in get_additional_owners(playlist)
) and playlist.editable:
form = PlaylistForm(instance=playlist, user=request.user)
page_title = _(f"Edit playlist “{playlist.name}”")
page_title = _("Edit playlist “%(name)s”") % {"name": playlist.name}
else:
return redirect(reverse("playlist:list"))
else:
Expand Down
4 changes: 3 additions & 1 deletion pod/quiz/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class QuestionForm(forms.Form):
label=_("Title"),
required=True,
widget=forms.TextInput(attrs={"placeholder": _("Your question")}),
help_text=_("Please choose a title between 1 and 250 characters."),
help_text=_(
"Please choose a title between 1 and %(max)s characters."
) % {"max": 250}
)
explanation = forms.CharField(
label=_("Explanation"),
Expand Down
4 changes: 3 additions & 1 deletion pod/quiz/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class Question(models.Model):
title = models.CharField(
verbose_name=_("Title"),
max_length=250,
help_text=_("Please choose a title between 1 and 250 characters."),
help_text=_(
"Please choose a title between 1 and %(max)s characters."
) % {"max": 250}
)
explanation = models.TextField(
verbose_name=_("Explanation"),
Expand Down

0 comments on commit c9f066f

Please sign in to comment.