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

Added reportNS function to I18NextProvider to report used namespaces #500

Merged
merged 1 commit into from Aug 24, 2018

Conversation

@olivierpascal
Copy link
Contributor

olivierpascal commented Aug 23, 2018

Related to #499

@coveralls

This comment has been minimized.

Copy link

coveralls commented Aug 23, 2018

Coverage Status

Coverage increased (+0.3%) to 82.937% when pulling d398635 on olivierpascal:reportNS into 2d2ec21 on i18next:master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

coveralls commented Aug 23, 2018

Coverage Status

Coverage increased (+0.3%) to 82.937% when pulling d398635 on olivierpascal:reportNS into 2d2ec21 on i18next:master.

@jamuhl

This comment has been minimized.

Copy link
Member

jamuhl commented Aug 24, 2018

Looks good...would you also be able to extend the documentation?!?:

-> https://react.i18next.com/components/i18nextprovider#the-i-18-nextprovider-props (add the new prop)
-> https://react.i18next.com/misc/serverside-rendering add a small sample (like in your issue description to show how to use this new feature)

@olivierpascal

This comment has been minimized.

Copy link
Contributor Author

olivierpascal commented Aug 24, 2018

Sure!

@jamuhl jamuhl merged commit 0667a40 into i18next:master Aug 24, 2018
3 checks passed
3 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.3%) to 82.937%
Details
@jamuhl

This comment has been minimized.

Copy link
Member

jamuhl commented Aug 24, 2018

thanks again

published in react-i18next@7.11.0

@tutok

This comment has been minimized.

Copy link

tutok commented Aug 31, 2018

it looks like namespace reported by reportNS is undefined when no namespace is specified and fallback rule is executed. For example when I use translate HOC in that way: translate()(Home);

@olivierpascal

This comment has been minimized.

Copy link
Contributor Author

olivierpascal commented Aug 31, 2018

Maybe you can create an issue (please tag me) and use something like yourArray.filter(Boolean) until a fix is available?

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