From b660a037affdb36ad234e1af76151ad2a294629a Mon Sep 17 00:00:00 2001 From: "Saurang Suthar(OpenERP)" <> Date: Sun, 22 Jul 2012 14:56:32 +0530 Subject: [PATCH] [IMP] Improved warning messages for survey module bzr revid: pso@tinyerp.com-20120722092632-xrdkx353au7acoft --- addons/survey/i18n/survey.pot | 14 +++++++------- addons/survey/survey.py | 6 +++--- addons/survey/wizard/survey_answer.py | 2 +- addons/survey/wizard/survey_selection.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/survey/i18n/survey.pot b/addons/survey/i18n/survey.pot index a5cf222bae2..7b8abb90aa1 100644 --- a/addons/survey/i18n/survey.pot +++ b/addons/survey/i18n/survey.pot @@ -584,7 +584,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_answer.py:126 #, python-format -msgid "You cannot answer this survey more than %s times" +msgid "You cannot answer this survey more than %s times." msgstr "" #. module: survey @@ -595,7 +595,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_answer.py:119 #, python-format -msgid "You can not answer because the survey is not open." +msgid "You cannot answer because the survey is not open." msgstr "" #. module: survey @@ -683,7 +683,7 @@ msgstr "" #: code:addons/survey/survey.py:370 #: code:addons/survey/survey.py:457 #, python-format -msgid "You must enter one or more column heading." +msgid "You must enter one or more column headings." msgstr "" #. module: survey @@ -815,7 +815,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_selection.py:83 #, python-format -msgid "You cannot give more response. Please contact the author of this survey for further assistance." +msgid "You cannot give more responses. Please contact the author of this survey for further assistance." msgstr "" #. module: survey @@ -1131,7 +1131,7 @@ msgstr "" #. module: survey #: code:addons/survey/wizard/survey_selection.py:80 #, python-format -msgid "You cannot give response for this survey more than %s times" +msgid "You cannot give response for this survey more than %s times." msgstr "" #. module: survey @@ -1449,7 +1449,7 @@ msgstr "" #. module: survey #: code:addons/survey/survey.py:453 #, python-format -msgid "You must enter one or more answer." +msgid "You must enter one or more answers." msgstr "" #. module: survey @@ -1528,7 +1528,7 @@ msgstr "" #. module: survey #: code:addons/survey/survey.py:382 #, python-format -msgid "You must enter one or more Answer." +msgid "You must enter one or more Answers." msgstr "" #. module: survey diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 5bce82837d5..763bf350b5c 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -379,7 +379,7 @@ class survey_question(osv.osv): if que_type in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans',\ 'matrix_of_drop_down_menus', 'rating_scale']: if not col_len: - raise osv.except_osv(_('Warning !'),_("You must enter one or more column heading.")) + raise osv.except_osv(_('Warning !'),_("You must enter one or more column headings.")) ans_len = len(question['answer_choice_ids']) if vals.has_key('answer_choice_ids'): @@ -391,7 +391,7 @@ class survey_question(osv.osv): if que_type not in ['descriptive_text', 'single_textbox', 'comment','table']: if not ans_len: - raise osv.except_osv(_('Warning !'),_("You must enter one or more Answer.")) + raise osv.except_osv(_('Warning !'),_("You must enter one or more Answers.")) req_type = "" if vals.has_key('required_type'): @@ -462,7 +462,7 @@ class survey_question(osv.osv): maximum_ans = 0 if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']): if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']: - raise osv.except_osv(_('Warning !'),_("You must enter one or more answer.")) + raise osv.except_osv(_('Warning !'),_("You must enter one or more answers.")) if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']): if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']: diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py index 412339895f7..e0614143540 100644 --- a/addons/survey/wizard/survey_answer.py +++ b/addons/survey/wizard/survey_answer.py @@ -123,7 +123,7 @@ class survey_question_wiz(osv.osv_memory): user_limit = survey_obj.browse(cr, uid, survey_id) user_limit = user_limit.response_user if user_limit and res >= user_limit: - raise osv.except_osv(_('Warning !'),_("You cannot answer this survey more than %s times") % (user_limit)) + raise osv.except_osv(_('Warning !'),_("You cannot answer this survey more than %s times.") % (user_limit)) if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1: survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")}) diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index 53af41bc80b..675f14a6d04 100644 --- a/addons/survey/wizard/survey_selection.py +++ b/addons/survey/wizard/survey_selection.py @@ -77,10 +77,10 @@ class survey_name_wiz(osv.osv_memory): res = cr.fetchone()[0] sur_rec = survey_obj.browse(cr,uid,survey_id,context=context) if sur_rec.response_user and res >= sur_rec.response_user: - raise osv.except_osv(_('Warning !'),_("You cannot give response for this survey more than %s times") % (sur_rec.response_user)) + raise osv.except_osv(_('Warning !'),_("You cannot give response for this survey more than %s times.") % (sur_rec.response_user)) if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey: - raise osv.except_osv(_('Warning !'),_("You cannot give more response. Please contact the author of this survey for further assistance.")) + raise osv.except_osv(_('Warning !'),_("You cannot give more responses. Please contact the author of this survey for further assistance.")) search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')]) return {