Merge pull request #1115 from jrfnl/feature/check-correct-text-domain

Verify the text domain provided for all translatable strings for WPCS
This commit is contained in:
David A. Kennedy 2017-06-16 00:25:34 +02:00 committed by GitHub
commit 23f963f322
1 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@
<ruleset name="WordPress Theme Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description>
@ -13,6 +14,14 @@
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
</rule>
<!-- Verify that the text_domain is set to the desired text-domain.
Multiple valid text domains can be provided as a comma-delimited list. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="_s" />
</properties>
</rule>
<!-- Include sniffs for PHP cross-version compatibility. -->
<config name="testVersion" value="5.2-99.0"/>
<rule ref="PHPCompatibility"/>