You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_Check should be created and exists at includes/Checker/Checks
Class I18n_Usage_Check should extend the Abstract_PHP_CodeSniffer_Check abstract 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 check
run() method adds a correct message to the $check_result when checking an invalid file
run() method does not add any message to the $check_result when checking a valid file
@jjgrainger Added a standard argument in the task description as we need to test the translation logic against WP coding standards. Let me know if you have any other suggestions, thank you!
Activity
7 remaining items
jjgrainger commentedon Jan 17, 2023
Thanks @felixarntz
I've updated the AC's to reflect the changes made to the
Abstract_PHPCodeSniffer_Check.felixarntz commentedon Jan 18, 2023
@jjgrainger ACs LGTM!
vishalkakadiya commentedon Jan 21, 2023
@jjgrainger Added a
standardargument in the task description as we need to test the translation logic against WP coding standards. Let me know if you have any other suggestions, thank you!CC @felixarntz
vishalkakadiya commentedon Jan 25, 2023
@jjgrainger I have addressed your feedback and left one question for you. Thank you!
Bump the WordPress.WP.AlternativeFunctions on the PHPCS checks to an …
Add changelog to #18