-
Notifications
You must be signed in to change notification settings - Fork 798
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
WordPress.com Features: Calypso Locale Sync from Calypso to wp-admin #37352
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
I added a4a53f8. I thought that would be the easiest way to collaborate, but please feel free to revert it if needed. I'm just sharing ideas. I was able to get syncing working both ways with this commit. By skipping all POST requests and skipping GET requests to profile.php?updated=1, I was able to get locale updates on profile.php using #37316 working again. And by forcing a redirect to the current GET request I was able to refresh the language from a Calypso side sync. The linter is pretty mad at my commit though 😅, so that needs attention. And we need to consider if this approach is brittle. It needs some more thinking. I'm at EOD, so I'll pass it back to you, @miksansegundo. |
projects/packages/jetpack-mu-wpcom/src/features/wp-admin-locale-sync/wp-admin-locale-sync.php
Outdated
Show resolved
Hide resolved
I'm testing this again after 1cd341a added the following changes:
|
98186b1
to
95e4b51
Compare
I raised D148599-code to add the stubs that may be causing the fails on Tests / Static analysis. However, the tests on that diff didn't pass. I appreciate help with those tests and the pending linter issue. I followed the guide at p81Rsd-1Pn-p2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
c949742
to
6826e86
Compare
Fixes https://github.com/Automattic/dotcom-forge/issues/6812
Related #37316 https://github.com/Automattic/dotcom-forge/issues/7086
Proposed changes:
admin_init
to check whether the wp-admin locale needs to be synced with Calypso localeNote
The masterbar module contains the logic for syncing the Calypso locale in Atomic Default. It's loaded here, only when the navigation redesign flag is disabled.
There is a project in progress that is moving Jetpack Masterbar module to mu-wpcom. See #37277 and read more in pfwV0U-3U-p2
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
/wp-admin/profile.php