summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-07-02 15:01:34 +0000
committerVictor Feyens <vfe@odoo.com>2020-07-06 10:29:39 +0000
commit8a8d482b43394f834bc0ddf3cb0c0c62f11b90b1 (patch)
tree9a4ea80ee59050cf7a5a6751d05adf51440e55ba
parent8363a10f6b9c7d0b85c412a1197bbec8c4f1166d (diff)
[IMP] *: do not split translations to insert values
* Less translations * Translations more precise and adapted to the context
-rw-r--r--addons/barcodes/models/barcodes.py6
-rw-r--r--addons/l10n_id_efaktur/models/account_move.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/barcodes/models/barcodes.py b/addons/barcodes/models/barcodes.py
index 5f82c963d2c..4678ab39b4e 100644
--- a/addons/barcodes/models/barcodes.py
+++ b/addons/barcodes/models/barcodes.py
@@ -195,10 +195,10 @@ class BarcodeRule(models.Model):
findall = re.findall("[{]|[}]", p) # p does not contain escaped { or }
if len(findall) == 2:
if not re.search("[{][N]*[D]*[}]", p):
- raise ValidationError(_("There is a syntax error in the barcode pattern ") + rule.pattern + _(": braces can only contain N's followed by D's."))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: braces can only contain N's followed by D's.", rule.pattern))
elif re.search("[{][}]", p):
- raise ValidationError(_("There is a syntax error in the barcode pattern ") + rule.pattern + _(": empty braces."))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: empty braces.", rule.pattern))
elif len(findall) != 0:
- raise ValidationError(_("There is a syntax error in the barcode pattern ") + rule.pattern + _(": a rule can only contain one pair of braces."))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: a rule can only contain one pair of braces.", rule.pattern))
elif p == '*':
raise ValidationError(_(" '*' is not a valid Regex Barcode Pattern. Did you mean '.*' ?"))
diff --git a/addons/l10n_id_efaktur/models/account_move.py b/addons/l10n_id_efaktur/models/account_move.py
index e19b6d17367..b0707975ab6 100644
--- a/addons/l10n_id_efaktur/models/account_move.py
+++ b/addons/l10n_id_efaktur/models/account_move.py
@@ -125,7 +125,7 @@ class AccountMove(models.Model):
raise ValidationError(_('Could not download E-faktur in draft state'))
if record.partner_id.l10n_id_pkp and not record.l10n_id_tax_number:
- raise ValidationError(_('Connect ') + record.name + _(' with E-faktur to download this report'))
+ raise ValidationError(_('Connect %(move_number)s with E-faktur to download this report', move_number=record.name))
self._generate_efaktur(',')
return self.download_csv()