[IMP] Improved warning messages for survey module

bzr revid: pso@tinyerp.com-20120722092632-xrdkx353au7acoft
This commit is contained in:
Saurang Suthar(OpenERP)
2012-07-22 14:56:32 +05:30
committed by pso (OpenERP)
parent 97d1e8b4ce
commit b660a037af
4 changed files with 13 additions and 13 deletions
+7 -7
View File
@@ -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
+3 -3
View File
@@ -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']:
+1 -1
View File
@@ -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")})
+2 -2
View File
@@ -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 {