summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins/recipientpolicy/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-12-06 09:46:01 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-12-06 09:46:01 +0000
commitb300f00c14270a3a5e2f52332259090ccc3c919d (patch)
tree0e607797cac7bb925c8b569804d5db479e47506c /pykolab/plugins/recipientpolicy/__init__.py
parented14a87d9912f504cfe513b9db9765e4590aa52f (diff)
downloadpykolab-b300f00c14270a3a5e2f52332259090ccc3c919d.tar.gz
Add an default_locale setting to indicate the preferred system locale and default for all users
Add preferredLanguage setting to LDAP attributes obtained with a user account
Diffstat (limited to 'pykolab/plugins/recipientpolicy/__init__.py')
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index 07204a2..1167eae 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -63,7 +63,7 @@ class KolabRecipientpolicy(object):
try:
mail = kw['primary_mail'] % user_attrs
- return utils.translate(mail.lower())
+ return utils.translate(mail.lower(), user['preferredLanguage'])
except KeyError, e:
log.warning(_("Attribute substitution for 'mail' failed in Recipient Policy"))
return user_attrs['mail'].lower()
@@ -105,7 +105,7 @@ class KolabRecipientpolicy(object):
log.warning(_("Attribute substitution for 'alternative_mail' failed in Recipient Policy"))
#log.debug(_("Appending additional mail address: %s") %(retval), level=8)
- alternative_mail.append(utils.translate(retval))
+ alternative_mail.append(utils.translate(retval), user['preferredLanguage'])
for _domain in kw['secondary_domains']:
user_attrs['domain'] = _domain