Commits

Ezio Melotti committed cc688b1

#538: use add_*_message instead of *_message.append and update templates.

Comments (0)

Files changed (3)

extensions/create_patch.py

         files.append(fileid)
         db.issue.set(self.nodeid, files=files)
         db.hgrepo.set(repo, lastrev=head)
-        self.client.ok_message.append('Successfully downloaded %s.diff' % head)
+        self.client.add_ok_message('Successfully downloaded %s.diff' % head)
         db.commit()
 
 def init(instance):

extensions/spambayes.py

             if not is_spam:
                 props['spambayes_score'] = 0.0
                 s = " HAM"
-            self.client.ok_message.append(self._('Message classified as') + s)
+            self.client.add_ok_message(self._('Message classified as') + s)
         else:
-            self.client.error_message.append(self._('Unable to classify message, got error:') + errmsg)
+            self.client.add_error_message(self._('Unable to classify message, got error:') + errmsg)
 
         klass = self.db.getclass(self.classname)
         klass.set(self.nodeid, **props)
 <div id="content">
 <div id="breadcrumb"><span metal:define-slot="body_title">body title</span></div>
  <p tal:condition="options/error_message | nothing" class="error-message"
-    tal:repeat="m options/error_message" tal:content="m" />
+    tal:repeat="m options/error_message" tal:content="structure string:$m" />
  <p tal:condition="options/ok_message | nothing" class="ok-message">
-  <span style="white-space:pre" tal:content="python:
+  <span style="white-space:pre" tal:content="structure python:
         utils.clean_ok_message(options['ok_message'])" />
   <a class="form-small" tal:attributes="href request/current_url"
      i18n:translate="">clear this message</a>