Add translation support

This commit is contained in:
Jeremy Stretch 2024-07-25 16:27:55 -04:00
parent 403c45e4c0
commit 7b8fccb690
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{% load i18n %}
<div style="margin-left: -30px">
<object data="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg{% if extra_params %}&{{ extra_params }}{% endif %}" class="rack_elevation" aria-label="Rack elevation"></object>
<object data="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg{% if extra_params %}&{{ extra_params }}{% endif %}" class="rack_elevation" aria-label="{% trans "Rack elevation" %}"></object>
</div>
<div class="text-center mt-3">
<a class="btn btn-outline-primary" href="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg{% if extra_params %}&{{ extra_params }}{% endif %}" hx-boost="false">

View File

@ -15,7 +15,7 @@
hx-target="#htmx-modal-content"
data-bs-toggle="modal"
data-bs-target="#htmx-modal"
aria-label="{{ widget.title }} widget configuration"
aria-label="{{ widget.title }} {% trans "widget configuration" %}"
>
<i class="mdi mdi-cog {% if widget.color %} text-{{ widget.fg_color }} {% endif %}"></i>
</a>
@ -29,7 +29,7 @@
hx-target="#htmx-modal-content"
data-bs-toggle="modal"
data-bs-target="#htmx-modal"
aria-label="Close {{ widget.title }} widget"
aria-label="{% trans "Close widget" %} {{ widget.title }}"
>
<i class="mdi mdi-close {% if widget.color %} text-{{ widget.fg_color }} {% endif %}"></i>
</a>

View File

@ -145,7 +145,7 @@ Context:
{{ field.label }}
{% endif %}
{% if field.STATIC_CHOICES %}
<a href="#" data-bs-toggle="modal" data-bs-target="#{{ name }}_choices" aria-label="{{ name }} choices"><i class="mdi mdi-help-circle"></i></a>
<a href="#" data-bs-toggle="modal" data-bs-target="#{{ name }}_choices" aria-label="{{ name }} {% trans "choices" %}"><i class="mdi mdi-help-circle"></i></a>
<div class="modal fade" id="{{ name }}_choices" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">