Use sentence case for mid-sentence work item type names
What does this MR do and why?
Work item type names are stored in title case and interpolated into UI strings through %{workItemType}. Mid-sentence that produced title case where Pajamas calls for sentence case. Because merge request !249565 (merged) fixed only the close and reopen paths, the More actions dropdown mixed both conventions:
Close key result
Delete Key Result
Copy Key Result email addressThis MR extracts the lowercasing that MR duplicated into a lowercaseWorkItemType helper in work_items/utils.js, as suggested during its review, and applies it to the mid-sentence call sites across 13 components.
Sentence-initial strings such as %{workItemType} created. keep their capitalization, so each call site was assessed individually rather than replaced wholesale. No locale/gitlab.pot change is needed, because only the interpolated value changes, not the message ID.
Two strings the issue's inventory did not name are also covered:
- The Add dropdown in the work item tree, which uses
%{workItemName}rather than%{workItemType}and so does not appear in the issue's regeneration grep. Without it the dropdown would readNew Taskabove aCreate taskbutton. - Three error messages local to
work_item_actions.vue, which are separate from the shared message IDs inconstants.js.
Left for follow-up: the four shared error message IDs in work_items/constants.js (roughly 34 references), the two EE lifecycle strings that follow a colon, and the %{childItemType} placeholder in the change-type child warning.
Resolves #613315 (closed)
Screenshots or screen recordings
Request if needed.
How to set up and validate locally
- Open a key result or objective in a group that has OKRs available.
- Open the More actions dropdown and confirm Delete key result and Copy key result email address now match Close key result.
- In the Child items section, select Add and confirm the dropdown reads New key result and Existing key result, and that the form button reads Create key result.
- Confirm the toast after creating an item still reads Key result created. with a capital K.