diff --git a/test/api/v3/integration/shops/GET-shops_backgrounds.test.js b/test/api/v3/integration/shops/GET-shops_backgrounds.test.js index ed9d65a429..387a3bf40f 100644 --- a/test/api/v3/integration/shops/GET-shops_backgrounds.test.js +++ b/test/api/v3/integration/shops/GET-shops_backgrounds.test.js @@ -14,7 +14,7 @@ describe('GET /shops/backgrounds', () => { const shop = await user.get('/shops/backgrounds'); expect(shop.identifier).to.equal('backgroundShop'); expect(shop.text).to.eql(t('backgroundShop')); - expect(shop.notes).to.eql(t('backgroundShopText')); + expect(shop.notes).to.eql(t('backgroundShop')); expect(shop.imageName).to.equal('background_shop'); expect(shop.sets).to.be.an('array'); diff --git a/test/api/v3/integration/tasks/DELETE-tasks_id.test.js b/test/api/v3/integration/tasks/DELETE-tasks_id.test.js index 7700c5ea56..7218592e69 100644 --- a/test/api/v3/integration/tasks/DELETE-tasks_id.test.js +++ b/test/api/v3/integration/tasks/DELETE-tasks_id.test.js @@ -31,7 +31,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -41,7 +41,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); @@ -123,7 +123,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.del('/tasks/550e8400-e29b-41d4-a716-446655440000')).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -137,7 +137,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.del(`/tasks/${anotherUsersTask._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/GET-tasks_challenge_challengeId.test.js b/test/api/v3/integration/tasks/GET-tasks_challenge_challengeId.test.js index 9a2a0eb40b..6d92b47b9d 100644 --- a/test/api/v3/integration/tasks/GET-tasks_challenge_challengeId.test.js +++ b/test/api/v3/integration/tasks/GET-tasks_challenge_challengeId.test.js @@ -47,7 +47,7 @@ describe('GET /tasks/:taskId', () => { await expect(user.get(`/tasks/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -68,7 +68,7 @@ describe('GET /tasks/:taskId', () => { await expect(anotherUser.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); diff --git a/test/api/v3/integration/tasks/GET-tasks_id.test.js b/test/api/v3/integration/tasks/GET-tasks_id.test.js index a1b43a8378..a699815491 100644 --- a/test/api/v3/integration/tasks/GET-tasks_id.test.js +++ b/test/api/v3/integration/tasks/GET-tasks_id.test.js @@ -21,7 +21,7 @@ describe('GET /tasks/:id', () => { await expect(user.get(`/tasks/${dummyId}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); @@ -63,7 +63,7 @@ describe('GET /tasks/:id', () => { await expect(anotherUser.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); @@ -118,7 +118,7 @@ describe('GET /tasks/:id', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); @@ -163,7 +163,7 @@ describe('GET /tasks/:id', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); diff --git a/test/api/v3/integration/tasks/POST-tasks_move_taskId_to_position.test.js b/test/api/v3/integration/tasks/POST-tasks_move_taskId_to_position.test.js index 1d87a5e6b8..e229e83282 100644 --- a/test/api/v3/integration/tasks/POST-tasks_move_taskId_to_position.test.js +++ b/test/api/v3/integration/tasks/POST-tasks_move_taskId_to_position.test.js @@ -23,7 +23,7 @@ describe('POST /tasks/:taskId/move/to/:position', () => { await expect(user.post(`/tasks/${generateUUID()}/move/to/1`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js b/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js index 638285945a..be356c38e0 100644 --- a/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js +++ b/test/api/v3/integration/tasks/POST-tasks_unlink-all_challengeId.test.js @@ -80,7 +80,7 @@ describe('POST /tasks/unlink-all/:challengeId', () => { await expect(user.get(`/tasks/${daily._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/POST-tasks_unlink-one_taskId.test.js b/test/api/v3/integration/tasks/POST-tasks_unlink-one_taskId.test.js index 3339e064ad..0ac8f64f7b 100644 --- a/test/api/v3/integration/tasks/POST-tasks_unlink-one_taskId.test.js +++ b/test/api/v3/integration/tasks/POST-tasks_unlink-one_taskId.test.js @@ -65,7 +65,7 @@ describe('POST /tasks/unlink-one/:taskId', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/challenges/DELETE-tasks_challenge_challengeId_checklist_itemId.test.js b/test/api/v3/integration/tasks/challenges/DELETE-tasks_challenge_challengeId_checklist_itemId.test.js index 02c66a0139..9325f27db2 100644 --- a/test/api/v3/integration/tasks/challenges/DELETE-tasks_challenge_challengeId_checklist_itemId.test.js +++ b/test/api/v3/integration/tasks/challenges/DELETE-tasks_challenge_challengeId_checklist_itemId.test.js @@ -22,7 +22,7 @@ describe('DELETE /tasks/:taskId/checklist/:itemId', () => { await expect(user.del(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/challenges/DELETE-tasks_id_challenge_challengeId.test.js b/test/api/v3/integration/tasks/challenges/DELETE-tasks_id_challenge_challengeId.test.js index f329775baf..22d8f83cfc 100644 --- a/test/api/v3/integration/tasks/challenges/DELETE-tasks_id_challenge_challengeId.test.js +++ b/test/api/v3/integration/tasks/challenges/DELETE-tasks_id_challenge_challengeId.test.js @@ -31,7 +31,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.del(`/tasks/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -51,7 +51,7 @@ describe('DELETE /tasks/:id', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -93,7 +93,7 @@ describe('DELETE /tasks/:id', () => { await expect(anotherUser.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -111,7 +111,7 @@ describe('DELETE /tasks/:id', () => { await expect(anotherUser.get(`/tasks/${anotherUsersNewChallengeTaskID}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); diff --git a/test/api/v3/integration/tasks/challenges/POST-tasks_challenge_challengeId_taskId_checklist.test.js b/test/api/v3/integration/tasks/challenges/POST-tasks_challenge_challengeId_taskId_checklist.test.js index a8e249d4cc..00307ef494 100644 --- a/test/api/v3/integration/tasks/challenges/POST-tasks_challenge_challengeId_taskId_checklist.test.js +++ b/test/api/v3/integration/tasks/challenges/POST-tasks_challenge_challengeId_taskId_checklist.test.js @@ -24,7 +24,7 @@ describe('POST /tasks/:taskId/checklist/', () => { })).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId.test.js b/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId.test.js index c9ffec5984..80032970d6 100644 --- a/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId.test.js +++ b/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId.test.js @@ -37,7 +37,7 @@ describe('PUT /tasks/:id', () => { })).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId_tasksId_checklist_itemId.test.js b/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId_tasksId_checklist_itemId.test.js index 5e8a45dc9f..dde27f1bb9 100644 --- a/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId_tasksId_checklist_itemId.test.js +++ b/test/api/v3/integration/tasks/challenges/PUT-tasks_challenge_challengeId_tasksId_checklist_itemId.test.js @@ -137,7 +137,7 @@ describe('PUT /tasks/:taskId/checklist/:itemId', () => { await expect(user.put(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/checklists/DELETE-tasks_taskId_checklist_itemId.test.js b/test/api/v3/integration/tasks/checklists/DELETE-tasks_taskId_checklist_itemId.test.js index 2016454178..5c66bc8d80 100644 --- a/test/api/v3/integration/tasks/checklists/DELETE-tasks_taskId_checklist_itemId.test.js +++ b/test/api/v3/integration/tasks/checklists/DELETE-tasks_taskId_checklist_itemId.test.js @@ -70,7 +70,7 @@ describe('DELETE /tasks/:taskId/checklist/:itemId', () => { await expect(user.del(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist.test.js b/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist.test.js index 80bb5377e4..c0177a3716 100644 --- a/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist.test.js +++ b/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist.test.js @@ -88,7 +88,7 @@ describe('POST /tasks/:taskId/checklist/', () => { })).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); diff --git a/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist_itemId_score.test.js b/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist_itemId_score.test.js index b54b860ebe..4f772ebaf7 100644 --- a/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist_itemId_score.test.js +++ b/test/api/v3/integration/tasks/checklists/POST-tasks_taskId_checklist_itemId_score.test.js @@ -80,7 +80,7 @@ describe('POST /tasks/:taskId/checklist/:itemId/score', () => { await expect(user.post(`/tasks/${generateUUID()}/checklist/${generateUUID()}/score`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/checklists/PUT-tasks_taskId_checklist_itemId.test.js b/test/api/v3/integration/tasks/checklists/PUT-tasks_taskId_checklist_itemId.test.js index cef2cbaac4..528deaa739 100644 --- a/test/api/v3/integration/tasks/checklists/PUT-tasks_taskId_checklist_itemId.test.js +++ b/test/api/v3/integration/tasks/checklists/PUT-tasks_taskId_checklist_itemId.test.js @@ -88,7 +88,7 @@ describe('PUT /tasks/:taskId/checklist/:itemId', () => { await expect(user.put(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/DELETE-group_tasks_id.test.js b/test/api/v3/integration/tasks/groups/DELETE-group_tasks_id.test.js index 73828accdc..45d2d918f8 100644 --- a/test/api/v3/integration/tasks/groups/DELETE-group_tasks_id.test.js +++ b/test/api/v3/integration/tasks/groups/DELETE-group_tasks_id.test.js @@ -45,7 +45,7 @@ describe('Groups DELETE /tasks/:id', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); @@ -60,7 +60,7 @@ describe('Groups DELETE /tasks/:id', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/POST-group_tasks_id_approve_userId.test.js b/test/api/v3/integration/tasks/groups/POST-group_tasks_id_approve_userId.test.js index 1d23e5f85c..9c3288fa42 100644 --- a/test/api/v3/integration/tasks/groups/POST-group_tasks_id_approve_userId.test.js +++ b/test/api/v3/integration/tasks/groups/POST-group_tasks_id_approve_userId.test.js @@ -38,7 +38,7 @@ describe('POST /tasks/:id/approve/:userId', () => { .to.eventually.be.rejected.and.to.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/POST-group_tasks_id_needs-work_userId.test.js b/test/api/v3/integration/tasks/groups/POST-group_tasks_id_needs-work_userId.test.js index 8472bc03aa..1299c75a16 100644 --- a/test/api/v3/integration/tasks/groups/POST-group_tasks_id_needs-work_userId.test.js +++ b/test/api/v3/integration/tasks/groups/POST-group_tasks_id_needs-work_userId.test.js @@ -38,7 +38,7 @@ describe('POST /tasks/:id/needs-work/:userId', () => { .to.eventually.be.rejected.and.to.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/POST-tasks_group_id_assign_user_id.test.js b/test/api/v3/integration/tasks/groups/POST-tasks_group_id_assign_user_id.test.js index 214a50fc03..044c58018d 100644 --- a/test/api/v3/integration/tasks/groups/POST-tasks_group_id_assign_user_id.test.js +++ b/test/api/v3/integration/tasks/groups/POST-tasks_group_id_assign_user_id.test.js @@ -42,7 +42,7 @@ describe('POST /tasks/:taskId/assign/:memberId', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/POST-tasks_task_id_unassign.test.js b/test/api/v3/integration/tasks/groups/POST-tasks_task_id_unassign.test.js index c1981b3061..0a9a09cbe1 100644 --- a/test/api/v3/integration/tasks/groups/POST-tasks_task_id_unassign.test.js +++ b/test/api/v3/integration/tasks/groups/POST-tasks_task_id_unassign.test.js @@ -44,7 +44,7 @@ describe('POST /tasks/:taskId/unassign/:memberId', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/checklists/DELETE-group_tasks_taskId_checklist_item.test.js b/test/api/v3/integration/tasks/groups/checklists/DELETE-group_tasks_taskId_checklist_item.test.js index 1830faa9f0..537b100363 100644 --- a/test/api/v3/integration/tasks/groups/checklists/DELETE-group_tasks_taskId_checklist_item.test.js +++ b/test/api/v3/integration/tasks/groups/checklists/DELETE-group_tasks_taskId_checklist_item.test.js @@ -65,7 +65,7 @@ describe('DELETE group /tasks/:taskId/checklist/:itemId', () => { await expect(user.del(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/tasks/groups/checklists/POST-group_tasks_taskId_checklist.test.js b/test/api/v3/integration/tasks/groups/checklists/POST-group_tasks_taskId_checklist.test.js index f1e553984d..257dd3dfa4 100644 --- a/test/api/v3/integration/tasks/groups/checklists/POST-group_tasks_taskId_checklist.test.js +++ b/test/api/v3/integration/tasks/groups/checklists/POST-group_tasks_taskId_checklist.test.js @@ -80,7 +80,7 @@ describe('POST group /tasks/:taskId/checklist/', () => { })).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); }); diff --git a/test/api/v3/integration/tasks/groups/checklists/PUT-group_tasks_taskId_checklist_itemId.test.js b/test/api/v3/integration/tasks/groups/checklists/PUT-group_tasks_taskId_checklist_itemId.test.js index 06c612f71b..2565da77e0 100644 --- a/test/api/v3/integration/tasks/groups/checklists/PUT-group_tasks_taskId_checklist_itemId.test.js +++ b/test/api/v3/integration/tasks/groups/checklists/PUT-group_tasks_taskId_checklist_itemId.test.js @@ -74,7 +74,7 @@ describe('PUT group /tasks/:taskId/checklist/:itemId', () => { await expect(user.put(`/tasks/${generateUUID()}/checklist/${generateUUID()}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js b/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js index 78a9d0d4b8..f806574e6d 100644 --- a/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js +++ b/test/api/v3/integration/user/POST-user_class_cast_spellId.test.js @@ -116,7 +116,7 @@ describe('POST /user/class/cast/:spellId', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v3/integration/user/POST-user_reset.test.js b/test/api/v3/integration/user/POST-user_reset.test.js index d25f360df0..11f771ce5a 100644 --- a/test/api/v3/integration/user/POST-user_reset.test.js +++ b/test/api/v3/integration/user/POST-user_reset.test.js @@ -27,7 +27,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.habits).to.be.empty; @@ -45,7 +45,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.dailys).to.be.empty; @@ -63,7 +63,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.todos).to.be.empty; @@ -81,7 +81,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.rewards).to.be.empty; diff --git a/test/api/v4/user/POST-user_class_cast_spellId.test.js b/test/api/v4/user/POST-user_class_cast_spellId.test.js index 986b65ac81..851500b3e1 100644 --- a/test/api/v4/user/POST-user_class_cast_spellId.test.js +++ b/test/api/v4/user/POST-user_class_cast_spellId.test.js @@ -101,7 +101,7 @@ describe('POST /user/class/cast/:spellId', () => { .to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); }); diff --git a/test/api/v4/user/POST-user_reset.test.js b/test/api/v4/user/POST-user_reset.test.js index d3da161d4a..1c98059cc6 100644 --- a/test/api/v4/user/POST-user_reset.test.js +++ b/test/api/v4/user/POST-user_reset.test.js @@ -27,7 +27,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.habits).to.be.empty; @@ -45,7 +45,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.dailys).to.be.empty; @@ -63,7 +63,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.todos).to.be.empty; @@ -81,7 +81,7 @@ describe('POST /user/reset', () => { await expect(user.get(`/tasks/${task._id}`)).to.eventually.be.rejected.and.eql({ code: 404, error: 'NotFound', - message: t('taskNotFound'), + message: t('messageTaskNotFound'), }); expect(user.tasksOrder.rewards).to.be.empty; diff --git a/website/client/src/components/achievements/welcome.vue b/website/client/src/components/achievements/welcome.vue index df5e71e39d..2c09c66d6f 100644 --- a/website/client/src/components/achievements/welcome.vue +++ b/website/client/src/components/achievements/welcome.vue @@ -52,7 +52,7 @@ class="btn btn-primary btn-lg flex-column" @click="ready()" > - {{ $t('imReady') }} + {{ $t('enterHabitica') }}
diff --git a/website/client/src/components/challenges/challengeDetail.vue b/website/client/src/components/challenges/challengeDetail.vue index 470da2d075..5b6e4907d5 100644 --- a/website/client/src/components/challenges/challengeDetail.vue +++ b/website/client/src/components/challenges/challengeDetail.vue @@ -100,7 +100,7 @@ - {{ $t('keepThem') }} + {{ $t('keepTasks') }} diff --git a/website/client/src/components/challenges/myChallenges.vue b/website/client/src/components/challenges/myChallenges.vue index ee4584eb16..8f31154ca3 100644 --- a/website/client/src/components/challenges/myChallenges.vue +++ b/website/client/src/components/challenges/myChallenges.vue @@ -42,7 +42,7 @@ {{ $t('noChallengeTitle') }}

- {{ $t('challengeDescription1') }} + {{ $t('challengeDetails') }}

{{ $t('challengeDescription2') }} diff --git a/website/client/src/components/group-plans/createGroupModalPages.vue b/website/client/src/components/group-plans/createGroupModalPages.vue index 1bd76ac8fc..2b314834ad 100644 --- a/website/client/src/components/group-plans/createGroupModalPages.vue +++ b/website/client/src/components/group-plans/createGroupModalPages.vue @@ -64,7 +64,7 @@ > @@ -74,7 +74,7 @@ :disabled="!newGroupIsReady" @click="createGroup()" > - {{ $t('createGroupPlan') }} + {{ $t('create') }} diff --git a/website/client/src/components/group-plans/taskInformation.vue b/website/client/src/components/group-plans/taskInformation.vue index 3395bd3d27..e215d80212 100644 --- a/website/client/src/components/group-plans/taskInformation.vue +++ b/website/client/src/components/group-plans/taskInformation.vue @@ -64,7 +64,7 @@ target="create-task-btn" placement="bottom" > - {{ $t('addTaskToGroupPlan') }} + {{ $t('create') }} diff --git a/website/client/src/components/groups/discovery.vue b/website/client/src/components/groups/discovery.vue index ff7ad74437..55f52f56a7 100644 --- a/website/client/src/components/groups/discovery.vue +++ b/website/client/src/components/groups/discovery.vue @@ -28,7 +28,7 @@ b-dropdown(:text="$t('sort')", right=true) class="svg-icon positive-icon" v-html="icons.positiveIcon" > - {{ $t('createGuild2') }} + {{ $t('create') }} diff --git a/website/client/src/components/groups/groupPlan.vue b/website/client/src/components/groups/groupPlan.vue index 9d932760c5..6fc137a31f 100644 --- a/website/client/src/components/groups/groupPlan.vue +++ b/website/client/src/components/groups/groupPlan.vue @@ -222,7 +222,7 @@ > @@ -232,7 +232,7 @@ :disabled="!newGroupIsReady" @click="createGroup()" > - {{ $t('createGroupPlan') }} + {{ $t('create') }} diff --git a/website/client/src/components/groups/myGuilds.vue b/website/client/src/components/groups/myGuilds.vue index f091f00fe7..0d775fab2e 100644 --- a/website/client/src/components/groups/myGuilds.vue +++ b/website/client/src/components/groups/myGuilds.vue @@ -26,7 +26,7 @@ class="svg-icon positive-icon" v-html="icons.positiveIcon" > - {{ $t('createGuild2') }} + {{ $t('create') }} - diff --git a/website/client/src/components/tasks/user.vue b/website/client/src/components/tasks/user.vue index 3777703974..9e73cbe263 100644 --- a/website/client/src/components/tasks/user.vue +++ b/website/client/src/components/tasks/user.vue @@ -49,7 +49,7 @@ v-if="tagsType.key !== 'groups' && !editingTags" class="d-block" @click="editTags(tagsType.key)" - >{{ $t('editTags2') }} + >{{ $t('editTagsText') }}

- {{ $t('addTaskToUser') }} + {{ $t('addTask') }}
diff --git a/website/client/src/components/userMenu/profileStats.vue b/website/client/src/components/userMenu/profileStats.vue index 73c117e950..291ab110b1 100644 --- a/website/client/src/components/userMenu/profileStats.vue +++ b/website/client/src/components/userMenu/profileStats.vue @@ -357,7 +357,7 @@ export default { body: this.$t('bodyAccess'), weapon: this.$t('mainHand'), _skip: 'skip', - shield: this.$t('offHand'), + shield: this.$t('offHandCapitalized'), }, allocateStatsList: { diff --git a/website/client/src/mixins/guide.js b/website/client/src/mixins/guide.js index 36e95d9e54..0234196f6b 100644 --- a/website/client/src/mixins/guide.js +++ b/website/client/src/mixins/guide.js @@ -58,7 +58,7 @@ export default { orphan: true, intro: this.$t('tourTavernPage'), final: true, - proceed: this.$t('tourAwesome'), + proceed: this.$t('awesome'), hideNavigation: true, }, ]], diff --git a/website/common/locales/en/backgrounds.json b/website/common/locales/en/backgrounds.json index 6ece6949a4..88fd3aa05c 100644 --- a/website/common/locales/en/backgrounds.json +++ b/website/common/locales/en/backgrounds.json @@ -2,7 +2,6 @@ "backgrounds": "Backgrounds", "background": "Background", "backgroundShop": "Background Shop", - "backgroundShopText": "Background Shop", "noBackground": "No Background Selected", "backgrounds062014": "SET 1: Released June 2014", diff --git a/website/common/locales/en/challenge.json b/website/common/locales/en/challenge.json index 4724e15264..375df7af7b 100644 --- a/website/common/locales/en/challenge.json +++ b/website/common/locales/en/challenge.json @@ -5,9 +5,8 @@ "brokenTask": "Broken Challenge Link: this task was part of a challenge, but has been removed from it. What would you like to do?", "keepIt": "Keep It", "removeIt": "Remove It", + "removeTasks": "Remove Tasks", "brokenChallenge": "Broken Challenge Link: this task was part of a challenge, but the challenge (or group) has been deleted. What to do with the orphan tasks?", - "keepThem": "Keep Tasks", - "removeThem": "Remove Tasks", "challengeCompleted": "This challenge has been completed, and the winner was <%- user %>! What to do with the orphan tasks?", "unsubChallenge": "Broken Challenge Link: this task was part of a challenge, but you have unsubscribed from the challenge. What to do with the orphan tasks?", "challenges": "Challenges", @@ -24,7 +23,6 @@ "createChallenge": "Create Challenge", "createChallengeAddTasks": "Add Challenge Tasks", "createChallengeCloneTasks": "Clone Challenge Tasks", - "addTaskToChallenge": "Add Task", "challengeTag": "Tag Name", "prize": "Prize", "publicChallengesTitle": "Public Challenges", @@ -32,7 +30,6 @@ "by": "by", "participants": "<%= membercount %> Participants", "join": "Join", - "exportChallengeCSV": "Export to CSV", "challengeCreated": "Challenge created", "sureDelCha": "Are you sure you want to delete this challenge?", "keepTasks": "Keep Tasks", @@ -60,7 +57,6 @@ "myChallenges": "My Challenges", "findChallenges": "Discover Challenges", "noChallengeTitle": "You don't have any Challenges.", - "challengeDescription1": "Challenges are community events in which players compete and earn prizes by completing a group of related tasks.", "challengeDescription2": "Find recommended Challenges based on your interests, browse Habitica's public Challenges, or create your own Challenges.", "noChallengeMatchFilters": "We couldn't find any matching Challenges.", "createdBy": "Created By", diff --git a/website/common/locales/en/character.json b/website/common/locales/en/character.json index 9d6938e1c0..18029b6b20 100644 --- a/website/common/locales/en/character.json +++ b/website/common/locales/en/character.json @@ -27,7 +27,6 @@ "color": "Color", "hair": "Hair", "bangs": "Bangs", - "hairBangs": "Bangs", "glasses": "Glasses", "hairSet1": "Hairstyle Set 1", "hairSet2": "Hairstyle Set 2", @@ -87,7 +86,6 @@ "allocateIntPop": "Add a Point to Intelligence", "noMoreAllocate": "Now that you've hit level 100, you won't gain any more Stat Points. You can continue leveling up, or start a new adventure at level 1 by using the Orb of Rebirth!", "stats": "Stats", - "achievs": "Achievements", "strength": "Strength", "strText": "Strength increases the chance of random \"critical hits\" and the Gold, Experience, and drop chance boost from them. It also helps deal damage to boss monsters.", "constitution": "Constitution", diff --git a/website/common/locales/en/contrib.json b/website/common/locales/en/contrib.json index 7d64aacda2..3cbac414fd 100644 --- a/website/common/locales/en/contrib.json +++ b/website/common/locales/en/contrib.json @@ -30,7 +30,6 @@ "contribLevel": "Contrib Tier", "hallContributors": "Hall of Contributors", "hallPatrons": "Hall of Patrons", - "UUID": "User ID", "noAdminAccess": "You don't have admin access.", "userNotFound": "User not found.", "invalidUUID": "UUID must be valid", diff --git a/website/common/locales/en/front.json b/website/common/locales/en/front.json index 5194269821..58c3e06b80 100644 --- a/website/common/locales/en/front.json +++ b/website/common/locales/en/front.json @@ -58,7 +58,7 @@ "setNewPass": "Set New Password", "password": "Password", "playButton": "Play", - "playButtonFull": "Enter Habitica", + "enterHabitica": "Enter Habitica", "presskit": "Press Kit", "presskitText": "Thanks for your interest in Habitica! The following images can be used for articles or videos about Habitica. For more information, please contact us at <%= pressEnquiryEmail %>.", "pkQuestion1": "What inspired Habitica? How did it start?", @@ -83,8 +83,6 @@ "pkBoss": "Bosses", "pkSamples": "Sample Screens", "pkWebsite": "Website", - "pkiOS": "iOS", - "pkAndroid": "Android", "privacy": "Privacy Policy", "register": "Register", "school": "School", diff --git a/website/common/locales/en/gear.json b/website/common/locales/en/gear.json index 6f8849d54c..ad9743dd62 100644 --- a/website/common/locales/en/gear.json +++ b/website/common/locales/en/gear.json @@ -1957,7 +1957,7 @@ "headArmoireBlackFloppyHatNotes": "Many spells have been sewn into this simple hat, giving it a bold black color. Increases Constitution, Perception, and Strength by <%= attrs %> each. Enchanted Armoire: Black Loungewear Set (Item 1 of 3).", "offhand": "off-hand item", - "offhandCapitalized": "Off-Hand Item", + "offHandCapitalized": "Off-Hand Item", "shieldBase0Text": "No Off-Hand Equipment", "shieldBase0Notes": "No shield or other off-hand item.", @@ -2320,7 +2320,6 @@ "shieldArmoireSoftBlackPillowNotes": "The brave warrior packs a pillow for any expedition. Guard yourself from tiresome tasks... even while you nap. Increases Intelligence and Perception by <%= attrs %> each. Enchanted Armoire: Black Loungewear Set (Item 3 of 3).", "back": "Back Accessory", - "backCapitalized": "Back Accessory", "backBase0Text": "No Back Accessory", "backBase0Notes": "No Back Accessory.", "animalTails": "Animal Tails", @@ -2414,7 +2413,6 @@ "backWolfTailNotes": "This tail makes you look like a loyal wolf! Confers no benefit.", "body": "Body Accessory", - "bodyCapitalized": "Body Accessory", "bodyBase0Text": "No Body Accessory", "bodyBase0Notes": "No Body Accessory.", @@ -2470,8 +2468,7 @@ "bodyArmoireClownsBowtieText": "Clown's Bow-Tie", "bodyArmoireClownsBowtieNotes": "A nice bow-tie is no joking matter, even for a clown. Increases Strength, Intelligence, Constitution and Perception by <%= attrs %> each. Enchanted Armoire: Clown Set (Item 5 of 5).", - "headAccessory": "head accessory", - "headAccessoryCapitalized": "Head Accessory", + "headAccessory": "Head Accessory", "accessories": "Accessories", "animalEars": "Animal Ears", @@ -2588,7 +2585,6 @@ "headAccessoryArmoireGogglesOfBookbindingNotes": "These goggles will help you zero in on any task, large or small! Increases Perception by <%= per %>. Enchanted Armoire: Bookbinder Set (Item 1 of 4).", "eyewear": "Eyewear", - "eyewearCapitalized": "Eyewear", "eyewearBase0Text": "No Eyewear", "eyewearBase0Notes": "No Eyewear.", diff --git a/website/common/locales/en/generic.json b/website/common/locales/en/generic.json index a39d9294bb..914542e0f5 100644 --- a/website/common/locales/en/generic.json +++ b/website/common/locales/en/generic.json @@ -49,7 +49,6 @@ "notEnoughGems": "Not enough Gems", "alreadyHave": "Whoops! You already have this item. No need to buy it again!", "delete": "Delete", - "gemsPopoverTitle": "Gems", "gems": "Gems", "needMoreGems": "Need More Gems?", "needMoreGemsInfo": "Purchase Gems now, or become a subscriber to buy Gems with Gold, get monthly mystery items, enjoy increased drop caps and more!", @@ -201,5 +200,6 @@ "selected": "Selected", "howManyToBuy": "How many would you like to buy?", "contactForm": "Contact the Moderation Team", - "loadEarlierMessages": "Load Earlier Messages" + "loadEarlierMessages": "Load Earlier Messages", + "askQuestion": "Ask a Question" } diff --git a/website/common/locales/en/groups.json b/website/common/locales/en/groups.json index a3e5235eb7..dac19498fe 100644 --- a/website/common/locales/en/groups.json +++ b/website/common/locales/en/groups.json @@ -5,26 +5,21 @@ "innCheckOutBannerShort": "You are checked into the Inn.", "resumeDamage": "Resume Damage", "helpfulLinks": "Helpful Links", - "communityGuidelinesLink": "Community Guidelines", "lookingForGroup": "Looking for Group (Party Wanted) Posts", "dataDisplayTool": "Data Display Tool", "requestFeature": "Request a Feature", - "askAQuestion": "Ask a Question", "askQuestionGuild": "Ask a Question (Habitica Help guild)", "contributing": "Contributing", "faq": "FAQ", "tutorial": "Tutorial", "glossary": "Glossary", "wiki": "Wiki", - "requestAF": "Request a Feature", - "dataTool": "Data Display Tool", "resources": "Resources", "communityGuidelines": "Community Guidelines", "bannedWordUsed": "Oops! Looks like this post contains a swearword, religious oath, or reference to an addictive substance or adult topic (<%= swearWordsUsed %>). Habitica has users from all backgrounds, so we keep our chat very clean. Feel free to edit your message so you can post it!", "bannedSlurUsed": "Your post contained inappropriate language, and your chat privileges have been revoked.", "party": "Party", "usernameCopied": "Username copied to clipboard.", - "createGroupPlan": "Create", "create": "Create", "userId": "User ID", "invite": "Invite", @@ -55,7 +50,6 @@ "search": "Search", "publicGuilds": "Public Guilds", "createGuild": "Create Guild", - "createGuild2": "Create", "guild": "Guild", "guilds": "Guilds", "sureKick": "Do you really want to remove this member from the Party/Guild?", @@ -237,7 +231,6 @@ "userMustBeMember": "User must be a member", "userIsNotManager": "User is not manager", "canOnlyApproveTaskOnce": "This task has already been approved.", - "addTaskToGroupPlan": "Create", "joinedGuild": "Joined a Guild", "joinedGuildText": "Ventured into the social side of Habitica by joining a Guild!", "badAmountOfGemsToPurchase": "Amount must be at least 1.", @@ -304,7 +297,6 @@ "wantToJoinPartyTitle": "Want to join a Party?", "wantToJoinPartyDescription": "Give your username to a friend who already has a Party, or head to the Party Wanted Guild to meet potential comrades!", "copy": "Copy", - "inviteToPartyOrQuest": "Invite Party to Quest", "questOwnerRewards": "Quest Owner Rewards", "updateParty": "Update Party", "upgradeToGroup": "Upgrade to Group", diff --git a/website/common/locales/en/npc.json b/website/common/locales/en/npc.json index baa748c6d1..5f0ac20e7d 100644 --- a/website/common/locales/en/npc.json +++ b/website/common/locales/en/npc.json @@ -116,7 +116,6 @@ "tourEquipmentPage": "This is where your Equipment is stored! Your Battle Gear affects your Stats. If you want to show different Equipment on your avatar without changing your Stats, click \"Enable Costume.\"", "equipmentAlreadyOwned": "You already own that piece of equipment", "tourOkay": "Okay!", - "tourAwesome": "Awesome!", "tourSplendid": "Splendid!", "welcomeToHabit": "Welcome to Habitica!", "welcome1": "Create a basic avatar.", @@ -125,7 +124,6 @@ "welcome2notes": "How well you do on your real-life tasks will control how well you do in the game!", "welcome3": "Progress in life and the game!", "welcome3notes": "As you improve your life, your avatar will level up and unlock pets, quests, equipment, and more!", - "imReady": "Enter Habitica", "limitedOffer": "Available until <%= date %>", "limitedAvailabilityDays": "Available for <%= days %>d <%= hours %>h <%= minutes %>m", "limitedAvailabilityHours": "Available for <%= hours %>h <%= minutes %>m", diff --git a/website/common/locales/en/quests.json b/website/common/locales/en/quests.json index 8fa5ee8864..688b7021d2 100644 --- a/website/common/locales/en/quests.json +++ b/website/common/locales/en/quests.json @@ -41,7 +41,6 @@ "questConfirm": "Are you sure you want to start this Quest? Not all Party members have accepted the Quest invite. Quests start automatically after all members respond to the invite.", "sureCancel": "Are you sure you want to cancel this Quest? Canceling the Quest will cancel all accepted and pending invitations. The Quest will be returned to the owner's inventory.", "sureAbort": "Are you sure you want to cancel this Quest? All progress will be lost. The Quest will be returned to the owner's inventory.", - "bossRageTitle": "Rage", "bossRageDescription": "When this bar fills, the boss will unleash a special attack!", "selectQuest": "Select Quest", "startQuest": "Start Quest", diff --git a/website/common/locales/en/tasks.json b/website/common/locales/en/tasks.json index f63d42fb6a..0d8b395665 100644 --- a/website/common/locales/en/tasks.json +++ b/website/common/locales/en/tasks.json @@ -7,7 +7,6 @@ "addATitle": "Add a title", "editATask": "Edit <%= type %>", "createTask": "Create <%= type %>", - "addTaskToUser": "Add Task", "scheduled": "Scheduled", "theseAreYourTasks": "These are your <%= taskType %>", "habit": "Habit", @@ -72,9 +71,8 @@ "silver": "Silver (100 silver = 1 gold)", "price": "Price", "tags": "Tags", - "editTags": "Edit", "newTag": "New Tag", - "editTags2": "Edit Tags", + "editTagsText": "Edit Tags", "toRequired": "You must supply a \"to\" property", "startDate": "Start Date", "streaks": "Streak Achievements", @@ -96,7 +94,6 @@ "taskToTop": "To top", "taskToBottom": "To bottom", "taskAliasAlreadyUsed": "Task alias already used on another task.", - "taskNotFound": "Task not found.", "invalidTaskType": "Task type must be one of \"habit\", \"daily\", \"todo\", \"reward\".", "invalidTasksType": "Task type must be one of \"habits\", \"dailys\", \"todos\", \"rewards\".", "invalidTasksTypeExtra": "Task type must be one of \"habits\", \"dailys\", \"todos\", \"rewards\", \"completedTodos\".", diff --git a/website/common/script/content/quests.js b/website/common/script/content/quests.js index 084cadd8d6..54f90b9f8c 100644 --- a/website/common/script/content/quests.js +++ b/website/common/script/content/quests.js @@ -3861,7 +3861,7 @@ each(quests, (v, key) => { }); if (b.rage) { defaults(b.rage, { - title: t('bossRageTitle'), + title: t('rage'), description: t('bossRageDescription'), }); } diff --git a/website/server/controllers/api-v3/shops.js b/website/server/controllers/api-v3/shops.js index f94129cb1f..efaaff2395 100644 --- a/website/server/controllers/api-v3/shops.js +++ b/website/server/controllers/api-v3/shops.js @@ -135,7 +135,7 @@ api.getBackgroundShopItems = { const resObject = { identifier: 'backgroundShop', text: res.t('backgroundShop'), - notes: res.t('backgroundShopText'), + notes: res.t('backgroundShop'), imageName: 'background_shop', sets: shops.getBackgroundShopSets(user, req.language), }; diff --git a/website/server/controllers/api-v3/tasks.js b/website/server/controllers/api-v3/tasks.js index e107d6d19e..5c20a9f4d7 100644 --- a/website/server/controllers/api-v3/tasks.js +++ b/website/server/controllers/api-v3/tasks.js @@ -511,27 +511,27 @@ api.getTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } else if (task.group.id && !task.userId) { // @TODO: Abstract this access snippet const fields = requiredGroupFields.concat(' managers'); const group = await Group.getGroup({ user, groupId: task.group.id, fields }); - if (!group) throw new NotFound(res.t('taskNotFound')); + if (!group) throw new NotFound(res.t('messageTaskNotFound')); const isNotGroupLeader = group.leader !== user._id; - if (!group.isMember(user) && isNotGroupLeader) throw new NotFound(res.t('taskNotFound')); + if (!group.isMember(user) && isNotGroupLeader) throw new NotFound(res.t('messageTaskNotFound')); // If the task belongs to a challenge make sure the user has rights (leader, admin or members) } else if (task.challenge.id && !task.userId) { const challenge = await Challenge.findOne({ _id: task.challenge.id }).select('leader').exec(); // @TODO: Abstract this access snippet - if (!challenge) throw new NotFound(res.t('taskNotFound')); + if (!challenge) throw new NotFound(res.t('messageTaskNotFound')); if (!challenge.canModify(user) && !challenge.isMember(user)) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } // If the task is owned by a user make it's the current one } else if (task.userId !== user._id) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } res.respond(200, task); @@ -607,14 +607,14 @@ api.updateTask = { const { taskId } = req.params; const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); const challenge = await getChallengeFromTask(task); // Verify that the user can modify the task. if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } else if (task.group.id && !task.userId) { // If the task is in a group and only modifying `collapseChecklist`, // the modification should be allowed. @@ -825,7 +825,7 @@ api.moveTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); @@ -913,7 +913,7 @@ api.addChecklistItem = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); @@ -965,7 +965,7 @@ api.scoreCheckListItem = { const { taskId } = req.params; const task = await Tasks.Task.findByIdOrAlias(taskId, user._id, { userId: user._id }); - if (!task) throw new NotFound(res.t('taskNotFound')); + if (!task) throw new NotFound(res.t('messageTaskNotFound')); if (task.type !== 'daily' && task.type !== 'todo') throw new BadRequest(res.t('checklistOnlyDailyTodo')); const item = _.find(task.checklist, { id: req.params.itemId }); @@ -1021,7 +1021,7 @@ api.updateChecklistItem = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); @@ -1085,7 +1085,7 @@ api.removeChecklistItem = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); @@ -1150,7 +1150,7 @@ api.addTagToTask = { const { taskId } = req.params; const task = await Tasks.Task.findByIdOrAlias(taskId, user._id, { userId: user._id }); - if (!task) throw new NotFound(res.t('taskNotFound')); + if (!task) throw new NotFound(res.t('messageTaskNotFound')); const { tagId } = req.params; const alreadyTagged = task.tags.indexOf(tagId) !== -1; @@ -1206,7 +1206,7 @@ api.removeTagFromTask = { const { taskId } = req.params; const task = await Tasks.Task.findByIdOrAlias(taskId, user._id, { userId: user._id }); - if (!task) throw new NotFound(res.t('taskNotFound')); + if (!task) throw new NotFound(res.t('messageTaskNotFound')); const hasTag = removeFromArray(task.tags, req.params.tagId); if (!hasTag) throw new NotFound(res.t('tagNotFound')); @@ -1320,7 +1320,7 @@ api.unlinkOneTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id, { userId: user._id }); - if (!task) throw new NotFound(res.t('taskNotFound')); + if (!task) throw new NotFound(res.t('messageTaskNotFound')); if (!task.challenge.id) throw new BadRequest(res.t('cantOnlyUnlinkChalTask')); if (!task.challenge.broken) throw new BadRequest(res.t('cantOnlyUnlinkChalTask')); @@ -1418,7 +1418,7 @@ api.deleteTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const group = await getGroupFromTaskAndUser(task, user); const challenge = await getChallengeFromTask(task); diff --git a/website/server/controllers/api-v3/tasks/groups.js b/website/server/controllers/api-v3/tasks/groups.js index 34d4a76521..98da938496 100644 --- a/website/server/controllers/api-v3/tasks/groups.js +++ b/website/server/controllers/api-v3/tasks/groups.js @@ -144,7 +144,7 @@ api.groupMoveTask = { const to = Number(req.params.position); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } if (task.type === 'todo' && task.completed) throw new BadRequest(res.t('cantMoveCompletedTodo')); @@ -197,7 +197,7 @@ api.assignTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } if (!task.group.id) { @@ -272,7 +272,7 @@ api.unassignTask = { const task = await Tasks.Task.findByIdOrAlias(taskId, user._id); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } if (!task.group.id) { @@ -332,7 +332,7 @@ api.approveTask = { }).exec(); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const fields = requiredGroupFields.concat(' managers'); @@ -440,7 +440,7 @@ api.taskNeedsWork = { ]); if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } const fields = requiredGroupFields.concat(' managers'); diff --git a/website/server/libs/spells.js b/website/server/libs/spells.js index c185bbf471..9319205ab4 100644 --- a/website/server/libs/spells.js +++ b/website/server/libs/spells.js @@ -24,7 +24,7 @@ async function castTaskSpell (res, req, targetId, user, spell, quantity = 1) { _id: targetId, userId: user._id, }).exec(); - if (!task) throw new NotFound(res.t('taskNotFound')); + if (!task) throw new NotFound(res.t('messageTaskNotFound')); if (task.challenge.id) throw new BadRequest(res.t('challengeTasksNoCast')); if (task.group.id) throw new BadRequest(res.t('groupTasksNoCast')); diff --git a/website/server/libs/tasks/index.js b/website/server/libs/tasks/index.js index 603b22caf7..2e33d1da9a 100644 --- a/website/server/libs/tasks/index.js +++ b/website/server/libs/tasks/index.js @@ -262,7 +262,7 @@ async function getChallengeFromTask (task) { function verifyTaskModification (task, user, group, challenge, res) { if (!task) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } else if (task.group.id && !task.userId) { if (!group) throw new NotFound(res.t('groupNotFound')); if (canNotEditTasks(group, user)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks')); @@ -274,7 +274,7 @@ function verifyTaskModification (task, user, group, challenge, res) { // If the task is owned by a user make it's the current one } else if (task.userId !== user._id) { - throw new NotFound(res.t('taskNotFound')); + throw new NotFound(res.t('messageTaskNotFound')); } } @@ -474,7 +474,7 @@ export async function scoreTasks (user, taskScorings, req, res) { } }); - if (Object.keys(tasks).length === 0) throw new NotFound(res.t('taskNotFound')); + if (Object.keys(tasks).length === 0) throw new NotFound(res.t('messageTaskNotFound')); // Score each task separately to make sure changes to user._tmp don't overlap. // scoreTask is an async function but the only async operation happens when a group task