cucumber/cucumber-jvm — Issue #184: i18n java snippets for undefined steps are always generated with @Given annotation
Author: vladimirkl
Created: 2012-02-01 14:17:23+00:00
State: open

Latest snapshot of cucumber-jvm 1.0.0.RC14-SNAPSHOT generates i18n java snippets for undefined steps with @Given annotation only. I use _"#language=ru"_ comments in feature files and never get snippets with annotations from _"cucumber.annotation.ru"_ package. Actually this was never working due to following code in **cucumber.runtime.UndefinedStepsTracker.java**:

```java
private boolean isGivenWhenThenKeyword(String keyword, Locale locale) {
I18n i18n = new I18n("en");
for (String gwts : asList("given", "when", "then")) {
List keywords = i18n.keywords(gwts);
if (keywords.contains(keyword) && !"* ".equals(keyword)) {
return true;
}
}
return false;
}
```
So if we change first line to _"I18n i18n = new I18n(locale.getLanguage())"_ everything works correctly. Should I create patch for this issue?