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 address

This 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 read New Task above a Create task button.
  • Three error messages local to work_item_actions.vue, which are separate from the shared message IDs in constants.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

  1. Open a key result or objective in a group that has OKRs available.
  2. Open the More actions dropdown and confirm Delete key result and Copy key result email address now match Close key result.
  3. 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.
  4. Confirm the toast after creating an item still reads Key result created. with a capital K.
Edited by Brendan Lynch

Merge request reports

Loading
Loading