Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngettext with JSX? #93

Open
tlrobinson opened this issue Feb 7, 2018 · 1 comment
Open

ngettext with JSX? #93

tlrobinson opened this issue Feb 7, 2018 · 1 comment

Comments

@tlrobinson
Copy link

tlrobinson commented Feb 7, 2018

What's the best way to use ngettext with JSX?

For example, this won't work:

ngettext(msgid`${<strong>{n}</strong>} widget`, `${<strong>{n}</strong>} widgets`, n)

It would be nice if something like this worked:

ngettext(jt`${<strong>{n}</strong>} widget`, jt`${<strong>{n}</strong>} widgets`, n)

Great library, thanks!

@AlexMost
Copy link
Member

AlexMost commented Feb 7, 2018

Hi, thanks for the good words)

Unfortunately, now you can't use jsx inside ngettext.
But it makes sense to implement that. Will try to make some prototype soon and share the results here.

Really glad that metabase team found this library useful, feel free to report any issues and suggestions.

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

No branches or pull requests

2 participants