Skip to content

Commit 6222769

Browse files
Update the gherkin i18n table
1 parent 11707a8 commit 6222769

File tree

6 files changed

+531
-108
lines changed

6 files changed

+531
-108
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ htmlproofer: hugo
1515
ruby themes/cucumber-hugo/tools/htmlproofer/htmlproofer.rb
1616
.PHONY: htmlproofer
1717

18-
layouts/shortcodes/gherkin-i18n-table.html: node_modules/gherkin/lib/gherkin/gherkin-languages.json layouts/shortcodes/gherkin-i18n-table-jq.txt
18+
layouts/shortcodes/gherkin-i18n-table.html: node_modules/@cucumber/gherkin/dist/src/gherkin-languages.json layouts/shortcodes/gherkin-i18n-table-jq.txt
1919
cat $< | jq --sort-keys --from-file layouts/shortcodes/gherkin-i18n-table-jq.txt --raw-output --compact-output > $@
2020

21-
node_modules/gherkin/lib/gherkin/gherkin-languages.json:
21+
node_modules/@cucumber/gherkin/dist/src/gherkin-languages.json:
2222
yarn
2323

2424
.docker-$(DOCKER_TAG): Dockerfile

layouts/shortcodes/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Gherkin Internationalization Table
2+
3+
The table can be updated automatically using make *from the root folder of
4+
the repo*:
5+
6+
```sh
7+
yarn upgrade
8+
make layouts/shortcodes/gherkin-i18n-table.html
9+
```
10+
11+
`yarn upgrade` will upgrade `@cucumber/gherkin` to get back the last version
12+
of the file `gherkin-languages.json`.
13+
14+
`make layouts/shortcodes/gherkin-i18n-table.html` will automatically update
15+
`gherkin-i18n-table.html` based on `gherkin-languages.json`.

layouts/shortcodes/gherkin-i18n-table-jq.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
" <tbody>\n"
1616
] + (
1717
[ .value
18-
| {"feature","background","scenario","scenarioOutline","examples","given","when","then","and","but"}
18+
| {"feature","background","scenario","scenarioOutline","examples","given","when","then","and","but","rule"}
1919
| to_entries[]
2020
| " <tr>\n",
2121
" <td><code>", ([ .key ] | add), "</code></th>\n",

0 commit comments

Comments
 (0)