[IMP] Improved warning messages for report_webkit, share and wiki modules

bzr revid: pso@tinyerp.com-20120722134024-hu4fbdhw5ga8p1u7
This commit is contained in:
Saurang Suthar(OpenERP) 2012-07-22 19:10:24 +05:30 committed by pso (OpenERP)
parent d5d97cb6e3
commit 7e978dce74
6 changed files with 20 additions and 20 deletions

View File

@ -90,7 +90,7 @@ msgstr ""
#: code:addons/report_webkit/webkit_report.py:285
#: code:addons/report_webkit/webkit_report.py:296
#, python-format
msgid "Webkit render !"
msgid "Webkit render!"
msgstr ""
#. module: report_webkit
@ -113,7 +113,7 @@ msgstr ""
#. module: report_webkit
#: code:addons/report_webkit/webkit_report.py:167
#, python-format
msgid "Webkit raise an error !"
msgid "Webkit raise an error!"
msgstr ""
#. module: report_webkit
@ -497,7 +497,7 @@ msgstr ""
#. module: report_webkit
#: code:addons/report_webkit/webkit_report.py:218
#, python-format
msgid "Webkit report template not found !"
msgid "Webkit report template not found!"
msgstr ""
#. module: report_webkit

View File

@ -164,7 +164,7 @@ class WebKitParser(report_sxw):
status = subprocess.call(command, stderr=subprocess.PIPE) # ignore stderr
if status :
raise except_osv(
_('Webkit raise an error !' ),
_('Webkit raise an error!' ),
status
)
except Exception:
@ -215,7 +215,7 @@ class WebKitParser(report_sxw):
if not template and report_xml.report_webkit_data :
template = report_xml.report_webkit_data
if not template :
raise except_osv(_('Error!'), _('Webkit report template not found !'))
raise except_osv(_('Error!'), _('Webkit report template not found!'))
header = report_xml.webkit_header.html
footer = report_xml.webkit_header.footer_html
if not header and report_xml.header:
@ -249,7 +249,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
raise except_osv(_('Webkit render !'), msg)
raise except_osv(_('Webkit render!'), msg)
else:
try :
html = body_mako_tpl.render(helper=helper,
@ -260,7 +260,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
raise except_osv(_('Webkit render !'), msg)
raise except_osv(_('Webkit render!'), msg)
head_mako_tpl = mako_template(header)
try :
head = head_mako_tpl.render(helper=helper,
@ -269,7 +269,7 @@ class WebKitParser(report_sxw):
_debug=False,
**self.parser_instance.localcontext)
except Exception, e:
raise except_osv(_('Webkit render !'),
raise except_osv(_('Webkit render!'),
exceptions.text_error_template().render())
foot = False
if footer :
@ -282,7 +282,7 @@ class WebKitParser(report_sxw):
except:
msg = exceptions.text_error_template().render()
_logger.error(msg)
raise except_osv(_('Webkit render !'), msg)
raise except_osv(_('Webkit render!'), msg)
if report_xml.webkit_debug :
try :
deb = head_mako_tpl.render(helper=helper,
@ -293,7 +293,7 @@ class WebKitParser(report_sxw):
except Exception, e:
msg = exceptions.text_error_template().render()
_logger.error(msg)
raise except_osv(_('Webkit render !'), msg)
raise except_osv(_('Webkit render!'), msg)
return (deb, 'html')
bin = self.get_lib(cursor, uid)
pdf = self.generate_pdf(bin, report_xml, head, foot, htmls)

View File

@ -110,7 +110,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:643
#, python-format
msgid "You must be a member of the Share/User group to use the share wizard"
msgid "You must be a member of the Share/User group to use the share wizard."
msgstr ""
#. module: share
@ -174,7 +174,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:640
#, python-format
msgid "Action and Access Mode are required to create a shared access"
msgid "Action and Access Mode are required to create a shared access."
msgstr ""
#. module: share
@ -257,7 +257,7 @@ msgstr ""
#. module: share
#: code:addons/share/wizard/share_wizard.py:647
#, python-format
msgid "Please indicate the emails of the persons to share with, one per line"
msgid "Please indicate the emails of the persons to share with, one per line."
msgstr ""
#. module: share
@ -416,7 +416,7 @@ msgstr ""
#: code:addons/share/wizard/share_wizard.py:60
#: code:addons/share/wizard/share_wizard.py:635
#, python-format
msgid "Sharing access could not be created."
msgid "Sharing access cannot be created."
msgstr ""
#. module: share

View File

@ -649,19 +649,19 @@ class share_wizard(osv.TransientModel):
rule_name=rule_name, restrict=True, context=context)
except Exception:
_logger.exception('Failed to create share access')
raise osv.except_osv(_('Sharing access could not be created'),
raise osv.except_osv(_('Sharing access cannot be created.'),
_('Sorry, the current screen and filter you are trying to share are not supported at the moment.\nYou may want to try a simpler filter.'))
def _check_preconditions(self, cr, uid, wizard_data, context=None):
self._assert(wizard_data.action_id and wizard_data.access_mode,
_('Action and Access Mode are required to create a shared access'),
_('Action and Access Mode are required to create a shared access.'),
context=context)
self._assert(self.has_share(cr, uid, context=context),
_('You must be a member of the Share/User group to use the share wizard'),
_('You must be a member of the Share/User group to use the share wizard.'),
context=context)
if wizard_data.user_type == 'emails':
self._assert((wizard_data.new_users or wizard_data.email_1 or wizard_data.email_2 or wizard_data.email_3),
_('Please indicate the emails of the persons to share with, one per line'),
_('Please indicate the emails of the persons to share with, one per line.'),
context=context)
def _create_share_users_group(self, cr, uid, wizard_data, context=None):

View File

@ -374,7 +374,7 @@ msgstr ""
#. module: wiki
#: code:addons/wiki/wizard/wiki_show_diff.py:54
#, python-format
msgid "You need to select minimum one or maximum two history revision!"
msgid "You need to select minimum one or maximum two history revisions!"
msgstr ""
#. module: wiki

View File

@ -51,7 +51,7 @@ class showdiff(osv.osv_memory):
nids.sort()
diff = base64.encodestring(history.getDiff(cr, uid, ids[0], nids[-1]))
else:
raise osv.except_osv(_('Warning'), _('You need to select minimum one or maximum two history revision!'))
raise osv.except_osv(_('Warning'), _('You need to select minimum one or maximum two history revisions!'))
return diff