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

use RTK compliant translation function #1189

Open
huss opened this issue Apr 3, 2024 · 0 comments
Open

use RTK compliant translation function #1189

huss opened this issue Apr 3, 2024 · 0 comments
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

Comments

@huss
Copy link
Member

huss commented Apr 3, 2024

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

@huss huss added t-enhancement This issues tracks a potential improvement to the software p-medium-priority i-good-first-issue This issue is probably a good starting point for people new to coding or the OED project. labels Apr 3, 2024
@huss huss added this to the 1.1 release milestone Apr 3, 2024
@huss huss moved this to Todo in Redux Toolkit Apr 3, 2024
@huss huss removed this from Redux Toolkit Apr 3, 2024
@huss huss added the reserved Expected to be assigned to developer by project so others should not work on without prior approval. label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant