Releases: ryandrewjohnson/react-localize-redux
Releases · ryandrewjohnson/react-localize-redux
v2.5.1
Added new Redux action creator addTranslationForLanguage
- Allows for adding language specific translation data.
- See new Single language format
Improved documentation
- moved docs from README to dedicated site
- improved existing documentation, as well as added new section Formatting Translation Data
Minor typo fixes and error message changes
v2.4.1 2.4.1
Optimizations
Before Optimization
- Any connected component using the
getTranslate
selector would re-render whenever any Redux action was dispatched.
After Optimization
- The
getTranslate
selector will only trigger a re-render if the translation data is updated using theaddTranslation
action creator, or if the languages or active language changes usingsetLanguages
orsetActiveLanguage
action creator.
NOTE: if your component is connected to other slices of state along with
getTranslate
a re-render will occur if any of the other connected state items change.
Bug fix
- fixed failing unit tests
v2.3.0
- The translate function will now return a plain string for translations that don't contain any HTML markup.
- Those translations that do contain HTML will still be wrapped in a
<span>
tag - same as before.
v2.2.1
- move
reselect
from peerDependencies to dependencies
v2.2.0
- add new feature to allow passing multiple translations to child components
v2.1.0
- update reselect version to 3.0.0
- update localize function so it takes an additional parameter
slice
which is needed when addinglocaleReducer
usingcombineReducers
. - update README to include instructions on adding
localeReducer
when usingcombineReducers
v2.0.2
- add missing exports
getActiveLanguage
,getLanguages
, andgetTranslations
- update README with additional selectors
getLanguages
andgetTranslations
v2.0.1
- Small tweaks to documentation