40 lines
1.7 KiB
Plaintext
40 lines
1.7 KiB
Plaintext
Index: doc-backend/openacademy/models.py
|
|
===================================================================
|
|
--- doc-backend.orig/openacademy/models.py 2014-08-25 14:43:52.288143046 +0200
|
|
+++ doc-backend/openacademy/models.py 2014-08-25 14:49:46.148137793 +0200
|
|
@@ -1,7 +1,7 @@
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from datetime import timedelta
|
|
-from openerp import models, fields, api, exceptions
|
|
+from openerp import models, fields, api, exceptions, _
|
|
|
|
class Course(models.Model):
|
|
_name = 'openacademy.course'
|
|
@@ -85,15 +85,15 @@
|
|
if self.seats < 0:
|
|
return {
|
|
'warning': {
|
|
- 'title': "Incorrect 'seats' value",
|
|
- 'message': "The number of available seats may not be negative",
|
|
+ 'title': _("Incorrect 'seats' value"),
|
|
+ 'message': _("The number of available seats may not be negative"),
|
|
},
|
|
}
|
|
if self.seats < len(self.attendee_ids):
|
|
return {
|
|
'warning': {
|
|
- 'title': "Too many attendees",
|
|
- 'message': "Increase seats or remove excess attendees",
|
|
+ 'title': _("Too many attendees"),
|
|
+ 'message': _("Increase seats or remove excess attendees"),
|
|
},
|
|
}
|
|
|
|
@@ -135,4 +135,4 @@
|
|
@api.constrains('instructor_id', 'attendee_ids')
|
|
def _check_instructor_not_in_attendees(self):
|
|
if self.instructor_id and self.instructor_id in self.attendee_ids:
|
|
- raise exceptions.ValidationError("A session's instructor can't be an attendee")
|
|
+ raise exceptions.ValidationError(_("A session's instructor can't be an attendee"))
|