use RTK compliant translation function #1189
Labels
i-good-first-issue
This issue is probably a good starting point for people new to coding or the OED project.
p-medium-priority
reserved
Expected to be assigned to developer by project so others should not work on without prior approval.
t-enhancement
This issues tracks a potential improvement to the software
Milestone
Is your feature request related to a problem? Please describe.
src/client/app/redux/componentHooks.ts defines useTranslate that is consistent with the new Redux Toolkit. OED should use is everywhere.
Describe the solution you'd like
src/client/app/utils/translate.ts has a translate function that directly access state. It would be better to use the one described above. Many files that use translate() are already in the RTK so it is hoped that change should be easy. (This is made easier by using
const translate = useTranslate();
) In others it may need to wait until the RTK translation is done (unsure). It is believed that all references must be changed at once within a file.Describe alternatives you've considered
The current code works but OED wants to remove all references to state.
Additional context
None
The text was updated successfully, but these errors were encountered: