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/web/controllers | |
| 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/web/controllers')
| -rw-r--r-- | addons/web/controllers/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index c69ee0d66ce..383308061de 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -773,11 +773,11 @@ class ExportXlsxWriter: # fails note that you can't export cell_value = pycompat.to_text(cell_value) except UnicodeDecodeError: - raise UserError(_("Binary fields can not be exported to Excel unless their content is base64-encoded. That does not seem to be the case for %s.") % self.field_names[column]) + raise UserError(_("Binary fields can not be exported to Excel unless their content is base64-encoded. That does not seem to be the case for %s.", self.field_names)[column]) if isinstance(cell_value, str): if len(cell_value) > self.worksheet.xls_strmax: - cell_value = _("The content of this cell is too long for an XLSX file (more than %s characters). Please use the CSV format for this export.") % self.worksheet.xls_strmax + cell_value = _("The content of this cell is too long for an XLSX file (more than %s characters). Please use the CSV format for this export.", self.worksheet.xls_strmax) else: cell_value = cell_value.replace("\r", " ") elif isinstance(cell_value, datetime.datetime): |
