diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-04 12:39:11 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | ba244cef01132347df4d2d9553ea3105ba13a938 (patch) | |
| tree | 20cdb55afb6b9f700bfe2844a90ca8de0050c941 /addons/payment_stripe | |
| parent | 3c3b88f6768e31417263b3828a874ca204e29514 (diff) | |
[IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))
Old syntax is still compatible but starts the migration to the new
syntax that catches error.
Diffstat (limited to 'addons/payment_stripe')
| -rw-r--r-- | addons/payment_stripe/models/payment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment_stripe/models/payment.py b/addons/payment_stripe/models/payment.py index d13f80bec46..a1a7da752bc 100644 --- a/addons/payment_stripe/models/payment.py +++ b/addons/payment_stripe/models/payment.py @@ -82,7 +82,7 @@ class PaymentAcquirerStripe(models.Model): except HTTPError: _logger.error(resp.text) stripe_error = resp.json().get('error', {}).get('message', '') - error_msg = " " + (_("Stripe gave us the following info about the problem: '%s'") % stripe_error) + error_msg = " " + (_("Stripe gave us the following info about the problem: '%s'", stripe_error)) raise ValidationError(error_msg) return resp.json() @@ -249,7 +249,7 @@ class PaymentTransactionStripe(models.Model): tx = self.search([('reference', '=', reference)]) if not tx: - error_msg = (_('Stripe: no order found for reference %s') % reference) + error_msg = _('Stripe: no order found for reference %s', reference) _logger.error(error_msg) raise ValidationError(error_msg) elif len(tx) > 1: |
