Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatched text domain #2

Open
samikeijonen opened this issue Oct 10, 2021 · 1 comment
Open

Mismatched text domain #2

samikeijonen opened this issue Oct 10, 2021 · 1 comment

Comments

@samikeijonen
Copy link
Member

Mismatched text domain. Expected 'kala' but got 'meom-blocks'.
| | (WordPress.WP.I18n.TextDomainMismatch)

Above is outputted when using command ./vendor/bin/phpcs htdocs/wp-content/plugins/meomblocks with this .phpcs.xml.dist in meoblocks root.

<?xml version="1.0"?>
<ruleset name="Project Rules">
    <rule ref="MEOM-default" />

    <!-- Verify that the text_domain is set to the desired text-domain.
            Multiple valid text domains can be provided as a new element. -->
    <rule ref="WordPress.WP.I18n">
        <properties>
            <property name="text_domain" type="array">
                <element value="meom-blocks"/>
            </property>
        </properties>
    </rule>
</ruleset>

Maybe we need to remove checking kala text-domain check from this main PHPCS rules and it in theme or plugin root folder.

@samikeijonen
Copy link
Member Author

Update: I forgot that we need to pass --standard flag in correct place.

./vendor/bin/phpcs htdocs/wp-content/plugins/meomblocks --standard=htdocs/wp-content/plugins/meomblocks/.phpcs.xml.dist

Let's add this in the documentation first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant