diff --git a/source/components/Feedback/PageFeedback.js b/source/components/Feedback/PageFeedback.js
index 50c836307..9aea0616e 100644
--- a/source/components/Feedback/PageFeedback.js
+++ b/source/components/Feedback/PageFeedback.js
@@ -2,7 +2,7 @@
import withTracker from 'Components/utils/withTracker'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { withRouter } from 'react-router-dom'
import { compose } from 'redux'
import safeLocalStorage from '../../storage/safeLocalStorage'
@@ -149,7 +149,7 @@ const PageFeedbackWithRouter = ({ location, ...props }) => (
)
export default compose(
- withI18n(),
+ withNamespaces(),
withTracker,
withRouter
)(PageFeedbackWithRouter)
diff --git a/source/components/LangSwitcher.js b/source/components/LangSwitcher.js
index e0372a587..efeeac794 100644
--- a/source/components/LangSwitcher.js
+++ b/source/components/LangSwitcher.js
@@ -1,7 +1,7 @@
import { compose } from 'ramda'
import React, { Component } from 'react'
import emoji from 'react-easy-emoji'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { withRouter } from 'react-router'
@@ -12,7 +12,7 @@ const languageCodeToEmoji = {
export default compose(
withRouter,
- withI18n(),
+ withNamespaces(),
connect(
null,
dispatch => ({
diff --git a/source/components/LegalNotice.js b/source/components/LegalNotice.js
index 97d5fc25d..66bde03c6 100644
--- a/source/components/LegalNotice.js
+++ b/source/components/LegalNotice.js
@@ -1,9 +1,9 @@
import Overlay from 'Components/Overlay'
import { ScrollToTop } from 'Components/utils/Scroll'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
-export const LegalNoticeContent = withI18n()(() => (
+export const LegalNoticeContent = withNamespaces()(() => (
<>
Mentions légales
diff --git a/source/components/PreviousSimulationBanner.js b/source/components/PreviousSimulationBanner.js
index 6a660fe05..20db30927 100644
--- a/source/components/PreviousSimulationBanner.js
+++ b/source/components/PreviousSimulationBanner.js
@@ -5,7 +5,7 @@ import {
} from 'Actions/actions'
import { compose } from 'ramda'
import React from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { noUserInputSelector } from 'Selectors/analyseSelectors'
import { LinkButton } from 'Ui/Button'
@@ -42,7 +42,7 @@ const PreviousSimulationBanner = ({
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
state => ({
previousSimulation: state.previousSimulation,
diff --git a/source/components/RulePage.js b/source/components/RulePage.js
index aa9dd7057..fdc6421fe 100644
--- a/source/components/RulePage.js
+++ b/source/components/RulePage.js
@@ -8,7 +8,7 @@ import {
} from 'Engine/rules.js'
import { compose, head, path } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { withRouter } from 'react-router'
import { Link, Redirect } from 'react-router-dom'
@@ -27,7 +27,7 @@ export default compose(
valuesToShow: !noUserInputSelector(state),
flatRules: flatRulesSelector(state)
})),
- withI18n()
+ withNamespaces()
)(
class RulePage extends Component {
render() {
@@ -81,7 +81,7 @@ const BackToSimulation = compose(
})
),
withRouter,
- withI18n()
+ withNamespaces()
)(
// Triggers rerender when the language changes
class BackToSimulation extends Component {
diff --git a/source/components/SearchBar.js b/source/components/SearchBar.js
index 85dd0938e..c0da6db60 100644
--- a/source/components/SearchBar.js
+++ b/source/components/SearchBar.js
@@ -3,7 +3,7 @@ import Fuse from 'fuse.js'
import { sortBy, pick } from 'ramda'
import React from 'react'
import Highlighter from 'react-highlight-words'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { Link, Redirect } from 'react-router-dom'
import Select from 'react-select'
import 'react-select/dist/react-select.css'
@@ -114,4 +114,4 @@ class SearchBar extends React.Component {
}
}
-export default withI18n()(SearchBar)
+export default withNamespaces()(SearchBar)
diff --git a/source/components/SearchButton.js b/source/components/SearchButton.js
index 819490472..3f9db18a9 100644
--- a/source/components/SearchButton.js
+++ b/source/components/SearchButton.js
@@ -1,6 +1,6 @@
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { flatRulesSelector } from 'Selectors/analyseSelectors'
import { LinkButton } from 'Ui/Button'
@@ -11,7 +11,7 @@ export default compose(
connect(state => ({
flatRules: flatRulesSelector(state)
})),
- withI18n()
+ withNamespaces()
)(
class SearchButton extends Component {
componentDidMount() {
diff --git a/source/components/Simu.js b/source/components/Simu.js
index fb0b08aeb..283f493c6 100644
--- a/source/components/Simu.js
+++ b/source/components/Simu.js
@@ -197,7 +197,7 @@ export default compose(
première estimation sur la base d'un
contrat générique. La législation française prévoit une
multitude de cas particuliers et de règles spécifiques qui
- modifient considérablement les montant de l'embauche.
+ modifient considérablement les montants de l'embauche.
diff --git a/source/components/conversation/Conversation.js b/source/components/conversation/Conversation.js
index 03bd47b43..db4ec9ddf 100644
--- a/source/components/conversation/Conversation.js
+++ b/source/components/conversation/Conversation.js
@@ -2,7 +2,7 @@ import Scroll from 'Components/utils/Scroll'
import { getInputComponent } from 'Engine/generateQuestions'
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { reduxForm } from 'redux-form'
import {
@@ -18,7 +18,7 @@ export default compose(
form: 'conversation',
destroyOnUnmount: false
}),
- withI18n(),
+ withNamespaces(),
connect(state => ({
conversationStarted: state.conversationStarted,
themeColours: state.themeColours,
diff --git a/source/components/conversation/FoldedStep.js b/source/components/conversation/FoldedStep.js
index e428bb7b5..0431a84ba 100644
--- a/source/components/conversation/FoldedStep.js
+++ b/source/components/conversation/FoldedStep.js
@@ -1,7 +1,7 @@
import { findRuleByDottedName } from 'Engine/rules'
import { compose } from 'ramda'
import React from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import {
flatRulesSelector,
@@ -11,7 +11,7 @@ import { LinkButton } from 'Ui/Button'
import { capitalise0 } from '../../utils'
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
state => ({
flatRules: flatRulesSelector(state),
diff --git a/source/components/conversation/FormDecorator.js b/source/components/conversation/FormDecorator.js
index d1082a37e..813c83e48 100644
--- a/source/components/conversation/FormDecorator.js
+++ b/source/components/conversation/FormDecorator.js
@@ -2,7 +2,7 @@ import classNames from 'classnames'
import Explicable from 'Components/conversation/Explicable'
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { change, Field } from 'redux-form'
import IgnoreStepButton from './IgnoreStepButton'
@@ -35,7 +35,7 @@ export var FormDecorator = formType => RenderField =>
dispatch(change('conversation', field, value))
})
),
- withI18n()
+ withNamespaces()
)(
class extends Component {
state = {
diff --git a/source/components/conversation/IgnoreStepButton.js b/source/components/conversation/IgnoreStepButton.js
index 330c43dea..8b652156d 100644
--- a/source/components/conversation/IgnoreStepButton.js
+++ b/source/components/conversation/IgnoreStepButton.js
@@ -1,13 +1,13 @@
import HoverDecorator from 'Components/utils/HoverDecorator'
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import './IgnoreStepButton.css'
import withColours from 'Components/utils/withColours'
export default compose(
HoverDecorator,
- withI18n(),
+ withNamespaces(),
withColours
)(
class IgnoreStepButton extends Component {
diff --git a/source/components/conversation/Input.js b/source/components/conversation/Input.js
index d4a02d090..a0ff8467a 100644
--- a/source/components/conversation/Input.js
+++ b/source/components/conversation/Input.js
@@ -2,7 +2,7 @@ import classnames from 'classnames'
import withColours from 'Components/utils/withColours'
import { compose } from 'ramda'
import { React, Component, T } from 'Components'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { debounce } from '../../utils'
import { FormDecorator } from './FormDecorator'
import InputSuggestions from './InputSuggestions'
@@ -12,7 +12,7 @@ import { formValueSelector } from 'redux-form'
export default compose(
FormDecorator('input'),
- withI18n(),
+ withNamespaces(),
withColours,
connect(state => ({
period: formValueSelector('conversation')(state, 'période')
diff --git a/source/components/conversation/InputSuggestions.js b/source/components/conversation/InputSuggestions.js
index 68a2c9bee..4e8c4c00d 100644
--- a/source/components/conversation/InputSuggestions.js
+++ b/source/components/conversation/InputSuggestions.js
@@ -1,14 +1,14 @@
import withColours from 'Components/utils/withColours'
import { compose, toPairs } from 'ramda'
import React, { Component } from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import './InputSuggestions.css'
import { connect } from 'react-redux'
import { formValueSelector } from 'redux-form'
export default compose(
withColours,
- withI18n(),
+ withNamespaces(),
connect(state => ({
period: formValueSelector('conversation')(state, 'période')
}))
diff --git a/source/components/conversation/Question.js b/source/components/conversation/Question.js
index 5d6b30f2f..11e4f1855 100644
--- a/source/components/conversation/Question.js
+++ b/source/components/conversation/Question.js
@@ -2,7 +2,7 @@ import HoverDecorator from 'Components/utils/HoverDecorator'
import withColours from 'Components/utils/withColours'
import { compose, is } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import Explicable from './Explicable'
import { FormDecorator } from './FormDecorator'
import './Question.css'
@@ -29,7 +29,7 @@ import { answer, answered } from './userAnswerButtonStyle'
// dont Question est un example
export default compose(
FormDecorator('question'),
- withI18n(),
+ withNamespaces(),
withColours
)(
class Question extends Component {
@@ -145,7 +145,7 @@ let RadioLabel = props => (
const RadioLabelContent = compose(
HoverDecorator,
- withI18n(),
+ withNamespaces(),
withColours
)(
class RadioLabelContent extends Component {
diff --git a/source/components/conversation/SendButton.js b/source/components/conversation/SendButton.js
index 2777cd890..31d51dfb4 100644
--- a/source/components/conversation/SendButton.js
+++ b/source/components/conversation/SendButton.js
@@ -2,11 +2,11 @@ import HoverDecorator from 'Components/utils/HoverDecorator'
import withColours from 'Components/utils/withColours'
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
export default compose(
HoverDecorator,
- withI18n(),
+ withNamespaces(),
withColours
)(
class SendButton extends Component {
diff --git a/source/components/conversation/TextArea.js b/source/components/conversation/TextArea.js
index 0b4acc8da..19edb29e8 100644
--- a/source/components/conversation/TextArea.js
+++ b/source/components/conversation/TextArea.js
@@ -1,11 +1,11 @@
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { FormDecorator } from './FormDecorator'
export default compose(
FormDecorator('text-area'),
- withI18n()
+ withNamespaces()
)(
class Input extends Component {
render() {
diff --git a/source/components/rule/Algorithm.js b/source/components/rule/Algorithm.js
index 55e92bd48..6ad39f0d6 100644
--- a/source/components/rule/Algorithm.js
+++ b/source/components/rule/Algorithm.js
@@ -2,12 +2,12 @@ import classNames from 'classnames'
import { makeJsx } from 'Engine/evaluation'
import { compose, path, values } from 'ramda'
import React from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import './Algorithm.css'
// The showValues prop is passed as a context. It used to be delt in CSS (not(.showValues) display: none), both coexist right now
import { ShowValuesProvider } from './ShowValuesContext'
-export default compose(withI18n())(
+export default compose(withNamespaces())(
class Algorithm extends React.Component {
render() {
let { rule, showValues } = this.props
diff --git a/source/components/rule/Destinataire.js b/source/components/rule/Destinataire.js
index b17be080a..f7fd81350 100644
--- a/source/components/rule/Destinataire.js
+++ b/source/components/rule/Destinataire.js
@@ -1,9 +1,9 @@
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import possiblesDestinataires from 'Règles/ressources/destinataires/destinataires.yaml'
import './Destinataire.css'
-export default withI18n()(
+export default withNamespaces()(
class Rule extends Component {
render() {
let { destinataire } = this.props,
diff --git a/source/components/rule/Examples.js b/source/components/rule/Examples.js
index ab07ef5e7..cb56ea8aa 100644
--- a/source/components/rule/Examples.js
+++ b/source/components/rule/Examples.js
@@ -2,7 +2,7 @@ import { setExample } from 'Actions/actions'
import classNames from 'classnames'
import { compose } from 'ramda'
import React, { Component } from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { capitalise0 } from '../../utils'
import './Examples.css'
@@ -20,7 +20,7 @@ export default compose(
)
})
),
- withI18n()
+ withNamespaces()
)(
class Examples extends Component {
render() {
diff --git a/source/components/rule/References.js b/source/components/rule/References.js
index 79695e445..01c28cc8c 100644
--- a/source/components/rule/References.js
+++ b/source/components/rule/References.js
@@ -1,11 +1,11 @@
import { groupBy, toPairs } from 'ramda'
import React from 'react'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import references from 'Règles/ressources/références/références.yaml'
import { capitalise0 } from '../../utils'
import './References.css'
-export default withI18n()(
+export default withNamespaces()(
class References extends React.Component {
state = {
showComplementary: false
diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js
index 6a7e59c4f..33a9c7866 100644
--- a/source/components/rule/Rule.js
+++ b/source/components/rule/Rule.js
@@ -10,7 +10,7 @@ import {
import { compose, isEmpty } from 'ramda'
import React, { Component, Suspense } from 'react'
import Helmet from 'react-helmet'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import { reduxForm } from 'redux-form'
@@ -40,7 +40,7 @@ export default compose(
analysedExample: exampleAnalysisSelector(state, props)
})),
AttachDictionary(knownMecanisms),
- withI18n(),
+ withNamespaces(),
withLanguage
)(
class Rule extends Component {
diff --git a/source/components/utils/withLanguage.js b/source/components/utils/withLanguage.js
index 805c27b9b..78de4bccd 100644
--- a/source/components/utils/withLanguage.js
+++ b/source/components/utils/withLanguage.js
@@ -1,8 +1,8 @@
import React, { Component } from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
export default function withLanguage(WrappedComponent) {
- return withI18n()(
+ return withNamespaces()(
class WithLanguage extends Component {
static displayName = `withLanguage(${Component.displayName ||
Component.name})`
diff --git a/source/sites/embauche.gouv.fr/pages/Header.js b/source/sites/embauche.gouv.fr/pages/Header.js
index b94932f55..866712d83 100644
--- a/source/sites/embauche.gouv.fr/pages/Header.js
+++ b/source/sites/embauche.gouv.fr/pages/Header.js
@@ -2,14 +2,14 @@ import LangSwitcher from 'Components/LangSwitcher'
import React, { Component } from 'react'
import { withRouter } from 'react-router'
import { Link } from 'react-router-dom'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import Logo from '../images/logo/logo-simulateur.svg'
import './Header.css'
import { compose } from 'ramda';
export const Header = compose(
withRouter,
- withI18n()
+ withNamespaces()
)(
class Header extends Component {
state = {
diff --git a/source/sites/embauche.gouv.fr/pages/IframeFooter.js b/source/sites/embauche.gouv.fr/pages/IframeFooter.js
index a8ef73423..bea3237d4 100644
--- a/source/sites/embauche.gouv.fr/pages/IframeFooter.js
+++ b/source/sites/embauche.gouv.fr/pages/IframeFooter.js
@@ -1,11 +1,11 @@
import LangSwitcher from 'Components/LangSwitcher'
import React, { Component } from 'react'
import emoji from 'react-easy-emoji'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import screenfull from 'screenfull'
import { isIE } from '../../../utils'
-export default withI18n()(
+export default withNamespaces()(
class IframeFooter extends Component {
componentDidMount() {
screenfull.enabled && screenfull.onchange(() => this.forceUpdate())
diff --git a/source/sites/mycompanyinfrance.fr/App.js b/source/sites/mycompanyinfrance.fr/App.js
index 7163dfd0c..840ad5c15 100644
--- a/source/sites/mycompanyinfrance.fr/App.js
+++ b/source/sites/mycompanyinfrance.fr/App.js
@@ -3,7 +3,7 @@ import { defaultTracker } from 'Components/utils/withTracker'
import createRavenMiddleware from 'raven-for-redux'
import Raven from 'raven-js'
import React, { Component } from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { Route, Switch } from 'react-router-dom'
import 'Ui/index.css'
import Provider from '../../Provider'
@@ -68,7 +68,7 @@ class InFranceRoute extends Component {
}
}
-let RouterSwitch = withI18n()(() => {
+let RouterSwitch = withNamespaces()(() => {
const paths = sitePaths()
return (
diff --git a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js
index bfd3104b0..2f211e44e 100644
--- a/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js
+++ b/source/sites/mycompanyinfrance.fr/layout/Footer/Footer.js
@@ -7,7 +7,7 @@ import urssafSvg from 'Images/urssaf.svg'
import { compose } from 'ramda'
import React from 'react'
import Helmet from 'react-helmet'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { withRouter } from 'react-router'
import i18n from '../../../../i18n'
import { feedbackBlacklist } from '../../config'
@@ -86,5 +86,5 @@ const Footer = ({ colours: { colour } }) => {
export default compose(
withRouter,
withColours,
- withI18n()
+ withNamespaces()
)(Footer)
diff --git a/source/sites/mycompanyinfrance.fr/layout/Navigation/Navigation.js b/source/sites/mycompanyinfrance.fr/layout/Navigation/Navigation.js
index 12dcfe3c2..f103c8963 100644
--- a/source/sites/mycompanyinfrance.fr/layout/Navigation/Navigation.js
+++ b/source/sites/mycompanyinfrance.fr/layout/Navigation/Navigation.js
@@ -2,7 +2,7 @@
import { React, T } from 'Components'
import { compose } from 'ramda'
import emoji from 'react-easy-emoji'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { NavLink, withRouter } from 'react-router-dom'
import selectors from 'Selectors/progressSelectors'
@@ -241,7 +241,7 @@ const StepsHeader = ({
export default compose(
withRouter,
- withI18n(),
+ withNamespaces(),
connect(
state => ({
...selectors(state),
diff --git a/source/sites/mycompanyinfrance.fr/layout/ProgressHeader/ProgressHeader.js b/source/sites/mycompanyinfrance.fr/layout/ProgressHeader/ProgressHeader.js
index 22b4d2121..8e1af6df5 100644
--- a/source/sites/mycompanyinfrance.fr/layout/ProgressHeader/ProgressHeader.js
+++ b/source/sites/mycompanyinfrance.fr/layout/ProgressHeader/ProgressHeader.js
@@ -3,7 +3,7 @@
import { React, T } from 'Components'
import withTracker from 'Components/utils/withTracker'
import { compose } from 'ramda'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { NavLink, withRouter } from 'react-router-dom'
import selectors from 'Selectors/progressSelectors'
@@ -87,5 +87,5 @@ export default compose(
selectors,
{}
),
- withI18n()
+ withNamespaces()
)(StepsHeader)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/AfterRegistration.js b/source/sites/mycompanyinfrance.fr/pages/Company/AfterRegistration.js
index 0ba6d5030..d2a55d22f 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/AfterRegistration.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/AfterRegistration.js
@@ -2,7 +2,7 @@
import { React, T } from 'Components'
import { ScrollToTop } from 'Components/utils/Scroll'
import { compose } from 'ramda'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import Animate from 'Ui/animate'
@@ -105,5 +105,5 @@ export default compose(
connect(state => ({
companyStatusChoice: state.inFranceApp.companyStatusChoice
})),
- withI18n()
+ withNamespaces()
)(AfterRegistration)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js b/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js
index fe0497e77..6a55a480c 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/CreationChecklist.js
@@ -8,7 +8,7 @@ import { React, T } from 'Components'
import Scroll from 'Components/utils/Scroll'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import * as Animate from 'Ui/animate'
@@ -427,7 +427,7 @@ const CreateCompany = ({
)
}
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
state => ({
companyCreationChecklist: state.inFranceApp.companyCreationChecklist,
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
index 7aa8c9776..aa58879c5 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
@@ -3,7 +3,7 @@ import { defineDirectorStatus } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { DirectorStatus } from 'Types/companyTypes'
@@ -76,7 +76,7 @@ const DefineDirectorStatus = ({ defineDirectorStatus, t }: Props) => (
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
null,
{ defineDirectorStatus }
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Find.js b/source/sites/mycompanyinfrance.fr/pages/Company/Find.js
index 3edc2999c..e7bd8fbb8 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Find.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Find.js
@@ -3,7 +3,7 @@ import { saveExistingCompanyDetails } from 'Actions/existingCompanyActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { withRouter } from 'react-router'
import { Link } from 'react-router-dom'
@@ -121,5 +121,5 @@ export default compose(
onCompanyDetailsConfirmation: saveExistingCompanyDetails
}
),
- withI18n()
+ withNamespaces()
)(Search)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
index e2217209c..4f42bc382 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
@@ -3,7 +3,7 @@ import { resetCompanyStatusChoice } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose, toPairs } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link, Redirect } from 'react-router-dom'
import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors'
@@ -96,5 +96,5 @@ export default compose(
}),
{ resetCompanyStatusChoice }
),
- withI18n()
+ withNamespaces()
)(CreateMyCompany)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js b/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
index 98e47435a..5a234d6bd 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
@@ -3,7 +3,7 @@ import { chooseCompanyLiability } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { CompanyLiability } from 'Types/companyTypes'
@@ -116,7 +116,7 @@ const Liability = ({
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
state => ({
multipleAssociates:
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js b/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
index 873a3ec38..664f9dd09 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
@@ -3,7 +3,7 @@ import { companyIsMicroenterprise } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import CompanyStatusNavigation from './CompanyStatusNavigation'
@@ -102,7 +102,7 @@ const Microenterprise = ({ companyIsMicroenterprise, t }: Props) => (
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
null,
{ companyIsMicroenterprise }
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js b/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
index 328d453ba..9636aaae0 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
@@ -3,7 +3,7 @@ import { directorIsInAMinority } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { TFunction } from 'react-i18next'
@@ -72,7 +72,7 @@ const MinorityDirector = ({ directorIsInAMinority, t }: Props) => (
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
null,
{ directorIsInAMinority }
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js b/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
index 62be81d30..bb18951b5 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
@@ -4,7 +4,7 @@ import { companyHasMultipleAssociates } from 'Actions/companyStatusActions'
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { TFunction } from 'react-i18next'
@@ -72,7 +72,7 @@ const NumberOfAssociates = ({ companyHasMultipleAssociates, t }: Props) => (
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
null,
{ companyHasMultipleAssociates }
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
index c93d3cd2b..484b91530 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
@@ -5,7 +5,7 @@ import { connect } from 'react-redux'
import { filter } from 'ramda'
import { Link } from 'react-router-dom'
import { possibleStatusSelector } from 'Selectors/companyStatusSelectors'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import StatusDescription from './StatusDescription'
import type { RouterHistory } from 'react-router'
import { compose } from 'ramda'
@@ -25,7 +25,7 @@ type Props = {
t: TFunction
}
-const StatusButton = withI18n()(
+const StatusButton = withNamespaces()(
({ status, t }: { status: LegalStatus, t: TFunction }) => (
@@ -131,7 +131,7 @@ const SetMainStatus = ({
}
export default compose(
- withI18n(),
+ withNamespaces(),
withLanguage,
connect(
state => ({ possibleStatus: possibleStatusSelector(state) }),
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/YourCompany.js b/source/sites/mycompanyinfrance.fr/pages/Company/YourCompany.js
index d5705fad1..75227feef 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/YourCompany.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/YourCompany.js
@@ -3,7 +3,7 @@
import { React, T } from 'Components'
import withLanguage from 'Components/utils/withLanguage'
import { toPairs } from 'ramda'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link, Redirect } from 'react-router-dom'
import sitePaths from '../../sitePaths'
@@ -38,7 +38,7 @@ const LocaleDate = withLanguage(
}).format(date)
)
-export const CompanyDetails = withI18n()(
+export const CompanyDetails = withNamespaces()(
({ t, ...data }: { t: TFunction, [string]: string }) => {
const localizedCompanyDataSelection = companyDataSelection(t)
return (
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/index.js b/source/sites/mycompanyinfrance.fr/pages/Company/index.js
index 2ad7875b1..c859b9907 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/index.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/index.js
@@ -1,5 +1,5 @@
import React from 'react'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Redirect, Route, Switch } from 'react-router'
import * as Animate from 'Ui/animate'
@@ -104,4 +104,4 @@ const CreateMyCompany = ({
export default connect(state => ({
companyStatusChoice: state.inFranceApp.companyStatusChoice,
existingCompany: state.inFranceApp.existingCompanyDetails
-}))(withI18n()(CreateMyCompany))
+}))(withNamespaces()(CreateMyCompany))
diff --git a/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js b/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js
index bd07dc4de..2e8b576e3 100644
--- a/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js
+++ b/source/sites/mycompanyinfrance.fr/pages/HiringProcess.js
@@ -6,7 +6,7 @@ import {
import { React, T } from 'Components'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import Animate from 'Ui/animate'
@@ -208,7 +208,7 @@ const HiringProcess = ({
)
export default compose(
- withI18n(),
+ withNamespaces(),
connect(
state => ({ hiringChecklist: state.inFranceApp.hiringChecklist }),
{
diff --git a/source/sites/mycompanyinfrance.fr/pages/Landing.js b/source/sites/mycompanyinfrance.fr/pages/Landing.js
index 660af4bb8..457f64511 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Landing.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Landing.js
@@ -5,7 +5,7 @@ import marianneSvg from 'Images/marianne.svg'
import urssafSvg from 'Images/urssaf.svg'
import React from 'react'
import emoji from 'react-easy-emoji'
-import { Trans, withI18n } from 'react-i18next'
+import { Trans, withNamespaces } from 'react-i18next'
import { Link } from 'react-router-dom'
import companySvg from '../images/company.svg'
import estimateSvg from '../images/estimate.svg'
@@ -14,7 +14,7 @@ import Footer from '../layout/Footer/Footer'
import sitePaths from '../sitePaths'
import './Landing.css'
-export default withI18n()(
+export default withNamespaces()(
withColours(({ colours: { colour } }) => (
<>
diff --git a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js
index 73fb5baa1..b7e83c14b 100644
--- a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js
+++ b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/Home.js
@@ -6,7 +6,7 @@ import { ScrollToTop } from 'Components/utils/Scroll'
import withLanguage from 'Components/utils/withLanguage'
import { compose } from 'ramda'
import Helmet from 'react-helmet'
-import { withI18n } from 'react-i18next'
+import { withNamespaces } from 'react-i18next'
import * as Animate from 'Ui/animate'
import type { Match, Location } from 'react-router'
import type { TFunction } from 'react-i18next'
@@ -89,6 +89,6 @@ class SocialSecurity extends Component {
}
export default compose(
- withI18n(),
+ withNamespaces(),
withLanguage
)(SocialSecurity)