diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-07-02 12:26:20 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2020-07-02 15:12:56 +0000 |
| commit | ad6b5e35f23fdedc6f790eace945d7a7a6d9a1ef (patch) | |
| tree | c2bccd0e4c9a55a3e43eee1ec3b93a50c77b3c49 /addons | |
| parent | 79a7cf9be53197d82167bec19bf971c9aa0804dc (diff) | |
[IMP] *: do not translate logs
The logs should all be in the same language, s.t. one does not need to
understand multiple languages when browsing/reading the server logs.
closes odoo/odoo#53984
Related: odoo/enterprise#11615
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_it_edi/models/account_edi_format.py | 6 | ||||
| -rw-r--r-- | addons/mail/controllers/main.py | 2 | ||||
| -rw-r--r-- | addons/phone_validation/tools/phone_validation.py | 2 | ||||
| -rw-r--r-- | addons/website_twitter/models/res_config_settings.py | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/addons/l10n_it_edi/models/account_edi_format.py b/addons/l10n_it_edi/models/account_edi_format.py index 6d52e5cf08e..c64fcd8f234 100644 --- a/addons/l10n_it_edi/models/account_edi_format.py +++ b/addons/l10n_it_edi/models/account_edi_format.py @@ -67,7 +67,7 @@ class AccountEdiFormat(models.Model): elif elements and elements[0].text and elements[0].text == 'TD04': self_ctx = invoice.with_context(default_move_type='in_refund') else: - _logger.info(_('Document type not managed: %s.') % (elements[0].text)) + _logger.info('Document type not managed: %s.', elements[0].text) # type must be present in the context to get the right behavior of the _default_journal method (account.move). # journal_id must be present in the context to get the right behavior of the _default_account method (account.move.line). @@ -83,9 +83,9 @@ class AccountEdiFormat(models.Model): else: company = self.env.company if elements: - _logger.info(_('Company not found with codice fiscale: %s. The company\'s user is set by default.', elements[0].text)) + _logger.info('No company found with codice fiscale: %s. The user\'s company is set by default.', elements[0].text) else: - _logger.info(_('Company not found. The company\'s user is set by default.')) + _logger.info('Company not found. The user\'s company is set by default.') if not self.env.is_superuser(): if self.env.company != company: diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 46d14831dd5..c6142ad284b 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -37,7 +37,7 @@ class MailController(http.Controller): def _check_token_and_record_or_redirect(cls, model, res_id, token): comparison = cls._check_token(token) if not comparison: - _logger.warning(_('Invalid token in route %s', request.httprequest.url)) + _logger.warning('Invalid token in route %s', request.httprequest.url) return comparison, None, cls._redirect_to_messaging() try: record = request.env[model].browse(res_id).exists() diff --git a/addons/phone_validation/tools/phone_validation.py b/addons/phone_validation/tools/phone_validation.py index ac96c82a87a..26f92a99310 100644 --- a/addons/phone_validation/tools/phone_validation.py +++ b/addons/phone_validation/tools/phone_validation.py @@ -48,7 +48,7 @@ try: if raise_exception: raise else: - _logger.warning(_('Unable to format %s:\n%s'), number, e) + _logger.warning('Unable to format phone number %s:\n%s', number, e) return number if force_format == 'E164': phone_fmt = phonenumbers.PhoneNumberFormat.E164 diff --git a/addons/website_twitter/models/res_config_settings.py b/addons/website_twitter/models/res_config_settings.py index b590f379ec1..14b6ec5acd7 100644 --- a/addons/website_twitter/models/res_config_settings.py +++ b/addons/website_twitter/models/res_config_settings.py @@ -55,11 +55,11 @@ class ResConfigSettings(models.TransientModel): _logger.info("%s - %s" % (e.response.status_code, e.response.reason), exc_info=True) raise UserError("%s - %s" % (e.response.status_code, e.response.reason) + ':' + self._get_twitter_exception_message(e.response.status_code)) except IOError: - _logger.info(_('We failed to reach a twitter server.'), exc_info=True) - raise UserError(_('Internet connection refused') + ' ' + _('We failed to reach a twitter server.')) + _logger.info('We failed to reach a twitter server.', exc_info=True) + raise UserError(_('Internet connection refused: We failed to reach a twitter server.')) except Exception: - _logger.info(_('Please double-check your Twitter API Key and Secret!'), exc_info=True) - raise UserError(_('Twitter authorization error!') + ' ' + _('Please double-check your Twitter API Key and Secret!')) + _logger.info('Please double-check your Twitter API Key and Secret!', exc_info=True) + raise UserError(_('Twitter authorization error! Please double-check your Twitter API Key and Secret!')) @api.model def create(self, vals): |
