Add GitLab::Utils.to_exclusive_sentence
What does this MR do?
Adds a new GitLab::Utils.to_exclusive_sentence
which wraps ActiveSupport
's Array#to_sentence
to convert the given array to a comma-separated sentence joined with localized 'or'
Strings instead of 'and'
. Refactors the existing code to use the new method.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
Edited by Luke Duncalfe