mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
* Many changes about internationalization (using gettext_noop when needed for example)
* Some strings were not detected by makemessages (for example in javascript files, behind comments...). There are still some issues with that but I think I'll have to wait a future Django release. * Support for per-user language selection is almost done. see #166
This commit is contained in:
+27
-37
@@ -2,7 +2,7 @@
|
||||
from django import forms
|
||||
from modoboa.admin.models import *
|
||||
from modoboa.admin.lib import is_domain_admin
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.contrib.auth.models import User
|
||||
from modoboa.admin.templatetags.admin_extras import gender
|
||||
from modoboa.lib import tables
|
||||
@@ -48,17 +48,17 @@ class DomainAliasForm(ProxyForm):
|
||||
self.fields["target"].queryset = Domain.objects.filter(pk=self._domain.id)
|
||||
|
||||
class MailboxForm(ProxyForm):
|
||||
quota = forms.IntegerField(label=_("Quota"), required=False,
|
||||
help_text=_("Mailbox quota in MB (default to domain quota if blank)"))
|
||||
password1 = forms.CharField(label=_("Password"),
|
||||
quota = forms.IntegerField(label=ugettext_noop("Quota"), required=False,
|
||||
help_text=ugettext_noop("Mailbox quota in MB (default to domain quota if blank)"))
|
||||
password1 = forms.CharField(label=ugettext_noop("Password"),
|
||||
widget=forms.PasswordInput(render_value=True),
|
||||
help_text=_("Password used to log in"))
|
||||
password2 = forms.CharField(label=_("Confirmation"),
|
||||
help_text=ugettext_noop("Password used to log in"))
|
||||
password2 = forms.CharField(label=ugettext_noop("Confirmation"),
|
||||
widget=forms.PasswordInput(render_value=True),
|
||||
help_text=_("Password confirmation"))
|
||||
help_text=ugettext_noop("Password confirmation"))
|
||||
enabled = forms.BooleanField(label=gender("Enabled", "f"), required=False,
|
||||
initial=True,
|
||||
help_text=_("Check to activate this mailbox"))
|
||||
help_text=ugettext_noop("Check to activate this mailbox"))
|
||||
|
||||
class Meta:
|
||||
model = Mailbox
|
||||
@@ -100,8 +100,8 @@ class MailboxForm(ProxyForm):
|
||||
return m
|
||||
|
||||
class AliasForm(ProxyForm):
|
||||
targets = forms.CharField(label=_("Target(s)"), required=False,
|
||||
help_text=_("Mailbox(es) this alias will point to"))
|
||||
targets = forms.CharField(label=ugettext_noop("Target(s)"), required=False,
|
||||
help_text=ugettext_noop("Mailbox(es) this alias will point to"))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AliasForm, self).__init__(*args, **kwargs)
|
||||
@@ -176,36 +176,26 @@ class AliasForm(ProxyForm):
|
||||
return a
|
||||
|
||||
class SuperAdminForm(forms.Form):
|
||||
user = forms.ModelChoiceField([], label=_("User"), required=True,
|
||||
empty_label=_("Select a user"),
|
||||
help_text=_("Select a user in the list"))
|
||||
|
||||
def __init__(self, user, *args, **kwargs):
|
||||
super(SuperAdminForm, self).__init__(*args, **kwargs)
|
||||
|
||||
self.fields["user"] = \
|
||||
forms.ModelChoiceField([], label=_("User"), required=True,
|
||||
empty_label=_("Select a user"),
|
||||
help_text=_("Select a user in the list"))
|
||||
self.fields["user"].queryset = User.objects.exclude(pk__in=[1, user.id])
|
||||
|
||||
class DomainAdminForm(forms.Form):
|
||||
domain = forms.ModelChoiceField(queryset=Domain.objects.all(), label=_("Domain"),
|
||||
required=True,
|
||||
empty_label=_("Select a domain"),
|
||||
help_text=_("Select a domain in the list"))
|
||||
user = forms.ChoiceField(label=_("User"), required=True,
|
||||
choices=[("", _("Empty"))],
|
||||
help_text=_("Select a user in the list"))
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DomainAdminForm, self).__init__(*args, **kwargs)
|
||||
|
||||
class SuperAdminsTable(tables.Table):
|
||||
idkey = "id"
|
||||
selection = tables.SelectionColumn("selection", width="4%", first=True)
|
||||
_1_user_name = tables.Column("user_name", label=_("User name"))
|
||||
_2_full_name = tables.Column("full_name", label=_("Full name"))
|
||||
_3_date_joined = tables.Column("date_joined", label=_("Defined"))
|
||||
_4_enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="10%")
|
||||
|
||||
class DomainAdminsTable(tables.Table):
|
||||
idkey = "id"
|
||||
selection = tables.SelectionColumn("selection", width="4%", first=True)
|
||||
_1_domain = tables.Column("domain", label=_("Domain"))
|
||||
_2_full_name = tables.Column("full_name", label=_("Full name"))
|
||||
_3_date_joined = tables.Column("date_joined", label=_("Defined"))
|
||||
_4_enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="10%")
|
||||
|
||||
self.fields["domain"] = \
|
||||
forms.ModelChoiceField(queryset=Domain.objects.all(),
|
||||
label=_("Domain"),
|
||||
required=True,
|
||||
empty_label=_("Select a domain"),
|
||||
help_text=_("Select a domain in the list"))
|
||||
self.fields["user"] = \
|
||||
forms.ChoiceField(label=_("User"), required=True,
|
||||
choices=[("", _("Empty"))],
|
||||
help_text=_("Select a user in the list"))
|
||||
|
||||
+25
-25
@@ -1,7 +1,7 @@
|
||||
# coding: utf-8
|
||||
from django.db import models, IntegrityError
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.conf import settings
|
||||
from modoboa.lib import parameters
|
||||
from modoboa.lib.sysutils import exec_cmd, exec_as_vuser
|
||||
@@ -74,11 +74,11 @@ class DatesAware(models.Model):
|
||||
last_modification = property(__last_modification)
|
||||
|
||||
class Domain(DatesAware):
|
||||
name = models.CharField(_('name'), max_length=100, unique=True,
|
||||
help_text=_("The domain name"))
|
||||
quota = models.IntegerField(help_text=_("Default quota in MB applied to mailboxes"))
|
||||
enabled = models.BooleanField(_('enabled'),
|
||||
help_text=_("Check to activate this domain"))
|
||||
name = models.CharField(ugettext_noop('name'), max_length=100, unique=True,
|
||||
help_text=ugettext_noop("The domain name"))
|
||||
quota = models.IntegerField(help_text=ugettext_noop("Default quota in MB applied to mailboxes"))
|
||||
enabled = models.BooleanField(ugettext_noop('enabled'),
|
||||
help_text=ugettext_noop("Check to activate this domain"))
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
@@ -131,12 +131,12 @@ class Domain(DatesAware):
|
||||
return self.name
|
||||
|
||||
class DomainAlias(DatesAware):
|
||||
name = models.CharField(_("name"), max_length=100, unique=True,
|
||||
help_text=_("The alias name"))
|
||||
target = models.ForeignKey(Domain, verbose_name=_('target'),
|
||||
help_text=_("The domain this alias points to"))
|
||||
enabled = models.BooleanField(_('enabled'),
|
||||
help_text=_("Check to activate this alias"))
|
||||
name = models.CharField(ugettext_noop("name"), max_length=100, unique=True,
|
||||
help_text=ugettext_noop("The alias name"))
|
||||
target = models.ForeignKey(Domain, verbose_name=ugettext_noop('target'),
|
||||
help_text=ugettext_noop("The domain this alias points to"))
|
||||
enabled = models.BooleanField(ugettext_noop('enabled'),
|
||||
help_text=ugettext_noop("Check to activate this alias"))
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
@@ -144,11 +144,11 @@ class DomainAlias(DatesAware):
|
||||
)
|
||||
|
||||
class Mailbox(DatesAware):
|
||||
name = models.CharField(_('name'), max_length=100,
|
||||
help_text=_("First name and last name of mailbox owner"))
|
||||
address = models.CharField(_('address'), max_length=100,
|
||||
help_text=_("Mailbox address (without the @domain.tld part)"))
|
||||
password = models.CharField(_('password'), max_length=100)
|
||||
name = models.CharField(ugettext_noop('name'), max_length=100,
|
||||
help_text=ugettext_noop("First name and last name of mailbox owner"))
|
||||
address = models.CharField(ugettext_noop('address'), max_length=100,
|
||||
help_text=ugettext_noop("Mailbox address (without the @domain.tld part)"))
|
||||
password = models.CharField(ugettext_noop('password'), max_length=100)
|
||||
quota = models.IntegerField()
|
||||
uid = models.IntegerField()
|
||||
gid = models.IntegerField()
|
||||
@@ -303,14 +303,14 @@ class Mailbox(DatesAware):
|
||||
}
|
||||
|
||||
class Alias(DatesAware):
|
||||
address = models.CharField(_('address'), max_length=254,
|
||||
help_text=_("The alias address (without the domain part). For a 'catch-all' address, just enter an * character."))
|
||||
address = models.CharField(ugettext_noop('address'), max_length=254,
|
||||
help_text=ugettext_noop("The alias address (without the domain part). For a 'catch-all' address, just enter an * character."))
|
||||
domain = models.ForeignKey(Domain)
|
||||
mboxes = models.ManyToManyField(Mailbox, verbose_name=_('mailboxes'),
|
||||
help_text=_("The mailboxes this alias points to"))
|
||||
mboxes = models.ManyToManyField(Mailbox, verbose_name=ugettext_noop('mailboxes'),
|
||||
help_text=ugettext_noop("The mailboxes this alias points to"))
|
||||
extmboxes = models.TextField(blank=True)
|
||||
enabled = models.BooleanField(_('enabled'),
|
||||
help_text=_("Check to activate this alias"))
|
||||
enabled = models.BooleanField(ugettext_noop('enabled'),
|
||||
help_text=ugettext_noop("Check to activate this alias"))
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
@@ -385,8 +385,8 @@ class Alias(DatesAware):
|
||||
|
||||
class Extension(models.Model):
|
||||
name = models.CharField(max_length=150)
|
||||
enabled = models.BooleanField(_('enabled'),
|
||||
help_text=_("Check to enable this extension"))
|
||||
enabled = models.BooleanField(ugettext_noop('enabled'),
|
||||
help_text=ugettext_noop("Check to enable this extension"))
|
||||
|
||||
def __getmodule(self):
|
||||
extname = "modoboa.extensions.%s" % self.name
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# coding: utf-8
|
||||
|
||||
import datetime
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.contrib.auth.models import User, Group
|
||||
from modoboa.lib.webutils import _render, getctx, _render_to_string
|
||||
from forms import *
|
||||
from tables import SuperAdminsTable, DomainAdminsTable
|
||||
|
||||
class Permissions(object):
|
||||
@staticmethod
|
||||
@@ -24,7 +25,7 @@ class Permissions(object):
|
||||
raise NotImplementedError
|
||||
|
||||
class SuperAdminsPerms(Permissions):
|
||||
title = _("Add super administrator")
|
||||
title = ugettext_noop("Add super administrator")
|
||||
role = "super_admins"
|
||||
|
||||
@staticmethod
|
||||
@@ -35,7 +36,7 @@ class SuperAdminsPerms(Permissions):
|
||||
form = SuperAdminForm(request.user)
|
||||
return _render(request, 'admin/add_permission.html', {
|
||||
"form" : form,
|
||||
"title" : self.title,
|
||||
"title" : _(self.title),
|
||||
"role": self.role
|
||||
})
|
||||
|
||||
@@ -51,7 +52,7 @@ class SuperAdminsPerms(Permissions):
|
||||
|
||||
content = _render_to_string(request, "admin/add_permission.html", {
|
||||
"form" : form,
|
||||
"title" : self.title,
|
||||
"title" : _(self.title),
|
||||
"role" : self.role
|
||||
})
|
||||
return False, getctx("ko", content=content)
|
||||
@@ -77,7 +78,7 @@ class SuperAdminsPerms(Permissions):
|
||||
|
||||
|
||||
class DomainAdminsPerms(Permissions):
|
||||
title = _("Add domain administrator")
|
||||
title = ugettext_noop("Add domain administrator")
|
||||
role = "domain_admins"
|
||||
|
||||
@staticmethod
|
||||
@@ -88,7 +89,7 @@ class DomainAdminsPerms(Permissions):
|
||||
form = DomainAdminForm()
|
||||
return _render(request, 'admin/add_domain_admin.html', {
|
||||
"form" : form,
|
||||
"title" : self.title,
|
||||
"title" : _(self.title),
|
||||
"role" : self.role
|
||||
})
|
||||
|
||||
@@ -106,7 +107,7 @@ class DomainAdminsPerms(Permissions):
|
||||
return True, None
|
||||
content = _render_to_string(request, "admin/add_domain_admin.html", {
|
||||
"form" : form,
|
||||
"title" : self.title,
|
||||
"title" : _(self.title),
|
||||
"role" : self.role
|
||||
})
|
||||
return False, getctx("ko", content=content)
|
||||
|
||||
+58
-33
@@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from modoboa.lib import tables
|
||||
from templatetags.admin_extras import *
|
||||
|
||||
@@ -7,20 +7,21 @@ class DomainsTable(tables.Table):
|
||||
tableid = "objects_table"
|
||||
idkey = "id"
|
||||
|
||||
name = tables.Column("name", label=_("Name"))
|
||||
creation = tables.Column("creation", label=_("Created"), width="160px")
|
||||
modified = tables.Column("last_modification", label=_("Last modified"),
|
||||
name = tables.Column("name", label=ugettext_noop("Name"))
|
||||
creation = tables.Column("creation", label=ugettext_noop("Created"), width="160px")
|
||||
modified = tables.Column("last_modification", label=ugettext_noop("Last modified"),
|
||||
width="160px")
|
||||
domaliases = tables.Column("domainalias_count", label=_("Domain aliases"),
|
||||
domaliases = tables.Column("domainalias_count", label=ugettext_noop("Domain aliases"),
|
||||
width="100px", align="center")
|
||||
mboxes = tables.Column("mailbox_count", label=_("Mailboxes"),
|
||||
mboxes = tables.Column("mailbox_count", label=ugettext_noop("Mailboxes"),
|
||||
width="100px", align="center")
|
||||
mbaliases = tables.Column("mbalias_counter", label=_("Mailbox aliases"),
|
||||
mbaliases = tables.Column("mbalias_counter", label=ugettext_noop("Mailbox aliases"),
|
||||
width="100px", align="center")
|
||||
quota = tables.Column("quota", label=_("Quota"), width="50px", align="center")
|
||||
enabled = tables.Column("enabled", label=_("Enabled"), width="50px",
|
||||
quota = tables.Column("quota", label=ugettext_noop("Quota"),
|
||||
width="50px", align="center")
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="50px",
|
||||
align="center")
|
||||
actions = tables.ActionColumn("actions", label=_("Actions"), width="50px",
|
||||
actions = tables.ActionColumn("actions", label=ugettext_noop("Actions"), width="50px",
|
||||
align="center", defvalue=domain_actions)
|
||||
|
||||
cols_order = ["name", "creation", "modified",
|
||||
@@ -41,15 +42,16 @@ class DomaliasesTable(tables.Table):
|
||||
tableid = "objects_table"
|
||||
idkey = "id"
|
||||
|
||||
name = tables.Column("name", label=_("Name"))
|
||||
target = tables.Column("target", label=_("Targeted domain"))
|
||||
creation = tables.Column("creation", label=_("Created"), width="170px")
|
||||
modified = tables.Column("last_modification", label=_("Last modified"),
|
||||
name = tables.Column("name", label=ugettext_noop("Name"))
|
||||
target = tables.Column("target", label=ugettext_noop("Targeted domain"))
|
||||
creation = tables.Column("creation", label=ugettext_noop("Created"), width="170px")
|
||||
modified = tables.Column("last_modification", label=ugettext_noop("Last modified"),
|
||||
width="170px")
|
||||
enabled = tables.Column("enabled", label=_("Enabled"), width="50px",
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="50px",
|
||||
align="center")
|
||||
actions = tables.ActionColumn("actions", label=_("Actions"), width="50px",
|
||||
align="center", defvalue=domalias_actions)
|
||||
actions = tables.ActionColumn("actions", label=ugettext_noop("Actions"),
|
||||
width="50px", align="center",
|
||||
defvalue=domalias_actions)
|
||||
|
||||
cols_order = ["name", "target", "creation",
|
||||
"modified", "enabled", "actions"]
|
||||
@@ -65,18 +67,20 @@ class MailboxesTable(tables.Table):
|
||||
tableid = "objects_table"
|
||||
idkey = "id"
|
||||
|
||||
address = tables.Column("address", label=_("Address"))
|
||||
name = tables.Column("name", label=_("Name"))
|
||||
creation = tables.Column("creation", label=_("Created"), width="160px")
|
||||
modified = tables.Column("last_modification", label=_("Last modified"),
|
||||
address = tables.Column("address", label=ugettext_noop("Address"))
|
||||
name = tables.Column("name", label=ugettext_noop("Name"))
|
||||
creation = tables.Column("creation", label=ugettext_noop("Created"),
|
||||
width="160px")
|
||||
aliases = tables.Column("alias_count", label=_("Aliases"), width="70px",
|
||||
modified = tables.Column("last_modification", label=ugettext_noop("Last modified"),
|
||||
width="160px")
|
||||
aliases = tables.Column("alias_count", label=ugettext_noop("Aliases"), width="70px",
|
||||
align="center")
|
||||
quota = tables.Column("quota", label=_("Quota"), width="50px", align="center")
|
||||
quota = tables.Column("quota", label=ugettext_noop("Quota"),
|
||||
width="50px", align="center")
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "f"), width="50px",
|
||||
align="center")
|
||||
actions = tables.ActionColumn("actions", label=_("Actions"), width="70px",
|
||||
align="center", defvalue=mailbox_actions)
|
||||
actions = tables.ActionColumn("actions", label=ugettext_noop("Actions"),
|
||||
width="70px", align="center", defvalue=mailbox_actions)
|
||||
|
||||
cols_order = ["address", "name", "creation", "modified", "aliases",
|
||||
"quota", "enabled", "actions"]
|
||||
@@ -95,14 +99,14 @@ class MbaliasesTable(tables.Table):
|
||||
tableid = "objects_table"
|
||||
idkey = "id"
|
||||
|
||||
address = tables.Column("full_address", label=_("Address"))
|
||||
targets = tables.Column("targets", label=_("Target(s)"), safe=True)
|
||||
creation = tables.Column("creation", label=_("Created"), width="170px")
|
||||
modified = tables.Column("last_modification", label=_("Last modified"),
|
||||
address = tables.Column("full_address", label=ugettext_noop("Address"))
|
||||
targets = tables.Column("targets", label=ugettext_noop("Target(s)"), safe=True)
|
||||
creation = tables.Column("creation", label=ugettext_noop("Created"), width="170px")
|
||||
modified = tables.Column("last_modification", label=ugettext_noop("Last modified"),
|
||||
width="170px")
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="50px",
|
||||
align="center")
|
||||
actions = tables.ActionColumn("actions", label=_("Actions"), width="50px",
|
||||
actions = tables.ActionColumn("actions", label=ugettext_noop("Actions"), width="50px",
|
||||
align="center", defvalue=mbalias_actions)
|
||||
|
||||
cols_order = ["address", "targets", "creation", "modified", "enabled", "actions"]
|
||||
@@ -120,8 +124,29 @@ class MbaliasesTable(tables.Table):
|
||||
class ExtensionsTable(tables.Table):
|
||||
idkey = "id"
|
||||
selection = tables.SelectionColumn("selection", width="4%", first=True)
|
||||
name = tables.Column("name", label=_("Name"), width="15%")
|
||||
version = tables.Column("version", label=_("Version"), width="6%")
|
||||
descr = tables.Column("description", label=_("Description"))
|
||||
name = tables.Column("name", label=ugettext_noop("Name"), width="15%")
|
||||
version = tables.Column("version", label=ugettext_noop("Version"), width="6%")
|
||||
descr = tables.Column("description", label=ugettext_noop("Description"))
|
||||
|
||||
cols_order = ["selection", "name", "version", "descr"]
|
||||
|
||||
class SuperAdminsTable(tables.Table):
|
||||
idkey = "id"
|
||||
selection = tables.SelectionColumn("selection", width="4%", first=True)
|
||||
user_name = tables.Column("user_name", label=ugettext_noop("User name"))
|
||||
full_name = tables.Column("full_name", label=ugettext_noop("Full name"))
|
||||
date_joined = tables.Column("date_joined", label=ugettext_noop("Defined"))
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="10%")
|
||||
|
||||
cols_order = ["selection", "user_name", "full_name", "date_joined", "enabled"]
|
||||
|
||||
class DomainAdminsTable(tables.Table):
|
||||
idkey = "id"
|
||||
selection = tables.SelectionColumn("selection", width="4%", first=True)
|
||||
domain = tables.Column("domain", label=ugettext_noop("Domain"))
|
||||
full_name = tables.Column("full_name", label=ugettext_noop("Full name"))
|
||||
date_joined = tables.Column("date_joined", label=ugettext_noop("Defined"))
|
||||
enabled = tables.Column("enabled", label=gender("Enabled", "m"), width="10%")
|
||||
|
||||
cols_order = ["selection", "domain", "full_name", "date_joined", "enabled"]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from django import template
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.core.urlresolvers import reverse
|
||||
from modoboa import admin
|
||||
from modoboa.lib import events
|
||||
@@ -9,7 +9,7 @@ from modoboa.lib.webutils import static_url, render_actions
|
||||
register = template.Library()
|
||||
|
||||
genders = {
|
||||
"Enabled" : (_("enabled_m"), _("enabled_f"))
|
||||
"Enabled" : (ugettext_noop("enabled_m"), ugettext_noop("enabled_f"))
|
||||
}
|
||||
|
||||
@register.simple_tag
|
||||
@@ -214,7 +214,7 @@ def loadadminextmenu(user):
|
||||
def param(app, definition):
|
||||
result = """<div class='row'>
|
||||
<label>%s</label>""" % (definition.has_key("label") \
|
||||
and definition["label"] or definition["name"])
|
||||
and _(definition["label"]) or definition["name"])
|
||||
name = "%s.%s" % (app, definition["name"])
|
||||
value = definition.has_key("value") \
|
||||
and definition["value"] or definition["deflt"]
|
||||
@@ -249,7 +249,7 @@ def param(app, definition):
|
||||
result += """
|
||||
<a href='%s' onclick='return false;' class='Tips' title='%s'>
|
||||
<img src='%s' border='0' />
|
||||
</a>""" % (definition["help"], _("Help"), static_url("pics/info.png"))
|
||||
</a>""" % (_(definition["help"]), _("Help"), static_url("pics/info.png"))
|
||||
result += """
|
||||
</div>
|
||||
"""
|
||||
|
||||
+1
-1
@@ -489,7 +489,7 @@ def permissions(request, tplname='admin/permissions.html'):
|
||||
permtables += [
|
||||
{"id" : "domain_admins",
|
||||
"title" : _("Domain administrators"),
|
||||
"rel" : "300 180",
|
||||
"rel" : "310 180",
|
||||
"content" : DomainAdminsPerms().get(request)}
|
||||
]
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ def dologin(request):
|
||||
if request.user.id != 1:
|
||||
request.session["password"] = encrypt(request.POST["password"])
|
||||
|
||||
request.session["django_language"] = \
|
||||
parameters.get_user(request.user, "LANG", app="general")
|
||||
|
||||
events.raiseEvent("UserLogin", request=request,
|
||||
username=request.POST["username"],
|
||||
password=request.POST["password"])
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
"""
|
||||
from django.conf.urls.defaults import *
|
||||
from django.utils.translation import ugettext as _, ungettext
|
||||
from django.utils.translation import ugettext_noop as _, ugettext
|
||||
from django.core.urlresolvers import reverse
|
||||
from modoboa.lib import events, parameters
|
||||
from modoboa.lib.webutils import static_url
|
||||
@@ -12,7 +12,7 @@ def infos():
|
||||
return {
|
||||
"name" : "Amavis quarantine",
|
||||
"version" : "1.0",
|
||||
"description" : _("Simple amavis quarantine management tool")
|
||||
"description" : ugettext("Simple amavis quarantine management tool")
|
||||
}
|
||||
|
||||
def init():
|
||||
@@ -33,11 +33,11 @@ def init():
|
||||
deflt=9998,
|
||||
help=_("PDP server port (if inet mode)"))
|
||||
parameters.register_admin("AM_PDP_SOCKET", type="string",
|
||||
deflt="/var/amavis/amavisd.sock",
|
||||
deflt=_("/var/amavis/amavisd.sock"),
|
||||
help=_("Path to the PDP server socket (if unix mode)"))
|
||||
|
||||
parameters.register_user("MESSAGES_PER_PAGE", type="int", deflt=40,
|
||||
label=_("Number of displayed emails per page"),
|
||||
label="Number of displayed emails per page",
|
||||
help=_("Sets the maximum number of messages displayed in a page"))
|
||||
|
||||
def destroy():
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from datetime import datetime
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.db.models import Q
|
||||
from modoboa.lib import tables
|
||||
from modoboa.lib.webutils import static_url
|
||||
@@ -18,10 +18,10 @@ class Qtable(tables.Table):
|
||||
label="<input type='checkbox' name='toggleselect' id='toggleselect' />",
|
||||
sortable=False)
|
||||
rstatus = tables.ImgColumn("rstatus", width='25px')
|
||||
from_ = tables.Column("from", label=_("From"), limit=30)
|
||||
subject = tables.Column("subject", label=_("Subject"), limit=40)
|
||||
time = tables.Column("date", label=_("Date"))
|
||||
to = tables.Column("to", label=_("To"), sortable=False)
|
||||
from_ = tables.Column("from", label=ugettext_noop("From"), limit=30)
|
||||
subject = tables.Column("subject", label=ugettext_noop("Subject"), limit=40)
|
||||
time = tables.Column("date", label=ugettext_noop("Date"))
|
||||
to = tables.Column("to", label=ugettext_noop("To"), sortable=False)
|
||||
|
||||
cols_order = []
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ functionality into Postfix.
|
||||
"""
|
||||
from django.conf.urls.defaults import include
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_noop as _, ugettext
|
||||
from modoboa.lib import events, parameters
|
||||
from modoboa.lib.webutils import static_url
|
||||
from models import *
|
||||
@@ -18,7 +18,7 @@ def infos():
|
||||
return {
|
||||
"name" : "Postfix autoreply",
|
||||
"version" : "1.0",
|
||||
"description" : _("Auto-reply (vacation) functionality using Postfix")
|
||||
"description" : ugettext("Auto-reply (vacation) functionality using Postfix")
|
||||
}
|
||||
|
||||
def init():
|
||||
@@ -57,7 +57,7 @@ def menu(**kwargs):
|
||||
"img" : static_url("pics/auto-reply.png"),
|
||||
"class" : "boxed",
|
||||
"rel" : "{handler:'iframe',size:{x:440,y:400}}",
|
||||
"label" : _("Auto-reply message")}
|
||||
"label" : ugettext("Auto-reply message")}
|
||||
]
|
||||
|
||||
def onCreateDomain(**kwargs):
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
from django import forms
|
||||
from django.http import QueryDict
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from modoboa.admin.templatetags.admin_extras import gender
|
||||
|
||||
class FiltersSetForm(forms.Form):
|
||||
name = forms.CharField()
|
||||
active = forms.BooleanField(label=gender("Active", "m"), required=False,
|
||||
initial=False,
|
||||
help_text=_("Check to activate this filters set"))
|
||||
|
||||
header_operators = [("contains", _("contains"), "string"),
|
||||
("notcontains", _("does not contain"), "string"),
|
||||
("is", _("is"), "string"),
|
||||
("isnot", _("is not"), "string")]
|
||||
help_text=ugettext_noop("Check to activate this filters set"))
|
||||
|
||||
class FilterForm(forms.Form):
|
||||
name = forms.CharField(label=_("Name"))
|
||||
match_type = forms.ChoiceField(choices=[("allof", _("All of the following")),
|
||||
("anyof", _("Any of the following")),
|
||||
("all", _("All messages"))],
|
||||
initial="anyof",
|
||||
widget=forms.RadioSelect)
|
||||
|
||||
cond_templates = [
|
||||
{"name" : "Subject", "label" : _("Subject"), "operators" : header_operators},
|
||||
{"name" : "From", "label" : _("Sender"), "operators" : header_operators},
|
||||
{"name" : "To", "label" : _("Recipient"), "operators" : header_operators},
|
||||
{"name" : "Cc", "label" : _("Cc"), "operators" : header_operators},
|
||||
{"name" : "size", "label" : _("Size"),
|
||||
"operators" : [("over", _("is greater than"), "number"),
|
||||
("under", _("is less than"), "number")]},
|
||||
]
|
||||
|
||||
action_templates = [
|
||||
{"name" : "fileinto", "label" : _("Move message to"),
|
||||
"args" : [{"type" : "list", "vloader" : "userfolders"}]},
|
||||
{"name" : "redirect", "label" : _("Redirect message to"),
|
||||
"args" : [{"type" : "string"}]},
|
||||
]
|
||||
|
||||
def __init__(self, conditions, actions, request, *args, **kwargs):
|
||||
super(FilterForm, self).__init__(*args, **kwargs)
|
||||
|
||||
self.fields["name"] = forms.CharField(label=_("Name"))
|
||||
self.fields["match_type"] = forms.ChoiceField(choices=[("allof", _("All of the following")),
|
||||
("anyof", _("Any of the following")),
|
||||
("all", _("All messages"))],
|
||||
initial="anyof",
|
||||
widget=forms.RadioSelect)
|
||||
|
||||
self.header_operators = [("contains", _("contains"), "string"),
|
||||
("notcontains", _("does not contain"), "string"),
|
||||
("is", _("is"), "string"),
|
||||
("isnot", _("is not"), "string")]
|
||||
|
||||
self.cond_templates = [
|
||||
{"name" : "Subject", "label" : _("Subject"), "operators" : self.header_operators},
|
||||
{"name" : "From", "label" : _("Sender"), "operators" : self.header_operators},
|
||||
{"name" : "To", "label" : _("Recipient"), "operators" : self.header_operators},
|
||||
{"name" : "Cc", "label" : _("Cc"), "operators" : self.header_operators},
|
||||
{"name" : "size", "label" : _("Size"),
|
||||
"operators" : [("over", _("is greater than"), "number"),
|
||||
("under", _("is less than"), "number")]},
|
||||
]
|
||||
|
||||
self.action_templates = [
|
||||
{"name" : "fileinto", "label" : _("Move message to"),
|
||||
"args" : [{"type" : "list", "vloader" : "userfolders"}]},
|
||||
{"name" : "redirect", "label" : _("Redirect message to"),
|
||||
"args" : [{"type" : "string"}]},
|
||||
]
|
||||
|
||||
self.conds_cnt = 0
|
||||
for c in conditions:
|
||||
getattr(self, "_build_%s_field" % c[0])(c[1], c[2])
|
||||
@@ -53,7 +53,7 @@ class FilterForm(forms.Form):
|
||||
targets = []
|
||||
ops = []
|
||||
vfield = None
|
||||
for tpl in FilterForm.cond_templates:
|
||||
for tpl in self.cond_templates:
|
||||
targets += [(tpl["name"], tpl["label"]),]
|
||||
if tpl["name"] != name:
|
||||
continue
|
||||
@@ -89,7 +89,7 @@ class FilterForm(forms.Form):
|
||||
def _build_action_field(self, request, name, value):
|
||||
actions = []
|
||||
args = None
|
||||
for tpl in FilterForm.action_templates:
|
||||
for tpl in self.action_templates:
|
||||
actions += [(tpl["name"], tpl["label"]),]
|
||||
if name == tpl["name"]:
|
||||
args = tpl["args"]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_noop as _, ugettext
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.conf.urls.defaults import include
|
||||
from modoboa.lib import events, parameters
|
||||
@@ -39,7 +39,7 @@ def infos():
|
||||
return {
|
||||
"name" : "Sieve filters",
|
||||
"version" : "1.0",
|
||||
"description" : _("Plugin to easily create server-side filters")
|
||||
"description" : ugettext("Plugin to easily create server-side filters")
|
||||
}
|
||||
|
||||
def urls(prefix):
|
||||
@@ -53,7 +53,7 @@ def menu(**kwargs):
|
||||
return []
|
||||
return [
|
||||
{"name" : "sievefilters",
|
||||
"label" : _("Message filters"),
|
||||
"label" : ugettext("Message filters"),
|
||||
"url" : reverse(views.index),
|
||||
"img" : static_url("pics/filters.png")}
|
||||
]
|
||||
|
||||
@@ -137,7 +137,7 @@ function savefs(evt) {
|
||||
* Remove the current filters set.
|
||||
*
|
||||
* On success, the user will be automatically redirected to the active
|
||||
* filters set. (FIXME: what happens when there is no more script?)
|
||||
* filters set.
|
||||
*/
|
||||
function removefs(evt) {
|
||||
if (!check_prereqs(evt, gettext("Remove filters set?"))) {
|
||||
|
||||
@@ -67,7 +67,7 @@ $(document).addEvent("domready", function() {
|
||||
<div class="title"><h1>{{ title }}</h1></div>
|
||||
<form action="{{ actionurl }}" method="POST" id="filterform" name="filterform">
|
||||
{% if oldname %}<input type="hidden" name="oldname" value="{{ oldname }}" />{% endif %}
|
||||
{{ form.name.label_tag }}:
|
||||
<label for="id_{{ form.name.html_name }}">{% trans form.name.label %}</label>:
|
||||
{{ form.name }}{% display_errors form.name.errors %}
|
||||
<h2>{% trans "Conditions" %}</h2>
|
||||
<div id="condlist">
|
||||
|
||||
@@ -41,8 +41,8 @@ def index(request, tplname="sievefilters/index.html"):
|
||||
@is_not_localadmin()
|
||||
def get_templates(request, ftype):
|
||||
if ftype == "condition":
|
||||
return ajax_simple_response(FilterForm.cond_templates)
|
||||
return ajax_simple_response(FilterForm.action_templates)
|
||||
return ajax_simple_response(FilterForm([], [], request).cond_templates)
|
||||
return ajax_simple_response(FilterForm([], [], request).action_templates)
|
||||
|
||||
@login_required
|
||||
@is_not_localadmin()
|
||||
|
||||
@@ -8,7 +8,7 @@ sent, received, bounced, rejected
|
||||
|
||||
"""
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_noop as _, ugettext
|
||||
from django.conf.urls.defaults import *
|
||||
from modoboa.lib import events, parameters
|
||||
from modoboa.lib.webutils import static_url
|
||||
@@ -17,7 +17,7 @@ def infos():
|
||||
return {
|
||||
"name" : "Statistics",
|
||||
"version" : "1.0",
|
||||
"description" : _("Graphical statistics about emails traffic using RRDtool")
|
||||
"description" : ugettext("Graphical statistics about emails traffic using RRDtool")
|
||||
}
|
||||
|
||||
def init():
|
||||
@@ -43,7 +43,7 @@ def menu(**kwargs):
|
||||
if kwargs["target"] == "admin_menu_box":
|
||||
return [
|
||||
{"name" : "stats",
|
||||
"label" : _("Statistics"),
|
||||
"label" : ugettext("Statistics"),
|
||||
"url" : reverse('fullindex'),
|
||||
"img" : static_url("pics/graph.png")}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h2>{% trans "Custom period : from" %} {{ start }} {% trans "to" %} {{ end }}</h2>
|
||||
{% endif %}
|
||||
{% for elems in graphs %}
|
||||
<h3>{{ elems.label }}</h3>
|
||||
<h3>{% trans elems.label %}</h3>
|
||||
<p><img src="{{ MEDIA_URL }}stats/{{ elems.name }}_{{ domain }}_AVERAGE_{% ifequal period 'custom' %}{{ period_name }}{% else %}{{ period }}{% endifequal %}.png"
|
||||
alt="{% trans 'No statistics available' %}" /></p>
|
||||
{% endfor %}
|
||||
|
||||
@@ -99,7 +99,7 @@ window.addEvent("domready", function() {
|
||||
<label for="period">{% trans "Period:" %}</label>
|
||||
<select id="period" name="period">
|
||||
{% for p in periods %}
|
||||
<option value="{{ p.name }}" {% ifequal p.name period %}selected{% endifequal %}>{{ p.label }}</option>
|
||||
<option value="{{ p.name }}" {% ifequal p.name period %}selected{% endifequal %}>{% trans p.label %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from django.utils import simplejson
|
||||
from modoboa.lib.webutils import _render, _render_to_string, getctx
|
||||
from modoboa.admin.views import good_domain
|
||||
@@ -12,14 +12,14 @@ from django.contrib.auth.decorators \
|
||||
from modoboa.extensions.stats.grapher import *
|
||||
|
||||
graph_types = ['AVERAGE', 'MAX']
|
||||
graph_list = [{"name" : "traffic", "label" : _("Average normal traffic")},
|
||||
{"name" : "badtraffic", "label" : _("Average bad traffic")},
|
||||
{"name" : "size", "label" : _("Average normal traffic size")}]
|
||||
periods = [{"name" : "day", "label" : _("Day")},
|
||||
{"name" : "week", "label" : _("Week")},
|
||||
{"name" : "month", "label" : _("Month")},
|
||||
{"name" : "year", "label" : _("Year")},
|
||||
{"name" : "custom", "label" : _("Custom")}]
|
||||
graph_list = [{"name" : "traffic", "label" : ugettext_noop("Average normal traffic")},
|
||||
{"name" : "badtraffic", "label" : ugettext_noop("Average bad traffic")},
|
||||
{"name" : "size", "label" : ugettext_noop("Average normal traffic size")}]
|
||||
periods = [{"name" : "day", "label" : ugettext_noop("Day")},
|
||||
{"name" : "week", "label" : ugettext_noop("Week")},
|
||||
{"name" : "month", "label" : ugettext_noop("Month")},
|
||||
{"name" : "year", "label" : ugettext_noop("Year")},
|
||||
{"name" : "custom", "label" : ugettext_noop("Custom")}]
|
||||
|
||||
@login_required
|
||||
@good_domain
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_noop as _
|
||||
|
||||
class ComposeMailForm(forms.Form):
|
||||
from_ = forms.CharField(label=_("From"))
|
||||
@@ -11,4 +11,4 @@ class FolderForm(forms.Form):
|
||||
name = forms.CharField()
|
||||
|
||||
class AttachmentForm(forms.Form):
|
||||
attachment = forms.FileField(label="")
|
||||
attachment = forms.FileField(label=_("Select a file"))
|
||||
|
||||
@@ -14,7 +14,7 @@ import email
|
||||
import lxml
|
||||
from django.core.files.uploadhandler import FileUploadHandler, StopUpload, SkipFile
|
||||
from django.http import HttpResponse
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop as __
|
||||
from django.conf import settings
|
||||
from modoboa.lib import u2u_decode, tables, imap_utf7, parameters
|
||||
from modoboa.lib.webutils import static_url, size2integer
|
||||
@@ -39,14 +39,15 @@ class WebmailError(Exception):
|
||||
class WMtable(tables.Table):
|
||||
tableid = "emails"
|
||||
idkey = "imapid"
|
||||
_0_select = tables.ImgColumn("select", cssclass="draggable left", width="1%",
|
||||
defvalue="%spics/grippy.png" % settings.MEDIA_URL,
|
||||
header="<input type='checkbox' name='toggleselect' id='toggleselect' />")
|
||||
_1_flags = tables.ImgColumn("flags", width="4%")
|
||||
_2_subject = tables.Column("subject", label=_("Subject"), width="50%")
|
||||
_3_from_ = tables.Column("from", width="20%", label=_("From"))
|
||||
_4_date = tables.Column("date", width="20%", label=_("Date"))
|
||||
select = tables.ImgColumn("select", cssclass="draggable left", width="1%",
|
||||
defvalue="%spics/grippy.png" % settings.MEDIA_URL,
|
||||
header="<input type='checkbox' name='toggleselect' id='toggleselect' />")
|
||||
flags = tables.ImgColumn("flags", width="4%")
|
||||
subject = tables.Column("subject", label=__("Subject"), width="50%")
|
||||
from_ = tables.Column("from", width="20%", label=__("From"))
|
||||
date = tables.Column("date", width="20%", label=__("Date"))
|
||||
|
||||
cols_order = ["select", "flags", "subject", "from_", "date"]
|
||||
|
||||
def parse(self, header, value):
|
||||
try:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_noop as _, ugettext
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.conf.urls.defaults import include
|
||||
from modoboa.lib import events, parameters
|
||||
@@ -73,7 +73,7 @@ def infos():
|
||||
return {
|
||||
"name" : "Webmail",
|
||||
"version" : "1.0",
|
||||
"description" : _("Simple IMAP webmail")
|
||||
"description" : ugettext("Simple IMAP webmail")
|
||||
}
|
||||
|
||||
def urls(prefix):
|
||||
|
||||
@@ -29,4 +29,8 @@
|
||||
img {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
div.row label {
|
||||
width: 150px;
|
||||
}
|
||||
@@ -9,11 +9,7 @@
|
||||
{% trans "Attachments" %}
|
||||
</div>
|
||||
<div id="list">
|
||||
{% blocktrans count attachments|length as counter %}
|
||||
{{ counter }} file
|
||||
{% plural %}
|
||||
{{ counter }} files
|
||||
{% endblocktrans %}
|
||||
{% blocktrans count attachments|length as counter %}{{ counter }} file{% plural %}{{ counter }} files{% endblocktrans %}
|
||||
<span class="shortlist">{{ short_att_list }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,5 +15,3 @@ class ExtControlMiddleware(object):
|
||||
if ext.enabled:
|
||||
return None
|
||||
raise Http404
|
||||
|
||||
|
||||
|
||||
+10
-2
@@ -61,11 +61,19 @@ def __guess_extension():
|
||||
return None
|
||||
|
||||
def register_admin(name, **kwargs):
|
||||
app = kwargs.has_key("app") and kwargs["app"] or __guess_extension()
|
||||
if kwargs.has_key("app"):
|
||||
app = kwargs["app"]
|
||||
del kwargs["app"]
|
||||
else:
|
||||
app = __guess_extension()
|
||||
return __register(app, 'A', name, **kwargs)
|
||||
|
||||
def register_user(name, **kwargs):
|
||||
app = kwargs.has_key("app") and kwargs["app"] or __guess_extension()
|
||||
if kwargs.has_key("app"):
|
||||
app = kwargs["app"]
|
||||
del kwargs["app"]
|
||||
else:
|
||||
app = __guess_extension()
|
||||
return __register(app, 'U', name, **kwargs)
|
||||
|
||||
def unregister_app(app):
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class Column:
|
||||
label = getattr(self, "label")
|
||||
except KeyError:
|
||||
label = getattr(self, "name")
|
||||
return label
|
||||
return _(label)
|
||||
|
||||
|
||||
class SelectionColumn(Column):
|
||||
|
||||
+421
-384
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Modoboa-0.8.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-25 09:58+0200\n"
|
||||
"POT-Creation-Date: 2011-09-14 14:06+0200\n"
|
||||
"PO-Revision-Date: 2011-07-10 07:30+0000\n"
|
||||
"Last-Translator: Patrick Ben Koetter <p@state-of-mind.de>\n"
|
||||
"Language-Team: DE <p@state-of-mind.fr>\n"
|
||||
@@ -17,11 +17,21 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:92
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:41
|
||||
#, fuzzy
|
||||
msgid "Delete this message?"
|
||||
msgstr "Diese Auswahl löschen?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:49
|
||||
#, fuzzy
|
||||
msgid "Release this message?"
|
||||
msgstr "Diese Auswahl freilassen?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:107
|
||||
msgid "Release this selection?"
|
||||
msgstr "Diese Auswahl freilassen?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:99
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:114
|
||||
msgid "Delete this selection?"
|
||||
msgstr "Diese Auswahl löschen?"
|
||||
|
||||
@@ -33,24 +43,34 @@ msgstr "Diesen Filter entfernen?"
|
||||
msgid "Save changes?"
|
||||
msgstr "Änderungen speichern?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:143
|
||||
#, fuzzy
|
||||
msgid "Remove filters set?"
|
||||
msgstr "Diesen Filter entfernen?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:161
|
||||
#, fuzzy
|
||||
msgid "Activate this filters set?"
|
||||
msgstr "Diesen Filter entfernen?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:169
|
||||
msgid "active"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:31
|
||||
msgid "Edit folder"
|
||||
msgstr "Ordner bearbeiten"
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:62
|
||||
#: extensions/webmail/static/js/fdmenu.js:63
|
||||
msgid "Folder deleted"
|
||||
msgstr "Ordner gelöscht"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:195
|
||||
msgid "Reloading..."
|
||||
msgstr "Aktualisiere..."
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:203
|
||||
#: extensions/webmail/static/js/webmail.js:227 static/js/anchor_nav.js:199
|
||||
#: extensions/webmail/static/js/webmail.js:226
|
||||
#: extensions/webmail/static/js/webmail.js:250 static/js/anchor_nav.js:212
|
||||
msgid "Done"
|
||||
msgstr "Abgeschlossen"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:216
|
||||
#: extensions/webmail/static/js/webmail.js:239
|
||||
msgid "Waiting..."
|
||||
msgstr "Warte..."
|
||||
|
||||
@@ -58,7 +78,7 @@ msgstr "Warte..."
|
||||
msgid "Loading..."
|
||||
msgstr "Lade..."
|
||||
|
||||
#: static/js/common.js:150
|
||||
#: static/js/common.js:172
|
||||
msgid "Search..."
|
||||
msgstr "Suchen..."
|
||||
|
||||
@@ -69,3 +89,6 @@ msgstr "Einstellungen gespeichert"
|
||||
#: static/js/settings.js:14
|
||||
msgid "Parameters saved"
|
||||
msgstr "Parameter gespeichert"
|
||||
|
||||
#~ msgid "Reloading..."
|
||||
#~ msgstr "Aktualisiere..."
|
||||
|
||||
+336
-283
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-25 09:58+0200\n"
|
||||
"POT-Creation-Date: 2011-09-14 14:06+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"
|
||||
@@ -17,11 +17,19 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:92
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:41
|
||||
msgid "Delete this message?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:49
|
||||
msgid "Release this message?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:107
|
||||
msgid "Release this selection?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:99
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:114
|
||||
msgid "Delete this selection?"
|
||||
msgstr ""
|
||||
|
||||
@@ -33,24 +41,32 @@ msgstr ""
|
||||
msgid "Save changes?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:143
|
||||
msgid "Remove filters set?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:161
|
||||
msgid "Activate this filters set?"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:169
|
||||
msgid "active"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:31
|
||||
msgid "Edit folder"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:62
|
||||
#: extensions/webmail/static/js/fdmenu.js:63
|
||||
msgid "Folder deleted"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:195
|
||||
msgid "Reloading..."
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:203
|
||||
#: extensions/webmail/static/js/webmail.js:227 static/js/anchor_nav.js:199
|
||||
#: extensions/webmail/static/js/webmail.js:226
|
||||
#: extensions/webmail/static/js/webmail.js:250 static/js/anchor_nav.js:212
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:216
|
||||
#: extensions/webmail/static/js/webmail.js:239
|
||||
msgid "Waiting..."
|
||||
msgstr ""
|
||||
|
||||
@@ -58,7 +74,7 @@ msgstr ""
|
||||
msgid "Loading..."
|
||||
msgstr ""
|
||||
|
||||
#: static/js/common.js:150
|
||||
#: static/js/common.js:172
|
||||
msgid "Search..."
|
||||
msgstr ""
|
||||
|
||||
|
||||
+363
-297
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Modoboa-0.8.5\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-25 09:58+0200\n"
|
||||
"POT-Creation-Date: 2011-09-14 14:06+0200\n"
|
||||
"PO-Revision-Date: 2011-07-08 09:04+0000\n"
|
||||
"Last-Translator: Pedro Gracia <pedro.gracia@impulzia.com>\n"
|
||||
"Language-Team: Español <i18n@impulzia.com>\n"
|
||||
@@ -17,11 +17,21 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:92
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:41
|
||||
#, fuzzy
|
||||
msgid "Delete this message?"
|
||||
msgstr "¿Eliminar esta selección?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:49
|
||||
#, fuzzy
|
||||
msgid "Release this message?"
|
||||
msgstr "¿Publicar esta selección?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:107
|
||||
msgid "Release this selection?"
|
||||
msgstr "¿Publicar esta selección?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:99
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:114
|
||||
msgid "Delete this selection?"
|
||||
msgstr "¿Eliminar esta selección?"
|
||||
|
||||
@@ -33,24 +43,34 @@ msgstr "¿Eliminar este filtro?"
|
||||
msgid "Save changes?"
|
||||
msgstr "¿Guardar cambios?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:143
|
||||
#, fuzzy
|
||||
msgid "Remove filters set?"
|
||||
msgstr "¿Eliminar este filtro?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:161
|
||||
#, fuzzy
|
||||
msgid "Activate this filters set?"
|
||||
msgstr "¿Eliminar este filtro?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:169
|
||||
msgid "active"
|
||||
msgstr ""
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:31
|
||||
msgid "Edit folder"
|
||||
msgstr "Editar carpeta"
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:62
|
||||
#: extensions/webmail/static/js/fdmenu.js:63
|
||||
msgid "Folder deleted"
|
||||
msgstr "Carpeta eliminada"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:195
|
||||
msgid "Reloading..."
|
||||
msgstr "Recargando..."
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:203
|
||||
#: extensions/webmail/static/js/webmail.js:227 static/js/anchor_nav.js:199
|
||||
#: extensions/webmail/static/js/webmail.js:226
|
||||
#: extensions/webmail/static/js/webmail.js:250 static/js/anchor_nav.js:212
|
||||
msgid "Done"
|
||||
msgstr "Hecho"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:216
|
||||
#: extensions/webmail/static/js/webmail.js:239
|
||||
msgid "Waiting..."
|
||||
msgstr "Esperando..."
|
||||
|
||||
@@ -58,7 +78,7 @@ msgstr "Esperando..."
|
||||
msgid "Loading..."
|
||||
msgstr "Cargando..."
|
||||
|
||||
#: static/js/common.js:150
|
||||
#: static/js/common.js:172
|
||||
msgid "Search..."
|
||||
msgstr "Buscar..."
|
||||
|
||||
@@ -69,3 +89,6 @@ msgstr "Preferencias guardas"
|
||||
#: static/js/settings.js:14
|
||||
msgid "Parameters saved"
|
||||
msgstr "Parámetros guardados"
|
||||
|
||||
#~ msgid "Reloading..."
|
||||
#~ msgstr "Recargando..."
|
||||
|
||||
+337
-282
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: modoboa-0.8.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-25 09:58+0200\n"
|
||||
"POT-Creation-Date: 2011-09-14 14:06+0200\n"
|
||||
"PO-Revision-Date: 2011-01-07 10:00+0100\n"
|
||||
"Last-Translator: Antoine Nguyen <tonio@ngyn.org>\n"
|
||||
"Language-Team: FR <tonio@ngyn.org>\n"
|
||||
@@ -16,40 +16,56 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:92
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:41
|
||||
msgid "Delete this message?"
|
||||
msgstr "Supprimer ce message?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:49
|
||||
msgid "Release this message?"
|
||||
msgstr "Relâcher cette message?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:107
|
||||
msgid "Release this selection?"
|
||||
msgstr "Relâcher cette sélection?"
|
||||
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:99
|
||||
#: extensions/amavis_quarantine/static/js/quarantine.js:114
|
||||
msgid "Delete this selection?"
|
||||
msgstr "Supprimer cette sélection?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:14
|
||||
msgid "Remove this filter?"
|
||||
msgstr "Supprimer ce filtre"
|
||||
msgstr "Supprimer ce filtre?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:116
|
||||
msgid "Save changes?"
|
||||
msgstr "Sauvegarder les changements?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:143
|
||||
msgid "Remove filters set?"
|
||||
msgstr "Supprimer ce jeu de filtres?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:161
|
||||
msgid "Activate this filters set?"
|
||||
msgstr "Activer ce jeu de filtres?"
|
||||
|
||||
#: extensions/sievefilters/static/js/lib.js:169
|
||||
msgid "active"
|
||||
msgstr "actif"
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:31
|
||||
msgid "Edit folder"
|
||||
msgstr "Editer le dossier"
|
||||
|
||||
#: extensions/webmail/static/js/fdmenu.js:62
|
||||
#: extensions/webmail/static/js/fdmenu.js:63
|
||||
msgid "Folder deleted"
|
||||
msgstr "Dossier supprimé"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:195
|
||||
msgid "Reloading..."
|
||||
msgstr "Rechargement..."
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:203
|
||||
#: extensions/webmail/static/js/webmail.js:227 static/js/anchor_nav.js:199
|
||||
#: extensions/webmail/static/js/webmail.js:226
|
||||
#: extensions/webmail/static/js/webmail.js:250 static/js/anchor_nav.js:212
|
||||
msgid "Done"
|
||||
msgstr "Effectué"
|
||||
|
||||
#: extensions/webmail/static/js/webmail.js:216
|
||||
#: extensions/webmail/static/js/webmail.js:239
|
||||
msgid "Waiting..."
|
||||
msgstr "En attente..."
|
||||
|
||||
@@ -57,7 +73,7 @@ msgstr "En attente..."
|
||||
msgid "Loading..."
|
||||
msgstr "Chargement..."
|
||||
|
||||
#: static/js/common.js:150
|
||||
#: static/js/common.js:172
|
||||
msgid "Search..."
|
||||
msgstr "Chercher..."
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ div#footer {
|
||||
#menubar {
|
||||
margin: 5px;
|
||||
display: table;
|
||||
width: 730px;
|
||||
width: 735px;
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ div#footer {
|
||||
.menubar li {
|
||||
float: left;
|
||||
display: inline;
|
||||
margin: 5px 5px;
|
||||
margin: 4px 4px;
|
||||
}
|
||||
|
||||
.menubar li.selected {
|
||||
|
||||
@@ -41,7 +41,7 @@ window.addEvent("domready", function() {
|
||||
return;
|
||||
}
|
||||
new Confirmation(rooturl + type + "/delete/", "selection=" + selection,
|
||||
gettext("Remove this selection?"), {
|
||||
"{% trans 'Remove this selection?' %}", {
|
||||
{% if deloptions %}checkboxes: { {% join deloptions %} }{% endif %}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
{% if field.help_text %}
|
||||
<div id="{{ field.name }}_helptext" class="tip">
|
||||
<div class="tip-title">{% trans "Help" %}</div>
|
||||
<div class="tip-text">{{ field.help_text}}</div>
|
||||
<div class="tip-text">{% trans field.help_text %}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ field.label_tag }}<div class="input_container clearfix"> {{ field }}</div> {% ifequal noerrors False %}{{ field.errors }}{% endifequal %}
|
||||
<label for="id_{{ field.html_name }}">{% trans field.label %}</label><div class="input_container clearfix"> {{ field }}</div> {% ifequal noerrors False %}{{ field.errors }}{% endifequal %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# coding: utf-8
|
||||
|
||||
from modoboa.lib import parameters
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
parameters.register_user("LANG", type="list", deflt="en",
|
||||
label=_("Prefered language"),
|
||||
values=[("de", "deutsch"), ("en", "english"),
|
||||
("es", "español"), ("fr", "français")],
|
||||
help=_("Prefered language to display pages"),
|
||||
app="general")
|
||||
|
||||
+4
-4
@@ -2,18 +2,18 @@ from django import forms
|
||||
from modoboa.admin.models import Domain, Mailbox
|
||||
from modoboa.auth.lib import _check_password
|
||||
from django.contrib.auth.models import check_password
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _, ugettext_noop
|
||||
from modoboa.lib.emailutils import split_mailbox
|
||||
|
||||
class BadDestination(Exception):
|
||||
pass
|
||||
|
||||
class ChangePasswordForm(forms.Form):
|
||||
oldpassword = forms.CharField(label=_("Old password"),
|
||||
oldpassword = forms.CharField(label=ugettext_noop("Old password"),
|
||||
widget=forms.PasswordInput)
|
||||
newpassword = forms.CharField(label=_("New password"),
|
||||
newpassword = forms.CharField(label=ugettext_noop("New password"),
|
||||
widget=forms.PasswordInput)
|
||||
confirmation = forms.CharField(label=_("Confirmation"),
|
||||
confirmation = forms.CharField(label=ugettext_noop("Confirmation"),
|
||||
widget=forms.PasswordInput)
|
||||
|
||||
def __init__(self, target, *args, **kwargs):
|
||||
|
||||
@@ -74,6 +74,7 @@ def setforward(request, tplname="userprefs/setforward.html"):
|
||||
@login_required
|
||||
def preferences(request):
|
||||
apps = sorted(parameters._params.keys())
|
||||
print request.LANGUAGE_CODE
|
||||
gparams = []
|
||||
for app in apps:
|
||||
if not len(parameters._params[app]['U']):
|
||||
|
||||
Reference in New Issue
Block a user