From 9020bf6c8b1e60e6b8d9fc09f1f743ce9e2ed76c Mon Sep 17 00:00:00 2001 From: Marcin Sedlak-Jakubowski <msedlakjakubowski@gitlab.com> Date: Thu, 22 Jun 2023 13:31:16 +0200 Subject: [PATCH] Remove parenthesis plurals Related to docs guidance: https://docs.gitlab.com/ee/development/documentation/styleguide/word_list.html#s Changelog: other EE: true --- .../assignees/collapsed_assignee_list.vue | 2 +- .../reviewers/collapsed_reviewer_list.vue | 2 +- .../components/sidebar/sidebar_assignees.vue | 6 ++-- app/helpers/form_helper.rb | 8 ++--- .../issue_and_merge_request_actions.rb | 6 ++-- .../quick_actions/merge_request_actions.rb | 6 ++-- ee/spec/frontend/users_select/index_spec.js | 4 +-- .../issue_and_merge_request_actions.rb | 2 +- .../quick_actions/merge_request_actions.rb | 4 +-- locale/gitlab.pot | 34 ++++++++----------- .../components/alert_management_table_spec.js | 2 +- .../assignees/collapsed_assignee_list_spec.js | 2 +- 12 files changed, 36 insertions(+), 42 deletions(-) diff --git a/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue b/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue index 884edc97016ee..577c01c50ff4a 100644 --- a/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue +++ b/app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue @@ -17,7 +17,7 @@ const generateCollapsedAssigneeTooltip = ({ renderUsers, allUsers, tooltipTitleM }); if (!allUsers.length) { - return __('Assignee(s)'); + return __('Assignees'); } if (allUsers.length > names.length) { names.push(sprintf(__('+ %{amount} more'), { amount: allUsers.length - names.length })); diff --git a/app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue b/app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue index 6f82178b6fdbf..88a74784dd296 100644 --- a/app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue +++ b/app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue @@ -67,7 +67,7 @@ export default { const names = renderUsers.map((u) => u.name); if (!this.users.length) { - return __('Reviewer(s)'); + return __('Reviewers'); } if (this.users.length > names.length) { diff --git a/app/assets/javascripts/vue_shared/alert_details/components/sidebar/sidebar_assignees.vue b/app/assets/javascripts/vue_shared/alert_details/components/sidebar/sidebar_assignees.vue index 4ec301b946b1a..2d3815439a624 100644 --- a/app/assets/javascripts/vue_shared/alert_details/components/sidebar/sidebar_assignees.vue +++ b/app/assets/javascripts/vue_shared/alert_details/components/sidebar/sidebar_assignees.vue @@ -22,15 +22,15 @@ const DATA_REFETCH_DELAY = 250; export default { i18n: { FETCH_USERS_ERROR: s__( - 'AlertManagement|There was an error while updating the assignee(s) list. Please try again.', + 'AlertManagement|There was an error while updating the assignees list. Please try again.', ), UPDATE_ALERT_ASSIGNEES_ERROR: s__( - 'AlertManagement|There was an error while updating the assignee(s) of the alert. Please try again.', + 'AlertManagement|There was an error while updating the assignees of the alert. Please try again.', ), UPDATE_ALERT_ASSIGNEES_GRAPHQL_ERROR: s__( 'AlertManagement|This assignee cannot be assigned to this alert.', ), - ASSIGNEES_BLOCK: s__('AlertManagement|Alert assignee(s): %{assignees}'), + ASSIGNEES_BLOCK: s__('AlertManagement|Alert assignees: %{assignees}'), }, components: { GlIcon, diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 3d0b899e867c0..d5f38debae41d 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -165,8 +165,8 @@ def append_help_page_link(message, options) def multiple_assignees_dropdown_options(options) new_options = options.dup - new_options[:title] = _('Select assignee(s)') - new_options[:data][:'dropdown-header'] = 'Assignee(s)' + new_options[:title] = _('Select assignees') + new_options[:data][:'dropdown-header'] = 'Assignees' new_options[:data][:'max-select'] = ::Issuable::MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS new_options @@ -175,8 +175,8 @@ def multiple_assignees_dropdown_options(options) def multiple_reviewers_dropdown_options(options) new_options = options.dup - new_options[:title] = _('Select reviewer(s)') - new_options[:data][:'dropdown-header'] = _('Reviewer(s)') + new_options[:title] = _('Select reviewers') + new_options[:data][:'dropdown-header'] = _('Reviewers') new_options[:data][:'max-select'] = ::Issuable::MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS diff --git a/ee/lib/ee/gitlab/quick_actions/issue_and_merge_request_actions.rb b/ee/lib/ee/gitlab/quick_actions/issue_and_merge_request_actions.rb index 6f3085f5e819d..f987f00994f8c 100644 --- a/ee/lib/ee/gitlab/quick_actions/issue_and_merge_request_actions.rb +++ b/ee/lib/ee/gitlab/quick_actions/issue_and_merge_request_actions.rb @@ -8,10 +8,10 @@ module IssueAndMergeRequestActions include ::Gitlab::QuickActions::Dsl included do - desc { _('Change assignee(s)') } - explanation { _('Change assignee(s).') } + desc { _('Change assignees') } + explanation { _('Change assignees.') } execution_message do |ids| - _('Changed assignee(s).') + _('Changed assignees.') end params '@user1 @user2' types Issue, MergeRequest diff --git a/ee/lib/ee/gitlab/quick_actions/merge_request_actions.rb b/ee/lib/ee/gitlab/quick_actions/merge_request_actions.rb index 951f93d5d1ad9..c6416dfdc2d1a 100644 --- a/ee/lib/ee/gitlab/quick_actions/merge_request_actions.rb +++ b/ee/lib/ee/gitlab/quick_actions/merge_request_actions.rb @@ -8,9 +8,9 @@ module MergeRequestActions include ::Gitlab::QuickActions::Dsl included do - desc { _('Change reviewer(s)') } - explanation { _('Change reviewer(s).') } - execution_message { _('Changed reviewer(s).') } + desc { _('Change reviewers') } + explanation { _('Change reviewers.') } + execution_message { _('Changed reviewers.') } params '@user1 @user2' types MergeRequest condition do diff --git a/ee/spec/frontend/users_select/index_spec.js b/ee/spec/frontend/users_select/index_spec.js index 26292346da60c..5e18ce4c21e2b 100644 --- a/ee/spec/frontend/users_select/index_spec.js +++ b/ee/spec/frontend/users_select/index_spec.js @@ -34,7 +34,7 @@ describe('EE ~/users_select/index with multiple assignees', () => { describe('when users are selected', () => { const selectedUsers = [getUsersFixtureAt(2), getUsersFixtureAt(4)]; const expectation = createAssignedExpectation({ - header: 'Assignee(s)', + header: 'Assignees', assigned: selectedUsers, }); @@ -63,7 +63,7 @@ describe('EE ~/users_select/index with multiple assignees', () => { describe('with preselected user and opened', () => { const expectation = createAssignedExpectation({ - header: 'Assignee(s)', + header: 'Assignees', assigned: [getUsersFixtureAt(0)], }); diff --git a/lib/gitlab/quick_actions/issue_and_merge_request_actions.rb b/lib/gitlab/quick_actions/issue_and_merge_request_actions.rb index e549ee2e43aae..e01be4e06046d 100644 --- a/lib/gitlab/quick_actions/issue_and_merge_request_actions.rb +++ b/lib/gitlab/quick_actions/issue_and_merge_request_actions.rb @@ -44,7 +44,7 @@ module IssueAndMergeRequestActions desc do if quick_action_target.allows_multiple_assignees? - _('Remove all or specific assignee(s)') + _('Remove all or specific assignees') else _('Remove assignee') end diff --git a/lib/gitlab/quick_actions/merge_request_actions.rb b/lib/gitlab/quick_actions/merge_request_actions.rb index c374593bf01aa..9798b0eca2cf9 100644 --- a/lib/gitlab/quick_actions/merge_request_actions.rb +++ b/lib/gitlab/quick_actions/merge_request_actions.rb @@ -202,7 +202,7 @@ module MergeRequestActions desc do if quick_action_target.allows_multiple_reviewers? - _('Assign reviewer(s)') + _('Assign reviewers') else _('Assign reviewer') end @@ -244,7 +244,7 @@ module MergeRequestActions desc do if quick_action_target.allows_multiple_reviewers? - _('Remove all or specific reviewer(s)') + _('Remove all or specific reviewers') else _('Remove reviewer') end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 67f74288bde9e..df3a2da518adb 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -4248,7 +4248,7 @@ msgstr "" msgid "AlertManagement|Alert" msgstr "" -msgid "AlertManagement|Alert assignee(s): %{assignees}" +msgid "AlertManagement|Alert assignees: %{assignees}" msgstr "" msgid "AlertManagement|Alert detail" @@ -4353,10 +4353,10 @@ msgstr "" msgid "AlertManagement|There was an error displaying the alerts. Confirm your endpoint's configuration details to ensure alerts appear." msgstr "" -msgid "AlertManagement|There was an error while updating the assignee(s) list. Please try again." +msgid "AlertManagement|There was an error while updating the assignees list. Please try again." msgstr "" -msgid "AlertManagement|There was an error while updating the assignee(s) of the alert. Please try again." +msgid "AlertManagement|There was an error while updating the assignees of the alert. Please try again." msgstr "" msgid "AlertManagement|There was an error while updating the status of the alert." @@ -6345,7 +6345,7 @@ msgstr "" msgid "Assign reviewer" msgstr "" -msgid "Assign reviewer(s)" +msgid "Assign reviewers" msgstr "" msgid "Assign severity" @@ -6404,9 +6404,6 @@ msgstr "" msgid "Assignee lists not available with your current license" msgstr "" -msgid "Assignee(s)" -msgstr "" - msgid "Assignees" msgstr "" @@ -9067,10 +9064,10 @@ msgstr "" msgid "Change assignee" msgstr "" -msgid "Change assignee(s)" +msgid "Change assignees" msgstr "" -msgid "Change assignee(s)." +msgid "Change assignees." msgstr "" msgid "Change branches" @@ -9088,10 +9085,10 @@ msgstr "" msgid "Change path" msgstr "" -msgid "Change reviewer(s)" +msgid "Change reviewers" msgstr "" -msgid "Change reviewer(s)." +msgid "Change reviewers." msgstr "" msgid "Change role" @@ -9163,13 +9160,13 @@ msgstr "" msgid "Changed" msgstr "" -msgid "Changed assignee(s)." +msgid "Changed assignees." msgstr "" msgid "Changed merge method to %{merge_method}" msgstr "" -msgid "Changed reviewer(s)." +msgid "Changed reviewers." msgstr "" msgid "Changed squash option to %{squash_option}" @@ -38205,13 +38202,13 @@ msgstr "" msgid "Remove access" msgstr "" -msgid "Remove all or specific assignee(s)" +msgid "Remove all or specific assignees" msgstr "" msgid "Remove all or specific label(s)" msgstr "" -msgid "Remove all or specific reviewer(s)" +msgid "Remove all or specific reviewers" msgstr "" msgid "Remove approvers" @@ -39296,9 +39293,6 @@ msgid_plural "%d Reviewers" msgstr[0] "" msgstr[1] "" -msgid "Reviewer(s)" -msgstr "" - msgid "Reviewers" msgstr "" @@ -42149,7 +42143,7 @@ msgstr "" msgid "Select assignee" msgstr "" -msgid "Select assignee(s)" +msgid "Select assignees" msgstr "" msgid "Select branch" @@ -42221,7 +42215,7 @@ msgstr "" msgid "Select report" msgstr "" -msgid "Select reviewer(s)" +msgid "Select reviewers" msgstr "" msgid "Select severity (optional)" diff --git a/spec/frontend/alert_management/components/alert_management_table_spec.js b/spec/frontend/alert_management/components/alert_management_table_spec.js index afd88e1a6ac29..9980843defbdf 100644 --- a/spec/frontend/alert_management/components/alert_management_table_spec.js +++ b/spec/frontend/alert_management/components/alert_management_table_spec.js @@ -186,7 +186,7 @@ describe('AlertManagementTable', () => { expect(findSeverityFields().at(0).text()).toBe('Critical'); }); - it('renders Unassigned when no assignee(s) present', () => { + it('renders Unassigned when no assignees present', () => { mountComponent({ data: { alerts: { list: mockAlerts }, alertsCount, errored: false }, loading: false, diff --git a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js index 40d3d090bb436..52d68d7047eeb 100644 --- a/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js +++ b/spec/frontend/sidebar/components/assignees/collapsed_assignee_list_spec.js @@ -194,7 +194,7 @@ describe('CollapsedAssigneeList component', () => { ${[busyUser, canMergeUser]} | ${1} | ${1} | ${`${busyUser.name} (Busy), ${canMergeUser.name} (1/2 can merge)`} ${[busyUser]} | ${1} | ${0} | ${`${busyUser.name} (Busy) (cannot merge)`} ${[canMergeUser]} | ${0} | ${1} | ${`${canMergeUser.name}`} - ${[]} | ${0} | ${0} | ${'Assignee(s)'} + ${[]} | ${0} | ${0} | ${'Assignees'} `( 'with $users.length users, $busy is busy and $canMerge that can merge', ({ users, expected }) => { -- GitLab