Skip to content

Allow use of elems without children #550

Open

Description

@sandalwoodbox

Because there is no way to extract translation strings from React, I'm using Localized components without children. For example:

<h1><Localized id="verify-email-page-title" /></h1>

This gets replaced by the translation just fine. However, if I want to use elems I suddenly need to have an empty element inside:

<p>
  <Localized
    id="verify-email-success"
    elems={{ loginLink: <Link to="/login"></Link> }}
  >
    <span></span>
  </Localized>
</p>

It would be great to be able to rely on elems as a signal that I want to use overlays regardless of whether the content inside looks like HTML.

Activity

  1. sandalwoodbox commented on Apr 17, 2021

    @sandalwoodbox
    Author

    It's possible there's a situation where I would want elems but not want to use an overlay, though that seems unlikely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions