Hi Mauro,

;-) Finally I could found what is the problem with my Brazilian Portuguese/ jbehave testing program ....

It is all because the class StepsConfiguration that is created on Step default constructor. This class is not using the resource bundle created by you. It is using the constant DEFAULT_STARTING_WORDS that is on English, look:

public class StepsConfiguration {

    public static final String[] DEFAULT_STARTING_WORDS = new String[] {
            "Given", "When", "Then", "And" };

So jbehave fails on execute method UnmatchedToPendingStepCreator.createStepsFrom(ScenarioDefinition scenario,
            Map<String, String> tableRow, CandidateSteps... candidateSteps)
for portuguese steps.

Another problem I could see is that there is a encode problem with your keywords_pt_properties file. The problem is exatly the one that I tried to warn you on my last email: Your file was saved on ISO8859-1(windows) but containing UTF-8 way portuguese caracters. Im sending to you a new file writted and saved as UTF-8. You can create another one writing and saving it on ISO8859-1 (do no copy and paste from mine). And if you do so, take care to configure your default editor to always open it and save it on same encode, because there is no way to convert Latin caracter between both encodes :-) I really had soffer a lot with this issue yet ;-)

I have created my own StepsConfiguration with portuguese words and have changed the properties file and everything runs ok now.

I hope I could help you. And congratulations to you and all jbehave team for the EXCELLENT job..

Its really an amazing tool !!!!

best regards

Cristiano

Mauro Talevi escreveu:
Cristiano Gavião wrote:
Hi Mauro,

I am testing your implementation for I18n for portuguese language and I found some issues.

First, the class I18nKeywordsBehaviour has some problems with words that has graphical caracter as "Cenário". There is a know issue that happens with Latin laguages: when files that contain this kind of words are saved first time as UTF-8 and after is opened as ISO8859-1 (windows) and saved again (or vice-versa), all letters with "~, ',^,ç" are missed. Its the case of I18nKeywordsBehaviour: it has "Cen�rio:" and not "Cenário:"

I've made two simple examples, one using English and other translated for Portuguese. The first runs ok but the second doesn't run. Im sending it to you. I couldn't figure out why yet...


Yes - known issue, which was still to be implemented (see commments on the Jira issue).

Added UTF8ResourceBundle - please checkout latest version and try again.

It should work fine now.

Cheers


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Scenario=Cenário:
GivenScenarios=Dados os cenários:
ExamplesTable=Exemplos:
ExamplesTableRow=Exemplo:
Given=Dado que
When=Quando
Then=Então
And=E
Pending=PENDENTE
NotPerformed=NÃO EXECUTADO
Failed=FALHADO
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to