WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
261 stars 53 forks source link

Create I18n_Usage_Check #18

Closed mehulkaklotar closed 1 year ago

mehulkaklotar commented 1 year ago

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

Tests Coverage

felixarntz commented 1 year ago

@jjgrainger The ACs here were added a while ago and are outdated. They need to be updated to reflect the way the Abstract_PHPCodeSniffer_Check works now.

jjgrainger commented 1 year ago

Thanks @felixarntz

I've updated the AC's to reflect the changes made to the Abstract_PHPCodeSniffer_Check.

felixarntz commented 1 year ago

@jjgrainger ACs LGTM!

vishalkakadiya commented 1 year ago

@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!

CC @felixarntz

vishalkakadiya commented 1 year ago

@jjgrainger I have addressed your feedback and left one question for you. Thank you!