How to use cucumber/gherkin in different language?

Bruno Pinheiro :

I'm setting up a test environment with Cucumber, Sikuli and Eclipse in my company. I've managed to get everything working just fine, but now I need to make the .feature files work in portuguese.

As far as I know, all I had to do was put the comment #language: pt at the beginning of the .feature file, but it's not working.

I also ran the commands cucumber --i18n help and cucumber --i18n pt to check if the language is really there, and it is.

Is there another configuration I'm not aware of?

I'm using these jars:

  • cucumber-core-3.0.2.jar
  • cucumber-java-3.0.2.jar
  • cucumber-junit-3.0.2.jar
  • cucumber-jvm-deps-1.0.6.jar
  • gherkin-5.1.0.jar
  • junit-4.12.jar
  • mockito-all-1.10.19.jar
Bruno Pinheiro :

First of all, thanks to everyone who helped me.

After quite some time I finally found out the problem.

Sébastien Le Callonnec's answer on this thread made it clear to me. The problem was with the Natural plugin.

Everything was working correctly from the start but it turns out that Natural only supports english. Thats why it was throwing errors but the test was executing. After uninstalling the plugin the errors disappeared.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=108231&siteId=1