kopia lustrzana https://github.com/wagtail/wagtail
Added transifex config + strings for wagtailusers
rodzic
e787ba65a1
commit
5c1f57abc0
|
@ -0,0 +1,8 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[wagtail.wagtailusers]
|
||||
file_filter = wagtail/wagtailusers/locale/<lang>/LC_MESSAGES/django.po
|
||||
source_file = wagtail/wagtailusers/locale/en/LC_MESSAGES/django.po
|
||||
source_lang = en
|
||||
type = PO
|
|
@ -13,9 +13,10 @@ class UserCreationForm(BaseUserCreationForm):
|
|||
required=False,
|
||||
help_text=_("If ticked, this user has the ability to manage user accounts.")
|
||||
)
|
||||
first_name = forms.CharField(required=True)
|
||||
last_name = forms.CharField(required=True)
|
||||
email = forms.EmailField(required=True)
|
||||
|
||||
email = forms.EmailField(required=True, label=_("Email"))
|
||||
first_name = forms.CharField(required=True, label=_("First Name"))
|
||||
last_name = forms.CharField(required=True, label=_("Last Name"))
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
|
@ -54,9 +55,9 @@ class UserEditForm(forms.ModelForm):
|
|||
'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")
|
||||
})
|
||||
|
||||
email = forms.EmailField(required=True)
|
||||
first_name = forms.CharField(required=True)
|
||||
last_name = forms.CharField(required=True)
|
||||
email = forms.EmailField(required=True, label=_("Email"))
|
||||
first_name = forms.CharField(required=True, label=_("First Name"))
|
||||
last_name = forms.CharField(required=True, label=_("Last Name"))
|
||||
|
||||
password1 = forms.CharField(
|
||||
label=_("Password"),
|
||||
|
|
Plik binarny nie jest wyświetlany.
|
@ -0,0 +1,179 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# serafeim <serafeim@torchbox.com>, 2014
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Wagtail\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-19 14:36+0200\n"
|
||||
"PO-Revision-Date: 2014-02-19 12:36+0000\n"
|
||||
"Last-Translator: serafeim <serafeim@torchbox.com>\n"
|
||||
"Language-Team: Greek (http://www.transifex.com/projects/p/wagtail/language/"
|
||||
"el/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: el\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: .\forms.py:12 .\forms.py:73
|
||||
msgid "Administrator"
|
||||
msgstr "Διαχειριστής"
|
||||
|
||||
#: .\forms.py:14
|
||||
msgid "If ticked, this user has the ability to manage user accounts."
|
||||
msgstr ""
|
||||
"Αν επιλεγεί, ο συγκεκριμένος χρήστης έχει τη δυνατότητα διαχείρισης "
|
||||
"λογαριασμών χρηστών."
|
||||
|
||||
#: .\forms.py:17 .\forms.py:58
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
|
||||
#: .\forms.py:18 .\forms.py:59
|
||||
msgid "First Name"
|
||||
msgstr "Όνομα"
|
||||
|
||||
#: .\forms.py:19 .\forms.py:60
|
||||
msgid "Last Name"
|
||||
msgstr "Επίθετο"
|
||||
|
||||
#: .\forms.py:46
|
||||
msgid "A user with that username already exists."
|
||||
msgstr "Υπάρχει ήδη χρήστης με το συγκεκριμένο όνομα χρήστη."
|
||||
|
||||
#: .\forms.py:47
|
||||
msgid "The two password fields didn't match."
|
||||
msgstr "Τα δύο πεδία κωδικών δεν είναι ίδια."
|
||||
|
||||
#: .\forms.py:50 .\templates\wagtailusers\list.html.py:15
|
||||
msgid "Username"
|
||||
msgstr "Όνομα χρήστη"
|
||||
|
||||
#: .\forms.py:53
|
||||
msgid "Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."
|
||||
msgstr ""
|
||||
"Απαραίτητο. Λιγότερο από 30 χαρακτήρες. Επιτρέπονται μόνο γράμματα, αριθμοί "
|
||||
"και οι χαρακτήρες @/./+/-/_."
|
||||
|
||||
#: .\forms.py:55
|
||||
msgid "This value may contain only letters, numbers and @/./+/-/_ characters."
|
||||
msgstr ""
|
||||
"Η τιμή επιτρέπεται να έχει μόνο γράμματα, αριθμούς και τους χαρακτήρες @/./"
|
||||
"+/-/_."
|
||||
|
||||
#: .\forms.py:63
|
||||
msgid "Password"
|
||||
msgstr "Κωδικός"
|
||||
|
||||
#: .\forms.py:66
|
||||
msgid "Leave blank if not changing."
|
||||
msgstr "Αφήστε κενό αν δεν το αλλάζετε."
|
||||
|
||||
#: .\forms.py:68
|
||||
msgid "Password confirmation"
|
||||
msgstr "Επιβεβαίωση κωδικού."
|
||||
|
||||
#: .\forms.py:70
|
||||
msgid "Enter the same password as above, for verification."
|
||||
msgstr "Εισάγετε τον ίδιο κωδικό για επιβεβαίωση"
|
||||
|
||||
#: .\forms.py:75
|
||||
msgid "Administrators have the ability to manage user accounts."
|
||||
msgstr ""
|
||||
"Οι Διαχειριστές έχουν τη δυνατότητα να διαχειρίζονται λογαριασμούς χρηστών."
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:8
|
||||
#: .\templates\wagtailusers\create.html.py:35
|
||||
msgid "Add user"
|
||||
msgstr "Προσθήκη χρήστη"
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:12
|
||||
#: .\templates\wagtailusers\edit.html.py:12
|
||||
msgid "Account"
|
||||
msgstr "Λογαριασμός"
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:13
|
||||
#: .\templates\wagtailusers\create.html.py:28
|
||||
#: .\templates\wagtailusers\edit.html.py:13
|
||||
msgid "Roles"
|
||||
msgstr "Ρόλοι"
|
||||
|
||||
#: .\templates\wagtailusers\edit.html.py:4
|
||||
#: .\templates\wagtailusers\edit.html.py:8
|
||||
msgid "Editing"
|
||||
msgstr "Διόρθωση"
|
||||
|
||||
#: .\templates\wagtailusers\edit.html.py:37
|
||||
msgid "Save"
|
||||
msgstr "Αποθήκευση"
|
||||
|
||||
#: .\templates\wagtailusers\index.html.py:4
|
||||
#: .\templates\wagtailusers\index.html.py:17
|
||||
msgid "Users"
|
||||
msgstr "Χρήστες"
|
||||
|
||||
#: .\templates\wagtailusers\index.html.py:18
|
||||
msgid "Add a user"
|
||||
msgstr "Προσθήκη χρήστη"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:7
|
||||
msgid "Name"
|
||||
msgstr "Όνομα"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:22
|
||||
msgid "Level"
|
||||
msgstr "Επίπεδο"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:23
|
||||
msgid "Status"
|
||||
msgstr "Κατάσταση"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:36
|
||||
msgid "Admin"
|
||||
msgstr "Διαχειριστής"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:37
|
||||
msgid "Active"
|
||||
msgstr "Ενεργός"
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:37
|
||||
msgid "Inactive"
|
||||
msgstr "Μη ενεργός"
|
||||
|
||||
#: .\templates\wagtailusers\results.html.py:12
|
||||
#, python-format
|
||||
msgid "Sorry, no users match \"<em>%(search_query)s</em>\""
|
||||
msgstr ""
|
||||
"Λυπούμαστε, δε βρέθηκαν χρήστες που να ταιριάζουν με το \"<em>%(search_query)"
|
||||
"s</em>\""
|
||||
|
||||
#: .\templates\wagtailusers\results.html.py:15
|
||||
#, python-format
|
||||
msgid ""
|
||||
"There are no users configured. Why not <a href=\"%(wagtailusers_create_url)s"
|
||||
"\">add some</a>?"
|
||||
msgstr ""
|
||||
"Δεν έχουν [προστεθεί χρήστες. Θέλετε να <a href=\"%(wagtailusers_create_url)s"
|
||||
"\">προσθέσετε μερικούς</a>?"
|
||||
|
||||
#: .\views\users.py:75
|
||||
#, python-format
|
||||
msgid "User '%s' created."
|
||||
msgstr "Ο χρήστης '%s' δημιουργήθηκε."
|
||||
|
||||
#: .\views\users.py:78
|
||||
msgid "The user could not be created due to errors."
|
||||
msgstr "Δεν ήταν δυνατή η δημιουργία του χρήστη."
|
||||
|
||||
#: .\views\users.py:94
|
||||
#, python-format
|
||||
msgid "User '%s' updated."
|
||||
msgstr "Τα στοιχεία του χρήστη '%s' ενημερώθηκαν."
|
||||
|
||||
#: .\views\users.py:97
|
||||
msgid "The user could not be saved due to errors."
|
||||
msgstr "Δεν ήταν δυνατή η ενημέρωση των στοιχείων του χρήστη."
|
Plik binarny nie jest wyświetlany.
|
@ -0,0 +1,165 @@
|
|||
# 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.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-19 14:35+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: .\forms.py:12 .\forms.py:73
|
||||
msgid "Administrator"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:14
|
||||
msgid "If ticked, this user has the ability to manage user accounts."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:17 .\forms.py:58
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:18 .\forms.py:59
|
||||
msgid "First Name"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:19 .\forms.py:60
|
||||
msgid "Last Name"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:46
|
||||
msgid "A user with that username already exists."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:47
|
||||
msgid "The two password fields didn't match."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:50 .\templates\wagtailusers\list.html.py:15
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:53
|
||||
msgid "Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:55
|
||||
msgid "This value may contain only letters, numbers and @/./+/-/_ characters."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:63
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:66
|
||||
msgid "Leave blank if not changing."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:68
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:70
|
||||
msgid "Enter the same password as above, for verification."
|
||||
msgstr ""
|
||||
|
||||
#: .\forms.py:75
|
||||
msgid "Administrators have the ability to manage user accounts."
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:8
|
||||
#: .\templates\wagtailusers\create.html.py:35
|
||||
msgid "Add user"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:12
|
||||
#: .\templates\wagtailusers\edit.html.py:12
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\create.html.py:13
|
||||
#: .\templates\wagtailusers\create.html.py:28
|
||||
#: .\templates\wagtailusers\edit.html.py:13
|
||||
msgid "Roles"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\edit.html.py:4
|
||||
#: .\templates\wagtailusers\edit.html.py:8
|
||||
msgid "Editing"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\edit.html.py:37
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\index.html.py:4
|
||||
#: .\templates\wagtailusers\index.html.py:17
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\index.html.py:18
|
||||
msgid "Add a user"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:7
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:22
|
||||
msgid "Level"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:23
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:36
|
||||
msgid "Admin"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:37
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\list.html.py:37
|
||||
msgid "Inactive"
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\results.html.py:12
|
||||
#, python-format
|
||||
msgid "Sorry, no users match \"<em>%(search_query)s</em>\""
|
||||
msgstr ""
|
||||
|
||||
#: .\templates\wagtailusers\results.html.py:15
|
||||
#, python-format
|
||||
msgid ""
|
||||
"There are no users configured. Why not <a href=\"%(wagtailusers_create_url)s"
|
||||
"\">add some</a>?"
|
||||
msgstr ""
|
||||
|
||||
#: .\views\users.py:75
|
||||
#, python-format
|
||||
msgid "User '%s' created."
|
||||
msgstr ""
|
||||
|
||||
#: .\views\users.py:78
|
||||
msgid "The user could not be created due to errors."
|
||||
msgstr ""
|
||||
|
||||
#: .\views\users.py:94
|
||||
#, python-format
|
||||
msgid "User '%s' updated."
|
||||
msgstr ""
|
||||
|
||||
#: .\views\users.py:97
|
||||
msgid "The user could not be saved due to errors."
|
||||
msgstr ""
|
|
@ -1,14 +1,16 @@
|
|||
{% extends "wagtailadmin/base.html" %}
|
||||
{% load image_tags %}
|
||||
{% block titletag %}Add user{% endblock %}
|
||||
{% load i18n %}
|
||||
{% block titletag %}{% trans "Add user" %}{% endblock %}
|
||||
{% block bodyclass %}menu-users{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% include "wagtailadmin/shared/header.html" with title="Add user" merged=1 tabbed=1 %}
|
||||
{% trans "Add user" as add_user_str %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=add_user_str merged=1 tabbed=1 %}
|
||||
|
||||
<ul class="tab-nav merged">
|
||||
<li class="active"><a href="#account">Account</a></li>
|
||||
<li><a href="#roles">Roles</a></li>
|
||||
<li class="active"><a href="#account">{% trans "Account" %}</a></li>
|
||||
<li><a href="#roles">{% trans "Roles" %}</a></li>
|
||||
</ul>
|
||||
|
||||
<form action="{% url 'wagtailusers_create' %}" method="POST">
|
||||
|
@ -23,14 +25,14 @@
|
|||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.password1 %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.password2 %}
|
||||
|
||||
<li><a href="#roles" class="button lowpriority tab-toggle icon icon-arrow-right-after" />Roles</a></li>
|
||||
<li><a href="#roles" class="button lowpriority tab-toggle icon icon-arrow-right-after" />{% trans "Roles" %}</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="roles" class="nice-padding">
|
||||
<ul class="fields">
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.is_superuser %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.groups %}
|
||||
<li><input type="submit" value="Add user" /></li>
|
||||
<li><input type="submit" value='{% trans "Add user" %}' /></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
{% extends "wagtailadmin/base.html" %}
|
||||
{% load image_tags %}
|
||||
{% block titletag %}Editing {{ user.username}}{% endblock %}
|
||||
{% load i18n %}
|
||||
{% block titletag %}{% trans "Editing" %} {{ user.username}}{% endblock %}
|
||||
{% block bodyclass %}menu-users{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% include "wagtailadmin/shared/header.html" with title="Editing" subtitle=user.username merged=1 tabbed=1 %}
|
||||
|
||||
{% trans "Editing" as editing_str %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=user.username merged=1 tabbed=1 %}
|
||||
|
||||
<ul class="tab-nav merged">
|
||||
<li class="active"><a href="#account">Account</a></li>
|
||||
<li><a href="#roles">Roles</a></li>
|
||||
<li class="active"><a href="#account">{% trans "Account" %}</a></li>
|
||||
<li><a href="#roles">{% trans "Roles" %}</a></li>
|
||||
</ul>
|
||||
|
||||
<form action="{% url 'wagtailusers_edit' user.id %}" method="POST">
|
||||
|
@ -25,14 +27,14 @@
|
|||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.password2 %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.is_active %}
|
||||
|
||||
<li><input type="submit" value="Save" /></li>
|
||||
<li><input type="submit" value="{% trans 'Save' %}" /></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="roles" class="nice-padding">
|
||||
<ul class="fields">
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.is_superuser %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=form.groups %}
|
||||
<li><input type="submit" value="Save" /></li>
|
||||
<li><input type="submit" value="{% trans 'Save' %}" /></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "wagtailadmin/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load gravatar %}
|
||||
{% block titletag %}Users{% endblock %}
|
||||
{% block titletag %}{% trans "Users" %}{% endblock %}
|
||||
{% block bodyclass %}menu-users{% endblock %}
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
|
@ -13,7 +14,9 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "wagtailadmin/shared/header.html" with title="Users" add_link="wagtailusers_create" add_text="Add a user" search_url="wagtailusers_index" %}
|
||||
{% trans "Users" as users_str %}
|
||||
{% trans "Add a user" as add_a_user_str %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=users_str add_link="wagtailusers_create" add_text=add_a_user_str search_url="wagtailusers_index" %}
|
||||
|
||||
<div class="nice-padding">
|
||||
<div id="user-results" class="users">
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{% load i18n %}
|
||||
{% load gravatar %}
|
||||
<table class="listing">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="name">
|
||||
Name
|
||||
{% trans "Name" %}
|
||||
{% if ordering == "name" %}
|
||||
<a href="{% url 'wagtailusers_index' %}" class="icon icon-arrow-down-after teal"></a>
|
||||
{% else %}
|
||||
|
@ -11,15 +12,15 @@
|
|||
{% endif %}
|
||||
</th>
|
||||
<th class="username">
|
||||
Username
|
||||
{% trans "Username" %}
|
||||
{% if ordering == "username" %}
|
||||
<a href="{% url 'wagtailusers_index' %}" class="icon icon-arrow-down-after teal"></a>
|
||||
{% else %}
|
||||
<a href="{% url 'wagtailusers_index' %}?ordering=username" class="icon icon-arrow-down-after"></a>
|
||||
{% endif %}
|
||||
</th>
|
||||
<th class="level">Level</th>
|
||||
<th class="status">Status</th>
|
||||
<th class="level">{% trans "Level" %}</th>
|
||||
<th class="status">{% trans "Status" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -32,8 +33,8 @@
|
|||
</h2>
|
||||
</td>
|
||||
<td class="username">{{ user.username }}</td>
|
||||
<td class="level">{% if user.is_superuser %}Admin{% endif %}</td>
|
||||
<td class="status"><div class="status-tag {% if user.is_active %}primary{% endif %}">{% if user.is_active %}Active{% else %}Inactive{% endif %}</div></td>
|
||||
<td class="level">{% if user.is_superuser %}{% trans "Admin" %}{% endif %}</td>
|
||||
<td class="status"><div class="status-tag {% if user.is_active %}primary{% endif %}">{% if user.is_active %}{% trans "Active" %}{% else %}{% trans "Inactive" %}{% endif %}</div></td>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{% load i18n %}
|
||||
{% if users %}
|
||||
{% if is_searching %}
|
||||
<h2>{{ users|length }} match{{ users|pluralize:"es" }}</h2>
|
||||
|
@ -8,8 +9,9 @@
|
|||
{% include "wagtailadmin/shared/pagination_nav.html" with items=users is_searching=is_searching linkurl="wagtailusers_index" %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<p>Sorry, no users match "<em>{{ search_query }}</em>"
|
||||
<p>{% blocktrans %}Sorry, no users match "<em>{{ search_query }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>There are no users configured. Why not <a href="{% url 'wagtailusers_create' %}">add some</a>?</p>
|
||||
{% url 'wagtailusers_create' as wagtailusers_create_url %}
|
||||
<p>{% blocktrans %}There are no users configured. Why not <a href="{{ wagtailusers_create_url }}">add some</a>?{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -4,6 +4,7 @@ from django.contrib.auth.decorators import permission_required
|
|||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
from django.contrib import messages
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from wagtail.wagtailadmin.forms import SearchForm
|
||||
from wagtail.wagtailusers.forms import UserCreationForm, UserEditForm
|
||||
|
@ -71,10 +72,10 @@ def create(request):
|
|||
form = UserCreationForm(request.POST)
|
||||
if form.is_valid():
|
||||
user = form.save()
|
||||
messages.success(request, "User '%s' created." % user)
|
||||
messages.success(request, _("User '%s' created.").format(user))
|
||||
return redirect('wagtailusers_index')
|
||||
else:
|
||||
messages.error(request, "The user could not be created due to errors.")
|
||||
messages.error(request, _("The user could not be created due to errors.") )
|
||||
else:
|
||||
form = UserCreationForm()
|
||||
|
||||
|
@ -90,10 +91,10 @@ def edit(request, user_id):
|
|||
form = UserEditForm(request.POST, instance=user)
|
||||
if form.is_valid():
|
||||
user = form.save()
|
||||
messages.success(request, "User '%s' updated." % user)
|
||||
messages.success(request, _("User '%s' updated.").format(user))
|
||||
return redirect('wagtailusers_index')
|
||||
else:
|
||||
messages.error(request, "The user could not be saved due to errors.")
|
||||
messages.error(request, _("The user could not be saved due to errors."))
|
||||
else:
|
||||
form = UserEditForm(instance=user)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue