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

dylanseago commented Oct 4, 2017

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

This comment has been minimized.

Copy link

coveralls commented Oct 4, 2017

Coverage Status

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

@jamuhl

This comment has been minimized.

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
1 of 3 checks passed
1 of 3 checks passed
codeclimate 8 issues to fix
Details
coverage/coveralls Coverage decreased (-0.1%) to 85.845%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jamuhl

This comment has been minimized.

Copy link
Member

jamuhl commented Oct 5, 2017

Thanks again...published in react-i18next@6.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.