Customize all text in Discourse

feedback

(Robin Ward) #1

Previously changing text in Discourse required either pasting brittle javascript into a <HEAD> customization or using a plugin (which isn’t available on many hosting plans).

Well, good news: in the latest builds of Discourse you can customize all of the text via the admin interface. Simply go to Admin > Customize > Text Content and you’ll be presented with a search page.

Search for the text you want to customize, click Edit then enter the new value. For example, I changed the “Dashboard” link to say “Evil Trout” here on Meta. After refreshing the page the text has been updated:

As always, give it a spin and let us know of any bugs or suggestions and we’ll tweak accordingly!


Editing Server.en.yml
[object Object] in top menu even after updating to v1.5.0.beta6 +23
Customizable Email Templates
How to change the account confirm email content
Enable changing of trust level badge description text
Export customized text from database into YML
Unable to Modify Email Sent Out Via Invites
Translate some Entries
Custom content localization
Discourse Voting
How to add translation client.xx.yml and server.xx.yml files to the server?
[PAID] - Points & Awards Plugin
Any way to customize message for "New" and "Unread" when nothing appears?
How can we get a full sentence in welcome emails?
How "Reply" to post button text can be changed to "Comment"?
Add another Text Content box to Customize
Viewing a private category while logged out should prompt for login
(Markus) #2

:heart: :heart_eyes: That’s freaking amazing! haha, love it.


(Allen - Watchman Monitoring) #3

It’s great to be able to customize things so much!

I look forward to being able to the return of previews, especially on longer items such as

/admin/customize/site_texts/system_messages.usage_tips.text_body_template


Broken "Welcome To" after last upgrade
(Sam Saffron) #4

Cool, some feedback

  1. There should be some way of only showing overriden values.
  2. I think “edit” should be inline (like site settings) as opposed to clearing the entire screen, makes it simpler to work through a bunch of values
  3. We should decorate stuff that has been overriden so you can tell it is not default.
  4. Exact matches should float to the top, eg: when searching for “logs”, admin_js.admin.logs.title should be at the top.

(Jeff Atwood) #5

Yeah #1 (and by association #3) there in particular is quite important @eviltrout


(Robin Ward) #6

I made all these changes except for inlining.

I purposely made it a separate page because:

  1. Some keys are very long, and expanding them inline is just not practical.

  2. People can pass around links to individiual keys as they all get their own URLs. This will make it very easy for us to answer questions like “How do I customize this string?” as we can pass them a link.

You might have noticed that the back button works great on the site text customization page and the back to search page also remembers your query. So going back and forth to do quite a few should be reasonably fast.

The hard part about previews is it’s not clear which keys are markdown and which are not. It would be incorrect to always show the preview so right now I don’t attempt to guess.

I suppose if we came up with a list of which keys support markdown I could show the d-editor there.


(Allen - Watchman Monitoring) #7

Here is a list of topics which I’m pretty sure can be closed since this feature’s release. :fireworks: I’m sure there will be more.

Editing Server.en.yml
Customize email content
Customize all text in Discourse
How do I edit the email template for the welcoming email?
Should any email subjects from discourse not be tagged?
Unable to Modify Email Sent Out Via Invites
Any way to customize message for "New" and "Unread" when nothing appears?
Customize email content
Email footer support
Customize email notification header and footer
Subscription emails should carry more context in message body

I’m guessing that it’s not appropriate for me to go post on them all, so I’ll leave it to the admins to clean up as needed.

PS I’m pretty excited about this, in case you can’t guess… and no longer feel a need to edit the server.en.yml in between updates.


(Alexander) #8

@eviltrout as for now I have one (and main) problem with customized strings - they don’t survive after rebuilding app :frowning: Is it by default or am I missing something here?


(Sam Saffron) #9

They should survive fine, they are persisted to the db


(Alexander) #10

They really do survive! Did not flush my Chrome cache :smile: Thank you guys for such a useful feature. :heart:


(Alexander) #11

Guys, there is a problem. Just made /admin/upgrade to latest tests-passed and after that I noticed that all customized strings are gone. Then I checked in admin are there any overridden texts - 0 was found.
I decided to make one new custom string and rebuild for checking. But after that new string was done - the old ones returned! It is I suppose definitely a bug.


Customization text reverses after update
Please help: All custom translations lost
Custom translation lost after upgrading Discourse
(Robin Ward) #12

I can’t seem to reproduce this. On my test instance, I renamed Colors to Hues. Then I just upgraded via the admin interface. On refresh after the update it was still Hues.

What keys in particular are you changing?


(Alexander) #13

js.faq
js.about.title
js.terms_of_service
js.about.simple_title
terms_of_service.title

After upgrade none of these strings were overridden. Changed js.faq and others backed again.


(Robin Ward) #14

I still can’t reproduce this unfortunately. I overwrote all those keys, then just performed an upgrade.

As you can see in this screenshot they were still present afterwards:


(Alexander) #15

Thank you for checking this, but it is all the same for me. I’ve just rebuilded app not from web ui to double check. So I noticed one more strange thing with string js.about.simple_title. It is showed as overridden string, but actually it is not.

I think I’m not alone with this problem :slightly_smiling:


(Robin Ward) #16

I think that person might have a different issue (saving the override in a different locale than english, then viewing it in English).

Is it possible that is your problem too? Are you using multiple locales?

I’m not saying it isn’t broken BTW, I just need steps to reproduce it before I can fix it.


(Alexander) #17

I have a different locale than english too. Russian in my example.


(Alexander) #18

By the way, server reboot also breaks customisations.


(Daniela) #19

It is possible edit the OP and add more informations about how to search texts correctly?

e.g. I want customize some plugins, like Tags or Babble, but there is no way to find the text about them. I am looking in site.json but I think this is not the right way or I am wrong?

A little more informations may be helpful for many costumers.


(cpradio) #20

For Tags, you simply need to use the Customize Text option and put tagging in the search parameter

https://my_discourse_instance/admin/customize/site_texts?overridden=false&q=tagging

For Babble, use babble in the search parameter

https://my_discourse_instance/admin/customize/site_texts?overridden=false&q=babble