I think “Site_text” is not available. When I try to edit the text at /admin/customize/site_texts/js.welcome_banner.header.new_members?locale=en I can see that only the name is available.
That makes sense. They didn’t log in, so we don’t know who they are. There is no name for them in the database.
It’s like when someone you don’t know rings your doorbell; you won’t be able to greet them by name until they introduce themselves.
I suppose you might be able to display the site name with a Theme Component by making a request to /about.json and getting the site title (I looked at the site service and couldn’t find anything about the site title).
I looked into this, the blocker here is not accessing the value of title. It’s that the backend validates translations by extracting valid interpolation keys from the default locale strings.
So when %{site_name} is not in the default string, it is rejected as an “invalid interpolation key”.
I don’t know what @NateDhaliwal’s idea is. I only wanted to point out an alternative to an additional request to /about.json.
I think a custom component that copies the welcome banner but provides the site_name key for all texts would be the way to go.
Or a PR that adds site_name as available key to the texts for logged in users in core