Migrate translations to state
-
the "$t" function should become a getter. -
The translation should added in the connect() function. -
This will allow to properly rerender the components on changing the language.
State proposal at first approach:
state = {
ui: { // Already existing
translations:
en: {
the_key: "The translation" // Note: the_key sould not include the 'client.'
},
fr: {
the_key: "La traduction"
}
}
}
}