-
Notifications
You must be signed in to change notification settings - Fork 171
Persist existing translations when introducing new helper text in emails #745
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
Conversation
| /** | ||
| * Get the client IP address for the current request. | ||
| * | ||
| * Note that the IP address is used only for information purposes |
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.
Explain the expected setup for this and known limitations.
providers/class-two-factor-email.php
Outdated
| ), | ||
| $token, | ||
| /* translators: %1$s: token */ | ||
| __( 'Enter %1$s to log in.', 'two-factor' ), |
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.
Keep this string as it was to ensure that the existing translations keep working.
| */ | ||
| public function pre_process_authentication( $user ) { | ||
| if ( isset( $user->ID ) && isset( $_REQUEST[ self::INPUT_NAME_RESEND_CODE ] ) ) { | ||
| if ( isset( $user->ID ) && isset( $_REQUEST[ self::INPUT_NAME_RESEND_CODE ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- non-distructive option that relies on user state. |
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.
Addressed the rest of PHPCS warnings for the file.
What?
Keep the existing
Enter %1$s to log in.as standalone string to ensure it works with existing translations. Add the new helper text in own lineDidn't expect this? A user from %1$s has successfully authenticated as %2$s. If this wasn't you, please change your password..Why?
Follow-up to #728.
How?
Testing Instructions
Screenshots or screencast
This now keeps the existing translations for the main sentence:
Changelog Entry