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

Update dependency react-i18next to v8 #69

Merged
merged 1 commit into from
Oct 13, 2018
Merged

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Oct 12, 2018

This PR contains the following updates:

Package Type Update Change References
react-i18next devDependencies major ^7.8.1 -> ^8.0.0 source

Release Notes

i18next/react-i18next

v8.0.7

Compare Source

v8.0.6

Compare Source

  • fix SSR cases

v8.0.5

Compare Source

  • fix issue with context not applied when merging i18n options

v8.0.4

Compare Source

  • add prop-types to peer deps as long we use the ponyfill create-react-context

v8.0.3

Compare Source

  • remove prop-types in tests

v8.0.2

Compare Source

  • remove proptypes dependency - not needed anylonger as we do not define old context
  • move out ssr stuff to utils
  • move reportNS to the NamespacesConsumer

v8.0.1

Compare Source

v8.0.0

Compare Source

  • translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded

  • I18n render prop was renamed to "NamespacesConsumer" as it controls which namespaces should be "consumed"

  • there is a new context.consuming HOC "withI18n" adds i18n, t to component props (without the extra options of withNamespaces)

  • there is a simplification for interpolation in translations

'Hello <1><0>{{name}}</0></1>, you have <3>{{count}}</3> message. Open <5>hear</5>.'

can be written as:

'Hello <1>{{name}}</1>, you have {{count}} message. Open <5>hear</5>.'

=> there is no need to add <0>...</0> around interpolated values anylonger
=> your old files having those extra pseudo tags will still work without needing to change them

  • there is a new I18nContext -> I18nContext.provider, I18next.consumer using new react context api

Using react's new context api

should be non breaking in most cases, with following exceptions:

  • using preact you will have to use preact.createContext plugin (or eventual hope the provided polyfill works for preact too)
  • you used the translate.getWrappedInstance function -> you will need to use instance.getWrappedInstance().getWrappedInstance() now as the translate hoc is now wrapped in an additional I18nContext.Consumer

still we prefer to increase this to a major version as beside the described egde cases there might be other effects we not have covered with our tests


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 Ignore: Close this PR and you won't be reminded about this update again.


This PR has been generated by Renovate Bot. View repository job log here.

@3rwww1 3rwww1 merged commit d7203e3 into master Oct 13, 2018
@3rwww1 3rwww1 deleted the renovate/react-i18next-8.x branch October 13, 2018 13:39
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.

2 participants