Closed mackoj closed 9 years ago
By the way i'm working on an autocomplete plugin for Gherkin. I will love to have more documentation on what correspond each of your pattern in your gherkin.cson. Something like a illustrated example of each pattern would really help me a lot.
Thanks,
Hi there! I was about to bump this request, but unfortunately as we can see in the atom docs, grammars are designed for a set of keywords.
I think that the best approach is to fork this repo and publish the domain specific translation. But if someone else has a better idea I'll be glad helping to make it real :+1:
Regards :octocat:
@jossemarGT Yes, I think it might not easy to consolidate i18n file with atom grammar coz its limitation, that's why I have seen people fork this repos and add their language support, so that is OK until we found the better way.
@mackoj How about autocomplete that you want? If it's just gherkin keywords like Scenario, Given, When, Then etc. I have a plan to add snippets soon.
Regards,
@jossemarGT: I don't think that forking this repo is the best solution. I think it could better if we group our effort into one repo. The idea is to automate the generation of gherkin.cson
with a script. We can use the actual gherkin.cson
file as a template and then fill it with the corresponding strings for each language. So that for each update of i18n.json
or gherkin.cson
(the template version of it), we just have to re-run this script. Also, it might be interesting to report our need to Github as they could provide a better way to handle this issue in the future.
@gigapixel: I want to be able to autocomplete using the autocomplete-plus
api and to autocomplete from a file of token generated from our continuous integration server. The process is quite easy: each time we integrate our application, a script regenerates a token.json
file. This file is an extract of all token and associated combinations available in our feature.rb
files. We want to autocomplete with our token.json
file as reference. So I will have all the possible sentences when writing a new scenario. The autocomplete plugin is able to update its token file in order to provide the best autocompletion possible.
Cheers,
Hello all,
The Atom docs for grammars is refering to a TextMate doc which mention the root level key firstLineMatch
.
This key is :
a regular expression which is matched against the first line of the document (when it is first loaded). If it matches, the grammar is used for the document (unless there is a user override). Example: ^#!/.*\bruby\b.
Here's what I tried, worked fine:
Then, in each of your .features
file, you just need to add:
# language: fr
as explained in the Cucumber documentation for spoken languages
I fork it finally. I will open source it soon.
@mackoj :+1:
Hi,
Thanks for your package.
Wouldn't it be great if it could support i18n base on gherkin/i18n.json file ?