# Set plugin name to capitals?

**URL:** https://meta.discourse.org/t/set-plugin-name-to-capitals/367381
**Category:** Development
**Created:** [May 23, 2025, 3:15pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381 "2025-05-23T15:15:16Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 23, 2025, 3:15pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/1 "2025-05-23T15:15:16Z")

</div>

This is probably a dumb question, but my slight OCD is kicking in.  
I created a plugin but only the first word of the name is capitalized.  
I looked at a few other plugin.rb files and don’t see any capitalized words in there or in /config/settings.yml either.  
Is there another file I need to create to do what I want?

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [May 24, 2025, 1:57am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/2 "2025-05-24T01:57:49Z")

</div>

You can probably do this with CSS.  
You can target the plugin name element and use `text-transform: capitalize`. This will make the words in captitals.

[I’m on mobile right now so I can’t check the element]

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 2:21am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/3 "2025-05-24T02:21:26Z")

</div>

That would fix it on my site, but if you install my plugin, it would still be broken on your site.  
I’m looking for a solution to adjust the plugin itself, I don’t think other plugins are using CSS to achieve this.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [May 24, 2025, 2:26am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/4 "2025-05-24T02:26:48Z")

</div>

Hmm… I have some sort of an idea on why this happens, but to be sure, can I know what plugin has this problem?

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 2:28am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/5 "2025-05-24T02:28:37Z")

</div>

I built a custom plugin. I’d like to eventually share it with the community, but I’d like to fix at least this one thing that’s giving me Forrest Whitacre eye before I do so.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [May 24, 2025, 2:44am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/6 "2025-05-24T02:44:02Z")

</div>

Is it possible to send your yml file for the settings, or the locale file?  
Thanks.

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 2:45am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/7 "2025-05-24T02:45:59Z")

</div>

I just sent it via DM.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [May 24, 2025, 4:43am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/8 "2025-05-24T04:43:28Z")

</div>

> [@tknospdr](#):
>
> it would still be broken on your site

Well, if I install your plugin and every word is captilized, from my, and majority of the world, point of view your plugin is broken that way.

You can’t win. You have to choose if you want to do how you want or how most of the globe works 🤷‍♂️

Not a major question, though.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 24, 2025, 7:06am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/10 "2025-05-24T07:06:37Z")

</div>

> [@tknospdr](#):
>
> I looked at a few other plugin.rb files and don’t see any capitalized words in there or in /config/settings.yml either.

This is a hint 😉  
Discourse plugin names and settings are lowercase as a convention.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 24, 2025, 7:13am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/11 "2025-05-24T07:13:54Z")

</div>

I wasn’t sure what the current convention was for the name displayed on the `/plugins` page. There seems to be a mix of sentence and title case for different ones (eg [Data explorer](https://meta.discourse.org/t/32566?silent=true) v Documentation Categories)

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 24, 2025, 8:24am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/12 "2025-05-24T08:24:38Z")

</div>

If this is about the _display name_, [this](https://github.com/discourse/discourse/blob/main/lib/plugin/instance.rb#L170C1-L175C20) is how it works.

If your plugin has metadata `# name: discourse-foo-bar` in `plugin.rb`,

Then the plugin will be shown as “Foo bar”

But you can override this in locales/client.XX.yml

```plaintext
en:
  admin_js:
    admin:
      site_settings:
        categories:
          discourse_foo_bar: "Discourse Foo Bar Blah"

```

The plugins will be _sorted_ by what comes after discourse- though.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [May 24, 2025, 8:32am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/13 "2025-05-24T08:32:31Z")

</div>

What about the

> <https://github.com/discourse/discourse-subscriptions/blob/33d033c23b37667ba086b11fe0b6eebff2e8e7cd/config/locales/client.en.yml#L33-L35>

?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 24, 2025, 10:09am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/14 "2025-05-24T10:09:27Z")

</div>

- `admin_js.admin.site_settings.categories.discourse_foo_plugin`  
 → name in `/admin/plugins` list

- `js.discourse_foo_plugin.title`  
 → title in plugin admin screen (`/admin/plugins/discourse-foo-plugin`)

- `js.discourse_foo_plugin.admin_navigation`  
 → name in admin sidebar

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [May 24, 2025, 11:42am UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/15 "2025-05-24T11:42:49Z")

</div>

Got it, thanks for clarifying!

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 8:10pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/16 "2025-05-24T20:10:12Z")

</div>

> [@RGJ](#):
>
> If this is about the _display name_, [this](https://github.com/discourse/discourse/blob/main/lib/plugin/instance.rb#L170C1-L175C20) is how it works.
> 
> If your plugin has metadata `# name: discourse-foo-bar` in `plugin.rb`,
> 
> Then the plugin will be shown as “Foo bar”
> 
> But you can override this in locales/client.XX.yml
> 
> ```plaintext
> en:
> admin_js:
> admin:
> site_settings:
> categories:
> discourse_foo_bar: "Discourse Foo Bar Blah"
> 
> ```
> 
> The plugins will be _sorted_ by what comes after discourse- though.

Yes, display name.  
I have this in a `config/locales/client.en.yml` file, I rebuilt, and there was no change.

```plaintext
en:
  admin_js:
    admin:
      site_settings:
        categories:
          auto_remove_group: "Auto Remove User from Group"
  site_settings:
    auto_remove_group_enabled: Enable the Auto Remove User from Group plugin.
    auto_remove_group_category_id: Set the category ID number you are watching for posts. It can be found in the URL when you navigate to a category.
    auto_remove_group_name: Set the group you want the user to be removed from once they post in category selected above.

```

 ![Failure to CAPITALIZE! :(](https://global.discourse-cdn.com/meta/original/4X/5/b/a/5ba6efff9a6058398c955bfbb1308db565876e91.jpeg)

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 8:22pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/17 "2025-05-24T20:22:19Z")

</div>

> [@Jagster](#):
>
> Well, if I install your plugin and every word is captilized, from my, and majority of the world, point of view your plugin is broken that way.

Actually, the general consensus is that each word in a title is capitalized.

> **[Title case](https://en.wikipedia.org/wiki/Title_case)**
>
> Title case or headline case is a style of capitalization used for rendering the titles of published works or works of art in English. When using title case, all words are capitalized, except for minor words (typically articles, short prepositions, and some conjunctions) that are not the first or last word of the title. There are different rules for which words are major, hence capitalized. As an example, a headline might be written: "The Quick Brown Fox Jumps over the Lazy Dog".
> The rules of tit...

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [May 24, 2025, 8:25pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/18 "2025-05-24T20:25:23Z")

</div>

And yet it isn’t. That is an american way, came from news.

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 8:35pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/19 "2025-05-24T20:35:23Z")

</div>

Well, out of the 10 plugins I have installed that are more than one word, 7 are capitalized.  
And many more in the plugins section of this site follow that convention. And that’s what I want mine to look like.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 24, 2025, 9:32pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/20 "2025-05-24T21:32:35Z")

</div>

Your key is `auto_remove_group` but your `#name` in your `plugin.rb` is `discourse-auto-remove-group`.

Try prefixing the key with `discourse_`

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [May 24, 2025, 10:01pm UTC](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381/21 "2025-05-24T22:01:11Z")

</div>

I made the change, but there was no love.  
Is it correct that the #name is using dashes, but the key is using underscores?

 ![Foiled again](https://global.discourse-cdn.com/meta/original/4X/d/1/3/d13c333ac9fc8f6be94aa5c415a2bcd401faf70d.jpeg)

[Next page](https://meta.discourse.org/t/set-plugin-name-to-capitals/367381.md?page=2)
