jimkleiber is trying to customize the text on a custom button in a template override using the UI, but is having trouble. The button is part of a custom login page created by overriding the static.hbs template, and the goal is to have it link to a pricing page. Despite adding the button to the template and trying to customize the text through the Admin > Customize > Text page, the changes are not taking effect.
pfaffman suggests that the issue is due to the lack of a locale for the custom button text. jimkleiber tries to add the locale using the theme-prefix helper, but it doesn’t work.
pfaffman explains that making non-trivial changes to a theme requires using the Discourse Theme CLI, rather than the UI. However, pfaffman also provides an alternative solution, suggesting the use of the translatedLabel attribute instead of a locale.
jimkleiber finds this solution to work, and is able to successfully customize the button text using the translatedLabel attribute.
I’m overriding one of the handlebars templates, static.hbs, so that I can create a custom login page.
I’ve been able to add a custom button instead of the Sign Up button, which will allow people to visit a pricing page to buy a membership through Memberful.
The challenge I have is that I’m not able to customize the text for the pricing button and I’m not sure why.
Yet when I go to Admin > Customize > Text and search for “pricing_button” it doesn’t show up.
I’ve run the Find a translation key with verbose localization and it shows in the console as Translation #36: pricing_button, but again, when I search the Admin > Customize > Text page, I don’t find it.
Any ideas what might be happening?
UPDATE: Seems that I’ll have to create this as a theme component with a repo, not just using the UI/UX, and that I have to add the pricing-button to the locale.
Fair point, I agree locales are much more complex. When I said simple, I meant it in the context of using a template override and adding a {{d-button}}.