# What do macros decode to?

**URL:** https://meta.discourse.org/t/what-do-macros-decode-to/295375
**Category:** Support
**Created:** [February 14, 2024, 7:02pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375 "2024-02-14T19:02:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [February 14, 2024, 7:02pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/1 "2024-02-14T19:02:18Z")

</div>

I’m looking at the new user onboarding flow, and that has led me to the `system_messages.welcome_user.text_body_template`, which uses `%{new_user_tips}`, among other macros.

I’m struggling to find where these value are set.

---

<div class="post-metadata">

### Author: ![maiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maiki/32/233950_2.png) [@maiki](https://meta.discourse.org/u/maiki)
#### Post date: [February 14, 2024, 7:20pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/2 "2024-02-14T19:20:32Z")

</div>

> [@ganncamp](#):
>
> I’m struggling to find where these value are set.

It is not apparent to me, either! Fortunately someone referred to that exact macro before:

> [@Where the welcome email template is used](https://meta.discourse.org/t/where-the-welcome-email-template-is-used/39194/1):
>
> Now, there is a key in Transifex named `system_messages.usage_tips.text_body_template`. Its content is pushed into the above to replaced the %{new\_user\_tips}.

As for where it is used, `/admin/customize/site_texts?locale=en&q=%25{new_user_tips}` shows a few templates:

 ![Screenshot 2024-02-14 at 11-19-17 Admin - fnord](https://global.discourse-cdn.com/meta/original/4X/b/4/d/b4dc835c08ec6e670f4492941348e272aaae6490.png)

I’ve never seen another macro that pull into the content from another content template in Discourse. 🙂

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [February 14, 2024, 8:03pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/3 "2024-02-14T20:03:51Z")

</div>

I… still don’t understand

What / where is ‘Transifex’?

And also, without asking here, how would I know that `%{new_user_tips}` == `system_messages.usage_tips.text_body_template`

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 14, 2024, 8:17pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/4 "2024-02-14T20:17:26Z")

</div>

> [@ganncamp](#):
>
> What / where is ‘Transifex’?

Transifex is our system for people contributing translations for localisation. You don’t need to worry about that and can pretend it doesn’t exist.

> [@ganncamp](#):
>
> I’m struggling to find where these value are set.

But this is a good question - most of the below are (I think) self-evident except for `new_user_tips`. In any case it might be a good idea to have an ⓘ explanation nearby.

> Available interpolation keys: site\_name, new\_user\_tips, base\_url, username, name, name\_or\_username

You’d have to go digging into the code to find `system_messages.usage_tips.text_body_template`.

This is something that could definitely be improved so it’s apparent in the editor.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 14, 2024, 8:27pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/7 "2024-02-14T20:27:04Z")

</div>

I think the values are set here:

> <https://github.com/discourse/discourse/blob/main/lib/system_message.rb#L92-L105>

But I agree that it would be welcome to see a note about it somewhere.

---

<div class="post-metadata">

### Author: ![ganncamp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ganncamp/32/106199_2.png) [@ganncamp](https://meta.discourse.org/u/ganncamp)
#### Post date: [February 15, 2024, 12:36pm UTC](https://meta.discourse.org/t/what-do-macros-decode-to/295375/8 "2024-02-15T12:36:25Z")

</div>

Thanks @Arkshine! That’s helpful!

And… That block is named `defaults`, implying that they can be changed to point to other values…?
