Skip to content

Commit

Permalink
fix: add a specific text domain to check in the phpcs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaferMazu committed Mar 8, 2024
1 parent ae87a15 commit a478523
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/model/class-openedx-commerce-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function register_post_type() {
'name' => $this->plural,
'singular_name' => $this->single,
'name_admin_bar' => $this->single,
'add_new' => sprintf( _x( 'Add New', 'openedx-commerce' ), $this->post_type ),
'add_new' => sprintf( _x( 'Add New', 'openedx-commerce', 'openedx-commerce' ), $this->post_type ),
// translators: %s: Name of the post type in singular.
'add_new_item' => sprintf( __( 'Add New %s', 'openedx-commerce' ), $this->single ),
// translators: %s: Name of the post type in singular.
Expand All @@ -119,7 +119,7 @@ public function register_post_type() {
// translators: %s: Name of the post type in plural.
'not_found_in_trash' => sprintf( __( 'No %s Found In Trash', 'openedx-commerce' ), $this->plural ),
// translators: %s: Name of the post type in singular.
'parent_item_colon' => sprintf( __( 'Parent %s' ), $this->single ),
'parent_item_colon' => sprintf( __( 'Parent %s', 'openedx-commerce' ), $this->single ),
'menu_name' => $this->plural,
);

Expand Down
10 changes: 10 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<exclude-pattern>./admin/index.php</exclude-pattern>
<exclude-pattern>./public/index.php</exclude-pattern>
<exclude-pattern>index.php</exclude-pattern>
<exclude-pattern>composer-setup.php</exclude-pattern>

<arg value="sp"/>
<arg name="basepath" value="./"/>
Expand All @@ -18,6 +19,15 @@
<rule ref="WordPress">
</rule>

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="openedx-commerce"/>
<element value="woocommerce"/>
</property>
</properties>
</rule>

<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
Expand Down

0 comments on commit a478523

Please sign in to comment.