1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #13102: Establish initial translation support in templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson
2023-07-29 03:30:25 +07:00
committed by GitHub
parent cf1b1a83eb
commit 7c17d2e932
257 changed files with 2056 additions and 1762 deletions

View File

@@ -1,14 +1,15 @@
{% load helpers %}
{% load i18n %}
<div class="card">
<h5 class="card-header">Inventory Items</h5>
<h5 class="card-header">{% trans "Inventory Items" %}</h5>
<div class="card-body">
<table class="table table-hover table-headings">
<thead>
<tr>
<th>Name</th>
<th>Label</th>
<th>Role</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Role" %}</th>
<th></th>
</tr>
</thead>
@@ -20,12 +21,12 @@
<td>{{ item.role|linkify|placeholder }}</td>
<td class="text-end noprint">
{% if perms.dcim.change_inventoryitem %}
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm lh-1" title="Edit">
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm lh-1" title="{% trans "Edit" %}">
<i class="mdi mdi-pencil" aria-hidden="true"></i>
</a>
{% endif %}
{% if perms.ipam.delete_inventoryitem %}
<a href="{% url 'dcim:inventoryitem_delete' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm lh-1" title="Delete">
<a href="{% url 'dcim:inventoryitem_delete' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm lh-1" title="{% trans "Delete" %}">
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
</a>
{% endif %}
@@ -33,7 +34,7 @@
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-muted">None</td>
<td colspan="5" class="text-muted">{% trans "None" %}</td>
</tr>
{% endfor %}
</tbody>
@@ -42,7 +43,7 @@
<div class="card-footer text-end noprint">
{% if perms.dcim.add_inventoryitem %}
<a href="{% url 'dcim:inventoryitem_add' %}?device={{ object.device.pk }}&component_type={{ object|content_type_id }}&component_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Inventory Item
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Inventory Item" %}
</a>
{% endif %}
</div>