mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-20 06:08:35 +02:00
French translation.
This commit is contained in:
+6
-5
@@ -1,15 +1,16 @@
|
||||
from django import forms
|
||||
from mailng.admin.models import Domain, Mailbox, Alias
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
class DomainForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Domain
|
||||
|
||||
class MailboxForm(forms.ModelForm):
|
||||
quota = forms.IntegerField(label="Quota", required=False)
|
||||
password1 = forms.CharField(label="Password", widget=forms.PasswordInput)
|
||||
password2 = forms.CharField(label="Confirmation", widget=forms.PasswordInput)
|
||||
enabled = forms.BooleanField(label="Enabled", required=False)
|
||||
quota = forms.IntegerField(label=_("Quota"), required=False)
|
||||
password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
|
||||
password2 = forms.CharField(label=_("Confirmation"), widget=forms.PasswordInput)
|
||||
enabled = forms.BooleanField(label=_("Enabled"), required=False)
|
||||
|
||||
class Meta:
|
||||
model = Mailbox
|
||||
@@ -17,7 +18,7 @@ class MailboxForm(forms.ModelForm):
|
||||
|
||||
def clean_password2(self):
|
||||
if self.cleaned_data["password1"] != self.cleaned_data["password2"]:
|
||||
raise forms.ValidationError("Passwords mismatch")
|
||||
raise forms.ValidationError(_("Passwords mismatch"))
|
||||
return self.cleaned_data["password2"]
|
||||
|
||||
class AliasForm(forms.ModelForm):
|
||||
|
||||
+9
-8
@@ -1,13 +1,14 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from mailng.lib import exec_pipe
|
||||
import os
|
||||
|
||||
class Domain(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
name = models.CharField(_('name'), max_length=100)
|
||||
quota = models.IntegerField()
|
||||
enabled = models.BooleanField()
|
||||
enabled = models.BooleanField(_('enabled'))
|
||||
|
||||
def create_dir(self):
|
||||
code, output = exec_pipe("sudo -u %s mkdir %s/%s" \
|
||||
@@ -39,10 +40,10 @@ class Domain(models.Model):
|
||||
return True
|
||||
|
||||
class Mailbox(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
address = models.CharField(max_length=100)
|
||||
name = models.CharField(_('name'), max_length=100)
|
||||
address = models.CharField(_('address'), max_length=100)
|
||||
full_address = models.CharField(max_length=150)
|
||||
password = models.CharField(max_length=100)
|
||||
password = models.CharField(_('password'), max_length=100)
|
||||
quota = models.IntegerField()
|
||||
uid = models.IntegerField()
|
||||
gid = models.IntegerField()
|
||||
@@ -84,7 +85,7 @@ class Mailbox(models.Model):
|
||||
return True
|
||||
|
||||
class Alias(models.Model):
|
||||
address = models.CharField(max_length=100)
|
||||
address = models.CharField(_('address'), max_length=100)
|
||||
full_address = models.CharField(max_length=150)
|
||||
mbox = models.ForeignKey(Mailbox)
|
||||
enabled = models.BooleanField()
|
||||
mbox = models.ForeignKey(Mailbox, verbose_name=_('mailbox'))
|
||||
enabled = models.BooleanField(_('enabled'))
|
||||
|
||||
+11
-10
@@ -3,6 +3,7 @@ from django.template.loader import render_to_string
|
||||
from django.template import RequestContext
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.utils import simplejson
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.core import serializers
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.contrib.auth.decorators import login_required
|
||||
@@ -39,7 +40,7 @@ def newdomain(request):
|
||||
error = None
|
||||
if form.is_valid():
|
||||
if Domain.objects.filter(name=request.POST["name"]):
|
||||
error = "Domain with this name already defined"
|
||||
error = _("Domain with this name already defined")
|
||||
else:
|
||||
domain = form.save(commit=False)
|
||||
if domain.create_dir():
|
||||
@@ -47,7 +48,7 @@ def newdomain(request):
|
||||
ctx = _ctx_ok(reverse(admin.views.domains))
|
||||
return HttpResponse(simplejson.dumps(ctx),
|
||||
mimetype="application/json")
|
||||
error = "Failed to initialise domain, check permissions"
|
||||
error = _("Failed to initialise domain, check permissions")
|
||||
ctx = _ctx_ko("admin/newdomain.html", {
|
||||
"form" : form, "error" : error
|
||||
})
|
||||
@@ -67,10 +68,10 @@ def editdomain(request, dom_id):
|
||||
if form.is_valid():
|
||||
if domain.name != request.POST["name"]:
|
||||
if Domain.objects.filter(name=request.POST["name"]):
|
||||
error = "Domain with this name already defined"
|
||||
error = _("Domain with this name already defined")
|
||||
else:
|
||||
if not domain.rename_dir(request.POST["name"]):
|
||||
error = "Failed to rename domain, check permissions"
|
||||
error = _("Failed to rename domain, check permissions")
|
||||
if not error:
|
||||
form.save()
|
||||
ctx = _ctx_ok(reverse(admin.views.domains))
|
||||
@@ -109,7 +110,7 @@ def newmailbox(request, dom_id=None):
|
||||
if form.is_valid():
|
||||
if Mailbox.objects.filter(address=request.POST["address"],
|
||||
domain=dom_id):
|
||||
error = "Mailbox with this address already exists"
|
||||
error = _("Mailbox with this address already exists")
|
||||
else:
|
||||
mb = form.save(commit=False)
|
||||
if mb.create_dir(domain):
|
||||
@@ -136,7 +137,7 @@ def newmailbox(request, dom_id=None):
|
||||
ctx = _ctx_ok(reverse(admin.views.mailboxes, args=[domain.id]))
|
||||
return HttpResponse(simplejson.dumps(ctx),
|
||||
mimetype="application/json")
|
||||
error = "Failed to initialise mailbox, check permissions"
|
||||
error = _("Failed to initialise mailbox, check permissions")
|
||||
ctx = _ctx_ko("admin/newmailbox.html", {
|
||||
"form" : form, "domain" : domain, "error" : error
|
||||
})
|
||||
@@ -157,10 +158,10 @@ def editmailbox(request, dom_id, mbox_id=None):
|
||||
if mb.address != request.POST["address"]:
|
||||
if Mailbox.objects.filter(address=request.POST["address"],
|
||||
domain=dom_id):
|
||||
error = "Mailbox with this address already exists"
|
||||
error = _("Mailbox with this address already exists")
|
||||
else:
|
||||
if not mb.rename_dir(mb.domain.name, request.POST["address"]):
|
||||
error = "Failed to rename mailbox, check permissions"
|
||||
error = _("Failed to rename mailbox, check permissions")
|
||||
if not error:
|
||||
mb = form.save(commit=False)
|
||||
enabled = request.POST.has_key("enabled") \
|
||||
@@ -224,7 +225,7 @@ def newalias(request, dom_id, mbox_id):
|
||||
if form.is_valid():
|
||||
if Alias.objects.filter(address=request.POST["address"],
|
||||
mbox=mbox_id):
|
||||
error = "Alias with this address already exists"
|
||||
error = _("Alias with this address already exists")
|
||||
else:
|
||||
alias = form.save(commit=False)
|
||||
alias.full_address = "%s@%s" % (alias.address, mbox.domain.name)
|
||||
@@ -252,7 +253,7 @@ def editalias(request, dom_id, alias_id):
|
||||
if alias.address != request.POST["address"] \
|
||||
and Alias.objects.filter(address=request.POST["address"],
|
||||
mbox=alias.mbox.id):
|
||||
error = "Alias with this address already exists"
|
||||
error = _("Alias with this address already exists")
|
||||
else:
|
||||
alias = form.save(commit=False)
|
||||
alias.full_address = "%s@%s" % (alias.address,
|
||||
|
||||
@@ -32,3 +32,12 @@ def exec_pipe(cmd):
|
||||
else:
|
||||
code = -1
|
||||
return code, output
|
||||
|
||||
def crypt_password(raw_password):
|
||||
import md5
|
||||
import random
|
||||
|
||||
salt = md5.new(str(random.random) + str(random.random)).hexdigest()
|
||||
salt = salt[:5]
|
||||
hash = md5.new(salt + raw_password).hexdigest()
|
||||
return "%s$%s$%s" % ("md5", salt, hash)
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
# 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: 2009-03-29 23:04+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Antoine Nguyen <tonio@ngyn.org>\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"
|
||||
|
||||
#: admin/forms.py:10 templates/admin/domains.html:20
|
||||
#: templates/admin/mailboxes.html:17
|
||||
msgid "Quota"
|
||||
msgstr ""
|
||||
|
||||
#: admin/forms.py:11
|
||||
msgid "Password"
|
||||
msgstr "Mot de passe"
|
||||
|
||||
#: admin/forms.py:12
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
|
||||
#: admin/forms.py:13 templates/admin/domains.html:21
|
||||
#: templates/admin/mailboxes.html:18
|
||||
msgid "Enabled"
|
||||
msgstr "Activé"
|
||||
|
||||
#: admin/forms.py:21
|
||||
msgid "Passwords mismatch"
|
||||
msgstr "Les mots de passe diffèrent"
|
||||
|
||||
#: admin/models.py:9 admin/models.py:43
|
||||
msgid "name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: admin/models.py:11 admin/models.py:91
|
||||
msgid "enabled"
|
||||
msgstr "Activé"
|
||||
|
||||
#: admin/models.py:44 admin/models.py:88
|
||||
msgid "address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: admin/models.py:46
|
||||
msgid "password"
|
||||
msgstr "Mot de passe"
|
||||
|
||||
#: admin/models.py:90
|
||||
msgid "mailbox"
|
||||
msgstr "Boite aux lettres"
|
||||
|
||||
#: admin/views.py:43 admin/views.py:71
|
||||
msgid "Domain with this name already defined"
|
||||
msgstr "Un domaine avec ce nom existe déjà"
|
||||
|
||||
#: admin/views.py:51
|
||||
msgid "Failed to initialise domain, check permissions"
|
||||
msgstr "Impossible d'initialiser le domaine, vérifier les permissions"
|
||||
|
||||
#: admin/views.py:74
|
||||
msgid "Failed to rename domain, check permissions"
|
||||
msgstr "Impossible de renommer le domaine, vérifier les permissions"
|
||||
|
||||
#: admin/views.py:113 admin/views.py:161
|
||||
msgid "Mailbox with this address already exists"
|
||||
msgstr "Une boite aux lettres pour cette adresse existe déjà"
|
||||
|
||||
#: admin/views.py:140
|
||||
msgid "Failed to initialise mailbox, check permissions"
|
||||
msgstr ""
|
||||
"Impossible d'initialiser la boite aux lettres, vérifier les permissions"
|
||||
|
||||
#: admin/views.py:164
|
||||
msgid "Failed to rename mailbox, check permissions"
|
||||
msgstr "Impossible de renommer la boite aux lettres, vérifier les permissions."
|
||||
|
||||
#: admin/views.py:228 admin/views.py:256
|
||||
msgid "Alias with this address already exists"
|
||||
msgstr "Un alias avec cette adresse existe déjà"
|
||||
|
||||
#: templates/admin/aliases.html:10
|
||||
msgid "No alias defined."
|
||||
msgstr "Aucun alias défini."
|
||||
|
||||
#: templates/admin/aliases.html:25
|
||||
msgid "Edit alias"
|
||||
msgstr "Editer cet alias"
|
||||
|
||||
#: templates/admin/aliases.html:29
|
||||
msgid "Delete alias"
|
||||
msgstr "Supprimer cet alias"
|
||||
|
||||
#: templates/admin/domain_header.html:8 templates/admin/editdomain.html:7
|
||||
msgid "Domain"
|
||||
msgstr "Domaine"
|
||||
|
||||
#: templates/admin/domain_menu.html:12 templates/admin/newmailbox.html:7
|
||||
msgid "New mailbox"
|
||||
msgstr "Nouvelle boite aux lettres"
|
||||
|
||||
#: templates/admin/domain_menu.html:18 templates/admin/domains.html:19
|
||||
msgid "Mailboxes"
|
||||
msgstr "Boites aux lettres"
|
||||
|
||||
#: templates/admin/domain_menu.html:22
|
||||
msgid "Aliases"
|
||||
msgstr "Alias"
|
||||
|
||||
#: templates/admin/domain_menu.html:27
|
||||
msgid "Properties"
|
||||
msgstr "Propriétés"
|
||||
|
||||
#: templates/admin/domains.html:8
|
||||
msgid "Available domains"
|
||||
msgstr "Domaines disponibles"
|
||||
|
||||
#: templates/admin/domains.html:13
|
||||
msgid "No domain defined."
|
||||
msgstr "Aucun alias défini."
|
||||
|
||||
#: templates/admin/domains.html:17 templates/admin/mailboxes.html:14
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/admin/domains.html:18 templates/admin/mailboxes.html:15
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: templates/admin/domains.html:29
|
||||
msgid "Edit domain"
|
||||
msgstr "Editer le domaine"
|
||||
|
||||
#: templates/admin/domains.html:33
|
||||
msgid "Delete domain"
|
||||
msgstr "Supprimer le domaine"
|
||||
|
||||
#: templates/admin/domains.html:39 templates/admin/mailboxes.html:45
|
||||
msgid "MB"
|
||||
msgstr "Mo"
|
||||
|
||||
#: templates/admin/domains.html:40 templates/admin/mailboxes.html:46
|
||||
msgid "yes,no"
|
||||
msgstr "oui,non"
|
||||
|
||||
#: templates/admin/editalias.html:13 templates/admin/editdomain.html:15
|
||||
#: templates/admin/editmailbox.html:16
|
||||
msgid "Update"
|
||||
msgstr "Mettre à jour"
|
||||
|
||||
#: templates/admin/layout.html:17
|
||||
msgid "Logout"
|
||||
msgstr "Déconnexion"
|
||||
|
||||
#: templates/admin/layout.html:29 templates/admin/newdomain.html:7
|
||||
msgid "New domain"
|
||||
msgstr "Nouveau domaine"
|
||||
|
||||
#: templates/admin/layout.html:35
|
||||
msgid "Domains"
|
||||
msgstr "Domaines"
|
||||
|
||||
#: templates/admin/layout.html:41
|
||||
msgid "Settings"
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: templates/admin/mailboxes.html:10
|
||||
msgid "No mailbox defined."
|
||||
msgstr "Aucun alias défini."
|
||||
|
||||
#: templates/admin/mailboxes.html:16
|
||||
msgid "Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: templates/admin/mailboxes.html:26
|
||||
msgid "Edit mailbox"
|
||||
msgstr "Editer la boite aux lettres"
|
||||
|
||||
#: templates/admin/mailboxes.html:31
|
||||
msgid "Delete mailbox"
|
||||
msgstr "Supprimer la boite aux lettres"
|
||||
|
||||
#: templates/admin/mailboxes.html:36
|
||||
msgid "Add new alias"
|
||||
msgstr "Ajouter un alias"
|
||||
|
||||
#: templates/admin/mailboxes.html:40
|
||||
msgid "Mailbox aliases"
|
||||
msgstr "Alias de cette boite aux lettres"
|
||||
|
||||
#: templates/admin/newalias.html:7
|
||||
msgid "New alias"
|
||||
msgstr "Nouvel alias"
|
||||
|
||||
#: templates/admin/newalias.html:14 templates/admin/newdomain.html:15
|
||||
#: templates/admin/newmailbox.html:16
|
||||
msgid "Create"
|
||||
msgstr "Créer"
|
||||
|
||||
#: templates/registration/login.html:8
|
||||
msgid "Welcome"
|
||||
msgstr "Bienvenue"
|
||||
|
||||
#: templates/registration/login.html:11
|
||||
msgid "Your username and password didn't match. Please try again."
|
||||
msgstr ""
|
||||
"Votre nom d'utilisateur et mot de passe ne correspondent pas. Veuillez "
|
||||
"réessayer."
|
||||
+8
-11
@@ -13,26 +13,23 @@ window.addEvent('domready', function() {
|
||||
// };
|
||||
|
||||
if ($$("a[name=deleteDom]"))
|
||||
$$("a[name=deleteDom]").addEvent('click', function(event) {
|
||||
if (!confirm("Delete this domain?"))
|
||||
event.stop();
|
||||
});
|
||||
|
||||
$$("a[name=deleteDom]").addEvent('click', function(event) {
|
||||
if (!confirm(gettext("Delete this domain?")))
|
||||
event.stop();
|
||||
});
|
||||
|
||||
if ($$("a[name=deleteMb]"))
|
||||
$$("a[name=deleteMb]").addEvent('click', function(event) {
|
||||
if (!confirm("Delete this mailbox?"))
|
||||
if (!confirm(gettext("Delete this mailbox?")))
|
||||
event.stop();
|
||||
});
|
||||
|
||||
if ($$("a[name=deleteAlias]"))
|
||||
$$("a[name=deleteAlias]").addEvent('click', function(event) {
|
||||
if (!confirm("Delete this alias?"))
|
||||
if (!confirm(gettext("Delete this alias?")))
|
||||
event.stop();
|
||||
});
|
||||
|
||||
handlers['deleteDom'] = function(obj, target) {
|
||||
return confirm("Supprimer ce domaine?");
|
||||
}
|
||||
|
||||
$('body').addEvent('click', function(event) {
|
||||
target = event.target;
|
||||
@@ -89,4 +86,4 @@ loadPage = function(url, destination, callback) {
|
||||
new Request({url: url, method: "get", onSuccess: function(data) {
|
||||
$(destination).set('html', data);
|
||||
}}).send();
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block domcontent %}
|
||||
{% load i18n %}
|
||||
{% if not aliases %}
|
||||
<p>No alias defined.</p>
|
||||
<p>{% trans "No alias defined." %}</p>
|
||||
{% else %}
|
||||
<table>
|
||||
<tr>
|
||||
@@ -21,11 +22,11 @@
|
||||
{% url admin.views.editalias domain.id alias.id as edit_url %}
|
||||
<a href="{{ edit_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:190}}">
|
||||
<img src="/static/pics/edit.png" border="0" title="Edit alias"/>
|
||||
<img src="/static/pics/edit.png" border="0" title="{% trans 'Edit alias' %}"/>
|
||||
</a>
|
||||
{% url admin.views.delalias domain.id alias.id as del_url %}
|
||||
<a href="{{ del_url }}" name="deleteAlias">
|
||||
<img src="/static/pics/remove.png" border="0" title="Delete alias" />
|
||||
<img src="/static/pics/remove.png" border="0" title="{% trans 'Delete alias' %}" />
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ alias.address }}@{{ alias.mbox.domain.name }}</td>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<script src="/static/js/domains.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block mainframe %}
|
||||
{% load i18n %}
|
||||
<div class="header">
|
||||
<h1>Domain {{ domain.name }}</h1>
|
||||
<h1>{% trans "Domain" %} {{ domain.name }}</h1>
|
||||
</div>
|
||||
|
||||
<div id="menubar" class="menu2">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% url admin.views.editdomain domain_id as edit_url %}
|
||||
{% url admin.views.newmailbox domain_id as new_url %}
|
||||
{% url admin.views.mailboxes domain_id as mboxes_url %}
|
||||
@@ -8,20 +9,20 @@
|
||||
<a href="{{ new_url }}"
|
||||
class="boxed" rel="{handler:'iframe',size:{x:300,y:280}}">
|
||||
<img src="/static/pics/add.png" border="0" />
|
||||
New mailbox
|
||||
{% trans "New mailbox" %}
|
||||
</a>
|
||||
</li>
|
||||
<li {% ifequal selection "mailboxes" %}class="selected"{% endifequal %}>
|
||||
<a href="{{ mboxes_url }}">
|
||||
<img src="/static/pics/mailbox.png" border="0"/>
|
||||
Mailboxes</a></li>
|
||||
{% trans "Mailboxes" %}</a></li>
|
||||
<li {% ifequal selection "aliases" %}class="selected"{% endifequal %}>
|
||||
<a href="{{ aliases_url }}">
|
||||
<img src="/static/pics/alias.png" border="0"/>
|
||||
Aliases</a></li>
|
||||
{% trans "Aliases" %}</a></li>
|
||||
<li>
|
||||
<a href="{{ edit_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:180}}">
|
||||
<img src="/static/pics/edit.png" border="0"/>
|
||||
Properties</a></li>
|
||||
{% trans "Properties" %}</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
<script src="/static/js/domains.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block mainframe %}
|
||||
{% load i18n %}
|
||||
<div class="header">
|
||||
<h1>Available domains</h1>
|
||||
<h1>{% trans "Available domains" %}</h1>
|
||||
</div>
|
||||
|
||||
<div id="domcontent">
|
||||
{% if not domains %}
|
||||
No domain defined.
|
||||
{% trans "No domain defined." %}
|
||||
{% else %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="50px">Actions</th>
|
||||
<th width="80px">Name</th>
|
||||
<th width="50px">Mailboxes</th>
|
||||
<th width="50px">Quota</th>
|
||||
<th width="50px">Enabled</th>
|
||||
<th width="50px">{% trans "Actions" %}</th>
|
||||
<th width="80px">{% trans "Name" %}</th>
|
||||
<th width="50px">{% trans "Mailboxes" %}</th>
|
||||
<th width="50px">{% trans "Quota" %}</th>
|
||||
<th width="50px">{% trans "Enabled" %}</th>
|
||||
</tr>
|
||||
{% for dom in domains %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
@@ -25,18 +26,18 @@
|
||||
{% url admin.views.editdomain dom.id as edit_url %}
|
||||
<a href="{{ edit_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:180}}">
|
||||
<img src="/static/pics/edit.png" border="0" title="Edit domain"/>
|
||||
<img src="/static/pics/edit.png" border="0" title="{% trans 'Edit domain' %}"/>
|
||||
</a>
|
||||
{% url admin.views.deldomain dom.id as del_url %}
|
||||
<a href="{{ del_url }}" name="deleteDom">
|
||||
<img src="/static/pics/remove.png" border="0" title="Delete domain"/>
|
||||
<img src="/static/pics/remove.png" border="0" title="{% trans 'Delete domain' %}"/>
|
||||
</a>
|
||||
</td>
|
||||
{% url admin.views.mailboxes dom.id as domurl %}
|
||||
<td><a name="loadDom" href="{{ domurl }}">{{ dom.name }}</a></td>
|
||||
<td>{{ dom.mboxcounter }}</td>
|
||||
<td>{{ dom.quota }} MB</td>
|
||||
<td>{{ dom.enabled|yesno }}</td>
|
||||
<td>{{ dom.quota }} {% trans "MB" %}</td>
|
||||
<td>{{ dom.enabled|yesno:_("yes,no") }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{% include "admin/genericform.html" %}
|
||||
<div class="spacer"></div>
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" name="submit" value="Update" />
|
||||
<input type="submit" name="submit" value="{% trans 'Update' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<script src="/static/js/form.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="title"><h1>Domain {{ domain.name }}</h1></div>
|
||||
{% load i18n %}
|
||||
<div class="title"><h1>{% trans "Domain" %} {{ domain.name }}</h1></div>
|
||||
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
{% url admin.views.editdomain domain.id as dom_url %}
|
||||
@@ -11,7 +12,7 @@
|
||||
{% include "admin/genericform.html" %}
|
||||
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" class="button" name="submit" value="Update" />
|
||||
<input type="submit" class="button" name="submit" value="{% trans 'Update' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% extends "admin/layout_simple.html" %}
|
||||
{% load i18n %}
|
||||
{% block html_head %}
|
||||
<script src="/static/js/form.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
@@ -12,7 +13,7 @@
|
||||
<div class="spacer"></div>
|
||||
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" name="submit" value="Update" />
|
||||
<input type="submit" name="submit" value="{% trans 'Update' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
{% load i18n %}
|
||||
{% url admin.views.domains as dom_url %}
|
||||
<div id="body">
|
||||
<div id="leftcol">
|
||||
@@ -13,7 +14,7 @@
|
||||
<li>
|
||||
{% url django.contrib.auth.views.logout_then_login as logout_url %}
|
||||
<a href="{{ logout_url }}">
|
||||
<img src="/static/pics/logout.png" border="0" />Logout</a>
|
||||
<img src="/static/pics/logout.png" border="0" />{% trans "Logout" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -25,18 +26,20 @@
|
||||
<a href="{{ newdom_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:200}}">
|
||||
<img src="/static/pics/add.png" border="0"/>
|
||||
New domain
|
||||
{% trans "New domain" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a name="loadContent" href="{{ dom_url }}">
|
||||
<img src="/static/pics/domains.png" border="0"/>
|
||||
Domains</a>
|
||||
{% trans "Domains" %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a name="loadContent" href="">
|
||||
<img src="/static/pics/settings.png" border="0"/>
|
||||
Settings</a>
|
||||
{% trans "Settings" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block domcontent %}
|
||||
{% load i18n %}
|
||||
{% if not mailboxes %}
|
||||
<p>No mailbox defined.</p>
|
||||
<p>{% trans "No mailbox defined." %}</p>
|
||||
{% else %}
|
||||
<table>
|
||||
<tr>
|
||||
<th width="80px">Actions</th>
|
||||
<th width="130px">Name</th>
|
||||
<th width="170px">Address</th>
|
||||
<th width="60px">Quota</th>
|
||||
<th width="50px">Enabled</th>
|
||||
<th width="80px">{% trans "Actions" %}</th>
|
||||
<th width="130px">{% trans "Name" %}</th>
|
||||
<th width="170px">{% trans "Address" %}</th>
|
||||
<th width="60px">{% trans "Quota" %}</th>
|
||||
<th width="50px">{% trans "Enabled" %}</th>
|
||||
</tr>
|
||||
{% for mb in mailboxes %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
@@ -22,27 +23,27 @@
|
||||
{% url admin.views.editmailbox domain.id mb.id as edit_url %}
|
||||
<a href="{{ edit_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:280}}">
|
||||
<img src="/static/pics/edit.png" border="0" title="Edit mailbox"/>
|
||||
<img src="/static/pics/edit.png" border="0" title="{% trans 'Edit mailbox' %}"/>
|
||||
</a>
|
||||
{% url admin.views.delmailbox domain.id mb.id as del_url %}
|
||||
<a href="{{ del_url }}" name="deleteMb">
|
||||
<img src="/static/pics/remove.png" border="0"
|
||||
title="Delete mailbox" />
|
||||
title="{% trans 'Delete mailbox' %}" />
|
||||
</a>
|
||||
{% url admin.views.newalias domain.id mb.id as alias_url %}
|
||||
<a href="{{ alias_url }}" class="boxed"
|
||||
rel="{handler:'iframe',size:{x:300,y:190}}">
|
||||
<img src="/static/pics/add.png" border="0" title="Add new alias"/>
|
||||
<img src="/static/pics/add.png" border="0" title="{% trans 'Add new alias' %}"/>
|
||||
</a>
|
||||
{% url mbox-aliases domain.id mb.id as aliases_url %}
|
||||
<a href="{{ aliases_url }}">
|
||||
<img src="/static/pics/alias.png" border="0" title="Mailbox aliases"/>
|
||||
<img src="/static/pics/alias.png" border="0" title="{% trans 'Mailbox aliases' %}"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ mb.name }}</td>
|
||||
<td>{{ mb.address }}@{{ mb.domain.name }}</td>
|
||||
<td>{{ mb.quota }} MB</td>
|
||||
<td>{{ mb.user.is_active|yesno }}</td>
|
||||
<td>{{ mb.quota }} {% trans "MB" %}</td>
|
||||
<td>{{ mb.user.is_active|yesno:_("yes,no") }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{% extends "admin/layout_simple.html" %}
|
||||
{% load i18n %}
|
||||
{% block html_head %}
|
||||
<script src="/static/js/form.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="title"><h1>New alias</h1></div>
|
||||
<div class="title"><h1>{% trans "New alias" %}</h1></div>
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
{% url admin.views.newalias mbox.domain_id mbox.id as box_url %}
|
||||
<form action="{{ box_url }}" method="POST" id="aliasform" name="aliasform">
|
||||
{% include "admin/genericform.html" %}
|
||||
<div class="spacer"></div>
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" name="submit" value="Create" />
|
||||
<input type="submit" name="submit" value="{% trans 'Create' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<script src="/static/js/form.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="title"><h1>New domain</h1></div>
|
||||
{% load i18n %}
|
||||
<div class="title"><h1>{% trans "New domain" %}</h1></div>
|
||||
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
{% url admin.views.newdomain as dom_url %}
|
||||
@@ -11,8 +12,8 @@
|
||||
{% include "admin/genericform.html" %}
|
||||
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" class="button" name="submit" value="Create" />
|
||||
<input type="submit" class="button" name="submit" value="{% trans 'Create' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
²
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{% extends "admin/layout_simple.html" %}
|
||||
{% load i18n %}
|
||||
{% block html_head %}
|
||||
<script src="/static/js/form.js" type="text/javascript"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="title"><h1>New mailbox</h1></div>
|
||||
<div class="title"><h1>{% trans "New mailbox" %}</h1></div>
|
||||
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
{% url admin.views.newmailbox domain.id as box_url %}
|
||||
@@ -12,7 +13,7 @@
|
||||
<div class="spacer"></div>
|
||||
|
||||
<div class="lastrow" align="center">
|
||||
<input type="submit" name="submit" value="Create" />
|
||||
<input type="submit" name="submit" value="{% trans 'Create' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% load i18n %}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -8,6 +9,8 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/stylesheets/SqueezeBox.css" />
|
||||
<script src="/static/js/mootools.js" type="text/javascript"></script>
|
||||
<script src="/static/js/SqueezeBox.js" type="text/javascript"></script>
|
||||
{% url django.views.i18n.javascript_catalog as catalog_url %}
|
||||
<script type="text/javascript" src="{{ catalog_url }}"></script>
|
||||
{%block html_head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{% extends "layout.html" %}
|
||||
{% load i18n %}
|
||||
{% block html_head %}
|
||||
<link rel="stylesheet" type="text/css" href="/static/stylesheets/box.css" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="loginbox">
|
||||
<h3>Welcome</h3>
|
||||
<h3>{% trans "Welcome" %}</h3>
|
||||
{% if form.errors %}
|
||||
<div class="error">
|
||||
<p>Your username and password didn't match. Please try again.</p>
|
||||
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form method="post" action=".">
|
||||
|
||||
@@ -18,7 +18,9 @@ urlpatterns = patterns('',
|
||||
|
||||
(r'^mailng/admin/', include('mailng.admin.urls')),
|
||||
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
|
||||
(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login')
|
||||
(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login'),
|
||||
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog',
|
||||
{'packages': ('mailng',),})
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
|
||||
Reference in New Issue
Block a user