-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Bug with Trans component without children #84
Comments
Thanks for the bug report. I've just published |
@karellm I still have this error on |
@SPAHI4 Can you detail this please. Here is the test and the associated template file. A reproducible failing test case or more details would help. |
the code below, import React from 'react'
import { translate, Trans, Interpolate } from 'react-i18next'
const bar = () => (
<div>
<span><Trans i18nKey="bar"></Trans></span>
</div>
);
const foo = () => (
<div>
<span><Trans i18nKey="foo" /></span>
</div>
);
class Test extends React.Component {
render () {
const { t } = this.props
return (
<div>
<h1>{t('first')}</h1>
<Interpolate i18nKey="second" value="some thing" component={interpolateComponent} />
<Trans i18nKey="third.first" count={count}>
Hello <strong title={t('fourth')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.
</Trans>
<Trans i18nKey="fifth" count={count} />
</div>
)
}
}
export default translate('react')(Test) |
Thanks, it helped. I just published |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.0.0-beta6
cli
I'm trying to use
Trans
component as self-closing tag.<Trans i18nKey="Foo" />
CLI just do nothing without any error.
<Trans i18nKey="Foo"></Trans>
This works fine
The text was updated successfully, but these errors were encountered: