-
Notifications
You must be signed in to change notification settings - Fork 43
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
Avatar rating text is not translated properly if a user has a custom language set #88
Comments
9 tasks
9 tasks
Repository owner
moved this from Review Approved
to Merged
in Open Source Practice
Nov 23, 2021
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Reported here. The Avatar Rating text is translated properly if a site language is set but not if a user language is set.
Looking into it, I believe it's related to this: https://make.wordpress.org/core/2016/11/07/changed-loading-order-for-current-user-in-4-7/. Basically where we have those strings set is loaded prior to the user object being initialized, so the user's set language is never available and thus won't be considered when translating.
There may be other approaches but it may be as simple as moving those text strings to the actual function that needs them, which should be late enough in the loading process to fix the problem. We do use the avatar ratings (G, PG, etc) in other places, so those need to stay but the actual text strings are only used in a single location.
Steps to Reproduce
Expected behavior
All text should be translated if a different language is chosen and translations are available
The text was updated successfully, but these errors were encountered: