-
Notifications
You must be signed in to change notification settings - Fork 801
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
Site Settings: Allow language change even if WPLANG is defined as constant #13154
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: August 6, 2019. |
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.
I have confirmed that this patch fixes the issue.
Reason for most recent update: Core's |
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.
This handles empty strings for WPLANG
well, but it does not handle valid strings.
For example, if I set WPLANG
to fr_FR
, here is what happens today with master
:
And here is what happens with your branch:
That is not correct here, since my interface language is actually french, not English.
Maybe when WPLANG
is defined and not empty, we should send the value back to WordPress.com so it can be displayed in Calypso.
That may be a problem in Calypso, not in JP endpoint. With same setup, wp-admin: But Calypso continues to display English as site language. Since this PR is about the endpoint, perhaps I should update the test plan to use WPCOM Console so we can at least fix the JP endpoint behavior to match that of wp-admin. Meanwhile I'm going to look into why Calypso is misbehaving. I also noticed several
Did you test with latest version? That's is what is being done now.
|
Hold on. I may be looking at wrong API response. |
OK. I was looking at the wrong endpoint. End point that matters is: Finding out why the endpoint kept returning
Replacing the call with @jeherve I think something went wrong with your test setup because black warning notice only comes up if |
Yes I am sorry, I pasted the same screenshot twice in my comment, that was a mistake. |
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.
This tests well now. 👍
* 7.7 changelog: initial set of changes * Changelog: add #13154 * Changelog: add #13134 * Changelog: add #12699 and many others * Changelog: add #13127 * Changelog: add #13167 * Changelog: add #13225 * Changelog: add #13179 * Changelog: add #13173 * Changelog: add #13232 * Changelog: add #13137 * Changelog: add #13172 * Changelog: add #13182 * Changelog: add #13200 * Changelog: add #13244 * Changelog: add #13267 * Changelog: add #13204 * changelog: add #13205 * Changelog: add #13183 * Changelog: add #13278 * Changelog: add #13162 * Changelog: add #13268 * Changelog: add #13286 * Changelog: add #13273 * Changelog: add #12474 * Changelog: add #13085 * Changelog: add #13266 * Changelog: add #13306 * Changelog: add #13311 * Changelog: add #13302 * Changelog: add #13196 * Changelog: add #12733 * Changelog: add #13261 * Changelog: add #13322 * Changelog: add #13333 * Changelog: add #13335
wp-admin
users can change site language even ifWPLANG
constant is defined inwp-config.php
. This PR allows Calypso user to do the same in the general settings page (/settings/general/
).Fixes Automattic/wp-calypso#33440
Changes proposed in this Pull Request:
Removes
defined( 'WPLANG' )
checks from Jetpack's Core Data API endpoints used by Calypso to change site settings.Testing instructions:
wp-config.php
contains the linedefine('WPLANG', '');
Before:
After:
Proposed changelog entry for your changes:
WPLANG
constant is defined.