-
Notifications
You must be signed in to change notification settings - Fork 316
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
standardize translation method #1204
Comments
This seems to relate to issue #1189 and can probably be done together. |
Please assign this issue to me. |
I found 15 instances of formatMessage() across the files. General uses: Both in react-intl library translate(): formatMessage(): https://react.i18next.com/latest/usetranslation-hook Experimenting:
I think that it may be better to use the formatMessage() across the program if we want to continue to use the react-intl library. Translate() seems simpler, but it does not seem to be able to handle as many variables like the formatMessage() can. I would even propose to use translate() in some areas and use FormatMessage() strictly for error handling, which is how the instances seem to be used currently. |
I like how thorough your analysis of the two functions was, it was very enlightening and helped me form a better, more factual opinion of the efficiency of the use of either function. I agree with your statement at the end as well, the functions seem to each work better in different situations. |
@lawsj Thanks for looking into this and your analysis. Would it be possible to meet to discuss your two options? (You can DM/email me to find a time.) I'd like to understand the tradeoff a little better so a final decision can be made. If not, I can ask questions here. |
I would like to take on this issue. |
@RaiuXL Please note that PR #1354 made significant progress on this issue. At this point the item left is to get it two work outside components. There has been a little discussion on how that might be done. If you still want to work on this then please indicate that and it might be good to discuss how to move forward. |
Is your feature request related to a problem? Please describe.
In many places OED uses translate() and in some it uses FormatMessage(). They both appear to return a string.
Describe the solution you'd like
OED should pick the better of these two and use it consistently in the code. Maybe research the two and propose one to the project. Then make the needed edits once everyone agrees.
Describe alternatives you've considered
Leave as is
Additional context
None
The text was updated successfully, but these errors were encountered: