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

Filters are hardcoded in english #169

Open
seblaz opened this issue Jun 23, 2020 · 6 comments
Open

Filters are hardcoded in english #169

seblaz opened this issue Jun 23, 2020 · 6 comments

Comments

@seblaz
Copy link

seblaz commented Jun 23, 2020

Hi!
I just noticed that the filters (Behat\Gherkin\Filter\RoleFilter for example) has the as an string hardcoded. This makes it imposible to use some role-based features in other languages.

Update:
It looks like the only filter with hardcoded strings is the RoleFilter.

@stof
Copy link
Member

stof commented Feb 4, 2021

As far as I can tell, this RoleFilter is something that was invented by Behat, with no equivalent in Cucumber. So on their side, they don't have any need for i18n for this.

@seblaz there is a NarrativeFilter supporting arbitrary regexp

@ciaranmcnulty
Copy link
Contributor

As it's not part of the gherkin (it's part of our stuff) we could have it in the localist translations in Behat/Behat somehow?

@stof
Copy link
Member

stof commented Feb 4, 2021

I think the whole Behat\Gherkin\Filter thing should actually not be in behat/gherkin as this is about implementing the filtering for Behat suites, not about parsing gherkin.

Tag expressions would make sense to implement as a dedicated package too (maybe semi-generated in cucumber too as for other languages) rather than implementing that inside the TagFilter directly (moved to Behat or no).

@ciaranmcnulty
Copy link
Contributor

I imagine it's done this way because in theory a more complex Loader (e.g. coming from a web service or database) would benefit from filtering at the source.

@stof
Copy link
Member

stof commented Feb 4, 2021

@ciaranmcnulty Behat won't expose filters to the loader directly as far as I remember. They are only used later.

@ciaranmcnulty
Copy link
Contributor

Oh, huh true

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

3 participants