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

@@ -2,6 +2,7 @@
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% block breadcrumbs %}
{{ block.super }}
@@ -15,20 +16,20 @@
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
Interface
{% trans "Interface" %}
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Virtual Machine</th>
<th scope="row">{% trans "Virtual Machine" %}</th>
<td>{{ object.virtual_machine|linkify }}</td>
</tr>
<tr>
<th scope="row">Name</th>
<th scope="row">{% trans "Name" %}</th>
<td>{{ object.name }}</td>
</tr>
<tr>
<th scope="row">Enabled</th>
<th scope="row">{% trans "Enabled" %}</th>
<td>
{% if object.enabled %}
<span class="text-success"><i class="mdi mdi-check-bold"></i></span>
@@ -38,31 +39,31 @@
</td>
</tr>
<tr>
<th scope="row">Parent</th>
<th scope="row">{% trans "Parent" %}</th>
<td>{{ object.parent|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Bridge</th>
<th scope="row">{% trans "Bridge" %}</th>
<td>{{ object.bridge|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">VRF</th>
<th scope="row">{% trans "VRF" %}</th>
<td>{{ object.vrf|linkify|placeholder }}</td>
</tr>
<tr>
<th scope="row">Description</th>
<th scope="row">{% trans "Description" %}</th>
<td>{{ object.description|placeholder }} </td>
</tr>
<tr>
<th scope="row">MTU</th>
<th scope="row">{% trans "MTU" %}</th>
<td>{{ object.mtu|placeholder }}</td>
</tr>
<tr>
<th scope="row">MAC Address</th>
<th scope="row">{% trans "MAC Address" %}</th>
<td><span class="font-monospace">{{ object.mac_address|placeholder }}</span></td>
</tr>
<tr>
<th scope="row">802.1Q Mode</th>
<th scope="row">{% trans "802.1Q Mode" %}</th>
<td>{{ object.get_mode_display|placeholder }}</td>
</tr>
</table>
@@ -80,7 +81,7 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">IP Addresses</h5>
<h5 class="card-header">{% trans "IP Addresses" %}</h5>
<div class="card-body htmx-container table-responsive"
hx-get="{% url 'ipam:ipaddress_list' %}?vminterface_id={{ object.pk }}"
hx-trigger="load"
@@ -88,7 +89,7 @@
{% if perms.ipam.add_ipaddress %}
<div class="card-footer text-end noprint">
<a href="{% url 'ipam:ipaddress_add' %}?virtual_machine={{ object.virtual_machine.pk }}&vminterface={{ 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 IP Address
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add IP Address" %}
</a>
</div>
{% endif %}