Commit 62d09760 authored by Laouen Fernet's avatar Laouen Fernet
Browse files

add translations for machines/

parent 9683e0d6
This diff is collapsed.
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-01-08 22:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('machines', '0100_auto_20190102_1753'),
]
operations = [
migrations.AlterModelOptions(
name='ouvertureport',
options={'verbose_name': 'ports opening', 'verbose_name_plural': 'ports openings'},
),
migrations.AlterField(
model_name='nas',
name='port_access_mode',
field=models.CharField(choices=[('802.1X', '802.1X'), ('Mac-address', 'MAC-address')], default='802.1X', max_length=32),
),
migrations.AlterField(
model_name='vlan',
name='igmp',
field=models.BooleanField(default=False, help_text='v4 multicast management'),
),
migrations.AlterField(
model_name='vlan',
name='mld',
field=models.BooleanField(default=False, help_text='v6 multicast management'),
),
]
......@@ -201,7 +201,7 @@ class Machine(RevMixin, FieldPermissionModelMixin, models.Model):
if interfaces_set:
return str(interfaces_set.domain.name)
else:
return "None"
return _("No name")
@cached_property
def complete_name(self):
......@@ -340,7 +340,7 @@ class IpType(RevMixin, AclMixin, models.Model):
("use_all_iptype", _("Can use all IP types")),
)
verbose_name = _("IP type")
verbose_name_plural = "IP types"
verbose_name_plural = _("IP types")
@cached_property
def ip_range(self):
......@@ -534,11 +534,11 @@ class Vlan(RevMixin, AclMixin, models.Model):
dhcpv6_snooping = models.BooleanField(default=False)
igmp = models.BooleanField(
default=False,
help_text="Gestion multicast v4"
help_text=_("v4 multicast management")
)
mld = models.BooleanField(
default=False,
help_text="Gestion multicast v6"
help_text=_("v6 multicast management")
)
class Meta:
......@@ -559,7 +559,7 @@ class Nas(RevMixin, AclMixin, models.Model):
default_mode = '802.1X'
AUTH = (
('802.1X', '802.1X'),
('Mac-address', 'Mac-address'),
('Mac-address', _("MAC-address")),
)
name = models.CharField(max_length=255, unique=True)
......@@ -666,7 +666,7 @@ class SOA(RevMixin, AclMixin, models.Model):
utilisée dans les migrations de la BDD. """
return cls.objects.get_or_create(
name=_("SOA to edit"),
mail="postmaser@example.com"
mail="postmaster@example.com"
)[0].pk
......@@ -934,7 +934,7 @@ class SshFp(RevMixin, AclMixin, models.Model):
machine = models.ForeignKey('Machine', on_delete=models.CASCADE)
pub_key_entry = models.TextField(
help_text="SSH public key",
help_text=_("SSH public key"),
max_length=2048
)
algo = models.CharField(
......@@ -942,7 +942,7 @@ class SshFp(RevMixin, AclMixin, models.Model):
max_length=32
)
comment = models.CharField(
help_text="Comment",
help_text=_("Comment"),
max_length=255,
null=True,
blank=True
......@@ -1872,7 +1872,8 @@ class OuverturePort(RevMixin, AclMixin, models.Model):
)
class Meta:
verbose_name = _("ports openings")
verbose_name = _("ports opening")
verbose_name_plural = _("ports openings")
def __str__(self):
if self.begin == self.end:
......
......@@ -38,7 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ alias }}</td>
<td class="text-right">
{% can_edit alias %}
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
{% include 'buttons/edit.html' with href='machines:edit-alias' id=alias.id %}
{% acl_end %}
{% history_button alias %}
</td>
......
......@@ -38,7 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ dname.dns_entry }}</td>
<td class="text-right">
{% can_edit dname %}
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
{% include 'buttons/edit.html' with href='machines:edit-dname' id=dname.id %}
{% acl_end %}
{% history_button dname %}
</td>
......
......@@ -54,7 +54,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ extension.dnssec|tick }}</td>
<td class="text-right">
{% can_edit extension %}
{% include 'buttons/edit.html' with href='machines:edit-extension' id=extension.id %}
{% include 'buttons/edit.html' with href='machines:edit-extension' id=extension.id %}
{% acl_end %}
{% history_button extension %}
</td>
......
......@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ type.ouverture_ports }}</td>
<td class="text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
......
......@@ -40,10 +40,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ ipv6.slaac_ip }}</td>
<td class="text-right">
{% can_edit ipv6 %}
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
{% include 'buttons/edit.html' with href='machines:edit-ipv6list' id=ipv6.id %}
{% acl_end %}
{% can_delete ipv6 %}
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
{% include 'buttons/suppr.html' with href='machines:del-ipv6list' id=ipv6.id %}
{% acl_end %}
{% history_button ipv6 %}
</td>
......
......@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="table-responsive">
{% if machines_list.paginator %}
{% include "pagination.html" with list=machines_list go_to_id="machines" %}
{% include 'pagination.html' with list=machines_list go_to_id="machines" %}
{% endif %}
<table class="table" id="machines_table">
......@@ -41,7 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</colgroup>
<thead>
{% trans "DNS name" as tr_dns_name %}
<th>{% include "buttons/sort.html" with prefix='machine' col='name' text=tr_dns_name %}</th>
<th>{% include 'buttons/sort.html' with prefix='machine' col='name' text=tr_dns_name %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "MAC address" %}</th>
<th>{% trans "IP address" %}</th>
......@@ -52,19 +52,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td colspan="4">
{% trans "No name" as tr_no_name %}
{% trans "View the profile" as tr_view_the_profile %}
<b>{{ machine.get_name|default:'<i>tr_no_name</i>' }}</b> <i class="fa fa-angle-right"></i>
<b>{{ machine.get_name|default:tr_no_name }}</b> <i class="fa fa-angle-right"></i>
<a href="{% url 'users:profil' userid=machine.user.id %}" title=tr_view_the_profile>
<i class="fa fa-user"></i> {{ machine.user }}
</a>
</td>
<td class="text-right">
{% can_create Interface machine.id %}
{% trans "Create an interface" as tr_create_an_interface %}
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %}
{% can_create Interface machine.id %}
{% trans "Create an interface" as tr_create_an_interface %}
{% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %}
{% acl_end %}
{% history_button machine %}
{% can_delete machine %}
{% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %}
{% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %}
{% acl_end %}
</td>
</tr>
......@@ -153,7 +153,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
{% history_button interface %}
{% can_delete interface %}
{% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %}
{% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %}
{% acl_end %}
</div>
</td>
......@@ -215,6 +215,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</script>
{% if machines_list.paginator %}
{% include "pagination.html" with list=machines_list go_to_id="machines" %}
{% include 'pagination.html' with list=machines_list go_to_id="machines" %}
{% endif %}
</div>
......@@ -40,7 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ type.ip_type }}</td>
<td class="text-right">
{% can_edit type %}
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
{% include 'buttons/edit.html' with href='machines:edit-machinetype' id=type.id %}
{% acl_end %}
{% history_button type %}
</td>
......
......@@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ mx.name }}</td>
<td class="text-right">
{% can_edit mx %}
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
{% include 'buttons/edit.html' with href='machines:edit-mx' id=mx.id %}
{% acl_end %}
{% history_button mx %}
</td>
......
......@@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ nas.autocapture_mac|tick }}</td>
<td class="text-right">
{% can_edit nas %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
{% include 'buttons/edit.html' with href='machines:edit-nas' id=nas.id %}
{% acl_end %}
{% history_button nas %}
</td>
......
......@@ -40,7 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ ns.ns }}</td>
<td class="text-right">
{% can_edit ns %}
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
{% include 'buttons/edit.html' with href='machines:edit-ns' id=ns.id %}
{% acl_end %}
{% history_button ns %}
</td>
......
......@@ -44,7 +44,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{% for serv in role.servers.all %}{{ serv }}, {% endfor %}</td>
<td class="text-right">
{% can_edit role %}
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
{% include 'buttons/edit.html' with href='machines:edit-role' id=role.id %}
{% acl_end %}
{% history_button role %}
</td>
......
......@@ -47,7 +47,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class="fa fa-sync"></i></a></td>
<td class="text-right">
{% can_edit service %}
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %}
{% acl_end %}
{% history_button service %}
</td>
......
......@@ -48,7 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ soa.ttl }}</td>
<td class="text-right">
{% can_edit soa %}
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
{% include 'buttons/edit.html' with href='machines:edit-soa' id=soa.id %}
{% acl_end %}
{% history_button soa %}
</td>
......
......@@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ srv.target }}</td>
<td class="text-right">
{% can_edit srv %}
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
{% include 'buttons/edit.html' with href='machines:edit-srv' id=srv.id %}
{% acl_end %}
{% history_button srv %}
</td>
......
......@@ -41,11 +41,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ sshfp.comment }}</td>
<td class="text-right">
{% can_edit sshfp %}
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %}
{% acl_end %}
{% history_button sshfp %}
{% can_delete sshfp %}
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %}
{% acl_end %}
</td>
</tr>
......
......@@ -40,7 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ txt.dns_entry }}</td>
<td class="text-right">
{% can_edit txt %}
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
{% include 'buttons/edit.html' with href='machines:edit-txt' id=txt.id %}
{% acl_end %}
{% history_button txt %}
</td>
......
......@@ -45,7 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{% for range in vlan.iptype_set.all %}{{ range }}, {% endfor %}</td>
<td class="text-right">
{% can_edit vlan %}
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
{% include 'buttons/edit.html' with href='machines:edit-vlan' id=vlan.id %}
{% acl_end %}
{% history_button vlan %}
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment