mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-19 04:19:54 +01:00
Issue #118: Incorrect handling of Locales on e-mail templates
This commit is contained in:
parent
f418e97efc
commit
ea1610e837
@ -9,3 +9,7 @@ to the Submitter. This is a work in progress.
|
|||||||
Patch courtesy of david@zettazebra.com, adds the ability to add tags to
|
Patch courtesy of david@zettazebra.com, adds the ability to add tags to
|
||||||
tickets if django-tagging is installed and in use. If django-tagging isn't
|
tickets if django-tagging is installed and in use. If django-tagging isn't
|
||||||
being used, no change is visible to the user.
|
being used, no change is visible to the user.
|
||||||
|
|
||||||
|
2009-10-13 r141 Issue #118 Incorrect locale handling on email templates
|
||||||
|
Patch courtesy of hgeerts. Corrects the handling of locale on email
|
||||||
|
templaets, defaulting to English if no locale is provided.
|
||||||
|
4
lib.py
4
lib.py
@ -52,7 +52,9 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
context = Context(email_context)
|
context = Context(email_context)
|
||||||
locale = getattr(context['queue'], 'locale', 'en')
|
locale = getattr(context['queue'], 'locale', '')
|
||||||
|
if not locale:
|
||||||
|
locale = 'en'
|
||||||
|
|
||||||
if locale:
|
if locale:
|
||||||
template_localized = template_name + ':' + locale
|
template_localized = template_name + ':' + locale
|
||||||
|
Loading…
Reference in New Issue
Block a user