redhat-documentation / vale-at-red-hat

Vale config files, styles, and docs to help individuals and teams roll out Vale
https://redhat-documentation.github.io/vale-at-red-hat/
MIT License
39 stars 58 forks source link

Check for {product-title} usage #792

Open bhardesty opened 5 months ago

bhardesty commented 5 months ago

Is your feature request related to a problem? Describe. The OpenShift docs use the {product-title} attribute extensively, but this occasionally resolves to grammatically-incorrect phrases in certain OpenShift distributions. A common example is this phrase:

an {product-title} cluster

When {product-title} resolves to "OpenShift Container Platform" or "OpenShift Dedicated", this phrase is fine. But when it resolves to "Red Hat OpenShift Service on AWS", the phrase becomes "an Red Hat OpenShift Service on AWS cluster", which is grammatically incorrect.

Describe the solution you'd propose Warn the user that "an {product-title} cluster" may result in grammatically-incorrect wording if the content appears in the ROSA docs. If the content does appear in the ROSA docs, you should use, "a {product-title} cluster" instead.

Describe alternatives you've considered At the moment, the only way to check for this issue is to manually look for it during peer reviews.

One alternative would be to create a couple new attributes for this particular phrase. For example:

:ocp-osd-cluster-lower: an {product-title} cluster
:ocp-osd-cluster-upper: An {product-title} cluster
:rosa-cluster-lower: a {product-title} cluster
:rosa-cluster-upper: A {product-title} cluster

However, this does get a bit awkward to apply, and gets really tricky if we need to account for additional distributions (ARO, Microshift, etc.).

apinnick commented 3 months ago

I ran into a similar situation with KubeVirt vs OpenShift Virtualization.

I created upstream and downstream attributes:

:KubeVirt: KubeVirt
:a-KubeVirt: a KubeVirt

:KubeVirt: OpenShift Virtualization
:a-KubeVirt: an OpenShift Virtualization

I did not need an upper-case "A", only lower case.