Skip to content

Localisation supports #663

@MegaGrindStone

Description

@MegaGrindStone

🤔 What's the problem you're trying to solve?

I was trying to write Gherkin syntax in Indonesian language as defined in the docs.. But I got Parser errors when I ran the test. Here is the example of the feature file:

Fitur: login

  Skenario: Login sukses
    Jika username gw adalah dokter_jakbar1
    Ketika gw login pake password 12345678
    Maka access_token ga boleh kosong
    Dan http status code harus 200

  Skenario: Username ngaco
    Jika username gw adalah dukun_santet
    Ketika gw login pake password 12345678
    Maka http status code harus 401

This should be correct according to the docs. And if I switched the feature file using english like this:

Feature: login

  Scenario: Successful login
    Given my username is dokter_jakbar1
    When I login using the password 12345678
    Then access_token should not be empty
    And http status code should be 200

  Scenario: Invalid username
    Given my username is dukun_santet
    When I login using the password 12345678
    Then http status code should be 401

It works as expected.

When I take a peek on the code, I couldn't find anything to switch the language to call this gherkin go function. Or, am I missing something?

✨ What's your proposed solution?

Adding 'Language' or 'Dialect' field in flag options, then use it to called this function, would be safe implementation on a slight glance. Although, I'm not inspecting the ParseFeatures reference yet, whether adding parameters there would cause breaking change or not.

⛏ Have you considered any alternatives or workarounds?

No response

📚 Any additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions