Commit 34bf50e7 authored by Fernet Laouen's avatar Fernet Laouen

Translation of machines/ (front)

parent af40e3ea
......@@ -25,6 +25,7 @@
Here are defined some functions to check acl on the application.
"""
from django.utils.translation import ugettext as _
def can_view(user):
......@@ -38,4 +39,6 @@ def can_view(user):
viewing is granted and msg is a message (can be None).
"""
can = user.has_module_perms('machines')
return can, None if can else "Vous ne pouvez pas voir cette application."
return can, None if can else _("You don't have the right to view this"
" application.")
......@@ -37,7 +37,7 @@ from __future__ import unicode_literals
from django.forms import ModelForm, Form
from django import forms
from django.utils.translation import ugettext_lazy as _l
from django.utils.translation import ugettext_lazy as _
from re2o.field_permissions import FieldPermissionFormMixin
from re2o.mixins import FormRevMixin
......@@ -75,7 +75,7 @@ class EditMachineForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(EditMachineForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].label = 'Nom de la machine'
self.fields['name'].label = _("Machine name")
class NewMachineForm(EditMachineForm):
......@@ -94,12 +94,11 @@ class EditInterfaceForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
user = kwargs.get('user')
super(EditInterfaceForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['mac_address'].label = 'Adresse mac'
self.fields['type'].label = 'Type de machine'
self.fields['type'].empty_label = "Séléctionner un type de machine"
self.fields['mac_address'].label = _("MAC address")
self.fields['type'].label = _("Machine type")
self.fields['type'].empty_label = _("Select a machine type")
if "ipv4" in self.fields:
self.fields['ipv4'].empty_label = ("Assignation automatique de "
"l'ipv4")
self.fields['ipv4'].empty_label = _("Automatic IPv4 assignment")
self.fields['ipv4'].queryset = IpList.objects.filter(
interface__isnull=True
)
......@@ -170,7 +169,7 @@ class DelAliasForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs objets alias"""
alias = forms.ModelMultipleChoiceField(
queryset=Domain.objects.all(),
label="Alias actuels",
label=_("Current aliases"),
widget=forms.CheckboxSelectMultiple
)
......@@ -191,15 +190,15 @@ class MachineTypeForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(MachineTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['type'].label = 'Type de machine à ajouter'
self.fields['ip_type'].label = "Type d'ip relié"
self.fields['type'].label = _("Machine type to add")
self.fields['ip_type'].label = _("Related IP type")
class DelMachineTypeForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs machinetype"""
machinetypes = forms.ModelMultipleChoiceField(
queryset=MachineType.objects.none(),
label="Types de machines actuelles",
label=_("Current machine types"),
widget=forms.CheckboxSelectMultiple
)
......@@ -222,7 +221,7 @@ class IpTypeForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(IpTypeForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['type'].label = 'Type ip à ajouter'
self.fields['type'].label = _("IP type to add")
class EditIpTypeForm(IpTypeForm):
......@@ -239,7 +238,7 @@ class DelIpTypeForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs iptype"""
iptypes = forms.ModelMultipleChoiceField(
queryset=IpType.objects.none(),
label="Types d'ip actuelles",
label=_("Current IP types"),
widget=forms.CheckboxSelectMultiple
)
......@@ -261,17 +260,17 @@ class ExtensionForm(FormRevMixin, ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(ExtensionForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].label = 'Extension à ajouter'
self.fields['origin'].label = 'Enregistrement A origin'
self.fields['origin_v6'].label = 'Enregistrement AAAA origin'
self.fields['soa'].label = 'En-tête SOA à utiliser'
self.fields['name'].label = _("Extension to add")
self.fields['origin'].label = _("A record origin")
self.fields['origin_v6'].label = _("AAAA record origin")
self.fields['soa'].label = _("SOA record to use")
class DelExtensionForm(FormRevMixin, Form):
"""Suppression d'une ou plusieurs extensions"""
extensions = forms.ModelMultipleChoiceField(
queryset=Extension.objects.none(),
label="Extensions actuelles",
label=_("Current extensions"),
widget=forms.CheckboxSelectMultiple
)
......@@ -310,7 +309,7 @@ class DelSOAForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs SOA"""
soa = forms.ModelMultipleChoiceField(
queryset=SOA.objects.none(),
label="SOA actuels",
label=_("Current SOA records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -341,7 +340,7 @@ class DelMxForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs MX"""
mx = forms.ModelMultipleChoiceField(
queryset=Mx.objects.none(),
label="MX actuels",
label=_("Current MX records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -374,7 +373,7 @@ class DelNsForm(FormRevMixin, Form):
"""Suppresion d'un ou plusieurs NS"""
ns = forms.ModelMultipleChoiceField(
queryset=Ns.objects.none(),
label="Enregistrements NS actuels",
label=_("Current NS records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -402,7 +401,7 @@ class DelTxtForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs TXT"""
txt = forms.ModelMultipleChoiceField(
queryset=Txt.objects.none(),
label="Enregistrements Txt actuels",
label=_("Current TXT records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -430,7 +429,7 @@ class DelDNameForm(FormRevMixin, Form):
"""Delete a set of DNAME entries"""
dnames = forms.ModelMultipleChoiceField(
queryset=Txt.objects.none(),
label="Existing DNAME entries",
label=_("Current DNAME records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -458,7 +457,7 @@ class DelSrvForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs Srv"""
srv = forms.ModelMultipleChoiceField(
queryset=Srv.objects.none(),
label="Enregistrements Srv actuels",
label=_("Current SRV records"),
widget=forms.CheckboxSelectMultiple
)
......@@ -487,7 +486,7 @@ class DelNasForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs nas"""
nas = forms.ModelMultipleChoiceField(
queryset=Nas.objects.none(),
label="Enregistrements Nas actuels",
label=_("Current NAS devices"),
widget=forms.CheckboxSelectMultiple
)
......@@ -519,7 +518,7 @@ class DelRoleForm(FormRevMixin, Form):
"""Deletion of one or several roles."""
role = forms.ModelMultipleChoiceField(
queryset=Role.objects.none(),
label=_l("Current roles"),
label=_("Current roles"),
widget=forms.CheckboxSelectMultiple
)
......@@ -560,7 +559,7 @@ class DelServiceForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs service"""
service = forms.ModelMultipleChoiceField(
queryset=Service.objects.none(),
label="Services actuels",
label=_("Current services"),
widget=forms.CheckboxSelectMultiple
)
......@@ -588,7 +587,7 @@ class DelVlanForm(FormRevMixin, Form):
"""Suppression d'un ou plusieurs vlans"""
vlan = forms.ModelMultipleChoiceField(
queryset=Vlan.objects.none(),
label="Vlan actuels",
label=_("Current VLANs"),
widget=forms.CheckboxSelectMultiple
)
......@@ -646,3 +645,4 @@ class SshFpForm(FormRevMixin, ModelForm):
prefix=prefix,
**kwargs
)
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
# se veut agnostique au réseau considéré, de manière à être installable en
# quelques clics.
#
# Copyright © 2018 Maël Kervella
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
msgid ""
msgstr ""
"Project-Id-Version: 2.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-15 18:10+0200\n"
"PO-Revision-Date: 2018-06-23 16:35+0200\n"
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: acl.py:42
msgid "You don't have the right to view this application."
msgstr "Vous n'avez pas le droit de voir cette application."
#: forms.py:78
msgid "Machine name"
msgstr "Nom de la machine"
#: forms.py:97 templates/machines/aff_machines.html:46
msgid "MAC address"
msgstr "Adresse MAC"
#: forms.py:98 templates/machines/aff_machinetype.html:32
#: templates/machines/machine.html:112
msgid "Machine type"
msgstr "Type de machine"
#: forms.py:99
msgid "Select a machine type"
msgstr "Sélectionnez un type de machine"
#: forms.py:101
msgid "Automatic IPv4 assignment"
msgstr "Assignation automatique IPv4"
#: forms.py:172
msgid "Current aliases"
msgstr "Alias actuels"
#: forms.py:193
msgid "Machine type to add"
msgstr "Type de machine à ajouter"
#: forms.py:194
msgid "Related IP type"
msgstr "Type d'IP relié"
#: forms.py:201
msgid "Current machine types"
msgstr "Types de machines actuels"
#: forms.py:224
msgid "IP type to add"
msgstr "Type d'IP à ajouter"
#: forms.py:241
msgid "Current IP types"
msgstr "Types d'IP actuels"
#: forms.py:263
msgid "Extension to add"
msgstr "Extension à ajouter"
#: forms.py:264 templates/machines/aff_extension.html:37
msgid "A record origin"
msgstr "Enregistrement A origin"
#: forms.py:265 templates/machines/aff_extension.html:39
msgid "AAAA record origin"
msgstr "Enregistrement AAAA origin"
#: forms.py:266
msgid "SOA record to use"
msgstr "Enregistrement SOA à utiliser"
#: forms.py:273
msgid "Current extensions"
msgstr "Extensions actuelles"
#: forms.py:312
msgid "Current SOA records"
msgstr "Enregistrements SOA actuels"
#: forms.py:343
msgid "Current MX records"
msgstr "Enregistrements MX actuels"
#: forms.py:376
msgid "Current NS records"
msgstr "Enregistrements NS actuels"
#: forms.py:404
msgid "Current TXT records"
msgstr "Enregistrements TXT actuels"
#: forms.py:432
msgid "Current DNAME records"
msgstr "Enregistrements DNAME actuels"
#: forms.py:460
msgid "Current SRV records"
msgstr "Enregistrements SRV actuels"
#: forms.py:489
msgid "Current NAS devices"
msgstr "Dispositifs NAS actuels"
#: forms.py:521
msgid "Current roles"
msgstr "Rôles actuels"
#: forms.py:562
msgid "Current services"
msgstr "Services actuels"
#: forms.py:590
msgid "Current VLANs"
msgstr "VLANs actuels"
#: models.py:63
msgid "Optional"
msgstr "Optionnel"
#: models.py:71
msgid "Can view a machine object"
msgstr "Peut voir un objet machine"
#: models.py:73
msgid "Can change the user of a machine"
msgstr "Peut changer l'utilisateur d'une machine"
#: models.py:75
msgid "machine"
msgstr "machine"
#: models.py:76
msgid "machines"
msgstr "machines"
#: models.py:109
msgid "You don't have the right to change the machine's user."
msgstr "Vous n'avez pas le droit de changer l'utilisateur de la machine."
#: models.py:118
msgid "You don't have the right to view all the machines."
msgstr "Vous n'avez pas le droit de voir toutes les machines."
#: models.py:132
msgid "Nonexistent user."
msgstr "Utilisateur inexistant."
#: models.py:140
msgid "You don't have the right to add a machine."
msgstr "Vous n'avez pas le droit d'ajouter une machine."
#: models.py:142
msgid "You don't have the right to add a machine to another user."
msgstr "Vous n'avez pas le droit d'ajouter une machine à un autre utilisateur."
#: models.py:145 models.py:1152
#, python-format
msgid ""
"You reached the maximum number of interfaces that you are allowed to create "
"yourself (%s)."
msgstr ""
"Vous avez atteint le nombre maximal d'interfaces que vous pouvez créer vous-"
"mêmes (%s)."
#: models.py:164 models.py:1177 models.py:1194 models.py:1296 models.py:1313
msgid "You don't have the right to edit a machine of another user."
msgstr ""
"Vous n'avez pas le droit de modifier une machine d'un autre utilisateur."
#: models.py:182
msgid "You don't have the right to delete a machine of another user."
msgstr ""
"Vous n'avez pas le droit de supprimer une machine d'une autre utilisateur."
#: models.py:194
msgid "You don't have the right to view other machines than yours."
msgstr "Vous n'avez pas le droit de voir d'autres machines que les vôtres."
#: models.py:241
msgid "Can view a machine type object"
msgstr "Peut voir un objet type de machine"
#: models.py:242
msgid "Can use all machine types"
msgstr "Peut utiliser tous les types de machine"
#: models.py:244
msgid "machine type"
msgstr "type de machine"
#: models.py:245
msgid "machine types"
msgstr "types de machine"
#: models.py:263
msgid "You don't have the right to use all machine types."
msgstr "Vous n'avez pas le droit d'utiliser tous les types de machine."
#: models.py:282
msgid "Network containing the domain's IPv4 range (optional)"
msgstr "Réseau contenant la plage IPv4 du domaine (optionnel)"
#: models.py:290
msgid "Netmask for the domain's IPv4 range"
msgstr "Masque de sous-réseau pour la plage IPv4 du domaine"
#: models.py:294
msgid "Enable reverse DNS for IPv4"
msgstr "Activer DNS inverse pour IPv4"
#: models.py:310
msgid "Enable reverse DNS for IPv6"
msgstr "Activer DNS inverser pour IPv6"
#: models.py:326
msgid "Can view an IP type object"
msgstr "Peut voir un objet type d'IP"
#: models.py:327
msgid "Can use all IP types"
msgstr "Peut utiliser tous les types d'IP"
#: models.py:329 templates/machines/aff_iptype.html:35
#: templates/machines/machine.html:108
msgid "IP type"
msgstr "type d'IP"
#: models.py:433
msgid ""
"One or several IP addresses from the range are affected, impossible to "
"delete the range."
msgstr ""
"Une ou plusieurs adresses IP de la plage sont affectées, impossible de "
"supprimer la plage."
#: models.py:475
msgid "Range end must be after range start..."
msgstr "La fin de la plage doit être après le début..."
#: models.py:478
msgid "The range is too large, you can't create a larger one than a /16."
msgstr ""
"La plage est trop grande, vous ne pouvez pas en créer une plus grande "
"qu'un /16."
#: models.py:483
msgid "The specified range is not disjoint from existing ranges."
msgstr "La plage renseignée n'est pas disjointe des plages existantes."
#: models.py:491
msgid ""
"If you specify a domain network or netmask, it must contain the domain's IP "
"range."
msgstr ""
"Si vous renseignez un réseau ou masque de sous-réseau, il doit contenir"
" la plage IP du domaine."
#: models.py:521
msgid "Can view a VLAN object"
msgstr "Peut voir un objet VLAN"
#: models.py:523 templates/machines/machine.html:160
msgid "VLAN"
msgstr "VLAN"
#: models.py:524 templates/machines/sidebar.html:57
msgid "VLANs"
msgstr "VLANs"
#: models.py:560
msgid "Can view a NAS device object"
msgstr "Peut voir un objet dispositif NAS"
#: models.py:562 templates/machines/machine.html:164
msgid "NAS device"
msgstr "dispositif NAS"
#: models.py:563 templates/machines/sidebar.html:63
msgid "NAS devices"
msgstr "dispositifs NAS"
#: models.py:577
msgid "Contact email address for the zone"
msgstr "Adresse mail de contact pour la zone"
#: models.py:581
msgid ""
"Seconds before the secondary DNS have to ask the primary DNS serial to "
"detect a modification"
msgstr ""
"Secondes avant que le DNS secondaire demande au DNS primaire le serial pour "
"détecter une modification"
#: models.py:586
msgid ""
"Seconds before the secondary DNS ask the serial again in case of a primary "
"DNS timeout"
msgstr ""
"Secondes avant que le DNS secondaire demande le serial de nouveau dans le "
"cas d'un délai d'attente du DNS primaire"
#: models.py:591
msgid ""
"Seconds before the secondary DNS stop answering requests in case of primary "
"DNS timeout"
msgstr ""
"Secondes avant que le DNS secondaire arrête de répondre aux requêtes dans le "
"cas d'un délai d'attente du DNS primaire"
#: models.py:596 models.py:846
msgid "Time to Live"
msgstr "Temps de vie"
#: models.py:601
msgid "Can view an SOA record object"
msgstr "Peut voir un objet enregistrement SOA"
#: models.py:603 templates/machines/aff_extension.html:36
#: templates/machines/machine.html:120
msgid "SOA record"
msgstr "enregistrement SOA"
#: models.py:604
msgid "SOA records"
msgstr "enregistrements SOA"
#: models.py:643
msgid "SOA to edit"
msgstr "SOA à modifier"
#: models.py:654
msgid "Zone name, must begin with a dot (.example.org)"
msgstr "Nom de zone, doit commencer par un point (.example.org)"
#: models.py:662
msgid "A record associated with the zone"
msgstr "Enregistrement A associé à la zone"
#: models.py:668
msgid "AAAA record associated with the zone"
msgstr "Enregristrement AAAA associé avec la zone"
#: models.py:677
msgid "Can view an extension object"
msgstr "Peut voir un objet extension"
#: models.py:678
msgid "Can use all extensions"
msgstr "Peut utiliser toutes les extensions"
#: models.py:680
msgid "DNS extension"
msgstr "extension DNS"
#: models.py:681
msgid "DNS extensions"
msgstr "extensions DNS"
#: models.py:732
msgid "An extension must begin with a dot."
msgstr "Une extension doit commencer par un point."
#: models.py:746
msgid "Can view an MX record object"
msgstr "Peut voir un objet enregistrement MX"
#: models.py:748 templates/machines/machine.html:124
msgid "MX record"
msgstr "enregistrement MX"
#: models.py:749
msgid "MX records"
msgstr "enregistrements MX"
#: models.py:771
msgid "Can view an NS record object"
msgstr "Peut voir un objet enregistrement NS"
#: models.py:773 templates/machines/machine.html:128
msgid "NS record"
msgstr "enregistrement NS"
#: models.py:774
msgid "NS records"
msgstr "enregistrements NS"
#: models.py:793
msgid "Can view a TXT record object"
msgstr "Peut voir un objet enregistrement TXT"
#: models.py:795 templates/machines/machine.html:132
msgid "TXT record"
msgstr "enregistrement TXT"
#: models.py:796
msgid "TXT records"
msgstr "enregistrements TXT"
#: models.py:815
msgid "Can view a DNAME record object"
msgstr "Peut voir un objet enregistrement DNAME"
#: models.py:817 templates/machines/machine.html:136
msgid "DNAME record"
msgstr "enregistrement DNAME"
#: models.py:818
msgid "DNAME records"
msgstr "enregistrements DNAME"
#: models.py:851
msgid ""
"Priority of the target server (positive integer value, the lower it is, the "
"more the server will be used if available)"
msgstr ""
"Priorité du serveur cible (entier positif, plus il est bas, plus le serveur "
"sera utilisé si disponible)"
#: models.py:858
msgid ""
"Relative weight for records with the same priority (integer value between 0 "
"and 65535)"
msgstr ""
"Poids relatif des enregistrements avec la même priorité (entier entre 0 et "
"65535)"
#: models.py:863
msgid "TCP/UDP port"
msgstr "Port TCP/UDP"
#: models.py:868
msgid "Target server"
msgstr "Serveur cible"
#: models.py:873
msgid "Can view an SRV record object"
msgstr "Peut voir un objet enregistrement SRV"
#: models.py:875 templates/machines/machine.html:140
msgid "SRV record"
msgstr "enregistrement SRV"
#: models.py:876
msgid "SRV records"
msgstr "enregistrements SRV"
#: models.py:940
msgid "Can view an SSHFP record object"
msgstr "Peut voir un objet enregistrement SSHFP"
#: models.py:942 templates/machines/machine.html:144
msgid "SSHFP record"
msgstr "enregistrement SSHFP"
#: models.py:943
msgid "SSHFP records"
msgstr "enregistrements SSHFP"
#: models.py:981
msgid "Can view an interface object"
msgstr "Peut voir un objet interface"
#: models.py:983
msgid "Can change the owner of an interface"
msgstr "Peut changer l'utilisateur d'une interface"
#: models.py:985
msgid "interface"
msgstr "interface"
#: models.py:986
msgid "interfaces"
msgstr "interfaces"
#: models.py:1080
msgid "The given MAC address is invalid."
msgstr "L'adresse MAC indiquée est invalide."
#: models.py:1093
msgid "The selected IP type is invalid."
msgstr "Le type d'IP sélectionné est invalide."
#: models.py:1106
msgid "There is no IP address available in the slash."
msgstr "Il n'y a pas d'adresse IP disponible dans le slash."
#: models.py:1124
msgid "The IPv4 address and the machine type don't match."
msgstr "L'adresse IPv4 et le type de machine ne correspondent pas."
#: models.py:1138
msgid "Nonexistent machine."
msgstr "Machine inexistante."
#: models.py:1142
msgid "You can't add a machine."
msgstr "Vous ne pouvez pas ajouter une machine."
#: models.py:1148
msgid ""
"You don't have the right to add an interface to a machine of another user."
msgstr ""
"Vous n'avez pas le droit d'ajouter une interface à une machine d'un autre "
"utilisateur."
#: models.py:1162
msgid "Permission required to edit the machine."
msgstr "Permission requise pour modifier la machine."