diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 9613c2376fa..2cc1c05105b 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -65,7 +65,7 @@ class hr_employee_category(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You cannot create recursive Categories.', ['parent_id']) + (_check_recursion, _('Error ! You cannot create recursive Categories.'), ['parent_id']) ] hr_employee_category() @@ -208,8 +208,8 @@ class hr_employee(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You cannot create recursive Hierarchy of Employees.', ['parent_id']), - (_check_department_id, 'Error ! You cannot select a department for which the employee is the manager.', ['department_id']), + (_check_recursion, _('Error ! You cannot create recursive Hierarchy of Employees.'), ['parent_id']), + (_check_department_id, _('Error ! You cannot select a department for which the employee is the manager.'), ['department_id']), ] hr_employee() diff --git a/addons/hr/hr_department.py b/addons/hr/hr_department.py index 8e1d11716c2..ef2024c4e71 100644 --- a/addons/hr/hr_department.py +++ b/addons/hr/hr_department.py @@ -21,6 +21,7 @@ from osv import fields, osv import tools +from tools.translate import _ class hr_department(osv.osv): def name_get(self, cr, uid, ids, context=None): @@ -80,7 +81,7 @@ class hr_department(osv.osv): return True _constraints = [ - (_check_recursion, 'Error! You can not create recursive departments.', ['parent_id']) + (_check_recursion, _('Error! You can not create recursive departments.'), ['parent_id']) ] hr_department() diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index c51406f19de..ce830c59a42 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -85,7 +85,7 @@ class hr_attendance(osv.osv): return False return True - _constraints = [(_altern_si_so, 'Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)', ['action'])] + _constraints = [(_altern_si_so, _('Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)'), ['action'])] _order = 'name desc' hr_attendance() diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index b2b4c52865e..83ce70b6901 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -257,7 +257,7 @@ class hr_holidays(osv.osv): return False return True - _constraints = [(_check_date, 'Start date should not be larger than end date!\nNumber of Days should be greater than 1!', ['number_of_days_temp'])] + _constraints = [(_check_date, _('Start date should not be larger than end date!\nNumber of Days should be greater than 1!'), ['number_of_days_temp'])] def unlink(self, cr, uid, ids, context=None): if context is None: diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 77afdf15676..3ef3fdfad64 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -77,7 +77,7 @@ class hr_passport(osv.osv): 'note': fields.text('Description'), } _sql_constraints = [ - ('passport_no_uniq', 'unique (employee_id, name)', 'The Passport No must be unique !'), + ('passport_no_uniq', _('unique (employee_id, name)'), 'The Passport No must be unique !'), ] hr_passport() diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index c780951d07e..31b23f0c6b1 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -369,8 +369,8 @@ class hr_timesheet_sheet(osv.osv): _constraints = [ - (_sheet_date, 'You can not have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.', ['date_from','date_to']), - (_date_current_check, 'You must select a Current date which is in the timesheet dates !', ['date_current']), + (_sheet_date, _('You can not have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.'), ['date_from','date_to']), + (_date_current_check, _('You must select a Current date which is in the timesheet dates !'), ['date_current']), ] def action_set_to_draft(self, cr, uid, ids, *args):