- Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
ChecksAudit/test of the particular part of the pluginAudit/test of the particular part of the plugin[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature
Milestone
Description
Description
Checks that WordPress internationalization functions are used properly, including using a valid textdomain that matches the plugin’s textdomain in the main file comment header. It will also include checks for each of the localization functions for typos and ensure the correct parameters are passed. This will use the existing WordPress.WP.I18n sniff in the WordPress Coding Standards.
Acceptance Criteria
- Class
I18n_Usage_Checkshould be created and exists atincludes/Checker/Checks - Class
I18n_Usage_Checkshould extend theAbstract_PHP_CodeSniffer_Checkabstract class - Class should implement the public
get_args()and return an associative array of the required PHPCS arguments'sniffs' => 'WordPress.WP.I18n''standard' => 'WordPress'
Tests Coverage
get_args()method returns the expected array of PHPCS arguments for the checkrun()method adds a correct message to the$check_resultwhen checking an invalid filerun()method does not add any message to the$check_resultwhen checking a valid file
Metadata
Metadata
Assignees
Labels
ChecksAudit/test of the particular part of the pluginAudit/test of the particular part of the plugin[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature