[rspec-devel] New spoken language support for cucumber

Dan North tastapod at gmail.com
Fri Oct 10 08:08:30 EDT 2008


Excellent :)

2008/10/10 aslak hellesoy <aslak.hellesoy at gmail.com>

> On Fri, Oct 10, 2008 at 10:56 AM, Dan North <tastapod at gmail.com> wrote:
> > A few years ago the Thai government sponsored a fork of Firefox to
> support
> > the Thai language. The Firefox core team felt the changes necessary to
> > support Thai would be disproportionate relative to the user base so they
> > didn't want to have the changes in the core. Because they are using
> > distributed SCM they have found it is easy to keep the two forks in sync
> and
> > share common bug fixes and enhancements.
> >
> > If the changes required for Chinese language support are straightforward
> I
> > suggest we adopt them into the mainline, otherwise we could have a
> similar
> > collaborative model where there are different "flavours" of cucumber
> based
> > on the various regional language rules.
> >
>
> No special plan seems necessary.
>
> > wdyt?
> > Dan
> >
> >
> > 2008/10/9 Lian Liming <lianliming at gmail.com>
> >>
> >> Hi all,
> >>
> >> I still haven't found any documentation on how to add a new spoken
> >> language support to cucumber. I have tried following two steps to add
> >> a new one.
> >>
> >> 1) Add a new section to the languange.yaml and identify the
> >> translations of the keywords.
> >> 2) run rake -f gem_tasks/treetop.rake treetop:compile
> >>
> >> The new language I am trying to add is my mother tongue -- Chinese. By
> >> applying above steps, it basically works. The only thing I have to
> >> deal with is that, there is no space between keyword and rest of the
> >> sentence in Chinese language. That is also the important difference
> >> between Asian languages(including Chinese, Japanese, Korea)  and
> >> western languages (those have been supported in cucumber).
> >>
> >> Take a look at following example:
> >>
> >> In English: Given I have entered 50 into the calculator
> >> In Chinese: 假如我已经在计算器中输入了50
> >>
> >> To support native Chinese conventions, I have to change the treetop
> >> rules a little bit as following:
> >>
> >> ----  diff --------
> >> 34c34
> >> <     scenario_keyword space? name:line_to_eol steps:(space
> >> step_sequence)? {
> >> ---
> >> >     scenario_keyword space name:line_to_eol steps:(space
> step_sequence)?
> >> > {
> >> 99c99
> >> <     given_scenario_keyword space? name:line_to_eol {
> >> ---
> >> >     given_scenario_keyword space name:line_to_eol {
> >> 108c108
> >> <     step_keyword space? name:line_to_eol {
> >> ---
> >> >     step_keyword space name:line_to_eol {
> >> ----  end of diff --------
> >>
> >> This change targets Asian languages and I don't know whether it breaks
> >> the conventions of western languages. I also would like to know if
> >> there is any more flexible solution of supporting different kinds of
> >> spoken languages. Any ideas?
> >>
> >> Liming
> >> _______________________________________________
> >> rspec-devel mailing list
> >> rspec-devel at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-devel
> >
> > _______________________________________________
> > rspec-devel mailing list
> > rspec-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-devel
> >
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-devel/attachments/20081010/03dbb0b2/attachment.html>


More information about the rspec-devel mailing list