fix(i18n): default tasks checklists

This commit is contained in:
Matteo Pagliazzi
2014-05-11 17:11:57 +02:00
parent f29eaab719
commit ce69b42b2b
+8
View File
@@ -364,6 +364,14 @@ UserSchema.pre('save', function(next) {
}else{
newTask.text = task.text(self.preferences.language);
newTask.notes = task.notes(self.preferences.language);
if(newTask.checklist){
newTask.checklist = _.map(newTask.checklist, function(checklistItem){
var newChecklistItem = checklistItem;
newChecklistItem.text = checklistItem.text(self.preferences.language);
return newChecklistItem;
});
}
}
return newTask;