Skip to content
Snippets Groups Projects
Commit 8a8d482b authored by Victor Feyens's avatar Victor Feyens
Browse files

[IMP] *: do not split translations to insert values

* Less translations
* Translations more precise and adapted to the context
parent 8363a10f
Branches
Tags
No related merge requests found
......@@ -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 '.*' ?"))
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment