From 7e978dce7416e82f57eef382f9e1d14098581ac2 Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 19:10:24 +0530 Subject: [PATCH] [IMP] Improved warning messages for report_webkit, share and wiki modules bzr revid: pso@tinyerp.com-20120722134024-hu4fbdhw5ga8p1u7 --- addons/report_webkit/i18n/report_webkit.pot | 6 +++--- addons/report_webkit/webkit_report.py | 14 +++++++------- addons/share/i18n/share.pot | 8 ++++---- addons/share/wizard/share_wizard.py | 8 ++++---- addons/wiki/i18n/wiki.pot | 2 +- addons/wiki/wizard/wiki_show_diff.py | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/report_webkit/i18n/report_webkit.pot b/addons/report_webkit/i18n/report_webkit.pot index 4c5642695de..ec614d00f8d 100644 --- a/addons/report_webkit/i18n/report_webkit.pot +++ b/addons/report_webkit/i18n/report_webkit.pot @@ -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 diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index 7504d4f766e..e1ce5a38c6b 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -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) diff --git a/addons/share/i18n/share.pot b/addons/share/i18n/share.pot index 01406615f89..dd253268703 100644 --- a/addons/share/i18n/share.pot +++ b/addons/share/i18n/share.pot @@ -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 diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 7a75d5be2a6..22e70011b06 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -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): diff --git a/addons/wiki/i18n/wiki.pot b/addons/wiki/i18n/wiki.pot index b2457978df5..e5ef29bd93e 100644 --- a/addons/wiki/i18n/wiki.pot +++ b/addons/wiki/i18n/wiki.pot @@ -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 diff --git a/addons/wiki/wizard/wiki_show_diff.py b/addons/wiki/wizard/wiki_show_diff.py index 37a62b87b86..97f7d75024c 100644 --- a/addons/wiki/wizard/wiki_show_diff.py +++ b/addons/wiki/wizard/wiki_show_diff.py @@ -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