From 5b7a9c0855ac67e95656577b36413a76c87f6fb0 Mon Sep 17 00:00:00 2001 From: tobes Date: Thu, 16 Aug 2012 08:49:35 +0100 Subject: [PATCH] Flash messages to notices plus translatable --- ckanext/harvest/controllers/view.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckanext/harvest/controllers/view.py b/ckanext/harvest/controllers/view.py index 4a8a05b..4455694 100644 --- a/ckanext/harvest/controllers/view.py +++ b/ckanext/harvest/controllers/view.py @@ -231,10 +231,10 @@ class ViewController(BaseController): abort(401,self.not_auth_message) except Exception, e: if 'Can not create jobs on inactive sources' in str(e): - h.flash_error('Cannot create new harvest jobs on inactive sources. ' - + 'Please first change the status to \'active\'') + h.flash_notice(_('Cannot create new harvest jobs on inactive sources. ' + + 'Please first change the status to \'active\'')) elif 'There already is an unrun job for this source' in str(e): - h.flash_error('A harvest job has already been scheduled for this source') + h.flash_notice(_('A harvest job has already been scheduled for this source')) else: msg = 'An error occurred: [%s]' % str(e) h.flash_error(msg)