cucumber / cucumber/vscode

Cannot detect cucumber steps on internationalized java annotation

Open
#266 0 comments 2 reactions 0 assignees View on GitHub
:bug: bug
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 👓 What did you see?

Hi,

I was testing a project written in Java with cucumber in pt-br.

I observed that the plugin can capture the annotation written in English (e.g., `@Given`). Still, it cannot capture the annotation written in Portuguese (e.g., `@Dado`).

When I use `@Dado` (instead of `@Given`), the plugin captures zero steps. See the following log to understand the problem:

```
[Info - 12:57:32 PM] * Found 12 feature file(s) in ["src/test/resources/features/**/*.feature"]
[Info - 12:57:32 PM] * Found 455 steps in those feature files
[Info - 12:57:33 PM] * Found 1 glue file(s) in ["src/test/java/**/*.java"]
[Info - 12:57:33 PM] * Found 0 parameter types in those glue files
[Info - 12:57:33 PM] * Found 0 step definitions in those glue files
[Info - 12:57:33 PM] * Built 160 suggestions for auto complete
[Info - 12:58:07 PM] Unable to generate step definition. Please create one first manually.
```

Once I change the annotation to English, it will work as expected.

Hence, cucumber can work with both annotations, but the plugin apparently expects only English.

```
import io.cucumber.java.en.Given;
import io.cucumber.java.pt.Dado;
```

### ✅ What did you expect to see?

The plugin should be able to capture step written in other languages

### 📦 Which tool/library version are you using?

vscode 1.97.1 with cucumber extension 1.10.0
cucumber 6.10.4

### 🔬 How could we reproduce it?

Create a step using `@Dado` instead of `@Given`

### 📚 Any additional context?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.