diff --git a/addons/email_template/email_template_account.py b/addons/email_template/email_template_account.py index ec8d6446603..281a876fc22 100644 --- a/addons/email_template/email_template_account.py +++ b/addons/email_template/email_template_account.py @@ -360,19 +360,19 @@ unless it is already specified in the From Email, e.g: John Doe ", payload_part.attach(part) except Exception, error: logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, error)) - return {'error_msg': "Server Send Error\nDescription: %s"%error} + return {'error_msg': _("Server Send Error\nDescription: %s")%error} try: serv.sendmail(payload_part['From'], addresses_l['all-recipients'], payload_part.as_string()) except Exception, error: - logging.getLogger('email_template').error("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s", id, error, exc_info=True) - return {'error_msg': "Server Send Error\nDescription: %s"%error} + logging.getLogger('email_template').error(_("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s"), id, error, exc_info=True) + return {'error_msg': _("Server Send Error\nDescription: %s")%error} #The mail sending is complete serv.close() logger.notifyChannel(_("Email Template"), netsvc.LOG_INFO, _("Mail from Account %s successfully Sent.") % (id)) return True else: logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:Account not approved") % id) - return {'nodestroy':True,'error_msg':"Mail from Account %s failed. Probable Reason:Account not approved"% id} + return {'nodestroy':True,'error_msg': _("Mail from Account %s failed. Probable Reason:Account not approved")% id} def extracttime(self, time_as_string): """ diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py index 7388a883f99..6d05cabd8e7 100644 --- a/addons/l10n_ch/wizard/create_dta.py +++ b/addons/l10n_ch/wizard/create_dta.py @@ -464,8 +464,8 @@ def _create_dta(obj, cr, uid, data, context=None): v['partner_zip']= '' v['partner_country']= '' raise osv.except_osv(_('Error'), _('No address defined \n' \ - 'for the partner: ' + pline.partner_id.name + '\n' \ - 'on line: ' + pline.name)) + 'for the partner: %s \n' \ + 'on line: %s') % (pline.partner_id.name,pline.name)) if pline.order_id.date_scheduled: date_value = datetime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d')