Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An easier way to use a different langauge #24

Closed
hediyi opened this issue May 3, 2016 · 8 comments
Closed

An easier way to use a different langauge #24

hediyi opened this issue May 3, 2016 · 8 comments

Comments

@hediyi
Copy link

hediyi commented May 3, 2016

Say I need to use Japanese as the primary language for my feature files. Do I need to actually put

# language: ja

at top of each file? That's not really smart to do to be honest.

Can't find a cli option that specifies a spoken language when running tests, and the reference doesn't say anything about this.

@aslakhellesoy
Copy link
Contributor

Hi @esdoppio

There isn't currently a way to specify a language globally, but I really like your idea. It sounds like the lack of this feature really bothers you.

Don't worry - Cucumber is open source, so you can fix this yourself. Just fork the repo, add support for a new --language LANGUAGE option (with tests) and send us a pull request. We'll do our best to help you if you're stuck, and if your contribution is good we might add this in the next release!

Thanks!

@hediyi
Copy link
Author

hediyi commented May 4, 2016

Thanks for the reply.

If we're really going this direction, I think the --language option should affects only the feature files that doesn't explicitly specify a spoken language, allowing a project to have tests written in different languages, which is rare, but it doesn't affect users who don't need that complexity.

Do you think this is over-designed? And what do you think of the idea of a configuration file (for cucumber)? @aslakhellesoy

@aslakhellesoy
Copy link
Contributor

I agree that a # language header in a file should override whatever was specified with --language.

Cucumber already has a configuration file - cucumber.yml.

Luckily Gherkin already supports specifying a default language - it's just a matter of hooking into it. See cucumber/gherkin#78

@mattwynne
Copy link
Member

@esdoppio which flavour of Cucumber are you using?

@hediyi
Copy link
Author

hediyi commented May 5, 2016

@mattwynne It's cucumber-ruby.

@mattwynne
Copy link
Member

OK, in that case let's start with an issue over there: https://github.com/cucumber/cucumber-ruby/issues

Can you raise one, and do your best to describe your acceptance criteria? The very best thing would be if you could create a PR with a new failing feature in https://github.com/cucumber/cucumber-ruby/tree/master/features/docs/cli

@aslakhellesoy
Copy link
Contributor

I'm closing this issue since it's in the wrong repo.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants