Commit 669307c3 authored by Jérome Perrin's avatar Jérome Perrin

deferred_style: translate email subject

by evaluating it in a translationContext
parent efda0ab2
portal = context.getPortalObject() portal = context.getPortalObject()
N_ = portal.Base_translateString
form = context.restrictedTraverse(form) form = context.restrictedTraverse(form)
request = container.REQUEST request = container.REQUEST
...@@ -16,6 +15,8 @@ with portal.Localizer.translationContext(localizer_language): ...@@ -16,6 +15,8 @@ with portal.Localizer.translationContext(localizer_language):
else: else:
raise ValueError, 'form meta_type (%r) unknown' %(form.meta_type,) raise ValueError, 'form meta_type (%r) unknown' %(form.meta_type,)
report_title = portal.Base_translateString((form.getProperty('title')))
# Rebuild request_other as report section can have modify request content # Rebuild request_other as report section can have modify request content
request_other = portal.ERP5Site_filterRequestForDeferredStyle(request) request_other = portal.ERP5Site_filterRequestForDeferredStyle(request)
...@@ -45,7 +46,7 @@ activity_context.activate(activity='SQLQueue', after_tag=tag, priority=priority) ...@@ -45,7 +46,7 @@ activity_context.activate(activity='SQLQueue', after_tag=tag, priority=priority)
active_process_url=active_process.getRelativeUrl(), active_process_url=active_process.getRelativeUrl(),
skin_name=skin_name, skin_name=skin_name,
localizer_language=localizer_language, localizer_language=localizer_language,
title=N_(form.getProperty('title')), title=report_title,
request_other=request_other, request_other=request_other,
form_path=form.getPhysicalPath(), form_path=form.getPhysicalPath(),
user_name=user_name, user_name=user_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment