Commit 679e81ac authored by Laouen Fernet's avatar Laouen Fernet Committed by chirac

Mark strings for translation in users

parent 207c8ba2
......@@ -41,6 +41,6 @@ def can_view(user):
can = user.has_module_perms("users")
return (
can,
None if can else _("You don't have the right to view this" " application."),
None if can else _("You don't have the right to view this application."),
("users",),
)
......@@ -150,7 +150,7 @@ class UserCreationForm(FormRevMixin, forms.ModelForm):
return self.cleaned_data.get("email").lower()
else:
raise forms.ValidationError(
_("You can't use an internal address" " as your external address.")
_("You can't use an internal address as your external address.")
)
class Meta:
......@@ -293,7 +293,7 @@ class MassArchiveForm(forms.Form):
date = forms.DateTimeField(help_text="%d/%m/%y")
full_archive = forms.BooleanField(
label=_(
"Make a full archive operation ? (WARNING : CRITICAL OPERATION IF TRUE)"
"Fully archive users? WARNING: CRITICAL OPERATION IF TRUE"
),
initial=False,
required=False,
......@@ -384,15 +384,14 @@ class AdherentCreationForm(AdherentForm):
# Champ permettant d'éviter au maxium les doublons d'utilisateurs
former_user_check_info = _(
"If you already have an account, please use it. "
+ "If your lost access to it, please consider "
+ "using the forgotten password button on the "
+ "login page or contacting support."
"If you already have an account, please use it. If your lost access to"
" it, please consider using the forgotten password button on the"
" login page or contacting support."
)
former_user_check = forms.BooleanField(
required=True, help_text=former_user_check_info
)
former_user_check.label = _("I certify that I have not had an account before")
former_user_check.label = _("I certify that I have not had an account before.")
# Checkbox for GTU
gtu_check = forms.BooleanField(required=True)
......@@ -657,7 +656,7 @@ class NewListRightForm(ListRightForm):
def __init__(self, *args, **kwargs):
super(NewListRightForm, self).__init__(*args, **kwargs)
self.fields["gid"].label = _(
"GID. Warning: this field must not be" " edited after creation."
"GID. Warning: this field must not be edited after creation."
)
......@@ -734,7 +733,7 @@ class EMailAddressForm(FormRevMixin, ModelForm):
prefix = kwargs.pop("prefix", self.Meta.model.__name__)
super(EMailAddressForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields["local_part"].label = _("Local part of the email address")
self.fields["local_part"].help_text = _("Can't contain @")
self.fields["local_part"].help_text = _("Can't contain @.")
def clean_local_part(self):
return self.cleaned_data.get("local_part").lower()
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="fa fa-address-book"></i>
{% trans "Superuser" %}
</h4>
{% trans "Django's specific pre-defined right that supersed any other rights." %}
{% trans "Django's specific pre-defined right that supersedes any other rights." %}
</div>
<div class="panel-collapse collapse" id="collapse_superuser">
<div class="panel-body">
......
......@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Role" %}</th>
<th>{% trans "Access group" %}</th>
<th>{% trans "Comment" %}</th>
<th></th>
</tr>
......
......@@ -32,9 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %}
<h2>{% trans "List of groups of rights" %}</h2>
{% can_create ListRight %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-listright' %}"><i class="fa fa-plus"></i>{% trans " Add a group of rights" %}</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-listright' %}"><i class="fa fa-plus"></i> {% trans "Add a group of rights" %}</a>
{% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-listright' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several groups of rights" %}</a>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-listright' %}"><i class="fa fa-trash"></i> {% trans "Delete one or several groups of rights" %}</a>
<br />
<br />
{% include 'users/aff_listright.html' %}
......
......@@ -31,11 +31,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %}
<h2>{% trans "List of schools" %}</h2>
<h5>{% trans "List of schools for created users" %}</h5>
<h5>{% trans "List of schools for registered users" %}</h5>
{% can_create School %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-school' %}"><i class="fa fa-plus"></i>{% trans " Add a school" %}</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-school' %}"><i class="fa fa-plus"></i> {% trans "Add a school" %}</a>
{% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-school' %}"><i class="fa fa-trash"></i>{% trans " Delete one or several schools" %}</a>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-school' %}"><i class="fa fa-trash"></i> {% trans "Delete one or several schools" %}</a>
<hr>
{% include 'users/aff_schools.html' with school_list=school_list %}
<br />
......
......@@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h2>{% trans "List of LDAP service users" %}</h2>
<h5>{% trans "The LDAP service users are special users having access only to the LDAP for authentication operations. It is recommended to create a service user with a login and a password for any concerned service." %}</h5>
{% can_create ServiceUser %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:new-serviceuser' %}"><i class="fa fa-plus"></i>{% trans " Add a service user" %}</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:new-serviceuser' %}"><i class="fa fa-plus"></i> {% trans "Add a service user" %}</a>
{% acl_end %}
{% include 'users/aff_serviceusers.html' with serviceusers_list=serviceusers_list %}
<br />
......
......@@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %}
<h2>{% trans "List of shells" %}</h2>
{% can_create ListShell %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-shell' %}"><i class="fa fa-plus"></i>{% trans " Add a shell" %}</a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-shell' %}"><i class="fa fa-plus"></i> {% trans "Add a shell" %}</a>
{% acl_end %}
{% include 'users/aff_shell.html' with shell_list=shell_list %}
<br />
......
......@@ -36,7 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<input type="submit" name="valider" value={% trans "Confirm" %} class="btn btn-primary" id="submit-id-submit">
</form>
<h3>{% blocktrans %}The following users will be archived ({{ to_archive_list|length }}):{% endblocktrans %}</h3>
<h3>{% blocktrans %}The following users will be archived:{% endblocktrans %}</h3>
{% include 'users/aff_users.html' with users_list=to_archive_list %}
<br />
<br />
......
......@@ -43,7 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="col-sm-6 {% if solde_activated %}col-md-4{% else %}col_md-6{% endif %}">
{% if users.is_ban%}
<div class="panel panel-danger">
<div class="panel-heading dashboard">{% trans "Your account has been banned" %}</div>
<div class="panel-heading dashboard">{% trans "Your account has been banned." %}</div>
<div class="panel-body dashboard">
<i class="text-danger">{% blocktrans with end_ban_date=users.end_ban|date:"SHORT_DATE_FORMAT" %}End of the ban: {{ end_ban_date }}{% endblocktrans %}</i>
</div>
......@@ -57,7 +57,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="fa fa-sign-in"></i> {% trans "Pay for a connection" %}
</a>
{% acl_else %}
{% trans "Ask for someone with the appropriate rights to pay for a connection." %}
{% trans "Ask someone with the appropriate rights to pay for a connection." %}
{% acl_end %}
</div>
</div>
......@@ -94,11 +94,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel panel-info">
<div class="panel-heading dashboard" data-parent="#accordion" data-toggle="collapse"
data-target="#machines">
<i class="fa fa-desktop"></i>{% trans " Machines" %} <span class="badge"> {{ nb_machines }}</span>
<i class="fa fa-desktop"></i> {% trans "Machines" %} <span class="badge"> {{ nb_machines }}</span>
</div>
<div class="panel-body dashboard">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}">
<i class="fa fa-desktop"></i>{% trans " Add a machine" %}
<i class="fa fa-desktop"></i> {% trans "Add a machine" %}
</a>
</div>
</div>
......@@ -110,7 +110,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
<div class="panel-body dashboard">
<a class="btn btn-warning btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}">
<i class="fa fa-desktop"></i>{% trans " Add a machine" %}
<i class="fa fa-desktop"></i> {% trans "Add a machine" %}
</a>
</div>
</div>
......@@ -125,7 +125,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse"
data-target="#information">
<h3 class="panel-title pull-left">
<i class="fa fa-user"></i>{% trans " Detailed information" %}
<i class="fa fa-user"></i> {% trans "Detailed information" %}
</h3>
</div>
<div class="panel-collapse collapse collapse-default" id="information">
......@@ -225,7 +225,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if users.end_adhesion != None %}
<dd><i class="text-success">{{ users.end_adhesion }}</i></dd>
{% else %}
<dd><i class="text-danger">{% trans "not a member" %}</i></dd>
<dd><i class="text-danger">{% trans "Not a member" %}</i></dd>
{% endif %}
</div>
......@@ -256,9 +256,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% elif users.state == 2 %}
<dd><i class="text-danger">{% trans "Archived" %}</i></dd>
{% elif users.state == 3 %}
<dd><i class="text-danger">{% trans "Not yet member" %}</i></dd>
<dd><i class="text-danger">{% trans "Not yet active" %}</i></dd>
{% elif users.state == 4 %}
<dd><i class="text-danger">{% trans "Full Archived" %}</i></dd>
<dd><i class="text-danger">{% trans "Fully archived" %}</i></dd>
{% endif %}
</div>
......@@ -320,7 +320,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel panel-default">
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" data-target="#club">
<h3 class="panel-title pull-left">
<i class="fa fa-users"></i>{% trans " Manage the club" %}
<i class="fa fa-users"></i> {% trans "Manage the club" %}
</h3>
</div>
<div class="panel-collapse collapse" id="club">
......@@ -484,14 +484,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel panel-default">
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" data-target="#email">
<h3 class="panel-title pull-left">
<i class="fa fa-envelope"></i>{% trans " Email settings" %}
<i class="fa fa-envelope"></i> {% trans "Email settings" %}
</h3>
</div>
<div id="email" class="panel-collapse collapse">
<div class="panel-body">
{% can_edit users %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-email-settings' users.id %}">
<i class="fa fa-pencil"></i>{% trans " Edit email settings" %}
<i class="fa fa-pencil"></i> {% trans "Edit email settings" %}
</a>
{% acl_end %}
</div>
......@@ -510,12 +510,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ users.local_email_redirect | tick }}</td>
</tr>
</table>
<p>{% trans "The contact email address is the email address where we send emails to contact you. If you would like to use your external email address for that, you can either disable your local email address or enable the local email redirection." %}</p>
<p>{% trans "The contact email address is the email address to which we send emails to contact you. If you would like to use your external email address for that, you can either disable your local email address or enable the local email redirection." %}</p>
</div>
{% if users.local_email_enabled %}
{% can_create EMailAddress users.id %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-emailaddress' users.id %}">
<i class="fa fa-plus-square"></i>{% trans " Add an email address" %}
<i class="fa fa-plus-square"></i> {% trans "Add an email address" %}
</a>
{% acl_end %}
{% if emailaddress_list %}
......
......@@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %}
{% bootstrap_form_errors userform %}
<h2>{% blocktrans %}Device and room register form{% endblocktrans %}</h2>
<h2>{% trans "Device and room register form" %}</h2>
<form class="form" method="post">
{% csrf_token %}
......@@ -61,7 +61,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div>
</div>
<center>{% bootstrap_button _("OK") button_type="submit" icon='ok' button_class='btn-success' %}</center>
{% trans "OK" as tr_ok %}
<center>{% bootstrap_button tr_ok button_type="submit" icon='ok' button_class='btn-success' %}</center>
</form>
......
This diff is collapsed.
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