Personalizar texto no Discourse

:bookmark: This is a guide for customizing text in Discourse via the admin interface, enabling changes to various UI elements.

:person_raising_hand: Required user level: Administrator

In Discourse, you can customize all of the text via the admin interface. This can be useful for tailoring the user experience to better fit the particular tone or branding of your community.

Summary

This guide will cover:

  • Accessing the text customization interface
  • Editing text strings
  • Identifying translation keys

Accessing the text customization interface

To customize the text in Discourse, navigate to the text customization page:

  1. Go to Admin.
  2. Search for site text in the sidebar search.
    OR
    Enter the URL of the screen directly https://discourse.example.com/admin/customize/site_texts

You will be presented with a page where you can search for specific text strings to edit.

Editing text strings

To edit a text string:

  1. Search for the text you want to customize.
  2. Click Edit.
  3. Enter the new value.

For example, you might want to personalize the “About Your Site” link:

After making changes and refreshing the page, the text will be updated:

Identifying translation keys

If you need help identifying the strings to translate, refer to this guide: Find a translation key with verbose localization

FAQs

Can I customize all text in Discourse including system messages?
Yes, you can customize almost all text strings, including system messages, notifications, and UI elements.

Do I need to refresh the page to see changes?
Yes, after making changes, you’ll need to refresh the page for the updated text to appear.

Last edited by @Moin 2024-07-22T06:11:29Z

Check documentPerform check on document:
74 curtidas

Existe alguma forma de adicionar um hiperlink a um texto personalizado?

Sim, você pode fazer isso usando links markdown, por exemplo:
Este é um link para o Google!
Que é (bruto):

Este é um [link](https://google.com) para o Google!
1 curtida

Obrigado @Firepup650. Estou tentando atualizar um texto no rodapé de um dos e-mails e, quando copio e colo sua linha, ela é exibida como abaixo. Talvez esses links de markdown não funcionem nos e-mails?

Eu estava tentando atualizar user_notifications.chat_summary.unsubscribe_no_link

Hm. Talvez os modelos de e-mail sejam diferentes. Você poderia tentar HTML puro em vez disso?

Este é um link para o Google!
Que é (cru):

Este é um <a href="https://google.com/">link</a> para o Google!
1 curtida

Isso funcionou! Obrigado.

1 curtida

Eu me pergunto se isso ainda era verdade até a nova barra lateral de administração… :upside_down_face:

Precisamos modificar esses registros em lote

Existe Globally replace translations para substituir uma palavra em todos os lugares.

Obrigado, este autor também é do meu país!!

Tentei alterar o texto, mas o botão ‘salvar alterações’ está desativado.

Estou tendo problemas para aplicar isso em nossa página de boas-vindas “Login Required”. Parece que está em uma div ou algo assim, mas o link não está clicável como esperado. Como eu escaparia para a janela atual como destino para o link? (Clicar com o botão direito e selecionar “Abrir este link em uma nova guia…” funcionará, claro.)

:white_check_mark: Corrigido:
Usei uma âncora apontando para target=“_blank” :slight_smile: