You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Transi18nKey="messageCount"count={3}>
You have <strong>{{count: 3}}</strong> new messages.
</Trans>
with translation keys being:
messageCount: "Du hast <1>{{count}}</1> neue Nachricht",
messageCount_plural: "Du hast <1>{{count}}</1> neue Nachrichten",
feels unnecessarily complicated and also redundant if you're not using a variable for count. The value for count can possibly be replaced automatically based on the value that is passed to the count prop in the Trans component, so that this would be possible:
<Transi18nKey="messageCount"count={3}>
You have <strong>?</strong> new messages.
</Trans>
Is your feature request related to a problem? Please describe.
As already discussed on Twitter:
https://twitter.com/ManuelBieh/status/1117491118223106048
The current usage of the
Trans
component:with translation keys being:
feels unnecessarily complicated and also redundant if you're not using a variable for
count
. The value forcount
can possibly be replaced automatically based on the value that is passed to thecount
prop in theTrans
component, so that this would be possible:Describe the solution you'd like
I'd love to see this working:
https://codesandbox.io/s/oqj2o017w9
The text was updated successfully, but these errors were encountered: