Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.44k stars 1.99k forks source link

Related Posts: Account language switch is not affecting the "Related Posts" string (translation/localization) #58442

Open retnonindya opened 3 years ago

retnonindya commented 3 years ago

Quick summary

When a user saved their "Related Posts" setting in a certain language (language A) then saved Interface Language from Accounts page to another language (language B), the string "Related posts" is not automatically translated.

Steps to reproduce

  1. Open test site. Then go to Settings > Reading: .../wp-admin/options-reading.php. On this scenario, lets use English language as the Interface language.

  2. Note that the "Related Posts" title has the word "Related" in English as expected.

    Screenshot 2021-11-24 at 2 43 12 PM
  3. Now, go to Account Settings page: https://wordpress.com/me/account

  4. Change the interface language to another language. For this example, I'm using Indonesian language (Bahasa Indonesia). Make sure the changes are saved and the dashboard is using the new language we just set.

  5. Go back to Settings > Reading. Everything should be displayed in Indonesian ("Terkait" means "Related").

    Screenshot 2021-11-24 at 2 47 09 PM
  6. Now, do some changes, or do nothing -- then save the changes (click the Save button on the bottom of the page.)

  7. Check the live site. It should have the "Related Posts" in the selected language.

  8. Then, go back to Account Settings page: https://wordpress.com/me/account -- and switch the language back to English.

  9. Make sure the dashboard and the interface is back to English.

  10. Check the live site. It's still using the non-ENG language (on my end, it's still using Indonesian language) on the string "Related" even though the interface language on the Account Settings page has changed and the string is back to "Related" on Settings > Reading field.

What you expected to happen

I expect to see the "Related" string to be automatically changed/translated as soon as the language on interface language (Account Settings) changed.

What actually happened

The string "Related" is still unchanged/it's still using the previous language

Context

Customer report and personal test

Operating System

No response

Browser

Google Chrome/Chromium

Simple, Atomic or both?

Simple

Theme-specific issue?

No response

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, easy to implement

Workaround details

The workaround is simple. After we changed the language in Account Settings, go back to Settings > Reading, find the "Related Posts" field, and click the "Save Changes" button. It should "force" the translation on the Related Posts field to stick.

Robertght commented 3 years ago

I'm not able to replicate this at the moment.

@retnonindya is there a website we could see this happening or have you noticed if this happens only with a specific theme?

retnonindya commented 3 years ago

@Robertght Hi Robert! Thanks for looking into this! This happens on my test site: https://premiumtestsite.corianderpho.blog/

This is the screen recording (video).

https://user-images.githubusercontent.com/44726232/143796690-726ca045-2049-4ca8-bb77-30ab86e4da0c.mp4

However, now that I think of it; it seems like this is not a bug, but more on flow? 🤔 After we changed our interface language, we need to resave whatever it is, to ensure the translated string is saved too?

Robertght commented 2 years ago

Thank you for sharing this @retnonindya !

This is indeed questionable. I'm not sure how this feature is supposed to work, but since this is a Jetpack feature I'm pinging @jeherve for a second look.

jeherve commented 2 years ago

I'm not sure how this feature is supposed to work

I would expect that string to respect the site language, not the account's language. So I would not expect it to change when I change my account's language, since I may have different sites under my account, using different languages.