From 39437f51e26ffcadd529811da5c97695c043d0da Mon Sep 17 00:00:00 2001 From: sebalix Date: Thu, 30 Jun 2016 22:15:24 +0200 Subject: [PATCH] [FIX] base_multi_image - Make validation error messages translatable --- base_multi_image/models/image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base_multi_image/models/image.py b/base_multi_image/models/image.py index d01ffbd20..0da993558 100644 --- a/base_multi_image/models/image.py +++ b/base_multi_image/models/image.py @@ -175,22 +175,22 @@ class Image(models.Model): def _check_url(self): if self.storage == 'url' and not self.url: raise exceptions.ValidationError( - 'You must provide an URL for the image.') + _('You must provide an URL for the image.')) @api.constrains('storage', 'path') def _check_path(self): if self.storage == 'file' and not self.path: raise exceptions.ValidationError( - 'You must provide a file path for the image.') + _('You must provide a file path for the image.')) @api.constrains('storage', 'file_db_store') def _check_store(self): if self.storage == 'db' and not self.file_db_store: raise exceptions.ValidationError( - 'You must provide an attached file for the image.') + _('You must provide an attached file for the image.')) @api.constrains('storage', 'attachment_id') def _check_store(self): if self.storage == 'filestore' and not self.attachment_id: raise exceptions.ValidationError( - 'You must provide an attachment for the image.') + _('You must provide an attachment for the image.'))