Use work item type in UI text
What does this MR do and why?
Fixes #368003 (closed) - use work item type when creating, updating, or deleting a work item.
Update the following UI text:
before | after |
---|---|
Task deleted | %{workItemType} deleted |
Are you sure you want to delete the task? This action cannot be reversed. | Are you sure you want to delete the %{workItemType}? This action cannot be reversed. |
Delete task | Delete %{workItemType} |
Something went wrong when creating a task. Please try again | Something went wrong when creating %{workItemType}. Please try again. |
Something went wrong when deleting the work item. Please try again. | Something went wrong when deleting the %{workItemType}. Please try again. |
Something went wrong while updating the work item. Please try again. | Something went wrong while updating the %{workItemType}. Please try again." |
Moves most UI text to constants.js, and pass in the workItemType
string. This means components can import i18nForType
instead of needing to import s__
, sprintf
, and capitalizeFirstLetter
.
How to set up and validate locally
- Enable
work_items
andwork_items_mvc_2
feature flags - Go to
gdk.test:3000/gitlab-org/gitlab-test/-/work_items/new
to create a new work item - To force errors in creating/updating. Either
gdk stop
(after loading the page), or Disable network in throttling section of Network tab in devtools - To view delete, create a work item, click ellipsis menu
Edited by Simon Knox