Closed dfriquet closed 4 years ago
Hi David,
That is one thing we haven't done and will need to start looking into. Will keep you posted.
Hi @dfriquet , we've started work on this. To help us test before release, can you please fully translate the following feature to French? Thanks
Feature: Google search
Scenario: Lucky Google search
Given I have Google in my browser
When I do a search for "gwen-web automation"
Then I should find a Gwen page
Nice! Are you always that efficient? :+1:
Here is my contribution:
Fonctionnalité: recherche Google
Scénario: recherche Google fructueuse
Étant donné mon navigateur ouvert sur Google
Quand je recherche "gwen-web automation"
Alors je dois trouver une page concernant Gwen
I have kept the "keyword alignment" you used, so that you can easily distinguish them from the steps without learning French ;-)
Hope it helps.
Thanks for that @dfriquet
We're almost there. Here's a preview of the generated reports:
Note however that the dialect can only be specified in feature files. Gherkin keywords and the predefined Gwen DSL in meta must remain in English. The sample meta for the above is:
Feature: Google search meta
@StepDef
@Context
Scenario: mon navigateur ouvert sur Google
Given I start a new browser
When I navigate to "http://www.google.com"
Then the page title should be "Google"
@StepDef
@Action
Scenario: je recherche "<query>"
Given the search field can be located by name "q"
When I enter "$<query>" in the search field
Then the page title should contain "$<query>"
@StepDef
@Assertion
Scenario: je dois trouver une page concernant Gwen
Given link 1 can be located by css selector ".r > a"
When I click link 1
Then the current URL should match regex ".+[G|g]wen.*"
That's exactly what we need… Merci !
You will also be able to specify the following setting. Specifying it will make it the default dialect so you don't have to specify the # language
header in every feature file.
gwen.feature.dialect = fr
If you do specify the # langauge
header in features it will override this setting. The default value of this setting is en
.
Support for Gherkin's spoken languages has been implemented and released in gwen-web v2.42.0. Also included is a change to treat universal *
keyword as And
.
@dfriquet Please evaluate and close this issue when ready.
It works like a charm :bowing_man:
Hello there,
Gwen is leaving the PoC status to become a first-class citizen in our software tool belt. One last thing bothers us so far: we work with native French-speaking end users and we would like to write our feature specs in French — not the @StepDef meta specs, just the user-facing feature specs.
It seems that the Gwen interpreter uses Cucumber's Gherkin parser, and Cucumber supports a lot of spoken languages. Have you succeeded in using other keywords than
Given/When/Then
with Cucumber syntax# language: fr
for instance?I get errors like
or, with the "universal"
*
syntax:Do I do anything wrong or is it unsupported yet?
Best regards, -- David.