Commit cde0f7fa authored by jocelyn's avatar jocelyn

Supprime les bouts d'internationalisation

Déjà on va essayer de s'organiser entre francophones pour commencer, avant de
conquérir le monde :o).

D'ailleurs, on avait pas dans le repo de fichier .po avec les
traductions. Concrètement, l'impact était qu'une partie de l'interface était en
anglais.

Fix #209
parent 71189130
......@@ -2,7 +2,6 @@
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from netfields import InetAddressField, NetManager
......@@ -31,22 +30,22 @@ class RadiusGroup(models.Model):
infrastracture) to different L2TP servers by placing them in different
Radius groups.
"""
name = models.CharField(max_length=256, verbose_name=_("group name"))
name = models.CharField(max_length=256, verbose_name="nom du groupe")
realm = models.CharField(max_length=50,
verbose_name=_("radius realm"),
help_text=_('Example: "fdn.nerim"'))
verbose_name="realm radius",
help_text='Exemple : « fdn.nerim »')
suffix = models.CharField(max_length=50, blank=True,
verbose_name=_("suffix"),
help_text=_('Optional suffix added to the login, as a kind of "sub-realm". Example: "%gnd"'))
verbose_name="suffixe",
help_text='Suffixe optionnel, ajouté après le login, comme un « sous-realm ». Exemple : "%gnd"')
comment = models.CharField(max_length=256, blank=True,
verbose_name=_("comment"))
verbose_name="commentaire")
def __unicode__(self):
return "{} ({}@{})".format(self.name, self.suffix, self.realm)
class Meta:
verbose_name = _("radius group")
verbose_name_plural = _("radius groups")
verbose_name = "groupe radius"
verbose_name_plural = "groupes radius"
class DSLConfiguration(CoinLdapSyncMixin, Configuration):
......@@ -56,18 +55,18 @@ class DSLConfiguration(CoinLdapSyncMixin, Configuration):
"""
url_namespace = "dsl_ldap"
phone_number = models.CharField(max_length=20,
verbose_name=_('phone number'),
help_text=_("Phone number associated to the DSL line"))
activated = models.BooleanField(default=False, verbose_name=_('activated'))
radius_group = models.ForeignKey(RadiusGroup, verbose_name=_("radius group"),
help_text=_("Group (i.e. backhaul) to use"))
verbose_name="numéro de téléphone",
help_text="numéro de téléphone associé à la ligne xDSL")
activated = models.BooleanField(default=False, verbose_name='actif')
radius_group = models.ForeignKey(RadiusGroup, verbose_name="groupe radius",
help_text="Groupe (ex : backhaul) à utiliser")
# TODO: introduce forbidden characters (and read RFC2865)
login = models.CharField(max_length=50, unique=True, blank=True,
verbose_name=_("login"),
help_text=_("Leave empty for automatic generation"))
verbose_name="login",
help_text="Laisser vide pour auto-générer.")
password = models.CharField(max_length=256, blank=True,
verbose_name=_("password"),
help_text=_("Will be stored in cleartext! Automatically generated if empty"))
verbose_name="mot de passe",
help_text="Est stocké en clair ! Auto-généré si laissé vide.")
objects = NetManager()
......@@ -140,9 +139,8 @@ class DSLConfiguration(CoinLdapSyncMixin, Configuration):
return self.full_login()
class Meta:
verbose_name = _("DSL line")
verbose_name_plural = _("DSL lines")
# db_table = "dsl_ldap_dslconfiguration"
verbose_name = "Ligne xDSL"
verbose_name_plural = "Lignes xDSL"
class LdapDSLConfig(ldapdb.models.Model):
......
......@@ -3,7 +3,6 @@
from __future__ import unicode_literals
import re
from django.utils.translation import ugettext_lazy as _
from django.forms import fields
from django.db import models
......@@ -13,7 +12,7 @@ mac_re = re.compile(MAC_RE)
class MACAddressFormField(fields.RegexField):
default_error_messages = {
'invalid': _(u'Enter a valid MAC address.'),
'invalid': 'Saisir une adresse MAC valide',
}
def __init__(self, *args, **kwargs):
......
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