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

Support passing i18n and t as Trans props #315

Merged
merged 2 commits into from
Oct 5, 2017

Conversation

dylanseago
Copy link
Contributor

Currently, Trans uses i18n and t props when provided, but also passes them down to the rendered HTML element causing an error.

This PR does the following:

  • Adds i18n and t propTypes
  • Moves logic that determines which i18n and t to use from constructor to render
  • Ensures i18n and t props don't get passed to the HTML element

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 85.845% when pulling 79cbb48 on dylanseago:trans-context-as-props into 2f84fcc on i18next:master.

@jamuhl
Copy link
Member

jamuhl commented Oct 4, 2017

will have a look and merge tomorrow...thanks for providing this PR

@jamuhl jamuhl merged commit e8cb36a into i18next:master Oct 5, 2017
@jamuhl
Copy link
Member

jamuhl commented Oct 5, 2017

Thanks again...published in [email protected]

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

Successfully merging this pull request may close these issues.

3 participants