Fix Plugin Check Errors: MissingTranslatorsComment & MissingSingularPlaceholder#758
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| /* translators: 1: number of failed login attempts, 2: time since last failed attempt */ | ||
| _n( | ||
| 'WARNING: Your account has attempted to login without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', | ||
| 'WARNING: Your account has attempted to login %1$s time without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', |
There was a problem hiding this comment.
Looks like this requires updating the associated phpunit test case:
- Test_ClassTwoFactorCore::test_maybe_show_last_login_failure_notice
Failed asserting that 'WARNING: Your account has attempted to login 1 time without providing a valid two factor token. The last failed login occurred 5 seconds ago. If this wasn't you, you should reset your password.' contains "login without providing a valid two factor token"./var/www/html/wp-content/plugins/two-factor/tests/class-two-factor-core.php:630
Fixes #757
What?
This PR intends to fix the MissingTranslatorsComment & MissingSingularPlaceholder Errors shown by the Plugin Check Plugin
Why?
This PR is necessary to resolve WordPress Coding Standards (PHPCS) i18n errors related to translatable strings with placeholders.
How?
The PR addresses these issues by:
Testing Instructions
Screenshots or screencast
Changelog Entry