Skip to content

I18n (PHP): Add lint to avoid including HTML tags in a translated string #19911

@ockham

Description

@ockham

Is your feature request related to a problem? Please describe.
We discovered this issue through an i18n linter set up on WP.com, whereas it wasn't detected within the Gutenberg repo.

Describe the solution you'd like
I think it'd make sense to include similar linting capabilities to Gutenberg, which we'll ideally run from a commit hook, and CI (either Travis or GH Actions) to avoid cases like that in the future.

I'm not sure if core (or WP.org, more generally) already has a linter like that in place (and if we could share it with the Gutenberg repo)?

Question: Do we have a place for PHP linting rules like this in the Gutenberg repo?

Describe alternatives you've considered
N/A

/cc @akirk @epiqueras @chriskmnds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Internationalization (i18n)Issues or PRs related to internationalization efforts[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] Code QualityIssues or PRs that relate to code quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions