1 Index: addons/openacademy/models.py
2 ===================================================================
3 --- addons.orig/openacademy/models.py 2014-08-26 17:26:19.919783076 +0200
4 +++ addons/openacademy/models.py 2014-08-26 17:26:19.915783076 +0200
6 # -*- coding: utf-8 -*-
8 from datetime import timedelta
9 -from openerp import models, fields, api, exceptions
10 +from openerp import models, fields, api, exceptions, _
12 class Course(models.Model):
13 _name = 'openacademy.course'
18 - 'title': "Incorrect 'seats' value",
19 - 'message': "The number of available seats may not be negative",
20 + 'title': _("Incorrect 'seats' value"),
21 + 'message': _("The number of available seats may not be negative"),
24 if self.seats < len(self.attendee_ids):
27 - 'title': "Too many attendees",
28 - 'message': "Increase seats or remove excess attendees",
29 + 'title': _("Too many attendees"),
30 + 'message': _("Increase seats or remove excess attendees"),
35 @api.constrains('instructor_id', 'attendee_ids')
36 def _check_instructor_not_in_attendees(self):
37 if self.instructor_id and self.instructor_id in self.attendee_ids:
38 - raise exceptions.ValidationError("A session's instructor can't be an attendee")
39 + raise exceptions.ValidationError(_("A session's instructor can't be an attendee"))