Commit c3b3146f authored by Laouen Fernet's avatar Laouen Fernet

Translation of preferences/ (front)

parent 34bf50e7
......@@ -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('preferences')
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.")
......@@ -27,7 +27,7 @@ from __future__ import unicode_literals
from django.forms import ModelForm, Form
from django import forms
from django.utils.translation import ugettext_lazy as _
from re2o.mixins import FormRevMixin
from .models import (
OptionalUser,
......@@ -56,9 +56,13 @@ class EditOptionalUserForm(ModelForm):
**kwargs
)
self.fields['is_tel_mandatory'].label = (
'Exiger un numéro de téléphone'
_("Telephone number required")
)
self.fields['self_adhesion'].label = 'Auto inscription'
self.fields['gpg_fingerprint'].label = _("GPG fingerprint")
self.fields['all_can_create_club'].label = _("All can create a club")
self.fields['all_can_create_adherent'].label = _("All can create a member")
self.fields['self_adhesion'].label = _("Self registration")
self.fields['shell_default'].label = _("Default shell")
class EditOptionalMachineForm(ModelForm):
......@@ -74,12 +78,17 @@ class EditOptionalMachineForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['password_machine'].label = "Possibilité d'attribuer\
un mot de passe par interface"
self.fields['max_lambdauser_interfaces'].label = "Maximum\
d'interfaces autorisées pour un user normal"
self.fields['max_lambdauser_aliases'].label = "Maximum d'alias\
dns autorisés pour un user normal"
self.fields['password_machine'].label = _("Possibility to set a"
" password per machine")
self.fields['max_lambdauser_interfaces'].label = _("Maximum number of"
" interfaces"
" allowed for a"
" standard user")
self.fields['max_lambdauser_aliases'].label = _("Maximum number of DNS"
" aliases allowed for"
" a standard user")
self.fields['ipv6_mode'].label = _("IPv6 mode")
self.fields['create_machine'].label = _("Can create a machine")
class EditOptionalTopologieForm(ModelForm):
......@@ -95,10 +104,11 @@ class EditOptionalTopologieForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['vlan_decision_ok'].label = "Vlan où placer les\
machines après acceptation RADIUS"
self.fields['vlan_decision_nok'].label = "Vlan où placer les\
machines après rejet RADIUS"
self.fields['radius_general_policy'].label = _("RADIUS general policy")
self.fields['vlan_decision_ok'].label = _("VLAN for machines accepted"
" by RADIUS")
self.fields['vlan_decision_nok'].label = _("VLAN for machines rejected"
" by RADIUS")
class EditGeneralOptionForm(ModelForm):
......@@ -114,18 +124,25 @@ class EditGeneralOptionForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['search_display_page'].label = 'Resultats\
affichés dans une recherche'
self.fields['pagination_number'].label = 'Items par page,\
taille normale (ex users)'
self.fields['pagination_large_number'].label = 'Items par page,\
taille élevée (machines)'
self.fields['req_expire_hrs'].label = 'Temps avant expiration du lien\
de reinitialisation de mot de passe (en heures)'
self.fields['site_name'].label = 'Nom du site web'
self.fields['email_from'].label = "Adresse mail d\
'expedition automatique"
self.fields['GTU_sum_up'].label = "Résumé des CGU"
self.fields['general_message'].label = _("General message")
self.fields['search_display_page'].label = _("Number of results"
" displayed when"
" searching")
self.fields['pagination_number'].label = _("Number of items per page,"
" standard size (e.g."
" users)")
self.fields['pagination_large_number'].label = _("Number of items per"
" page, large size"
" (e.g. machines)")
self.fields['req_expire_hrs'].label = _("Time before expiration of the"
" reset password link (in"
" hours)")
self.fields['site_name'].label = _("Website name")
self.fields['email_from'].label = _("Email address for automatic"
" emailing")
self.fields['GTU_sum_up'].label = _("Summary of the General Terms of"
" Use")
self.fields['GTU'].label = _("General Terms of Use")
class EditAssoOptionForm(ModelForm):
......@@ -141,15 +158,19 @@ class EditAssoOptionForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['name'].label = 'Nom de l\'asso'
self.fields['siret'].label = 'SIRET'
self.fields['adresse1'].label = 'Adresse (ligne 1)'
self.fields['adresse2'].label = 'Adresse (ligne 2)'
self.fields['contact'].label = 'Email de contact'
self.fields['telephone'].label = 'Numéro de téléphone'
self.fields['pseudo'].label = 'Pseudo d\'usage'
self.fields['utilisateur_asso'].label = 'Compte utilisé pour\
faire les modifications depuis /admin'
self.fields['name'].label = _("Organisation name")
self.fields['siret'].label = _("SIRET number")
self.fields['adresse1'].label = _("Address (line 1)")
self.fields['adresse2'].label = _("Address (line 2)")
self.fields['contact'].label = _("Contact email address")
self.fields['telephone'].label = _("Telephone number")
self.fields['pseudo'].label = _("Usual name")
self.fields['utilisateur_asso'].label = _("Account used for editing"
" from /admin")
self.fields['payment'].label = _("Payment")
self.fields['payment_id'].label = _("Payment ID")
self.fields['payment_pass'].label = _("Payment password")
self.fields['description'].label = _("Description")
class EditMailMessageOptionForm(ModelForm):
......@@ -165,10 +186,10 @@ class EditMailMessageOptionForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['welcome_mail_fr'].label = 'Message dans le\
mail de bienvenue en français'
self.fields['welcome_mail_en'].label = 'Message dans le\
mail de bienvenue en anglais'
self.fields['welcome_mail_fr'].label = _("Message for the French"
" welcome email")
self.fields['welcome_mail_en'].label = _("Message for the English"
" welcome email")
class EditHomeOptionForm(ModelForm):
......@@ -184,6 +205,9 @@ class EditHomeOptionForm(ModelForm):
prefix=prefix,
**kwargs
)
self.fields['facebook_url'].label = _("Facebook URL")
self.fields['twitter_url'].label = _("Twitter URL")
self.fields['twitter_account_name'].label = _("Twitter account name")
class ServiceForm(ModelForm):
......@@ -195,13 +219,17 @@ class ServiceForm(ModelForm):
def __init__(self, *args, **kwargs):
prefix = kwargs.pop('prefix', self.Meta.model.__name__)
super(ServiceForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].label = _("Name")
self.fields['url'].label = _("URL")
self.fields['description'].label = _("Description")
self.fields['image'].label = _("Image")
class DelServiceForm(Form):
"""Suppression de services sur la page d'accueil"""
services = forms.ModelMultipleChoiceField(
queryset=Service.objects.none(),
label="Enregistrements service actuels",
label=_("Current services"),
widget=forms.CheckboxSelectMultiple
)
......@@ -239,3 +267,4 @@ class DelMailContactForm(Form):
self.fields['mailcontacts'].queryset = instances
else:
self.fields['mailcontacts'].queryset = MailContact.objects.all()
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 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.
#
#, fuzzy
# 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: PACKAGE VERSION\n"
"Project-Id-Version: 2.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-07-26 21:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: \n"
"POT-Creation-Date: 2018-08-18 13:26+0200\n"
"PO-Revision-Date: 2018-06-24 15:54+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"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: models.py:256
msgid "Contact email adress"
msgstr "Adresse email de contact"
#: 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:59 templates/preferences/display_preferences.html:41
msgid "Telephone number required"
msgstr "Numéro de téléphone requis"
#: forms.py:61
msgid "GPG fingerprint"
msgstr "Empreinte GPG"
#: forms.py:62
msgid "All can create a club"
msgstr "Tous peuvent créer un club"
#: forms.py:63
msgid "All can create a member"
msgstr "Tous peuvent créer un adhérent"
#: forms.py:64 templates/preferences/display_preferences.html:43
msgid "Self registration"
msgstr "Autoinscription"
#: forms.py:65
msgid "Default shell"
msgstr "Interface système par défaut"
#: forms.py:81
msgid "Possibility to set a password per machine"
msgstr "Possibilité de mettre un mot de passe par machine"
#: forms.py:83 templates/preferences/display_preferences.html:87
msgid "Maximum number of interfaces allowed for a standard user"
msgstr "Nombre maximum d'interfaces autorisé pour un utilisateur standard"
#: forms.py:87 templates/preferences/display_preferences.html:91
msgid "Maximum number of DNS aliases allowed for a standard user"
msgstr "Nombre maximum d'alias DNS autorisé pour un utilisateur standard"
#: forms.py:90
msgid "IPv6 mode"
msgstr "Mode IPv6"
#: forms.py:91
msgid "Can create a machine"
msgstr "Peut créer une machine"
#: forms.py:107
msgid "RADIUS general policy"
msgstr "Politique générale de RADIUS"
#: forms.py:108 templates/preferences/display_preferences.html:116
msgid "VLAN for machines accepted by RADIUS"
msgstr "VLAN pour les machines acceptées par RADIUS"
#: forms.py:110 templates/preferences/display_preferences.html:118
msgid "VLAN for machines rejected by RADIUS"
msgstr "VLAN pour les machines rejetées par RADIUS"
#: forms.py:127
msgid "General message"
msgstr "Message général"
#: forms.py:128 templates/preferences/display_preferences.html:137
msgid "Number of results displayed when searching"
msgstr "Nombre de résultats affichés lors de la recherche"
#: forms.py:131
msgid "Number of items per page, standard size (e.g. users)"
msgstr "Nombre d'éléments par page, taille standard (ex : utilisateurs)"
#: forms.py:134
msgid "Number of items per page, large size (e.g. machines)"
msgstr "Nombre d'éléments par page, taille importante (ex : machines)"
#: forms.py:137 templates/preferences/display_preferences.html:145
msgid "Time before expiration of the reset password link (in hours)"
msgstr ""
"Temps avant expiration du lien de réinitialisation de mot de passe (en "
"heures)"
#: forms.py:140 templates/preferences/display_preferences.html:131
msgid "Website name"
msgstr "Nom du site"
#: forms.py:141 templates/preferences/display_preferences.html:133
msgid "Email address for automatic emailing"
msgstr "Adresse mail pour les mails automatiques"
#: forms.py:143 templates/preferences/display_preferences.html:151
msgid "Summary of the General Terms of Use"
msgstr "Résumé des Conditions Générales d'Utilisation"
#: forms.py:145 templates/preferences/display_preferences.html:155
msgid "General Terms of Use"
msgstr "Conditions Générales d'Utilisation"
#: forms.py:161
msgid "Organisation name"
msgstr "Nom de l'association"
#: forms.py:162 templates/preferences/display_preferences.html:170
msgid "SIRET number"
msgstr "Numéro SIRET"
#: forms.py:163
msgid "Address (line 1)"
msgstr "Adresse (ligne 1)"
#: forms.py:164
msgid "Address (line 2)"
msgstr "Adresse (ligne 2)"
#: forms.py:165 models.py:288
#: templates/preferences/display_preferences.html:178
msgid "Contact email address"
msgstr "Adresse mail de contact"
#: forms.py:166 templates/preferences/display_preferences.html:182
msgid "Telephone number"
msgstr "Numéro de téléphone"
#: forms.py:167 templates/preferences/display_preferences.html:184
msgid "Usual name"
msgstr "Nom d'usage"
#: forms.py:168
msgid "Account used for editing from /admin"
msgstr "Compte utilisé pour les modifications depuis /admin"
#: forms.py:170
msgid "Payment"
msgstr "Paiement"
#: forms.py:171
msgid "Payment ID"
msgstr "ID de paiement"
#: forms.py:172
msgid "Payment password"
msgstr "Mot de passe de paiement"
#: forms.py:173 forms.py:224 templates/preferences/aff_service.html:33
msgid "Description"
msgstr "Description"
#: forms.py:189
msgid "Message for the French welcome email"
msgstr "Message pour le mail de bienvenue en français"
#: forms.py:191
msgid "Message for the English welcome email"
msgstr "Message pour le mail de bienvenue en anglais"
#: forms.py:208
msgid "Facebook URL"
msgstr "URL du compte Facebook"
#: forms.py:209
msgid "Twitter URL"
msgstr "URL du compte Twitter"
#: forms.py:210 templates/preferences/display_preferences.html:233
msgid "Twitter account name"
msgstr "Nom du compte Twitter"
#: forms.py:222 templates/preferences/aff_service.html:31
#: templates/preferences/display_preferences.html:168
msgid "Name"
msgstr "Nom"
#: forms.py:223 templates/preferences/aff_service.html:32
msgid "URL"
msgstr "URL"
#: forms.py:225 templates/preferences/aff_service.html:34
msgid "Image"
msgstr "Image"
#: forms.py:232
msgid "Current services"
msgstr "Services actuels"
#: models.py:71
msgid "Users can create a club"
msgstr "Les utilisateurs peuvent créer un club"
#: models.py:75
msgid "Users can create a member"
msgstr "Les utilisateurs peuvent créer un adhérent"
#: models.py:79
msgid "A new user can create their account on Re2o"
msgstr "Un nouvel utilisateur peut créer son compte sur Re2o"
#: models.py:89 templates/preferences/display_preferences.html:49
msgid "Users can edit their shell"
msgstr "Les utilisateurs peuvent modifier leur interface système"
#: models.py:93
msgid "Enable local email accounts for users"
msgstr "Active les comptes mail locaux pour les utilisateurs"
#: models.py:98
msgid "Domain to use for local email accounts"
msgstr "Domaine à utiliser pour les comptes mail locaux"
#: models.py:102
msgid "Maximum number of local email addresses for a standard user"
msgstr ""
"Nombre maximum d'adresses mail locales autorisé pour un utilisateur standard"
#: models.py:108
msgid "Can view the user options"
msgstr "Peut voir les options d'utilisateur"
#: models.py:110
msgid "user options"
msgstr "options d'utilisateur"
#: models.py:117
msgid "Email domain must begin with @"
msgstr "Un domaine mail doit commencer par @"
#: models.py:135
msgid "Autoconfiguration by RA"
msgstr "Configuration automatique par RA"
#: models.py:136
msgid "IP addresses assigning by DHCPv6"
msgstr "Attribution d'adresses IP par DHCPv6"
#: models.py:137
msgid "Disabled"
msgstr "Désactivé"
#: models.py:159
msgid "Can view the machine options"
msgstr "Peut voir les options de machine"
#: models.py:161
msgid "machine options"
msgstr "options de machine"
#: models.py:180
msgid "On the IP range's VLAN of the machine"
msgstr "Sur le VLAN de la plage d'IP de la machine"
#: models.py:181
msgid "Preset in 'VLAN for machines accepted by RADIUS'"
msgstr "Prédéfinie dans 'VLAN pour les machines acceptées par RADIUS'"
#: models.py:206
msgid "Can view the topology options"
msgstr "Peut voir les options de topologie"
#: models.py:208
msgid "topology options"
msgstr "options de topologie"
#: models.py:225
msgid ""
"General message displayed on the French version of the website (e.g. in case "
"of maintenance)"
msgstr ""
"Message général affiché sur la version française du site (ex : en cas de "
"maintenance)"
#: models.py:263
msgid "Description of the associated email adress."
#: models.py:231
msgid ""
"General message displayed on the English version of the website (e.g. in "
"case of maintenance)"
msgstr ""
"Message général affiché sur la version anglaise du site (ex : en cas de "
"maintenance)"
#: models.py:253
msgid "Can view the general options"
msgstr "Peut voir les options générales"
#: models.py:255
msgid "general options"
msgstr "options générales"
#: models.py:275
msgid "Can view the service options"
msgstr "Peut voir les options de service"
#: models.py:277
msgid "service"
msgstr "service"
#: models.py:278
msgid "services"
msgstr "services"
#: models.py:295
msgid "Description of the associated email address."
msgstr "Description de l'adresse mail associée."
#: models.py:273
msgid "Can see contact email"
msgstr "Peut voir un mail de contact"
#: models.py:305
msgid "Can view a contact email address object"
msgstr "Peut voir un objet adresse mail de contact"
#: templates/preferences/aff_mailcontact.html:30
msgid "Adress"
msgstr "Adresse"
#: models.py:307
msgid "contact email address"
msgstr "adresse mail de contact"
#: models.py:308
msgid "contact email addresses"
msgstr "adresses mail de contact"
#: models.py:318
msgid "Networking organisation school Something"
msgstr "Association de réseau de l'école Machin"
#: models.py:322
msgid "Threadneedle Street"
msgstr "1 rue de la Vrillière"
#: models.py:323
msgid "London EC2R 8AH"
msgstr "75001 Paris"
#: models.py:326
msgid "Organisation"
msgstr "Association"
#: models.py:340
msgid "Can view the organisation options"
msgstr "Peut voir les options d'association"
#: models.py:342
msgid "organisation options"
msgstr "options d'association"
#: models.py:371
msgid "Can view the homepage options"
msgstr "Peut voir les options de page d'accueil"
#: models.py:373
msgid "homepage options"
msgstr "options de page d'accueil"
#: models.py:391
msgid "Can view the email message options"
msgstr "Peut voir les options de message pour les mails"
#: models.py:394
msgid "email message options"
msgstr "options de messages pour les mails"
#: templates/preferences/aff_mailcontact.html:31
msgid "Remark"
#: templates/preferences/display_preferences.html:174
msgid "Address"
msgstr "Adresse"
#: templates/preferences/aff_mailcontact.html:32
msgid "Comment"
msgstr "Commentaire"
#: templates/preferences/display_preferences.html:205
msgid "Contact email adresses list"
msgstr "Liste des adresses email de contact"
#: templates/preferences/display_preferences.html:31
#: templates/preferences/edit_preferences.html:30
#: templates/preferences/preferences.html:29
msgid "Preferences"
msgstr "Préférences"
#: templates/preferences/display_preferences.html:34
msgid "User preferences"
msgstr "Préférences d'utilisateur"
#: templates/preferences/display_preferences.html:37
#: templates/preferences/display_preferences.html:79
#: templates/preferences/display_preferences.html:104
#: templates/preferences/display_preferences.html:125
#: templates/preferences/display_preferences.html:162
#: templates/preferences/display_preferences.html:197
#: templates/preferences/display_preferences.html:219
#: templates/preferences/edit_preferences.html:40 views.py:170 views.py:234
msgid "Edit"
msgstr "Modifier"
#: templates/preferences/display_preferences.html:47
msgid "Default shell for users"
msgstr "Interface système par défaut pour les utilisateurs"
#: templates/preferences/display_preferences.html:53
msgid "Creation of members by everyone"
msgstr "Création d'adhérents par tous"
#: templates/preferences/display_preferences.html:55
msgid "Creation of clubs by everyone"
msgstr "Création de clubs par tous"
#: templates/preferences/display_preferences.html:59
msgid "GPG fingerprint field"
msgstr "Champ empreinte GPG"
#: templates/preferences/display_preferences.html:63
msgid "Em