Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add branded capitalization guide #36846

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pepelsbey
Copy link
Member

@pepelsbey pepelsbey commented Nov 18, 2024

Description

  • Adds a guide for branded capitalization in general.
  • Most importantly, adds an exception for lowercase names at the beginning of a sentence.

Motivation

Comes from the #36840 and MDN content team discussion.

@pepelsbey pepelsbey requested review from bsmth and Josh-Cena November 18, 2024 15:34
@pepelsbey pepelsbey requested a review from a team as a code owner November 18, 2024 15:34
@github-actions github-actions bot added Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed labels Nov 18, 2024
Copy link
Contributor

The only exception is when the always-lowercase name is at the beginning of a sentence. In this case, use a sentence case. For example:

- Webpack is a module bundler you can install using npm.
- Npm can be used to install the webpack module bundler.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"npm" is definitely invariant. Under no occasion would you capitalize it—anywhere. It looks awkward anyway. "Webpack" is less strict about this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll move the discussion here if you don’t mind, so it won’t get in the way of merging your original PR.

I think it’s important to differentiate self-representation from our project’s writing guidelines. While we should respect the representation, by strictly following the lowercase, we might disrupt the reading flow of our users. If a sentence inside a paragraph or the beginning of a list item doesn’t start with a capital letter, it breaks the flow.

We discussed it with the MDN content team today, so I created this PR.

Copy link
Member Author

@pepelsbey pepelsbey Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under no occasion would you capitalize it
It looks awkward anyway

Even if it breaks the reading flow for our users? I think we should apply one of the HTML’s design principles here:

In case of conflict, consider users over authors over implementors over specifiers over theoretical purity.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we are breaking someone else's branding policy. If npm's own docs does this then so should we because they have the final right of interpretation over their brand. Capitalizing the brand name wrong is like spelling a word wrong—capitalization is invariant unless it is explicitly allowed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My two bits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to go along with Estelle's suggestion, but I wouldn't want to endorse the usage of "Npm" under any case—it's certainly a misspelling and arguably much worse than "NPM".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be OK with NPM at the start of a sentence.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW Google style guide is to (1) use the product name capitalization if necessary, but (2) prefer to reword so it's not an issue (as Estelle says, and as I would also prefer, aka the cowards' way out): https://developers.google.com/style/product-names. I think this is the best policy.

Even if it breaks the reading flow for our users? I think we should apply one of the HTML’s design principles here:

In case of conflict, consider users over authors over implementors over specifiers over theoretical purity.

I don't think anyone is going to disagree with this principle, but it's not clear which is better for readers - if they always see npm then Npm looks totally weird.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with starting a sentence like this:

npm is a package manager

And if we really want to avoid it, no objections to this either, as suggested above:

You can use npm to XYZ

@OnkarRuikar
Copy link
Contributor

Since we are on the topic, we don't have to manually correct the names like #36840. We can add a new rule to our linter to flag and auto-correct the names of known products/brands/companies. For example, the following existing rule:

content/.markdownlint.jsonc

Lines 195 to 200 in d278428

"name": "incorrect-spelling",
"message": "Incorrect spelling",
"searchPattern": ["/e-mail/ig", "/(w)eb site/ig"],
"replace": ["email", "$1ebsite"],
"searchScope": "all",
},
.

@Josh-Cena
Copy link
Member

We don't need custom rules. Just install https://www.npmjs.com/package/case-police. I used it for the majority of the fixes anyway.

@OnkarRuikar
Copy link
Contributor

We don't need custom rules. Just install npmjs.com/package/case-police. I used it for the majority of the fixes anyway.

Yeah! It will fit perfectly in the pre-commit hook.

@OnkarRuikar
Copy link
Contributor

Just install npmjs.com/package/case-police. I used it for the majority of the fixes anyway.

@Josh-Cena may I know why you didn't change Ajax → AJAX, Unix → UNIX, mongoDB → MongoDB?

I'll submit a followup PR to fix the rest and integrate the tool.

@Josh-Cena
Copy link
Member

MongoDB should be fixed. AJAX was fixed everywhere except the glossary, where we are consistently using Ajax (and writing "AJAX" as an alternative). UNIX is too widespread and in fact Unix is equally widely used so definitely not worth fixing.

@OnkarRuikar
Copy link
Contributor

AJAX was fixed everywhere except the glossary, where we are consistently using Ajax (and writing "AJAX" as an alternative).

This warrants an ignore comment at the end of the file.

@sideshowbarker sideshowbarker removed the request for review from a team January 4, 2025 03:57
@Josh-Cena
Copy link
Member

Any progress on this? I think we have reached some level of agreement to prefer rewording with npm.

@OnkarRuikar
Copy link
Contributor

Any progress on this? I think we have reached some level of agreement to prefer rewording with npm.

I tried to fix the bug in the tool, but the library author committed their own fix before merging my PR. Now, the tool has completely lost its ability to use magic comments in markdown files. 😭

@Josh-Cena, could you persuade the author to correct the regex so the tool remains useable with markdown?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Meta Content in the meta docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants