Cristiano,
yes, I too had become aware of this issue as I was preparing a fully
i18n-ed example. I'm working to get the StepsConfiguration use the
KeyWords to get the starting words. There should only be one place
where these keywords are defined, although here in the steps
configuration we are telling JBehave which of keywords are the starting
words of steps, so in general it will be a subset of the keywords which
can be i18n-ed.
Thanks for your feedback. We much appreciate your appreciation :-)
Cheers
Cristiano Gavião wrote:
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
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email