[IMP] rephrase some error and warning messages in base_action_rule, base_calendar, base_crypt, base_report_designer and base_status
remove exclamation marks at the end of messages remove first person usage ('I' and 'We') remove unjustified capital letters rephrase the clumsy form 'No <some attribute> is defined' bzr revid: abo@openerp.com-20120806162817-241dzl664je6t1kt
This commit is contained in:
parent
48e0915804
commit
d7083b21fe
|
@ -327,7 +327,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
reply_to = emailfrom
|
||||
if not emailfrom:
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_("No Email ID is found for your Company address!"))
|
||||
_("No email ID found for your company address."))
|
||||
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id)
|
||||
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ property or property parameter."),
|
|||
cal = vobject.iCalendar()
|
||||
event = cal.add('vevent')
|
||||
if not event_obj.date_deadline or not event_obj.date:
|
||||
raise osv.except_osv(_('Warning !'),_("First specified the date for Invitation."))
|
||||
raise osv.except_osv(_('Warning !'),_("First you have to specify the date of the invitation."))
|
||||
event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
event.add('dtstart').value = ics_datetime(event_obj.date)
|
||||
event.add('dtend').value = ics_datetime(event_obj.date_deadline)
|
||||
|
@ -1194,7 +1194,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
|
|||
def get_month_string(freq, datas):
|
||||
if freq == 'monthly':
|
||||
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
|
||||
raise osv.except_osv(_('Error!'), ("Please select proper Day of month."))
|
||||
raise osv.except_osv(_('Error!'), ("Please select a proper day of the month."))
|
||||
|
||||
if datas.get('select1')=='day':
|
||||
return ';BYDAY=' + datas.get('byday') + datas.get('week_list')
|
||||
|
|
|
@ -139,7 +139,7 @@ class users(osv.osv):
|
|||
|
||||
def set_pw(self, cr, uid, id, name, value, args, context):
|
||||
if not value:
|
||||
raise osv.except_osv(_('Error!'), _("Please specify the password !"))
|
||||
raise osv.except_osv(_('Error!'), _("You have to specify a password."))
|
||||
|
||||
obj = pooler.get_pool(cr.dbname).get('res.users')
|
||||
if not hasattr(obj, "_salt_cache"):
|
||||
|
@ -181,8 +181,8 @@ class users(osv.osv):
|
|||
cr = pooler.get_db(db).cursor()
|
||||
return self._login(cr, db, login, password)
|
||||
except Exception:
|
||||
_logger.exception('Cannot authenticate!')
|
||||
return Exception('Access is denied!')
|
||||
_logger.exception('Cannot authenticate.')
|
||||
return Exception('Access denied.')
|
||||
finally:
|
||||
if cr is not None:
|
||||
cr.close()
|
||||
|
@ -296,4 +296,5 @@ class users(osv.osv):
|
|||
return pw
|
||||
|
||||
users()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -341,7 +341,7 @@ if __name__ == "__main__":
|
|||
parser.add_option("-o", "--output", dest="output", default='.', help="directory of image output")
|
||||
(opt, args) = parser.parse_args()
|
||||
if len(args) != 1:
|
||||
parser.error("Incorrect number of arguments!")
|
||||
parser.error("Incorrect number of arguments.")
|
||||
|
||||
import sys
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
self.aSearchResult =self.sock.execute( database, uid, self.password, self.dModel[modelSelectedItem], 'name_search', self.win.getEditText("txtSearchName"))
|
||||
self.win.removeListBoxItems("lstResource", 0, self.win.getListBoxItemCount("lstResource"))
|
||||
if self.aSearchResult == []:
|
||||
ErrorDialog("No search result is found !", "", "Search ERROR" )
|
||||
ErrorDialog("No search result found.", "", "Search Error.")
|
||||
return
|
||||
|
||||
for result in self.aSearchResult:
|
||||
|
@ -172,7 +172,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
docinfo = oDoc2.getDocumentInfo()
|
||||
|
||||
if oDoc2.getURL() == "":
|
||||
ErrorDialog("Please save your file.", "", "Saving ERROR!" )
|
||||
ErrorDialog("You should save your file.", "", "Saving Error.")
|
||||
return None
|
||||
|
||||
url = oDoc2.getURL()
|
||||
|
@ -180,7 +180,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
url = self.doc2pdf(url[7:])
|
||||
|
||||
if url == None:
|
||||
ErrorDialog( "Problem in creating PDF!", "", "PDF Error!" )
|
||||
ErrorDialog( "Problem in creating PDF.", "", "PDF Error.")
|
||||
return None
|
||||
|
||||
url = url[7:]
|
||||
|
@ -193,7 +193,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
docinfo = oDoc2.getDocumentInfo()
|
||||
|
||||
if self.win.getListBoxSelectedItem("lstResourceType") == "":
|
||||
ErrorDialog("Please select resource type.", "", "Selection ERROR!" )
|
||||
ErrorDialog("You have to select a resource type.", "", "Selection Error." )
|
||||
return
|
||||
|
||||
res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )
|
||||
|
@ -201,11 +201,11 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
|
||||
def btnOkWithInformation_clicked(self,oActionEvent):
|
||||
if self.win.getListBoxSelectedItem("lstResourceType") == "":
|
||||
ErrorDialog( "Please select resource type.", "", "Selection ERROR!" )
|
||||
ErrorDialog( "You have to select a resource type.", "", "Selection Error." )
|
||||
return
|
||||
|
||||
if self.win.getListBoxSelectedItem("lstResource") == "" or self.win.getListBoxSelectedItem("lstmodel") == "":
|
||||
ErrorDialog("Please select Model and Resource.","","Selection ERROR!")
|
||||
ErrorDialog("You have to select Model and Resource.", "", "Selection Error.")
|
||||
return
|
||||
|
||||
resourceid = None
|
||||
|
@ -215,7 +215,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
|
|||
break
|
||||
|
||||
if resourceid == None:
|
||||
ErrorDialog("No resource is selected !", "", "Resource ERROR!" )
|
||||
ErrorDialog("No resource is selected.", "", "Resource Error." )
|
||||
return
|
||||
|
||||
res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )
|
||||
|
|
|
@ -106,7 +106,7 @@ class ExportToRML( unohelper.Base, XJobExecutor ):
|
|||
import traceback,sys
|
||||
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
self.logobj.log_write('ExportToRML',LOG_ERROR, info)
|
||||
ErrorDialog("Cannot save the file to the hard drive.", "Exception: %s !" % e, "Error" )
|
||||
ErrorDialog("Cannot save the file to the hard drive.", "Exception: %s." % e, "Error" )
|
||||
|
||||
def GetAFileName(self):
|
||||
sFilePickerArgs = Array(10)
|
||||
|
|
|
@ -64,7 +64,6 @@ if __name__<>'package':
|
|||
database="test"
|
||||
uid = 3
|
||||
|
||||
#
|
||||
class ModifyExistingReport(unohelper.Base, XJobExecutor):
|
||||
def __init__(self,ctx):
|
||||
self.ctx = ctx
|
||||
|
@ -167,11 +166,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
|
|||
if oDoc2.hasLocation() and not oDoc2.isReadonly():
|
||||
oDoc2.store()
|
||||
|
||||
ErrorDialog("Download is Completed.","Your file has been placed here :\n ."+ fp_name,"Download Message !")
|
||||
ErrorDialog("Download is completed.","Your file has been placed here :\n ."+ fp_name,"Download Message !")
|
||||
obj=Logger()
|
||||
obj.log_write('Modify Existing Report',LOG_INFO, ':successful download report %s using database %s' % (self.report_with_id[selectedItemPos][2], database))
|
||||
except Exception, e:
|
||||
ErrorDialog("Report has not been downloaded.", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message !")
|
||||
ErrorDialog("The report could not be downloaded.", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message !")
|
||||
import traceback,sys
|
||||
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
self.logobj.log_write('ModifyExistingReport', LOG_ERROR, info)
|
||||
|
@ -197,11 +196,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
|
|||
else :
|
||||
pass
|
||||
if temp:
|
||||
ErrorDialog("Report","Report has been Delete:\n ."+name,"Message !")
|
||||
self.logobj.log_write('Delete Report',LOG_INFO, ':successful delete report %s using database %s' % (name, database))
|
||||
ErrorDialog("Report", "The report could not be deleted:\n"+name+".", "Message !")
|
||||
self.logobj.log_write('Delete Report', LOG_INFO, ': report %s successfully deleted using database %s.' % (name, database))
|
||||
|
||||
else:
|
||||
ErrorDialog("Report","Report has not Delete:\n ."+name," Message !")
|
||||
ErrorDialog("Report", "The report could not be deleted:\n"+name+".", "Message !")
|
||||
self.win.endExecute()
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@ if __name__<>'package':
|
|||
database="report"
|
||||
uid = 3
|
||||
|
||||
#
|
||||
#
|
||||
class SendtoServer(unohelper.Base, XJobExecutor):
|
||||
Kind = {
|
||||
'PDF' : 'pdf',
|
||||
|
@ -172,8 +170,8 @@ class SendtoServer(unohelper.Base, XJobExecutor):
|
|||
}
|
||||
res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec )
|
||||
else :
|
||||
ErrorDialog(" Report Name is already given !\n\n\n Please specify other name.","","Report Name !")
|
||||
self.logobj.log_write('SendToServer',LOG_WARNING, ':Report name all ready given DB %s' % (database))
|
||||
ErrorDialog("This name is already used for another report.\nPlease try with another name.", "", "Report Name !")
|
||||
self.logobj.log_write('SendToServer',LOG_WARNING, ': report name already used DB %s' % (database))
|
||||
self.win.endExecute()
|
||||
except Exception,e:
|
||||
import traceback,sys
|
||||
|
@ -205,8 +203,8 @@ class SendtoServer(unohelper.Base, XJobExecutor):
|
|||
self.logobj.log_write('SendToServer',LOG_INFO, ':Report %s successfully send using %s'%(params['name'],database))
|
||||
self.win.endExecute()
|
||||
else:
|
||||
ErrorDialog("Either Report Name or Technical Name is blank !\nPlease specify appropriate Name.","","Blank Field ERROR !")
|
||||
self.logobj.log_write('SendToServer',LOG_WARNING, ':Either Report Name or Technical Name is blank')
|
||||
ErrorDialog("Either report name or technical name is blank.\nPlease specify an appropriate name.","","Blank Field Error !")
|
||||
self.logobj.log_write('SendToServer',LOG_WARNING, ': either report name or technical name is blank.')
|
||||
self.win.endExecute()
|
||||
|
||||
def getID(self):
|
||||
|
|
|
@ -100,8 +100,8 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
|||
# sValue="Could not connect to the server!"
|
||||
# self.lstDatabase.addItem("Could not connect to the server!",0)
|
||||
elif res == 0:
|
||||
sValue="No Database is found !"
|
||||
self.lstDatabase.addItem("No Database is found !",0)
|
||||
sValue="No database found !"
|
||||
self.lstDatabase.addItem("No database found !",0)
|
||||
else:
|
||||
self.win.addComboListBox("lstDatabase", -2,28,123,15, True)
|
||||
self.lstDatabase = self.win.getControl( "lstDatabase" )
|
||||
|
@ -129,12 +129,12 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
|||
self.sock=RPCSession(url)
|
||||
UID = self.sock.login(sDatabase,sLogin,sPassword)
|
||||
if not UID or UID==-1 :
|
||||
ErrorDialog("Connection Refuse...","Please enter valid Login/Password.")
|
||||
ErrorDialog("Connection denied.", "Please enter valid login/password.")
|
||||
# self.win.endExecute()
|
||||
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
|
||||
if not len(ids_module):
|
||||
ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error !")
|
||||
self.logobj.log_write('Module is not found.',LOG_WARNING, ':base_report_designer not install in database %s.' % (sDatabase))
|
||||
self.logobj.log_write('Module not found.',LOG_WARNING, ': base_report_designer not installed in database %s.' % (sDatabase))
|
||||
#self.win.endExecute()
|
||||
else:
|
||||
desktop=getDesktop()
|
||||
|
@ -153,7 +153,7 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
|
|||
#docinfo.setUserFieldValue(2,self.win.getListBoxSelectedItem("lstDatabase"))
|
||||
#docinfo.setUserFieldValue(3,"")
|
||||
|
||||
ErrorDialog(" You can start creating your report in \n \t the current document.","After Creating sending to the server.","Message !")
|
||||
ErrorDialog("You can start creating your report in the current document.", "After creating, sending to the server.", "Message !")
|
||||
self.logobj.log_write('successful login',LOG_INFO, ': successful login from %s using database %s' % (sLogin, sDatabase))
|
||||
self.win.endExecute()
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
res = self.sock.execute(database, uid, self.password, sObject , 'read',[ids[0]])
|
||||
self.win.setEditText("txtUName",res[0][sMain[sMain.rfind("/")+1:]])
|
||||
else:
|
||||
ErrorDialog("Please select the Language field.")
|
||||
ErrorDialog("Please select a language.")
|
||||
|
||||
except:
|
||||
import traceback;traceback.print_exc()
|
||||
|
@ -261,7 +261,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
|
|||
|
||||
self.win.endExecute()
|
||||
else:
|
||||
ErrorDialog("Please fill appropriate data in Name field \nor select particular value from the list of fields.")
|
||||
ErrorDialog("Please fill appropriate data in name field \nor select particular value from the list of fields.")
|
||||
|
||||
def btnCancel_clicked( self, oActionEvent ):
|
||||
self.win.endExecute()
|
||||
|
|
|
@ -56,14 +56,14 @@ class mysocket:
|
|||
while totalsent < size:
|
||||
sent = self.sock.send(msg[totalsent:])
|
||||
if sent == 0:
|
||||
raise RuntimeError, "Socket connection broken!"
|
||||
raise RuntimeError, "Socket connection broken."
|
||||
totalsent = totalsent + sent
|
||||
def myreceive(self):
|
||||
buf=''
|
||||
while len(buf) < 8:
|
||||
chunk = self.sock.recv(8 - len(buf))
|
||||
if chunk == '':
|
||||
raise RuntimeError, "Socket connection broken!"
|
||||
raise RuntimeError, "Socket connection broken."
|
||||
buf += chunk
|
||||
size = int(buf)
|
||||
buf = self.sock.recv(1)
|
||||
|
@ -75,7 +75,7 @@ class mysocket:
|
|||
while len(msg) < size:
|
||||
chunk = self.sock.recv(size-len(msg))
|
||||
if chunk == '':
|
||||
raise RuntimeError, "Socket connection broken!"
|
||||
raise RuntimeError, "Socket connection broken."
|
||||
msg = msg + chunk
|
||||
msgio = cStringIO.StringIO(msg)
|
||||
unpickler = cPickle.Unpickler(msgio)
|
||||
|
@ -90,6 +90,4 @@ class mysocket:
|
|||
return res[0]
|
||||
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -100,8 +100,7 @@ class modify(unohelper.Base, XJobExecutor ):
|
|||
RepeatIn( start_group1, group2, stop_group1, item, True )
|
||||
else:
|
||||
ErrorDialog(
|
||||
"Please place your cursor at begaining of field \n"
|
||||
"which you want to modify.",""
|
||||
"Please place your cursor at beginning of field that you want to modify.",""
|
||||
)
|
||||
|
||||
else:
|
||||
|
|
|
@ -202,7 +202,7 @@ class base_stage(object):
|
|||
if case.section_id.parent_id.user_id:
|
||||
data['user_id'] = case.section_id.parent_id.user_id.id
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\n That is why you cannot escalate."))
|
||||
raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\nTherefore you cannot escalate furthermore."))
|
||||
self.write(cr, uid, [case.id], data, context=context)
|
||||
case.case_escalate_send_note(case.section_id.parent_id, context=context)
|
||||
cases = self.browse(cr, uid, ids, context=context)
|
||||
|
|
Loading…
Reference in New Issue