You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Behat/Gherkin we use the cucumber i18n data for translations. We have some tests that use this data to:
Generate a gherkin string using the different variations of the keywords
Generate a parsed AST that corresponds to that feature
Check the parser creates a similar AST when consuming the gherkin
This tends to fail when there are duplicate keywords inside a language's translation, so we skip some languages when doing this test.
Currently we are excluding the following from the tests:
ne: अनी means both And and Given
uz: Агар means both Given and When
en-old: Tha means both When and Then
Impact
Aside from failing tests easily skipped, in Behat our AST retains the 'type' of the node, which in some cases will now be wrong vs what the author intended
Maybe more importantly, in those languages there is a word that means two different things. This may damage education efforts around the G/W/T structure.
Possible Solution
fix the languages listed above to be unambiguous - this would have backwards compatibility issues so might not be acceptable
ensure via automated tests that duplicated words cannot be added to new or existing translations
The text was updated successfully, but these errors were encountered:
As the keyword would keep working for a step, I'm not even sure this creates a BC issue. They would still be usable for steps (as you would only remove one of the occurrences of the duplicate, not both). And to preserve BC with step type, it would be a matter of keeping the one corresponding to the step type being detected currently by cucumber implementations (but I think this is not even consistent between implementations, and may not cause issues)
Summary
In Behat/Gherkin we use the cucumber i18n data for translations. We have some tests that use this data to:
This tends to fail when there are duplicate keywords inside a language's translation, so we skip some languages when doing this test.
Currently we are excluding the following from the tests:
ne
:अनी
means bothAnd
andGiven
uz
:Агар
means bothGiven
andWhen
en-old
:Tha
means bothWhen
andThen
Impact
Aside from failing tests easily skipped, in Behat our AST retains the 'type' of the node, which in some cases will now be wrong vs what the author intended
Maybe more importantly, in those languages there is a word that means two different things. This may damage education efforts around the G/W/T structure.
Possible Solution
The text was updated successfully, but these errors were encountered: