Skip to content

Commit

Permalink
[DONE] Last fixes for 3.5.0 (#1034)
Browse files Browse the repository at this point in the history
* + Correct some i18n bugs
+ add table-responsive to my dressings
+ remove css causing alerts to be always white
+ correct event-info indentation
+ add missing "aria-hidden"
+ Move inline Js from my_meeting to a separate file
+ correct color bug on video-info

* Remove useless call to "jsi18n"
  • Loading branch information
Badatos authored Jan 30, 2024
1 parent 2f238ba commit 1d2ebaa
Show file tree
Hide file tree
Showing 18 changed files with 245 additions and 198 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Start reading our code and you'll get the hang of it. We optimize for readabilit

* Configuration variables are uppercase and can be called in all modules keeping the same name. For example, MAVAR = getattr(settings, "MAVAR", default value)
* Global variables to a module are also in uppercase but are considered private to the module and therefore must be prefixed and suffixed with a double underscore
* We indent using two spaces (soft tabs)
* All .py files must be indented using 4 spaces, and all other files (.css, .html, .js) with 2 spaces (soft tabs)
* This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.

### JavaScript Styleguide
Expand Down
6 changes: 4 additions & 2 deletions pod/dressing/templates/my_dressings.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{% endblock %}

{% block page_content %}
<div class="table-responsive">
<table class="table table-sm table-striped table-bordered text-center" summary="{% trans 'List of dressings I can use or manage.' %}">
<caption class="caption-top">{% trans 'Available video dressings' %}</caption>
<thead>
Expand Down Expand Up @@ -108,10 +109,10 @@
</td>
<td>
<div class="d-flex justify-content-between">
<a href="{% url 'dressing:dressing_edit' dressing_id=dressing.pk %}" class="btn btn-primary" title="{% trans 'Edit'%}" data-bs-toggle="tooltip" data-bs-placement="top">
<a href="{% url 'dressing:dressing_edit' dressing_id=dressing.pk %}" class="btn btn-primary me-1" title="{% blocktrans with title=dressing.title %}Edit “{{title}}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="top">
<i class="bi bi-pencil-square" aria-hidden="true"></i>
</a>
<a href="{% url 'dressing:dressing_delete' dressing_id=dressing.pk %}" class="btn btn-danger" title="{% trans 'Delete'%}" data-bs-toggle="tooltip" data-bs-placement="top">
<a href="{% url 'dressing:dressing_delete' dressing_id=dressing.pk %}" class="btn btn-danger" title="{% blocktrans with title=dressing.title%}Delete “{{title}}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="top">
<i class="bi bi-trash" aria-hidden="true"></i>
</a>
</div>
Expand All @@ -124,6 +125,7 @@
{% endfor %}
</tbody>
</table>
</div>
<a href="{% url 'dressing:dressing_create' %}" class="btn btn-primary">{% trans 'Add new dressing' %}</a>
{% endblock page_content %}

Expand Down
4 changes: 2 additions & 2 deletions pod/dressing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def video_dressing(request, slug):
"video": video,
"dressings": dressings,
"current": current,
"page_title": _("Dress the video “%s”" % video.title),
"page_title": _("Dress the video “%s”") % video.title,
},
)

Expand Down Expand Up @@ -190,7 +190,7 @@ def dressing_delete(request, dressing_id):
{
"dressing": dressing,
"form": form,
"page_title": _("Deleting the dressing “%s”" % dressing.title),
"page_title": _("Deleting the dressing “%s”") % dressing.title,
},
)

Expand Down
3 changes: 1 addition & 2 deletions pod/import_video/static/css/import_video.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ div.alert.alert-dismissible {
padding-left: 78px;
position: relative;
padding-right: 60px;
border: 1px solid #e6e6e6;
background: #fff;
}


div.alert .icon {
text-align: center;
width: 58px;
Expand Down
115 changes: 57 additions & 58 deletions pod/live/templates/live/event-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,68 +68,67 @@ <h2 class="modal-title h5" id="shareLabel">
</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
</div>
<div class="modal-body">
<div class="modal-body">

{% if event.is_draft %}
<div class="card text-white border-danger mb-3">
<div class="card-body">
{% blocktrans %}Please note that your event is in draft mode.<br>The following links contain a key allowing access. Anyone with this links can access it.{% endblocktrans %}
</div>
</div>
{% endif %}
{% if event.is_draft %}
<div class="alert alert-warning mb-3 d-flex align-items-center" role="alert">
<i class="bi bi-incognito" aria-hidden="true"></i>
<div class="ms-2">{% blocktrans %}Please note that your event is in draft mode.<br>The following links contain a key allowing access. Anyone with this links can access it.{% endblocktrans %}</div>
</div>
{% endif %}

<fieldset class="pod-share-fieldset">
<legend><i class="bi bi-code" aria-hidden="true"></i>&nbsp;{% trans 'Embed in a web page' %}</legend>
<div class="form-group ">
<label for="txtintegration">{% trans 'Copy the content of this text box and paste it in the page:'%}</label>
<textarea name="txtintegration" id="txtintegration" class="form-control" rows="4">&lt;iframe src="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}?is_iframe=true" width="640" height="360" style="padding: 0; margin: 0; border:0" allowfullscreen &gt;&lt;/iframe&gt;</textarea>
</div>
</fieldset>
<fieldset class="pod-share-fieldset">
<legend><i class="bi bi-code" aria-hidden="true"></i>&nbsp;{% trans 'Embed in a web page' %}</legend>
<div class="form-group ">
<label for="txtintegration">{% trans 'Copy the content of this text box and paste it in the page:'%}</label>
<textarea name="txtintegration" id="txtintegration" class="form-control" rows="4">&lt;iframe src="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}?is_iframe=true" width="640" height="360" style="padding: 0; margin: 0; border:0" allowfullscreen &gt;&lt;/iframe&gt;</textarea>
</div>
</fieldset>

{% if not event.is_draft and not event.broadcaster.is_restricted %}
<dl class="row">
<dt class="col-sm-3 text-right visually-hidden">{% trans 'Social Networks' %}</dt>
<dd class="col-sm-9 mb-0">
<ul class="list-inline mb-0 social_links">
<li class="list-inline-item">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} Facebook" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-facebook" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on Facebook' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} X (Twitter)" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-twitter-x" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on X (Twitter)' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} LinkedIn" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-linkedin" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on LinkedIn' %}</span>
</a>
</li>
</ul>
</dd>
</dl>
<hr>
{% endif %}
{% if not event.is_draft and not event.broadcaster.is_restricted %}
<dl class="row">
<dt class="col-sm-3 text-right visually-hidden">{% trans 'Social Networks' %}</dt>
<dd class="col-sm-9 mb-0">
<ul class="list-inline mb-0 social_links">
<li class="list-inline-item">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} Facebook" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-facebook" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on Facebook' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} X (Twitter)" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-twitter-x" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on X (Twitter)' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} LinkedIn" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-linkedin" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on LinkedIn' %}</span>
</a>
</li>
</ul>
</dd>
</dl>
<hr>
{% endif %}

<fieldset class="pod-share-fieldset">
<legend><i class="bi bi-link-45deg" aria-hidden="true"></i>&nbsp;{% trans 'Share the link' %}</legend>
<div class="form-group">
<label for="txtpartage">{% trans 'Use this link to share the event:' %}</label>
<input class="form-control" type="text" name="txtpartage" id="txtpartage" value="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}">
</div>
<div class="form-group m-2">
{% get_event_qrcode event.id as qrcode %}
<label>{% trans 'QR code for this link:' %}&nbsp;</label><br>
{{ qrcode }}
<br>
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}" class="btn btn-primary my-2" title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
</div>
</fieldset>
</div> <!-- End modal body-->
<fieldset class="pod-share-fieldset">
<legend><i class="bi bi-link-45deg" aria-hidden="true"></i>&nbsp;{% trans 'Share the link' %}</legend>
<div class="form-group">
<label for="txtpartage">{% trans 'Use this link to share the event:' %}</label>
<input class="form-control" type="text" name="txtpartage" id="txtpartage" value="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}">
</div>
<div class="form-group m-2">
{% get_event_qrcode event.id as qrcode %}
<label>{% trans 'QR code for this link:' %}&nbsp;</label><br>
{{ qrcode }}
<br>
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}" class="btn btn-primary my-2" title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
</div>
</fieldset>
</div> <!-- End modal body-->
</div> <!-- End modal content-->
</div> <!-- End modal dialog-->
</div> <!-- End modal -->
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
39 changes: 23 additions & 16 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-01-29 10:06+0000\n"
"POT-Creation-Date: 2024-01-29 15:38+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: obado <bado@unice.fr>\n"
"Language-Team: Pod Team cotech-esup-pod@esup-portail.org\n"
Expand Down Expand Up @@ -1001,7 +1001,6 @@ msgstr "Supprimer le chapitre « %(chapter_title)s »"
#: pod/completion/templates/document/list_document.html
#: pod/completion/templates/overlay/list_overlay.html
#: pod/dressing/templates/dressing_delete.html
#: pod/dressing/templates/my_dressings.html
#: pod/enrichment/templates/enrichment/list_enrichment.html
#: pod/live/templates/live/event_delete.html
#: pod/meeting/templates/meeting/delete.html
Expand Down Expand Up @@ -2141,10 +2140,15 @@ msgstr "Pas de filigrane"
msgid "View the video"
msgstr "Voir la vidéo"

#: pod/dressing/templates/my_dressings.html pod/live/templates/live/direct.html
#: pod/video/templates/videos/video_edit.html
msgid "Edit"
msgstr "Éditer"
#: pod/dressing/templates/my_dressings.html
#, python-format
msgid "Edit “%(title)s”"
msgstr "Modifier « %(title)s »"

#: pod/dressing/templates/my_dressings.html
#, python-format
msgid "Delete “%(title)s”"
msgstr "Supprimer « %(title)s »"

#: pod/dressing/templates/my_dressings.html
#: pod/dressing/templates/video_dressing.html
Expand Down Expand Up @@ -3485,6 +3489,11 @@ msgstr "Prochains évènements"
msgid "Manage broadcaster"
msgstr "Gérer le diffuseur"

#: pod/live/templates/live/direct.html
#: pod/video/templates/videos/video_edit.html
msgid "Edit"
msgstr "Éditer"

#: pod/live/templates/live/direct.html pod/live/templates/live/directs_all.html
msgid "no broadcast in progress"
msgstr "aucune diffusion actuellement"
Expand Down Expand Up @@ -5780,14 +5789,6 @@ msgstr ""
msgid "Add a meeting"
msgstr "Ajouter une réunion"

#: pod/meeting/templates/meeting/my_meetings.html
msgid "Unable to find information about the meeting"
msgstr "Impossible de trouver des informations sur la réunion"

#: pod/meeting/templates/meeting/my_meetings.html
msgid "End the meeting"
msgstr "Terminer la réunion"

#: pod/meeting/templates/meeting/recurring_options_modal_form.html
msgid "Repeat every"
msgstr "Répéter tou(te)s les"
Expand Down Expand Up @@ -8412,8 +8413,8 @@ msgstr "Document :"
#: pod/video/templates/videos/video-info.html
msgid ""
"Please note that your video is in draft mode.<br>\n"
"The following links contain a key allowing access.\n"
"Anyone with this links can access it."
" The following links contain a key allowing access.\n"
" Anyone with this links can access it."
msgstr ""
"Veuillez noter que votre vidéo est en mode brouillon. <br>\n"
"Les liens suivants contiennent une clé permettant l’accès.\n"
Expand Down Expand Up @@ -9141,3 +9142,9 @@ msgstr "Résultats de la recherche"
#: pod/xapi/apps.py
msgid "Esup-Pod xAPI"
msgstr "xAPI Esup-Pod"

#~ msgid "Unable to find information about the meeting"
#~ msgstr "Impossible de trouver des informations sur la réunion"

#~ msgid "End the meeting"
#~ msgstr "Terminer la réunion"
Binary file modified pod/locale/fr/LC_MESSAGES/djangojs.mo
Binary file not shown.
18 changes: 17 additions & 1 deletion pod/locale/fr/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Esup-Pod\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-26 16:38+0000\n"
"POT-Creation-Date: 2024-01-29 15:38+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: obado <bado@unice.fr>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -497,6 +497,22 @@ msgstr "Info"
msgid "Information"
msgstr "Information"

#: pod/meeting/static/js/my_meetings.js
msgid "Unable to find information about the meeting"
msgstr "Impossible de trouver des informations sur la réunion"

#: pod/meeting/static/js/my_meetings.js
msgid "End the meeting"
msgstr "Terminer la réunion"

#: pod/meeting/static/js/my_meetings.js
msgid "Text copied."
msgstr "Texte copié."

#: pod/meeting/static/js/my_meetings.js
msgid "Something went wrong."
msgstr "Quelque-chose s’est mal passé."

#: pod/playlist/static/playlist/js/add-or-edit.js
msgid "<b>Public:</b> the playlist can be accessed by anyone."
msgstr "<b>Public :</b> la liste de lecture est accessible par tous."
Expand Down
31 changes: 16 additions & 15 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-01-29 10:06+0000\n"
"POT-Creation-Date: 2024-01-29 15:38+0000\n"
"PO-Revision-Date: 2023-06-08 14:37+0200\n"
"Last-Translator: obado <bado@unice.fr>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -944,7 +944,6 @@ msgstr ""
#: pod/completion/templates/document/list_document.html
#: pod/completion/templates/overlay/list_overlay.html
#: pod/dressing/templates/dressing_delete.html
#: pod/dressing/templates/my_dressings.html
#: pod/enrichment/templates/enrichment/list_enrichment.html
#: pod/live/templates/live/event_delete.html
#: pod/meeting/templates/meeting/delete.html
Expand Down Expand Up @@ -2036,9 +2035,14 @@ msgstr ""
msgid "View the video"
msgstr ""

#: pod/dressing/templates/my_dressings.html pod/live/templates/live/direct.html
#: pod/video/templates/videos/video_edit.html
msgid "Edit"
#: pod/dressing/templates/my_dressings.html
#, python-format
msgid "Edit “%(title)s”"
msgstr ""

#: pod/dressing/templates/my_dressings.html
#, python-format
msgid "Delete “%(title)s”"
msgstr ""

#: pod/dressing/templates/my_dressings.html
Expand Down Expand Up @@ -3261,6 +3265,11 @@ msgstr ""
msgid "Manage broadcaster"
msgstr ""

#: pod/live/templates/live/direct.html
#: pod/video/templates/videos/video_edit.html
msgid "Edit"
msgstr ""

#: pod/live/templates/live/direct.html pod/live/templates/live/directs_all.html
msgid "no broadcast in progress"
msgstr ""
Expand Down Expand Up @@ -5475,14 +5484,6 @@ msgstr ""
msgid "Add a meeting"
msgstr ""

#: pod/meeting/templates/meeting/my_meetings.html
msgid "Unable to find information about the meeting"
msgstr ""

#: pod/meeting/templates/meeting/my_meetings.html
msgid "End the meeting"
msgstr ""

#: pod/meeting/templates/meeting/recurring_options_modal_form.html
msgid "Repeat every"
msgstr ""
Expand Down Expand Up @@ -7896,8 +7897,8 @@ msgstr ""
#: pod/video/templates/videos/video-info.html
msgid ""
"Please note that your video is in draft mode.<br>\n"
"The following links contain a key allowing access.\n"
"Anyone with this links can access it."
" The following links contain a key allowing access.\n"
" Anyone with this links can access it."
msgstr ""

#: pod/video/templates/videos/video-info.html
Expand Down
Loading

0 comments on commit 1d2ebaa

Please sign in to comment.