@@ -138,11 +138,14 @@ class CreatePage(http.Controller, PageFormMixin):
138138 form_title = _ ('Add page' )
139139 form_mode = 'create'
140140 template = 'website_cms.page_form'
141- status_message_success = {
142- 'type' : 'info' ,
143- 'title' : 'Info:' ,
144- 'msg' : _ ('Page created.' ),
145- }
141+
142+ @property
143+ def status_message_success (self ):
144+ return {
145+ 'type' : 'info' ,
146+ 'title' : _ ('Info:' ),
147+ 'msg' : _ ('Page created.' ),
148+ }
146149
147150 def load_defaults (self , main_object , ** kw ):
148151 """Override to preload values."""
@@ -202,11 +205,14 @@ class EditPage(http.Controller, PageFormMixin):
202205 form_title = _ ('Edit page' )
203206 form_mode = 'write'
204207 template = 'website_cms.page_form'
205- status_message_success = {
206- 'type' : 'info' ,
207- 'title' : 'Info:' ,
208- 'msg' : _ ('Page updated.' ),
209- }
208+
209+ @property
210+ def status_message_success (self ):
211+ return {
212+ 'type' : 'info' ,
213+ 'title' : _ ('Info:' ),
214+ 'msg' : _ ('Page updated.' ),
215+ }
210216
211217 def _check_security (self , main_object ):
212218 if request .website and \
@@ -238,7 +244,7 @@ def after_post_action(self, parent=None, main_object=None, **kw):
238244 if not main_object .description :
239245 msg = {
240246 'type' : 'warning' ,
241- 'title' : 'Note:' ,
247+ 'title' : _ ( 'Note:' ) ,
242248 'msg' : _ ('No description for this page yet. '
243249 'You see this because you can edit this page. '
244250 'A brief description can be useful '
0 commit comments