From 423df6e0d0cf3416cbb585ebf224a670094cfa69 Mon Sep 17 00:00:00 2001 From: John Costa Date: Tue, 26 May 2026 04:36:27 -0700 Subject: [PATCH] fix(tasks): use correct label when re-opening a completed task (#7792) The context menu's toggle-done button always showed "Mark as completed" regardless of the task's done state, because both branches of the ternary on line 151 of task-context-menu-inner.component.html referenced MARK_DONE. The matching icon already conditionally rendered undo vs check based on isDone, so only the label was misleading. Add a MARK_UNDONE i18n key ("Mark as not completed") and use it on the isDone branch, mirroring the existing icon switch. Closes #7785 --- .../task-context-menu-inner.component.html | 4 +++- src/app/t.const.ts | 1 + src/assets/i18n/en.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/features/tasks/task-context-menu/task-context-menu-inner/task-context-menu-inner.component.html b/src/app/features/tasks/task-context-menu/task-context-menu-inner/task-context-menu-inner.component.html index f51d8a40a2..9567a9c048 100644 --- a/src/app/features/tasks/task-context-menu/task-context-menu-inner/task-context-menu-inner.component.html +++ b/src/app/features/tasks/task-context-menu/task-context-menu-inner/task-context-menu-inner.component.html @@ -148,7 +148,9 @@ } @else { check } - {{ (task.isDone ? T.F.TASK.CMP.MARK_DONE : T.F.TASK.CMP.MARK_DONE) | translate }} + {{ + (task.isDone ? T.F.TASK.CMP.MARK_UNDONE : T.F.TASK.CMP.MARK_DONE) | translate + }} {{ kb.taskToggleDone }} diff --git a/src/app/t.const.ts b/src/app/t.const.ts index 5618905688..6d90c29f8e 100644 --- a/src/app/t.const.ts +++ b/src/app/t.const.ts @@ -1680,6 +1680,7 @@ const T = { ESTIMATE: 'F.TASK.CMP.ESTIMATE', FOCUS_SESSION: 'F.TASK.CMP.FOCUS_SESSION', MARK_DONE: 'F.TASK.CMP.MARK_DONE', + MARK_UNDONE: 'F.TASK.CMP.MARK_UNDONE', MOVE_TO_BACKLOG: 'F.TASK.CMP.MOVE_TO_BACKLOG', MOVE_TO_OTHER_PROJECT: 'F.TASK.CMP.MOVE_TO_OTHER_PROJECT', MOVE_TO_REGULAR: 'F.TASK.CMP.MOVE_TO_REGULAR', diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 88a0e7f6b9..dff370a845 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1642,6 +1642,7 @@ "ESTIMATE": "Estimate", "FOCUS_SESSION": "Start focus session", "MARK_DONE": "Mark as completed", + "MARK_UNDONE": "Mark as not completed", "MOVE_TO_BACKLOG": "Move to backlog", "MOVE_TO_OTHER_PROJECT": "Move to project", "MOVE_TO_REGULAR": "Move to regular list",