mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +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
|
||||
tickets if django-tagging is installed and in use. If django-tagging isn't
|
||||
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
|
||||
|
||||
context = Context(email_context)
|
||||
locale = getattr(context['queue'], 'locale', 'en')
|
||||
locale = getattr(context['queue'], 'locale', '')
|
||||
if not locale:
|
||||
locale = 'en'
|
||||
|
||||
if locale:
|
||||
template_localized = template_name + ':' + locale
|
||||
|
Loading…
Reference in New Issue
Block a user