alexkrechik / VSCucumberAutoComplete

Cucumber (Gherkin) Full Support Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete
MIT License
331 stars 82 forks source link

Autoformat feature file in different languages #270

Closed brunoracosta closed 5 years ago

brunoracosta commented 5 years ago

When I write in English the .feature file, like:

Feature: Feature name

    Feature Description
    Scenario: Scenario name
        Given Start to type your Given step here
        When Teste

But when a Write in my native language the format doesn't work. Ex.:

# language: pt
Funcionalidade: Feature name

Feature Description
Cenário: Scenario name
Dado Start to type your Given step here
Quando Teste

How can I format the document in portuguese?

brunoracosta commented 5 years ago

I found the solution, I only need to change the settings.

I think the configuration should be like that:

"cucumberautocomplete.formatConfOverride": {
        //Funcionalidade
        "Funcionalidade": 0,
        "Característica": 0,
        "Caracteristica": 0,
        //background
        "Contexto": 1,
        "Cenário de Fundo": 1,
        "Cenario de Fundo": 1,
        "Fundo": 1,
        //scenario
        "Cenário": 1,
        "Cenario": 1,
        "Esquema do Cenário": 1,
        "Esquema do Cenario": 1,
        "Delineação do Cenário": 1,
        "Delineacao do Cenario": 1,
        //examples
        "Exemplos": 2,
        "Cenários": 3,
        "Cenarios": 3,
        //given
        "Dado": 2,
        "Dada": 2,
        "Dados": 2,
        "Dadas": 2,
        //when
        "Quando": 2,
        //then
        "Então": 2,
        "Entao": 2,
        //E MAs
        "E": 3,
        "Mas": 3,
    },
papitodev commented 4 years ago

Nice