When an owner of a SCMHead, a SCMNavigator or a SCMSource only has one such instance (or where all instances agree on terminology) we need a way to allow the implementations to declare the terminology to be used.
- The GitHub terminology for the thing represented by a SCMNavigator is an "Organization". The GitHub terminology for the thing represented by a SCMSource is a "Repository". The GitHub terminology for the thing represented by a SCMHead is variously a "Branch", "Tag" or "Pull Request"
- With Bitbucket we have SCMNavigator = "Team", SCMSource = "Repository" and SCMHead = "Branch", "Tag" or "Pull Request"
- Other SCM systems may have their own completely different terminology.
Currently, the only way to expose this information is to use a hack with an AlternativeUiTextProvider, e.g. https://github.com/jenkinsci/github-organization-folder-plugin/blob/ebdc1c8e589cf0f24b542f33c08ad885ee66d553/src/main/java/org/jenkinsci/plugins/orgfolder/github/AlternativeUiTextProviderImpl.java
The hack route is prone to errors, for example if the bitbucket-branch-source plugin wanted to apply its terminology and applied the hack, depending on which AlternativeUiTextProvider ran first, a WorkflowMultiBranchProject with two navigators, one for a BitBucket Team and the other for a GitHub Organization would randomly get the pronoun of "Team" or "Organization". (The question of what should be shown in this case is outside the scope of this change, rather being an issue for the WorkflowMultiBranchProject... a simple solution would be to just sort and join them with / giving "Organization/Team" as the pronoun)