I found it curious, that cucumber doesn't seem to have translations in
the languages.yml file for the top level constructs of a feature, such
as "In order" and "As a".
I also had a need for a danish webrat translation. I have since
created a webrat_da.rb. Where would I submit such a patch for reuse?
Looks good. I also moved lib/cucumber/rails from cucumber to my fork
of cucumber-rails. I have deleted all the rails related stuff from
cucumber now. It's currently on my remove-rails branch. Once I get
gemcutter karma from you I'll push cucumber-rails-0.1.1.rc1 and
cucumber 0.4.4.rc1 so people can check if stuff is still working after
this split. If that's ok I'll merge remove-rails onto master and
release cucumber-rails-0.1.1 and cucumber-0.4.4.
Since the "main" cucumber-rails project is yours it is the only one
that can have Github tickets. I have created 2 tickets there and
closed the associated ones in LH. Let's keep the bugs with the
projects. (Already done like this for Cuke4Duke and Cuke4Nuke).
If you don't mind I'd like to control releases of cucumber-rails in
the start - just to see that everything is OK. (git tagging, pushing
gems to gemcutter). Then I'll happily give that honor over to you
Dennis (or anyone else who wants it).
>>> Is there a way to use the localized keywords (instead of Given/When/
>>> Then) in the step definitions?
>>
>> Yes - the methods are aliased when Cucumber parses a Feature file of a
>> different i18n language (which happens before ruby files are loaded).
>
> Hmm, maybe you can go ahead with the norwegian version and I'll see what I'm
> doing wrong.
>
http://github.com/aslakhellesoy/cucumber-rails-test/commit/1a8f67c42763fb2a332393410078ce0da9e743be
I'm guessing you're not adding the language header properly.
I'll add the Webrat translations later.
> Using step definitions like the following
>
> Wenn /^(?:|ich )auf (.+) gehe$/ do |page_name|
> visit path_to(page_name)
> end
>
> I always get the error:
>
> undefined method `Wenn' for main:Object (NoMethodError)
>
> Thanks for your support!
>
> Have a nice evening :)
> --
> Dennis
>
> web http://dennisbloete.de
> code http://github.com/dbloete
> twitter http://twitter.com/dbloete
>
>
>
>
> Am 08.11.2009 um 17:22 schrieb aslak hellesoy:
>
>> On Sun, Nov 8, 2009 at 4:58 PM, dbloete <dbl...@gmail.com> wrote:
>>>>
>>>> I won't put webrat_steps translations into Cucumber. Too much
>>>> maintenance.
>>>> It would be great if someone would take Cucumber's Rails generator,
>>>> extract
>>>> it into a separate project on github and package it as a gem
>>>> (cucumber-rails). If that happens I think it's OK to have several
>>>> translations there.
>>>
>>> Okay, I started out with the cucumber-rails gem, feel free to
>>> contribute:
>>> http://github.com/dbloete/cucumber-rails
>>>
>>
>> Thanks for doing this Dennis!
>>
>>> So far I've just added a language argument to the cucumber generator
>>> and a german version of the webrat_steps.rb.
>>> I'd like to get some feedback on whether or not this is a good way to
>>> add localization.
>>>
>>> Is there a way to use the localized keywords (instead of Given/When/
>>> Then) in the step definitions?
>>
>> Yes - the methods are aliased when Cucumber parses a Feature file of a
>> different i18n language (which happens before ruby files are loaded).
>>
>> I can add Norwegian translations - I already have most of the steps
>> translated at work.
>>
>> I have a cucumber_rails project
>> (http://github.com/aslakhellesoy/cucumber-rails-test) that is used to
>> test Cucumber against various versions of Rails (I just renamed it
>> from cucumber_rails to avoid confusion with your new cucumber-rails
>> gem).
>>
>> If/when I delete the code you have moved over from cucumber, we'll
>> need to modify cucumber-rails-test to install cucumber-rails as a
>> plugin - so it can be tested with the latest versions of both cucumber
>> and cucumber-rails.
>>
>> Could you do this change to cucumber-rails-test, Dennis?
>>
>> Cheers,
>> Aslak
>>
>>> I saw that the aforementioned Gist did
>>> that, but I couldn't get this going with the german keywords.
>
>