Open andrebandeira opened 8 years ago
@andrebandeira
Have you tried to put "# language: pt" on top? you're not using: "#"
Yes, I'm using the '#'. I pasted it wrong in the first comment. In fact, my code looks like this:
Funcionalidade: Pesquisa no google
Cenário: Pesquisando por "UTFPR" Dado Eu vou à "https://www.google.com.br/" Quando Eu preencho o campo "lst-ib" com "UTFPR" E Eu pressiono o botão "Pesquisar" E Eu espero "4" segundos Então Eu devo ver o texto "A Universidade Tecnológica Federal do Paraná é uma universidade pública mantida pelo governo federal e sua sede esta localizada na cidade de Curitiba, capital do estado brasileiro do Paraná. Wikipédia"
The problem is that the mink understand how I was using PT Portugal and not of Brazil, so it uses the file "pt.xliff". I wanted him to use the file "pt-br.xliff". A workarround I found was to rename the file "pt-br" for "pt", but I wonder if there is a correct way to use "en-us".
Hi @andrebandeira,
I think there's no official Gherkins "pt-br", but there is: Behat and Mink "pt-br" output translation, you can setup your configuration inside of behat.yaml like this:
default:
translation:
locale: pt-br
Mink will follow Behat translation, but your Gherkin should have "# language: pt", because Behat get the translations automatically generated from cucumber/gherkin repo, and the portuguese Brazil base words are the same(in my opinion), maybe that's why there's no "pt-br" translation.
Here's the config file from Behat Gherkin repo:
https://github.com/Behat/Gherkin/blob/master/i18n.php
You can send changes for:
https://raw.github.com/cucumber/gherkin/master/gherkin-languages.json
Hope it helps you
Hi @leoqbc,
Thanks a lot for the help,
My behat.yaml looks like this:
default: translation: locale: pt-br extensions: Behat\MinkExtension: browser_name: 'chrome' selenium2: capabilities: { "browserName": "chrome", "browser": "chrome", "version": "29", 'chrome': {'switches':['--no-sandbox']}}
But not working, what am I doing wrong?
Please, How do I use the pt-br language ?
If I put the feature as below does not work:
language: pt
Funcionalidade: Pesquisa no google
Cenário: Pesquisando por "UTFPR" Dado Eu vou à "https://www.google.com.br/" Quando Eu preencho o campo "lst-ib" com "UTFPR" E Eu pressiono o botão "Pesquisar" E Eu espero "4" segundos Então Eu devo ver o texto "A Universidade Tecnológica Federal do Paraná é uma universidade pública mantida pelo governo federal e sua sede esta localizada na cidade de Curitiba, capital do estado brasileiro do Paraná. Wikipédia"
Thank you for any help