Hello! I am trying to convert all the UI strings in the HEEx generated via phx.gen.auth
to use gettext
. However, I’m running into trouble with strings that have components within them.
I thought that maybe something like this would work, but I realize that I’m already within the context of the H
sigil, so I get a SyntaxError
.
<%= gettext("Don't have an account? %{sign_up} for an account now",
sign_up: ~H"""
<.link navigate={~p"/users/register"} class="font-semibold text-brand hover:underline">
<%= gettext("Sign up") %>
</.link>
"""
) %>
I tried some of the stuff mentioned in this topic about HTML interpolation, but it doesn’t seem to work. Any advice/tips?