Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONE] A11y for 3.8.2 #1219

Merged
merged 6 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitguardian.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
exclude_paths:
version: 2
secret:
ignored_paths:
- pod/enrichment/tests/test_views.py
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/gitguardian/ggshield
rev: v1.27.0
rev: v1.32.0
hooks:
- id: ggshield
language_version: python3
stages: [commit]
stages: [pre-commit]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Affiche la liste des commandes disponibles
help:
echo "Syntax: [make target] where target is in this list:"
@echo "Syntax: [make target] where target is in this list:"
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t

# Démarre le serveur de test
Expand Down
3 changes: 2 additions & 1 deletion pod/completion/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def enrich_kaldi_model_launch() -> None:

@admin.action(description=_("Enrich with selected subtitles"))
def enrich_model(modeladmin, request, queryset) -> None:
"""Enrich with selected subtitles."""
text = ""
title = ""
for query in list(queryset.all()):
Expand All @@ -249,7 +250,7 @@ def enrich_model(modeladmin, request, queryset) -> None:
title += query.video.title
file = query.src.file
for caption in webvtt.read(file.path):
text += caption.text + " \n"
text += caption.text + "\n"
query.enrich_ready = False
query.save()

Expand Down
9 changes: 7 additions & 2 deletions pod/dressing/templates/my_dressings.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,15 @@
{% endif %}
</td><td>
<div class="d-flex justify-content-between">
<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">
<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="{% blocktrans with title=dressing.title%}Delete “{{title}}”{% endblocktrans %}" 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 Down
4 changes: 2 additions & 2 deletions pod/import_video/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class ExternalRecordingForm(forms.ModelForm):
),
)

def filter_fields_admin(form):
def filter_fields_admin(form) -> None:
"""List fields, depends on user right."""
if not form.is_superuser and not form.is_admin:
form.remove_field("owner")
form.remove_field("site")

def clean(self):
def clean(self) -> None:
"""Clean method."""
cleaned_data = super(ExternalRecordingForm, self).clean()
try:
Expand Down
2 changes: 1 addition & 1 deletion pod/import_video/templates/import_video/add_or_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{% if form.errors %}
<p class="text-danger">{% trans "One or more errors have been found in the form." %}<br>
{% for error in form.non_field_errors %}
<span> - {{ error }}</span> <br>
<span> - {{ error }}</span><br>
{% endfor %}
</p>
{% endif %}
Expand Down
8 changes: 5 additions & 3 deletions pod/live/templates/live/event-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ <h2 class="modal-title h5" id="shareLabel">
<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>
{% get_event_qrcode event.id as qrcode %}
<label>{% trans 'QR code for this link:' %}</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>
<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-->
Expand Down
2 changes: 1 addition & 1 deletion pod/live/templates/live/event_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<p class="small video-title">
<a href="{{event.get_absolute_url}}
{% if playlist %}?playlist={{playlist.slug}}{% endif %}"
title="{{event.title}}">
title="{% blocktrans with title=event.title %}See the event “{{ title }}”.{% endblocktrans %}">
{{event.title|capfirst|truncatechars:43}}
</a>
</br>
Expand Down
2 changes: 1 addition & 1 deletion pod/live/templates/live/my_events.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
{% if display_creation_button %}
<div class="d-flex infinite-container mb-2" id="event_add">
<a class="btn btn-primary" href="{% url 'live:event_edit' %}" title="{% trans 'Plan an event' %}">
<a class="btn btn-primary" href="{% url 'live:event_edit' %}">
<i class="bi bi-plus pod-add" aria-hidden="true"></i>
<span>{% trans "Plan an event" %}</span>
</a>
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading
Loading