When using I18n.t to embed a link in Rails, one could do something like this in an ERB:
<% link_destination = link_to(I18n.t(".link destination", "https://destination.url")) %>
<%= I18n.t(".translated text with %{link}", link: link_destination) %>
But when I do something like this in a Phoenix / Elixir EEX:
<% link_destination = link(gettext("link destination"), to: "https://destination.url")
<%= raw(gettext("translated text with %{link}", link: link_destination)) %>
I get the error:
(Protocol.UndefinedError) protocol String.Chars not implemented for {:safe, [60, "a", [[32, "href", 61, 34, "https://destination.url", 34]], 62, "link destination", 60, 47, "a", 62]} of type Tuple.
So how do I embed a URL in a Gettext translation?