-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Credential Form: Show error message on the correct language + cleanup #95688
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
isEnglishLocale && | ||
code === 'automated_migration_tools_login_and_get_cookies_test_failed' | ||
) { | ||
if ( code === 'automated_migration_tools_login_and_get_cookies_test_failed' ) { |
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.
Super nitpicky, but we should reverse this conditional so the constant is on the left-hand side ("Yoda" conditions as per WP coding standards)
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.
Thanks @sixhours.
I just double-checked if we are adopting the WP pattern, and I saw we just have
164 instances of the Yoda style
1494 instances of the regular style.
I run a search using the following patterns:
Regular style
=== '
Yoda style
' ===
The javascript WordPress code standards also contain examples of "regular" style usage.
https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/
So, I think the Yoda style is more applicable to PHP
Fix #95625 and continue the work started on Remove English-based verifications #95552
Proposed Changes
Context
This comment highlighted we are not showing an error message on the user language. I initially thought the reason was the missing _locale flag, but actually, I found another English checking that was making the UI show errors directly from the backend.
Now, the UI is showing correct error messages.
Testing Instructions
Do it for me
Pre-merge Checklist