diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 2ecbd523a9c..24eb0312a48 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -172,7 +172,7 @@ class AccountMove(models.Model): if self.user_has_groups('account.group_account_manager'): lock_date = move.company_id.fiscalyear_lock_date if move.date <= lock_date: - raise UserError(_("You cannot add/modify entries prior to and inclusive of the lock date %s. Check the company settings or ask someone with the 'Adviser' role" % (lock_date))) + raise UserError(_("You cannot add/modify entries prior to and inclusive of the lock date %s. Check the company settings or ask someone with the 'Adviser' role") % (lock_date)) return True @api.multi diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 7195170a86a..5ea2b0bfd23 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -118,7 +118,7 @@ class account_register_payments(models.TransientModel): if not active_model or not active_ids: raise UserError(_("Programmation error: wizard action executed without active_model or active_ids in context.")) if active_model != 'account.invoice': - raise UserError(_("Programmation error: the expected model for this action is 'account.invoice'. The provided one is '%d'." % active_model)) + raise UserError(_("Programmation error: the expected model for this action is 'account.invoice'. The provided one is '%d'.") % active_model) # Checks on received invoice records invoices = self.env[active_model].browse(active_ids) diff --git a/addons/account_check_printing/account_journal.py b/addons/account_check_printing/account_journal.py index 03ad48bd8cf..7470787d322 100644 --- a/addons/account_check_printing/account_journal.py +++ b/addons/account_check_printing/account_journal.py @@ -23,7 +23,7 @@ class AccountJournal(models.Model): def _set_check_next_number(self): if self.check_next_number < self.check_sequence_id.number_next_actual: raise ValidationError(_("The last check number was %s. In order to avoid a check being rejected " - "by the bank, you can only use a greater number." % self.check_sequence_id.number_next_actual)) + "by the bank, you can only use a greater number.") % self.check_sequence_id.number_next_actual) if self.check_sequence_id: self.check_sequence_id.sudo().number_next_actual = self.check_next_number diff --git a/addons/account_test/report/account_test_report.py b/addons/account_test/report/account_test_report.py index 208fec8152a..16a06622c09 100644 --- a/addons/account_test/report/account_test_report.py +++ b/addons/account_test/report/account_test_report.py @@ -53,7 +53,7 @@ class ReportAssertAccount(models.AbstractModel): return ', '.join(["%s: %s" % (tup[0], tup[1]) for tup in order_columns(item, column_order)]) else: return item - result = [_(_format(rec)) for rec in result] + result = [_format(rec) for rec in result] return result diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index 581a5d8f586..5ad6f8eea42 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -72,7 +72,7 @@ class ir_model_fields_anonymization(osv.osv): if global_state == 'anonymized': raise UserError(_("The database is currently anonymized, you cannot create, modify or delete fields.")) elif global_state == 'unstable': - msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," " while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.") raise UserError(msg) @@ -339,7 +339,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): # remove the placeholer: eview.remove(placeholder) else: - msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," " while some fields are not anonymized. You should try to solve this problem before trying to do anything else.") raise UserError(msg) @@ -372,7 +372,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): if state == 'anonymized': self._raise_after_history_update(cr, uid, history_id, _('Error !'), _("The database is currently anonymized, you cannot anonymize it again.")) elif state == 'unstable': - msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") self._raise_after_history_update(cr, uid, history_id, 'Error !', msg) @@ -509,7 +509,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): if state == 'clear': raise UserError(_("The database is not currently anonymized, you cannot reverse the anonymization.")) elif state == 'unstable': - msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \ + msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," " while some fields are not anonymized. You should try to solve this problem before trying to do anything.") raise UserError(msg) diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index b508514617f..0092754e627 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -66,7 +66,7 @@ class AuthSignupHome(openerp.addons.web.controllers.main.Home): qcontext['error'] = _("Could not reset your password") _logger.exception('error when resetting password') except Exception, e: - qcontext['error'] = _(e.message) + qcontext['error'] = e.message return request.render('auth_signup.reset_password', qcontext) diff --git a/addons/base_iban/base_iban.py b/addons/base_iban/base_iban.py index 8468fa12f67..0877c264333 100644 --- a/addons/base_iban/base_iban.py +++ b/addons/base_iban/base_iban.py @@ -32,7 +32,7 @@ def validate_iban(iban): iban_template = _map_iban_template[country_code] if len(iban) != len(iban_template.replace(' ', '')): raise ValidationError(_("The IBAN does not seem to be correct. You should have entered something like this %s\n"\ - "Where B = National bank code, S = Branch code, C = Account No, k = Check digit" % iban_template)) + "Where B = National bank code, S = Branch code, C = Account No, k = Check digit") % iban_template) check_chars = iban[4:] + iban[:4] digits = int(''.join(str(int(char, 36)) for char in check_chars)) # BASE 36: 0..9,A..Z -> 0..35 diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py index 887c6560618..9e1dcba46e4 100644 --- a/addons/base_vat/base_vat.py +++ b/addons/base_vat/base_vat.py @@ -108,7 +108,7 @@ class res_partner(osv.osv): continue vat_country, vat_number = self._split_vat(partner.vat) if not check_func(cr, uid, vat_country, vat_number, context=context): - _logger.info(_("Importing VAT Number [%s] is not valid !" % vat_number)) + _logger.info("Importing VAT Number [%s] is not valid !", vat_number) return False return True diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 35c1db56bab..8686d62b4d4 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -260,7 +260,7 @@ class calendar_attendee(osv.Model): meeting_obj = self.pool['calendar.event'] res = self.write(cr, uid, ids, {'state': 'accepted'}, context) for attendee in self.browse(cr, uid, ids, context=context): - meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has accepted invitation") % (attendee.cn)), + meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_("%s has accepted invitation") % (attendee.cn), subtype="calendar.subtype_invitation", context=context) return res @@ -275,7 +275,7 @@ class calendar_attendee(osv.Model): meeting_obj = self.pool['calendar.event'] res = self.write(cr, uid, ids, {'state': 'declined'}, context) for attendee in self.browse(cr, uid, ids, context=context): - meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has declined invitation") % (attendee.cn)), subtype="calendar.subtype_invitation", context=context) + meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_("%s has declined invitation") % (attendee.cn), subtype="calendar.subtype_invitation", context=context) return res def create(self, cr, uid, vals, context=None): diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index f10be1eee18..f05f2ea3a65 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -737,11 +737,11 @@ class gamification_challenge(osv.Model): if challenge_ended: # open chatter message - message_body = _("The challenge %s is finished." % challenge.name) + message_body = _("The challenge %s is finished.") % challenge.name if rewarded_users: user_names = self.pool['res.users'].name_get(cr, uid, rewarded_users, context=context) - message_body += _("
Reward (badge %s) for every succeeding user was sent to %s." % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names]))) + message_body += _("
Reward (badge %s) for every succeeding user was sent to %s.") % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names])) else: message_body += _("
Nobody has succeeded to reach every goal, no badge is rewarded for this challenge.") diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py index 2903814f9ba..2f307e03ca0 100644 --- a/addons/gamification/models/goal.py +++ b/addons/gamification/models/goal.py @@ -130,7 +130,7 @@ class gamification_goal_definition(osv.Model): obj.search(cr, uid, domain, context=context, count=True) except (ValueError, SyntaxError), e: msg = e.message or (e.msg + '\n' + e.text) - raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s" % (definition.name, msg))) + raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s") % (definition.name, msg)) return True def create(self, cr, uid, vals, context=None): diff --git a/addons/google_account/google_account.py b/addons/google_account/google_account.py index 53c02e08ad3..9142dc67638 100644 --- a/addons/google_account/google_account.py +++ b/addons/google_account/google_account.py @@ -34,8 +34,8 @@ class google_service(osv.osv_memory): req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers) content = urllib2.urlopen(req, timeout=TIMEOUT).read() except urllib2.HTTPError: - error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired" - raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context) + error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired") + raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context) content = json.loads(content) return content.get('refresh_token') @@ -95,8 +95,8 @@ class google_service(osv.osv_memory): st, res, ask_time = self._do_request(cr, uid, uri, params=data, headers=headers, type='POST', preuri='', context=context) except urllib2.HTTPError: - error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid" - raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context) + error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid") + raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context) return res def _refresh_google_token_json(self, cr, uid, refresh_token, service, context=None): # exchange_AUTHORIZATION vs Token (service = calendar) @@ -125,8 +125,8 @@ class google_service(osv.osv_memory): self.pool['res.users'].write(cur, uid, [uid], {'google_%s_rtoken' % service: False}, context=context) error_key = json.loads(e.read()).get("error", "nc") _logger.exception("Bad google request : %s !" % error_key) - error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]" % error_key - raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context) + error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]") % error_key + raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context) return res def _do_request(self, cr, uid, uri, params={}, headers={}, type='POST', preuri="https://www.googleapis.com", context=None): diff --git a/addons/google_account/i18n/google_account.pot b/addons/google_account/i18n/google_account.pot index ed9115b97e1..459efa8553a 100644 --- a/addons/google_account/i18n/google_account.pot +++ b/addons/google_account/i18n/google_account.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-07 14:40+0000\n" -"PO-Revision-Date: 2015-09-07 14:40+0000\n" +"POT-Creation-Date: 2016-01-13 13:41+0000\n" +"PO-Revision-Date: 2016-01-13 13:41+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -50,6 +50,24 @@ msgstr "" msgid "Last Updated on" msgstr "" +#. module: google_account +#: code:addons/google_account/google_account.py:98 +#, python-format +msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid" +msgstr "" + +#. module: google_account +#: code:addons/google_account/google_account.py:37 +#, python-format +msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired" +msgstr "" + +#. module: google_account +#: code:addons/google_account/google_account.py:128 +#, python-format +msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]" +msgstr "" + #. module: google_account #: code:addons/google_account/google_account.py:173 #, python-format diff --git a/addons/google_calendar/google_calendar.py b/addons/google_calendar/google_calendar.py index 33acda6b82d..2d444c41b10 100644 --- a/addons/google_calendar/google_calendar.py +++ b/addons/google_calendar/google_calendar.py @@ -295,13 +295,13 @@ class google_calendar(osv.AbstractModel): st, content, ask_time = self.pool['google.service']._do_request(cr, uid, url, params, headers, type='GET', context=context) except urllib2.HTTPError, e: if e.code == 401: # Token invalid / Acces unauthorized - error_msg = "Your token is invalid or has been revoked !" + error_msg = _("Your token is invalid or has been revoked !") registry = openerp.modules.registry.RegistryManager.get(request.session.db) with registry.cursor() as cur: self.pool['res.users'].write(cur, SUPERUSER_ID, [uid], {'google_calendar_token': False, 'google_calendar_token_validity': False}, context=context) - raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context) + raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context) raise return (status_response(st), content['id'] or False, ask_time) @@ -699,8 +699,8 @@ class google_calendar(osv.AbstractModel): self.pool['res.users'].write(cur, SUPERUSER_ID, [uid], {'google_calendar_last_sync_date': False}, context=context) error_key = json.loads(str(e)) error_key = error_key.get('error', {}).get('message', 'nc') - error_msg = "Google is lost... the next synchro will be a full synchro. \n\n %s" % error_key - raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context) + error_msg = _("Google is lost... the next synchro will be a full synchro. \n\n %s") % error_key + raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context) my_google_att_ids = att_obj.search(cr, uid, [ ('partner_id', '=', myPartnerID), diff --git a/addons/sale/sale_analytic.py b/addons/sale/sale_analytic.py index cc7de3a1a98..9261c5c4208 100644 --- a/addons/sale/sale_analytic.py +++ b/addons/sale/sale_analytic.py @@ -52,7 +52,7 @@ class AccountAnalyticLine(models.Model): if not order: return False if order.state != 'sale': - raise UserError(_('The Sale Order %s linked to the Analytic Account must be validated before registering expenses.' % order.name)) + raise UserError(_('The Sale Order %s linked to the Analytic Account must be validated before registering expenses.') % order.name) last_so_line = self.env['sale.order.line'].search([('order_id', '=', order.id)], order='sequence desc', limit=1) last_sequence = last_so_line.sequence + 1 if last_so_line else 100 diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 270261e7ea7..193cf6bcef3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -529,7 +529,7 @@ class stock_quant(osv.osv): elif removal_strategy == 'lifo': order = 'in_date desc, id desc' return self._quants_get_order(cr, uid, quantity, move, ops=ops, domain=domain, orderby=order, context=context) - raise UserError(_('Removal strategy %s not implemented.' % (removal_strategy,))) + raise UserError(_('Removal strategy %s not implemented.') % (removal_strategy,)) def _quant_create(self, cr, uid, qty, move, lot_id=False, owner_id=False, src_package_id=False, dest_package_id=False, force_location_from=False, force_location_to=False, context=None): @@ -2952,7 +2952,7 @@ class stock_inventory(osv.osv): for inv in self.browse(cr, uid, ids, context=context): for inventory_line in inv.line_ids: if inventory_line.product_qty < 0 and inventory_line.product_qty != inventory_line.theoretical_qty: - raise UserError(_('You cannot set a negative product quantity in an inventory line:\n\t%s - qty: %s' % (inventory_line.product_id.name, inventory_line.product_qty))) + raise UserError(_('You cannot set a negative product quantity in an inventory line:\n\t%s - qty: %s') % (inventory_line.product_id.name, inventory_line.product_qty)) self.action_check(cr, uid, [inv.id], context=context) self.write(cr, uid, [inv.id], {'state': 'done'}, context=context) self.post_inventory(cr, uid, inv, context=context) diff --git a/addons/survey/wizard/survey_email_compose_message.py b/addons/survey/wizard/survey_email_compose_message.py index 0272ad0444c..55e326b3750 100644 --- a/addons/survey/wizard/survey_email_compose_message.py +++ b/addons/survey/wizard/survey_email_compose_message.py @@ -75,7 +75,7 @@ class survey_mail_compose_message(osv.TransientModel): else: emails_checked.append(email) if error_message: - raise UserError(_("One email at least is incorrect: %s" % error_message)) + raise UserError(_("One email at least is incorrect: %s") % error_message) emails_checked.sort() values = {'multi_email': '\n'.join(emails_checked)} diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 93d9080e4fd..4aa3deb1d4c 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -290,12 +290,12 @@ class website(osv.osv): for page in View.browse(cr, uid, pages, context=context): if page.page: dep[page_key].append({ - 'text': _('Page %s seems to have a link to this page !' % page.key), + 'text': _('Page %s seems to have a link to this page !') % page.key, 'link': '/page/%s' % page.key }) else: dep[page_key].append({ - 'text': _('Template %s (id:%s) seems to have a link to this page !' % (page.key, page.id)), + 'text': _('Template %s (id:%s) seems to have a link to this page !') % (page.key, page.id), 'link': '#' }) @@ -311,7 +311,7 @@ class website(osv.osv): dep[menu_key] = [] for menu in Menu.browse(cr, uid, menus, context=context): dep[menu_key].append({ - 'text': _('Menu %s seems to have a link to this page !' % menu.name), + 'text': _('Menu %s seems to have a link to this page !') % menu.name, 'link': False }) diff --git a/addons/website_blog/models/website_blog.py b/addons/website_blog/models/website_blog.py index cb2743b9652..d3d8569a3b1 100644 --- a/addons/website_blog/models/website_blog.py +++ b/addons/website_blog/models/website_blog.py @@ -289,7 +289,7 @@ class Website(osv.Model): dep[page_key] = [] for p in post_obj.browse(cr, uid, posts, context=context): dep[page_key].append({ - 'text': _('Blog Post %s seems to have a link to this page !' % p.name), + 'text': _('Blog Post %s seems to have a link to this page !') % p.name, 'link': p.website_url }) diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index eaf99a7811a..91569312d10 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -374,7 +374,7 @@ class Post(models.Model): if (self.post_type == 'question' and not self.forum_id.allow_question) \ or (self.post_type == 'discussion' and not self.forum_id.allow_discussion) \ or (self.post_type == 'link' and not self.forum_id.allow_link): - raise UserError(_('This forum does not allow %s' % self.post_type)) + raise UserError(_('This forum does not allow %s') % self.post_type) def _update_content(self, content, forum_id): forum = self.env['forum.forum'].browse(forum_id) @@ -473,26 +473,20 @@ class Post(models.Model): base_url = self.env['ir.config_parameter'].get_param('web.base.url') for post in self: if post.state == 'active' and post.parent_id: - body = _( - '

A new answer for %s has been posted. Click here to access the post.

' % - (post.parent_id.name, base_url, slug(post.parent_id.forum_id), slug(post.parent_id)) - ) + body = _('

A new answer for %s has been posted. Click here to access the post.

') % \ + (post.parent_id.name, base_url, slug(post.parent_id.forum_id), slug(post.parent_id)) post.parent_id.message_post(subject=_('Re: %s') % post.parent_id.name, body=body, subtype='website_forum.mt_answer_new') elif post.state == 'active' and not post.parent_id: - body = _( - '

A new question %s has been asked on %s. Click here to access the question.

' % - (post.name, post.forum_id.name, base_url, slug(post.forum_id), slug(post)) - ) + body = _('

A new question %s has been asked on %s. Click here to access the question.

') % \ + (post.name, post.forum_id.name, base_url, slug(post.forum_id), slug(post)) post.message_post(subject=post.name, body=body, subtype='website_forum.mt_question_new') elif post.state == 'pending' and not post.parent_id: # TDE FIXME: in master, you should probably use a subtype; # however here we remove subtype but set partner_ids partners = post.sudo().message_partner_ids.filtered(lambda partner: partner.user_ids and partner.user_ids.karma >= post.forum_id.karma_moderate) note_subtype = self.sudo().env.ref('mail.mt_note') - body = _( - '

A new question %s has been asked on %s and require your validation. Click here to access the question.

' % - (post.name, post.forum_id.name, base_url, slug(post.forum_id), slug(post)) - ) + body = _('

A new question %s has been asked on %s and require your validation. Click here to access the question.

') % \ + (post.name, post.forum_id.name, base_url, slug(post.forum_id), slug(post)) post.message_post(subject=post.name, body=body, subtype_id=note_subtype.id, partner_ids=partners.ids) return True diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 6190bbc675b..ecb6520b4d7 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -282,11 +282,11 @@ class website_slides(http.Controller): return preview existing_slide = Slide.search([('channel_id', '=', int(data['channel_id'])), ('document_id', '=', document_id)], limit=1) if existing_slide: - preview['error'] = _('This video already exists in this channel click here to view it ' % existing_slide.id) + preview['error'] = _('This video already exists in this channel click here to view it ') % existing_slide.id return preview values = Slide._parse_document_url(data['url'], only_preview_fields=True) if values.get('error'): - preview['error'] = _('Could not fetch data from url. Document or access right not available.\nHere is the received response: %s' % values['error']) + preview['error'] = _('Could not fetch data from url. Document or access right not available.\nHere is the received response: %s') % values['error'] return preview return values @@ -318,7 +318,7 @@ class website_slides(http.Controller): return {'error': e.name} except Exception as e: _logger.error(e) - return {'error': _('Internal server error, please try again later or contact administrator.\nHere is the error message: %s' % e.message)} + return {'error': _('Internal server error, please try again later or contact administrator.\nHere is the error message: %s') % e.message} return {'url': "/slides/slide/%s" % (slide_id.id)} # -------------------------------------------------- diff --git a/openerp/models.py b/openerp/models.py index ba42955eb42..679eb269672 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -673,7 +673,7 @@ class BaseModel(object): (fnct, fields2, order) = spec length = None else: - raise UserError(_('Invalid function definition %s in object %s !\nYou must use the definition: store={object:(fnct, fields, priority, time length)}.' % (fname, cls._name))) + raise UserError(_('Invalid function definition %s in object %s !\nYou must use the definition: store={object:(fnct, fields, priority, time length)}.') % (fname, cls._name)) pool._store_function.setdefault(model, []) t = (cls._name, fname, fnct, tuple(fields2) if fields2 else None, order, length) if t not in pool._store_function[model]: @@ -1266,7 +1266,7 @@ class BaseModel(object): res_msg = trans._get_source(self._name, 'constraint', self.env.lang, msg) if extra_error: res_msg += "\n\n%s\n%s" % (_('Error details:'), extra_error) - errors.append(_(res_msg)) + errors.append(res_msg) if errors: raise ValidationError('\n'.join(errors)) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index 2ee09b12982..04022058318 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -664,7 +664,7 @@ def trans_export(lang, modules, buffer, format, cr): else: raise Exception(_('Unrecognized extension: must be one of ' - '.csv, .po, or .tgz (received .%s).' % format)) + '.csv, .po, or .tgz (received .%s).') % format) translations = trans_generate(lang, modules, cr) modules = set(t[0] for t in translations)