Hi Cristiano,
Cristiano Gavião wrote:
Hi Mauro,
I was trying to run TraderSellsAllStocks and it didn't run ok.
I found the reason. I could see that you have used the following to
configure TraderScenario:
public KeyWords keywords() {
return new I18nKeyWords();
}
Using I18nKeyWords() without parameter calls Locale.getDefault() that
for mine environment it is pt_BR.
But trader_sells_all_stocks.scenario was written in English. So I
suggest you to specify a locale for english language as parameter for
I18nKeyWords object.
Yes - you're right, "default" locale was meant to be English, but that's
not going to be the case in JVMs running in other countries. So, I'll
amend to use Locale.ENGLISH for as default.
In the mean time, please use new I18nKeyWords(new Locale("pt", "BR))
About patternFor(String key, String default), I couldn't figure out yet
how could I use it. Will you use a resource bundle for looking for the key?
I've not quite got around to providing an i18n hook for it, just
preparing the ground. ATM, it simply allows you to override any message
pattern, regardless of locales and i18n.
E.g. to override the failed pattern:
Map<String,String> patterns = ... // map with your patterns by key
patterns.put("failed", "{0} <<<< FAILED");
String patternFor(String key, String default){
return patterns.get(key);
}
Still work in progress ... I'll make it easier to override and provide
i18n integration. Feel free to chip in and provide a patch with a test
to show how you'd see it working.
PS: I closed issue by mistake, meant to mark in progress. Re-opening.
Cheers
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email