Automattic / Automattic/jetpack
Related Posts uses the user locale setting instead of the site language
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### Steps to Reproduce
1. Change your user language to something other than English in `wp-admin/profile.php`
2. Look at the reading settings in `wp-admin/options-reading.php` - you'll see that the headline for the related posts feature is now localized to the language you selected.
3. Save the reading settings
Now you will see that the related posts headline is localized for all readers.
### A clear and concise description of what you expected to happen.
I would expect one of these behaviors - the first is likely easier to implement and probably makes more sense too
1. The related post headline is controlled by the site language, not the user language, so that all users see the same thing
2. The related posts headline is controlled by the browser language settings
3. The related posts headline matches the user language for each user, if the user is logged in, otherwise default to the site language.
### What actually happened
If one user of a blog has their language set to X, and updates the reading settings, the related posts headline is set to that user's language on the frontend.
### Browser
Google Chrome/Chromium, Mozilla Firefox, Microsoft Edge, Apple Safari, iOS Safari, Android Chrome
### Other information
_No response_
### Platform (Simple, Atomic, or both?)
Simple, Atomic, Self-hosted
### Reproducibility
Consistent
### Severity
Some (< 50%)
### Available workarounds?
Yes, easy to implement
### Workaround details
the workaround is to set the user language to the site language, update the reading settings, and then change the user language back. This is not an ideal situation though.
Contributor guide
Research direction
Reproduce the issue through wp-admin/profile.php and wp-admin/options-reading.php, then trace the Jetpack related-posts setting that supplies the headline locale. Confirm which locale is used when saving and displaying the setting; done means a user's language change no longer changes the headline for all readers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- internationalization, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100