You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Select a site language other than English (es_ES for instance). Ensure proper language packs get installed
Go to your profile page and note the Avatar Rating text is translated
Turn site language back to english
Set user language to a different language (es_ES again)
Note the Avatar Rating text is not translated
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:
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: