gherkin 2.12.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -15
  3. data/CONTRIBUTING.md +23 -0
  4. data/Gemfile +0 -3
  5. data/LICENSE +18 -17
  6. data/Makefile +65 -0
  7. data/README.md +9 -268
  8. data/Rakefile +17 -19
  9. data/bin/gherkin-generate-ast +21 -0
  10. data/bin/gherkin-generate-pickles +25 -0
  11. data/bin/gherkin-generate-tokens +12 -0
  12. data/gherkin-ruby.razor +218 -0
  13. data/gherkin.gemspec +22 -76
  14. data/lib/gherkin/ast_builder.rb +243 -0
  15. data/lib/gherkin/ast_node.rb +30 -0
  16. data/lib/gherkin/dialect.rb +58 -0
  17. data/lib/gherkin/errors.rb +45 -0
  18. data/lib/gherkin/gherkin-languages.json +2968 -0
  19. data/lib/gherkin/gherkin_line.rb +95 -0
  20. data/lib/gherkin/parser.rb +1910 -0
  21. data/lib/gherkin/pickles/compiler.rb +164 -0
  22. data/lib/gherkin/token.rb +18 -0
  23. data/lib/gherkin/token_formatter_builder.rb +39 -0
  24. data/lib/gherkin/token_matcher.rb +169 -0
  25. data/lib/gherkin/token_scanner.rb +40 -0
  26. data/spec/capture_warnings.rb +68 -0
  27. data/spec/coverage.rb +10 -0
  28. data/spec/gherkin/parser_spec.rb +146 -0
  29. metadata +60 -567
  30. data/.gitattributes +0 -2
  31. data/.mailmap +0 -2
  32. data/.rbenv-gemsets +0 -1
  33. data/.rspec +0 -1
  34. data/.ruby-gemset +0 -1
  35. data/.ruby-version +0 -1
  36. data/.yardopts +0 -5
  37. data/History.md +0 -881
  38. data/build_native_gems.sh +0 -7
  39. data/cucumber.yml +0 -5
  40. data/examples/parse_and_output_json.rb +0 -19
  41. data/ext/gherkin_lexer_ar/extconf.rb +0 -6
  42. data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +0 -1432
  43. data/ext/gherkin_lexer_bg/extconf.rb +0 -6
  44. data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +0 -1655
  45. data/ext/gherkin_lexer_bm/extconf.rb +0 -6
  46. data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +0 -1516
  47. data/ext/gherkin_lexer_ca/extconf.rb +0 -6
  48. data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +0 -1581
  49. data/ext/gherkin_lexer_cs/extconf.rb +0 -6
  50. data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +0 -1515
  51. data/ext/gherkin_lexer_cy_gb/extconf.rb +0 -6
  52. data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +0 -1282
  53. data/ext/gherkin_lexer_da/extconf.rb +0 -6
  54. data/ext/gherkin_lexer_da/gherkin_lexer_da.c +0 -1298
  55. data/ext/gherkin_lexer_de/extconf.rb +0 -6
  56. data/ext/gherkin_lexer_de/gherkin_lexer_de.c +0 -1425
  57. data/ext/gherkin_lexer_el/extconf.rb +0 -6
  58. data/ext/gherkin_lexer_el/gherkin_lexer_el.c +0 -1919
  59. data/ext/gherkin_lexer_en/extconf.rb +0 -6
  60. data/ext/gherkin_lexer_en/gherkin_lexer_en.c +0 -1418
  61. data/ext/gherkin_lexer_en_au/extconf.rb +0 -6
  62. data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +0 -1765
  63. data/ext/gherkin_lexer_en_lol/extconf.rb +0 -6
  64. data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +0 -1177
  65. data/ext/gherkin_lexer_en_old/extconf.rb +0 -6
  66. data/ext/gherkin_lexer_en_old/gherkin_lexer_en_old.c +0 -1309
  67. data/ext/gherkin_lexer_en_pirate/extconf.rb +0 -6
  68. data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +0 -1471
  69. data/ext/gherkin_lexer_en_scouse/extconf.rb +0 -6
  70. data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +0 -1634
  71. data/ext/gherkin_lexer_en_tx/extconf.rb +0 -6
  72. data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +0 -1265
  73. data/ext/gherkin_lexer_eo/extconf.rb +0 -6
  74. data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +0 -1241
  75. data/ext/gherkin_lexer_es/extconf.rb +0 -6
  76. data/ext/gherkin_lexer_es/gherkin_lexer_es.c +0 -1399
  77. data/ext/gherkin_lexer_et/extconf.rb +0 -6
  78. data/ext/gherkin_lexer_et/gherkin_lexer_et.c +0 -1236
  79. data/ext/gherkin_lexer_fa/extconf.rb +0 -6
  80. data/ext/gherkin_lexer_fa/gherkin_lexer_fa.c +0 -1475
  81. data/ext/gherkin_lexer_fi/extconf.rb +0 -6
  82. data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +0 -1215
  83. data/ext/gherkin_lexer_fr/extconf.rb +0 -6
  84. data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +0 -1493
  85. data/ext/gherkin_lexer_gl/extconf.rb +0 -6
  86. data/ext/gherkin_lexer_gl/gherkin_lexer_gl.c +0 -1374
  87. data/ext/gherkin_lexer_he/extconf.rb +0 -6
  88. data/ext/gherkin_lexer_he/gherkin_lexer_he.c +0 -1374
  89. data/ext/gherkin_lexer_hi/extconf.rb +0 -6
  90. data/ext/gherkin_lexer_hi/gherkin_lexer_hi.c +0 -1848
  91. data/ext/gherkin_lexer_hr/extconf.rb +0 -6
  92. data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +0 -1323
  93. data/ext/gherkin_lexer_hu/extconf.rb +0 -6
  94. data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +0 -1376
  95. data/ext/gherkin_lexer_id/extconf.rb +0 -6
  96. data/ext/gherkin_lexer_id/gherkin_lexer_id.c +0 -1208
  97. data/ext/gherkin_lexer_is/extconf.rb +0 -6
  98. data/ext/gherkin_lexer_is/gherkin_lexer_is.c +0 -1376
  99. data/ext/gherkin_lexer_it/extconf.rb +0 -6
  100. data/ext/gherkin_lexer_it/gherkin_lexer_it.c +0 -1340
  101. data/ext/gherkin_lexer_ja/extconf.rb +0 -6
  102. data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +0 -1699
  103. data/ext/gherkin_lexer_kn/extconf.rb +0 -6
  104. data/ext/gherkin_lexer_kn/gherkin_lexer_kn.c +0 -1965
  105. data/ext/gherkin_lexer_ko/extconf.rb +0 -6
  106. data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +0 -1360
  107. data/ext/gherkin_lexer_lt/extconf.rb +0 -6
  108. data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +0 -1296
  109. data/ext/gherkin_lexer_lu/extconf.rb +0 -6
  110. data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +0 -1389
  111. data/ext/gherkin_lexer_lv/extconf.rb +0 -6
  112. data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +0 -1425
  113. data/ext/gherkin_lexer_nl/extconf.rb +0 -6
  114. data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +0 -1368
  115. data/ext/gherkin_lexer_no/extconf.rb +0 -6
  116. data/ext/gherkin_lexer_no/gherkin_lexer_no.c +0 -1311
  117. data/ext/gherkin_lexer_pa/extconf.rb +0 -6
  118. data/ext/gherkin_lexer_pa/gherkin_lexer_pa.c +0 -2160
  119. data/ext/gherkin_lexer_pl/extconf.rb +0 -6
  120. data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +0 -1738
  121. data/ext/gherkin_lexer_pt/extconf.rb +0 -6
  122. data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +0 -1711
  123. data/ext/gherkin_lexer_ro/extconf.rb +0 -6
  124. data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +0 -1427
  125. data/ext/gherkin_lexer_ru/extconf.rb +0 -6
  126. data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +0 -2071
  127. data/ext/gherkin_lexer_sk/extconf.rb +0 -6
  128. data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +0 -1739
  129. data/ext/gherkin_lexer_sr_cyrl/extconf.rb +0 -6
  130. data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +0 -2112
  131. data/ext/gherkin_lexer_sr_latn/extconf.rb +0 -6
  132. data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +0 -1567
  133. data/ext/gherkin_lexer_sv/extconf.rb +0 -6
  134. data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +0 -1324
  135. data/ext/gherkin_lexer_th/extconf.rb +0 -6
  136. data/ext/gherkin_lexer_th/gherkin_lexer_th.c +0 -2840
  137. data/ext/gherkin_lexer_tl/extconf.rb +0 -6
  138. data/ext/gherkin_lexer_tl/gherkin_lexer_tl.c +0 -2021
  139. data/ext/gherkin_lexer_tr/extconf.rb +0 -6
  140. data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +0 -1347
  141. data/ext/gherkin_lexer_tt/extconf.rb +0 -6
  142. data/ext/gherkin_lexer_tt/gherkin_lexer_tt.c +0 -1936
  143. data/ext/gherkin_lexer_uk/extconf.rb +0 -6
  144. data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +0 -1941
  145. data/ext/gherkin_lexer_uz/extconf.rb +0 -6
  146. data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +0 -1651
  147. data/ext/gherkin_lexer_vi/extconf.rb +0 -6
  148. data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +0 -1458
  149. data/ext/gherkin_lexer_zh_cn/extconf.rb +0 -6
  150. data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +0 -1314
  151. data/ext/gherkin_lexer_zh_tw/extconf.rb +0 -6
  152. data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +0 -1307
  153. data/features/.cucumber/stepdefs.json +0 -244
  154. data/features/escaped_pipes.feature +0 -8
  155. data/features/feature_parser.feature +0 -237
  156. data/features/json_formatter.feature +0 -498
  157. data/features/json_parser.feature +0 -331
  158. data/features/native_lexer.feature +0 -19
  159. data/features/parser_with_native_lexer.feature +0 -205
  160. data/features/pretty_formatter.feature +0 -17
  161. data/features/step_definitions/eyeball_steps.rb +0 -3
  162. data/features/step_definitions/gherkin_steps.rb +0 -29
  163. data/features/step_definitions/json_formatter_steps.rb +0 -30
  164. data/features/step_definitions/json_parser_steps.rb +0 -21
  165. data/features/step_definitions/pretty_formatter_steps.rb +0 -85
  166. data/features/steps_parser.feature +0 -46
  167. data/features/support/env.rb +0 -41
  168. data/install_mingw_os_x.sh +0 -5
  169. data/js/.npmignore +0 -1
  170. data/js/lib/gherkin/lexer/.npmignore +0 -0
  171. data/lib/gherkin.rb +0 -2
  172. data/lib/gherkin/README.md +0 -7
  173. data/lib/gherkin/c_lexer.rb +0 -17
  174. data/lib/gherkin/formatter/ansi_escapes.rb +0 -97
  175. data/lib/gherkin/formatter/argument.rb +0 -16
  176. data/lib/gherkin/formatter/escaping.rb +0 -15
  177. data/lib/gherkin/formatter/filter_formatter.rb +0 -150
  178. data/lib/gherkin/formatter/hashable.rb +0 -25
  179. data/lib/gherkin/formatter/json_formatter.rb +0 -133
  180. data/lib/gherkin/formatter/line_filter.rb +0 -26
  181. data/lib/gherkin/formatter/model.rb +0 -281
  182. data/lib/gherkin/formatter/pretty_formatter.rb +0 -245
  183. data/lib/gherkin/formatter/regexp_filter.rb +0 -21
  184. data/lib/gherkin/formatter/step_printer.rb +0 -21
  185. data/lib/gherkin/formatter/tag_count_formatter.rb +0 -47
  186. data/lib/gherkin/formatter/tag_filter.rb +0 -19
  187. data/lib/gherkin/i18n.json +0 -786
  188. data/lib/gherkin/i18n.rb +0 -176
  189. data/lib/gherkin/json_parser.rb +0 -177
  190. data/lib/gherkin/lexer/ar.rb +0 -1170
  191. data/lib/gherkin/lexer/bg.rb +0 -1382
  192. data/lib/gherkin/lexer/bm.rb +0 -1250
  193. data/lib/gherkin/lexer/ca.rb +0 -1310
  194. data/lib/gherkin/lexer/cs.rb +0 -1246
  195. data/lib/gherkin/lexer/cy_gb.rb +0 -1032
  196. data/lib/gherkin/lexer/da.rb +0 -1048
  197. data/lib/gherkin/lexer/de.rb +0 -1166
  198. data/lib/gherkin/lexer/el.rb +0 -1628
  199. data/lib/gherkin/lexer/en.rb +0 -1156
  200. data/lib/gherkin/lexer/en_au.rb +0 -1486
  201. data/lib/gherkin/lexer/en_lol.rb +0 -934
  202. data/lib/gherkin/lexer/en_old.rb +0 -1037
  203. data/lib/gherkin/lexer/en_pirate.rb +0 -1210
  204. data/lib/gherkin/lexer/en_scouse.rb +0 -1362
  205. data/lib/gherkin/lexer/en_tx.rb +0 -1016
  206. data/lib/gherkin/lexer/encoding.rb +0 -41
  207. data/lib/gherkin/lexer/eo.rb +0 -995
  208. data/lib/gherkin/lexer/es.rb +0 -1140
  209. data/lib/gherkin/lexer/et.rb +0 -990
  210. data/lib/gherkin/lexer/fa.rb +0 -1214
  211. data/lib/gherkin/lexer/fi.rb +0 -969
  212. data/lib/gherkin/lexer/fr.rb +0 -1228
  213. data/lib/gherkin/lexer/gl.rb +0 -1117
  214. data/lib/gherkin/lexer/he.rb +0 -1118
  215. data/lib/gherkin/lexer/hi.rb +0 -1559
  216. data/lib/gherkin/lexer/hr.rb +0 -1066
  217. data/lib/gherkin/lexer/hu.rb +0 -1118
  218. data/lib/gherkin/lexer/i18n_lexer.rb +0 -48
  219. data/lib/gherkin/lexer/id.rb +0 -963
  220. data/lib/gherkin/lexer/is.rb +0 -1120
  221. data/lib/gherkin/lexer/it.rb +0 -1086
  222. data/lib/gherkin/lexer/ja.rb +0 -1418
  223. data/lib/gherkin/lexer/kn.rb +0 -1672
  224. data/lib/gherkin/lexer/ko.rb +0 -1102
  225. data/lib/gherkin/lexer/lt.rb +0 -1045
  226. data/lib/gherkin/lexer/lu.rb +0 -1132
  227. data/lib/gherkin/lexer/lv.rb +0 -1166
  228. data/lib/gherkin/lexer/nl.rb +0 -1115
  229. data/lib/gherkin/lexer/no.rb +0 -1060
  230. data/lib/gherkin/lexer/pa.rb +0 -1852
  231. data/lib/gherkin/lexer/pl.rb +0 -1457
  232. data/lib/gherkin/lexer/pt.rb +0 -1430
  233. data/lib/gherkin/lexer/ro.rb +0 -1164
  234. data/lib/gherkin/lexer/ru.rb +0 -1766
  235. data/lib/gherkin/lexer/sk.rb +0 -1452
  236. data/lib/gherkin/lexer/sr_cyrl.rb +0 -1803
  237. data/lib/gherkin/lexer/sr_latn.rb +0 -1294
  238. data/lib/gherkin/lexer/sv.rb +0 -1070
  239. data/lib/gherkin/lexer/th.rb +0 -2492
  240. data/lib/gherkin/lexer/tl.rb +0 -1726
  241. data/lib/gherkin/lexer/tr.rb +0 -1092
  242. data/lib/gherkin/lexer/tt.rb +0 -1643
  243. data/lib/gherkin/lexer/uk.rb +0 -1646
  244. data/lib/gherkin/lexer/uz.rb +0 -1376
  245. data/lib/gherkin/lexer/vi.rb +0 -1198
  246. data/lib/gherkin/lexer/zh_cn.rb +0 -1058
  247. data/lib/gherkin/lexer/zh_tw.rb +0 -1052
  248. data/lib/gherkin/listener/event.rb +0 -45
  249. data/lib/gherkin/listener/formatter_listener.rb +0 -150
  250. data/lib/gherkin/native.rb +0 -7
  251. data/lib/gherkin/native/java.rb +0 -72
  252. data/lib/gherkin/native/null.rb +0 -5
  253. data/lib/gherkin/native/therubyracer.rb +0 -41
  254. data/lib/gherkin/parser/meta.txt +0 -5
  255. data/lib/gherkin/parser/parser.rb +0 -166
  256. data/lib/gherkin/parser/root.txt +0 -11
  257. data/lib/gherkin/parser/steps.txt +0 -4
  258. data/lib/gherkin/platform.rb +0 -13
  259. data/lib/gherkin/rubify.rb +0 -31
  260. data/lib/gherkin/tag_expression.rb +0 -63
  261. data/ragel/lexer.c.rl.erb +0 -454
  262. data/ragel/lexer.java.rl.erb +0 -219
  263. data/ragel/lexer.js.rl.erb +0 -322
  264. data/ragel/lexer.rb.rl.erb +0 -179
  265. data/ragel/lexer_common.rl.erb +0 -50
  266. data/spec/gherkin/c_lexer_spec.rb +0 -22
  267. data/spec/gherkin/fixtures/1.feature +0 -8
  268. data/spec/gherkin/fixtures/comments_in_table.feature +0 -9
  269. data/spec/gherkin/fixtures/complex.feature +0 -45
  270. data/spec/gherkin/fixtures/complex.json +0 -139
  271. data/spec/gherkin/fixtures/complex_for_filtering.feature +0 -60
  272. data/spec/gherkin/fixtures/complex_with_tags.feature +0 -61
  273. data/spec/gherkin/fixtures/dos_line_endings.feature +0 -45
  274. data/spec/gherkin/fixtures/examples_with_only_header.feature +0 -14
  275. data/spec/gherkin/fixtures/hantu_pisang.feature +0 -35
  276. data/spec/gherkin/fixtures/i18n_fr.feature +0 -14
  277. data/spec/gherkin/fixtures/i18n_fr2.feature +0 -8
  278. data/spec/gherkin/fixtures/i18n_no.feature +0 -7
  279. data/spec/gherkin/fixtures/i18n_pt1.feature +0 -44
  280. data/spec/gherkin/fixtures/i18n_pt2.feature +0 -4
  281. data/spec/gherkin/fixtures/i18n_pt3.feature +0 -4
  282. data/spec/gherkin/fixtures/i18n_pt4.feature +0 -4
  283. data/spec/gherkin/fixtures/i18n_zh-CN.feature +0 -9
  284. data/spec/gherkin/fixtures/iso-8859-1.feature +0 -6
  285. data/spec/gherkin/fixtures/issue_145.feature +0 -22
  286. data/spec/gherkin/fixtures/scenario_outline_with_tags.feature +0 -13
  287. data/spec/gherkin/fixtures/scenario_without_steps.feature +0 -5
  288. data/spec/gherkin/fixtures/simple_with_comments.feature +0 -7
  289. data/spec/gherkin/fixtures/simple_with_tags.feature +0 -11
  290. data/spec/gherkin/fixtures/with_bom.feature +0 -3
  291. data/spec/gherkin/fixtures/with_bom_and_language_spec.feature +0 -4
  292. data/spec/gherkin/formatter/ansi_escapes_spec.rb +0 -32
  293. data/spec/gherkin/formatter/filter_formatter_spec.rb +0 -204
  294. data/spec/gherkin/formatter/json_formatter_spec.rb +0 -179
  295. data/spec/gherkin/formatter/model_spec.rb +0 -28
  296. data/spec/gherkin/formatter/pretty_formatter_spec.rb +0 -184
  297. data/spec/gherkin/formatter/spaces.feature +0 -9
  298. data/spec/gherkin/formatter/step_printer_spec.rb +0 -55
  299. data/spec/gherkin/formatter/tabs.feature +0 -9
  300. data/spec/gherkin/formatter/tag_count_formatter_spec.rb +0 -30
  301. data/spec/gherkin/i18n_spec.rb +0 -256
  302. data/spec/gherkin/java_lexer_spec.rb +0 -20
  303. data/spec/gherkin/json_parser_spec.rb +0 -165
  304. data/spec/gherkin/lexer/i18n_lexer_spec.rb +0 -65
  305. data/spec/gherkin/native_lexer_spec.rb +0 -29
  306. data/spec/gherkin/parser/parser_spec.rb +0 -16
  307. data/spec/gherkin/rubify_spec.rb +0 -23
  308. data/spec/gherkin/sexp_recorder.rb +0 -59
  309. data/spec/gherkin/shared/doc_string_group.rb +0 -161
  310. data/spec/gherkin/shared/encoding_group.rb +0 -48
  311. data/spec/gherkin/shared/lexer_group.rb +0 -589
  312. data/spec/gherkin/shared/row_group.rb +0 -123
  313. data/spec/gherkin/shared/tags_group.rb +0 -52
  314. data/spec/gherkin/tag_expression_spec.rb +0 -146
  315. data/spec/spec_helper.rb +0 -94
  316. data/tasks/apidoc.rake +0 -32
  317. data/tasks/bench.rake +0 -184
  318. data/tasks/bench/feature_builder.rb +0 -49
  319. data/tasks/bench/null_listener.rb +0 -4
  320. data/tasks/compile.rake +0 -83
  321. data/tasks/cucumber.rake +0 -23
  322. data/tasks/gems.rake +0 -46
  323. data/tasks/ikvm.rake +0 -126
  324. data/tasks/ragel_task.rb +0 -124
  325. data/tasks/release.rake +0 -34
  326. data/tasks/rspec.rake +0 -6
  327. data/tasks/yard/default/layout/html/bubble_32x32.png +0 -0
  328. data/tasks/yard/default/layout/html/bubble_48x48.png +0 -0
  329. data/tasks/yard/default/layout/html/footer.erb +0 -5
  330. data/tasks/yard/default/layout/html/index.erb +0 -1
  331. data/tasks/yard/default/layout/html/layout.erb +0 -25
  332. data/tasks/yard/default/layout/html/logo.erb +0 -1
  333. data/tasks/yard/default/layout/html/setup.rb +0 -4
@@ -1,245 +0,0 @@
1
- # encoding: utf-8
2
- require 'gherkin/formatter/ansi_escapes'
3
- require 'gherkin/formatter/step_printer'
4
- require 'gherkin/formatter/argument'
5
- require 'gherkin/formatter/escaping'
6
- require 'gherkin/formatter/model'
7
- require 'gherkin/native'
8
-
9
- module Gherkin
10
- module Formatter
11
- class PrettyFormatter
12
- native_impl('gherkin')
13
-
14
- include AnsiEscapes
15
- include Escaping
16
-
17
- def initialize(io, monochrome, executing)
18
- @io = io
19
- @step_printer = StepPrinter.new
20
- @monochrome = monochrome
21
- @executing = executing
22
- @steps = []
23
-
24
- # Prevent warnings, initialize fields
25
- @background = @tag_statement = @formats = @statement = nil
26
- end
27
-
28
- def uri(uri)
29
- @uri = uri
30
- end
31
-
32
- def feature(feature)
33
- print_comments(feature.comments, '')
34
- print_tags(feature.tags, '')
35
- @io.puts "#{feature.keyword}: #{feature.name}"
36
- print_description(feature.description, ' ', false)
37
- end
38
-
39
- def background(background)
40
- replay
41
- @statement = background
42
- end
43
-
44
- def scenario(scenario)
45
- replay
46
- @statement = scenario
47
- end
48
-
49
- def scenario_outline(scenario_outline)
50
- replay
51
- @statement = scenario_outline
52
- end
53
-
54
- def replay
55
- print_statement
56
- print_steps
57
- end
58
-
59
- def print_statement
60
- return if @statement.nil?
61
- calculate_location_indentations
62
- @io.puts
63
- print_comments(@statement.comments, ' ')
64
- print_tags(@statement.tags, ' ') if @statement.respond_to?(:tags) # Background doesn't
65
- @io.write " #{@statement.keyword}: #{@statement.name}"
66
- location = @executing ? "#{@uri}:#{@statement.line}" : nil
67
- @io.puts indented_location(location, true)
68
- print_description(@statement.description, ' ')
69
- @statement = nil
70
- end
71
-
72
- def print_steps
73
- while(@steps.any?)
74
- print_step('skipped', [], nil, true)
75
- end
76
- end
77
-
78
- def examples(examples)
79
- replay
80
- @io.puts
81
- print_comments(examples.comments, ' ')
82
- print_tags(examples.tags, ' ')
83
- @io.puts " #{examples.keyword}: #{examples.name}"
84
- print_description(examples.description, ' ')
85
- table(examples.rows)
86
- end
87
-
88
- def step(step)
89
- @steps << step
90
- end
91
-
92
- def match(match)
93
- @match = match
94
- print_statement
95
- print_step('executing', @match.arguments, @match.location, false)
96
- end
97
-
98
- def result(result)
99
- @io.write(up(1))
100
- print_step(result.status, @match.arguments, @match.location, true)
101
- end
102
-
103
- def print_step(status, arguments, location, proceed)
104
- step = proceed ? @steps.shift : @steps[0]
105
-
106
- text_format = format(status)
107
- arg_format = arg_format(status)
108
-
109
- print_comments(step.comments, ' ')
110
- @io.write(' ')
111
- @io.write(text_format.text(step.keyword))
112
- @step_printer.write_step(@io, text_format, arg_format, step.name, arguments)
113
- @io.puts(indented_location(location, proceed))
114
-
115
- doc_string(step.doc_string) if step.doc_string
116
- table(step.rows) if step.rows
117
- end
118
-
119
- class MonochromeFormat
120
- def text(text)
121
- text
122
- end
123
- end
124
-
125
- class ColorFormat
126
- include AnsiEscapes
127
-
128
- def initialize(status)
129
- @status = status
130
- end
131
-
132
- def text(text)
133
- self.__send__(@status) + text + reset
134
- end
135
- end
136
-
137
- def arg_format(key)
138
- format("#{key}_arg")
139
- end
140
-
141
- def format(key)
142
- if @formats.nil?
143
- if @monochrome
144
- @formats = Hash.new(MonochromeFormat.new)
145
- else
146
- @formats = Hash.new do |formats, status|
147
- formats[status] = ColorFormat.new(status)
148
- end
149
- end
150
- end
151
- @formats[key]
152
- end
153
-
154
- def eof
155
- replay
156
- # NO-OP
157
- end
158
-
159
- def done
160
- # NO-OP
161
- end
162
-
163
- def table(rows)
164
- cell_lengths = rows.map do |row|
165
- row.cells.map do |cell|
166
- escape_cell(cell).unpack("U*").length
167
- end
168
- end
169
- max_lengths = cell_lengths.transpose.map { |col_lengths| col_lengths.max }.flatten
170
-
171
- rows.each_with_index do |row, i|
172
- row.comments.each do |comment|
173
- @io.puts " #{comment.value}"
174
- end
175
- j = -1
176
- @io.puts ' | ' + row.cells.zip(max_lengths).map { |cell, max_length|
177
- j += 1
178
- color(cell, nil, j) + ' ' * (max_length - cell_lengths[i][j])
179
- }.join(' | ') + ' |'
180
- end
181
- end
182
-
183
- private
184
-
185
- def doc_string(doc_string)
186
- @io.puts " \"\"\"" + doc_string.content_type + "\n" + escape_triple_quotes(indent(doc_string.value, ' ')) + "\n \"\"\""
187
- end
188
-
189
- def exception(exception)
190
- exception_text = "#{exception.message} (#{exception.class})\n#{(exception.backtrace || []).join("\n")}".gsub(/^/, ' ')
191
- @io.puts(failed(exception_text))
192
- end
193
-
194
- def color(cell, statuses, col)
195
- if statuses
196
- self.__send__(statuses[col], escape_cell(cell)) + reset
197
- else
198
- escape_cell(cell)
199
- end
200
- end
201
-
202
- if(RUBY_VERSION =~ /^1\.9|2\.0/)
203
- START = /#{'^'.encode('UTF-8')}/
204
- TRIPLE_QUOTES = /#{'"""'.encode('UTF-8')}/
205
- else
206
- START = /^/
207
- TRIPLE_QUOTES = /"""/
208
- end
209
-
210
- def indent(string, indentation)
211
- string.gsub(START, indentation)
212
- end
213
-
214
- def escape_triple_quotes(s)
215
- s.gsub(TRIPLE_QUOTES, '\"\"\"')
216
- end
217
-
218
- def print_tags(tags, indent)
219
- @io.write(tags.empty? ? '' : indent + tags.map{|tag| tag.name}.join(' ') + "\n")
220
- end
221
-
222
- def print_comments(comments, indent)
223
- @io.write(comments.empty? ? '' : indent + comments.map{|comment| comment.value}.join("\n#{indent}") + "\n")
224
- end
225
-
226
- def print_description(description, indent, newline=true)
227
- if description != ""
228
- @io.puts indent(description, indent)
229
- @io.puts if newline
230
- end
231
- end
232
-
233
- def indented_location(location, proceed)
234
- indentation = proceed ? @indentations.shift : @indentations[0]
235
- location ? (' ' * indentation + ' ' + comments + "# #{location}" + reset) : ''
236
- end
237
-
238
- def calculate_location_indentations
239
- line_widths = ([@statement] + @steps).map {|step| (step.keyword+step.name).unpack("U*").length}
240
- max_line_width = line_widths.max
241
- @indentations = line_widths.map{|w| max_line_width - w}
242
- end
243
- end
244
- end
245
- end
@@ -1,21 +0,0 @@
1
- module Gherkin
2
- module Formatter
3
- class RegexpFilter
4
- def initialize(regexen)
5
- @regexen = regexen
6
- end
7
-
8
- def evaluate(tags, names, ranges)
9
- @regexen.detect do |regexp|
10
- names.detect do |name|
11
- name =~ regexp
12
- end
13
- end
14
- end
15
-
16
- def filter_table_body_rows(rows)
17
- rows
18
- end
19
- end
20
- end
21
- end
@@ -1,21 +0,0 @@
1
- module Gherkin
2
- module Formatter
3
- class StepPrinter
4
- def write_step(io, text_format, arg_format, step_name, arguments)
5
- unpacked_step_name = step_name.unpack("U*")
6
-
7
- text_start = 0
8
- arguments.each do |arg|
9
- if(arg.offset != 0 && !arg.offset.nil?)
10
- io.write(text_format.text(unpacked_step_name[text_start..arg.offset-1].pack("U*")))
11
- end
12
- if(!arg.val.nil?)
13
- io.write(arg_format.text(arg.val))
14
- text_start = arg.offset + arg.val.unpack("U*").length
15
- end
16
- end
17
- io.write(text_format.text(unpacked_step_name[text_start..-1].pack("U*"))) unless text_start == unpacked_step_name.length
18
- end
19
- end
20
- end
21
- end
@@ -1,47 +0,0 @@
1
- module Gherkin
2
- module Formatter
3
- class TagCountFormatter
4
- def initialize(formatter, tag_counts)
5
- @formatter = formatter
6
- @tag_counts = tag_counts
7
- end
8
-
9
- def uri(uri)
10
- @uri = uri
11
- end
12
-
13
- def feature(feature)
14
- @feature_tags = feature.tags
15
- @formatter.feature(feature)
16
- end
17
-
18
- def scenario(scenario)
19
- record_tags((@feature_tags.to_a + scenario.tags.to_a).uniq, scenario.line)
20
- @formatter.scenario(scenario)
21
- end
22
-
23
- def scenario_outline(scenario_outline)
24
- @scenario_outline_tags = scenario_outline.tags
25
- @formatter.scenario_outline(scenario_outline)
26
- end
27
-
28
- def examples(examples)
29
- record_tags((@feature_tags.to_a + @scenario_outline_tags.to_a + examples.tags.to_a).uniq, examples.line)
30
- @formatter.examples(examples)
31
- end
32
-
33
- private
34
-
35
- def record_tags(tags, line)
36
- tags.each do |tag|
37
- @tag_counts[tag.name] ||= []
38
- @tag_counts[tag.name] << "#{@uri}:#{line}"
39
- end
40
- end
41
-
42
- def method_missing(*args)
43
- @formatter.__send__(*args)
44
- end
45
- end
46
- end
47
- end
@@ -1,19 +0,0 @@
1
- require 'gherkin/tag_expression'
2
-
3
- module Gherkin
4
- module Formatter
5
- class TagFilter
6
- def initialize(tags)
7
- @tag_expression = TagExpression.new(tags)
8
- end
9
-
10
- def evaluate(tags, names, ranges)
11
- @tag_expression.evaluate(tags.uniq)
12
- end
13
-
14
- def filter_table_body_rows(rows)
15
- rows
16
- end
17
- end
18
- end
19
- end
@@ -1,786 +0,0 @@
1
- {
2
- "en": {
3
- "name": "English",
4
- "native": "English",
5
- "feature": "Feature|Business Need|Ability",
6
- "background": "Background",
7
- "scenario": "Scenario",
8
- "scenario_outline": "Scenario Outline|Scenario Template",
9
- "examples": "Examples|Scenarios",
10
- "given": "*|Given",
11
- "when": "*|When",
12
- "then": "*|Then",
13
- "and": "*|And",
14
- "but": "*|But"
15
- },
16
- "ar": {
17
- "name": "Arabic",
18
- "native": "العربية",
19
- "feature": "خاصية",
20
- "background": "الخلفية",
21
- "scenario": "سيناريو",
22
- "scenario_outline": "سيناريو مخطط",
23
- "examples": "امثلة",
24
- "given": "*|بفرض",
25
- "when": "*|متى|عندما",
26
- "then": "*|اذاً|ثم",
27
- "and": "*|و",
28
- "but": "*|لكن"
29
- },
30
- "bm": {
31
- "name": "Malay",
32
- "native": "Bahasa Melayu",
33
- "feature": "Fungsi",
34
- "background": "Latar Belakang",
35
- "scenario": "Senario|Situai|Keadaan",
36
- "scenario_outline": "Template Senario|Template Situai|Template Keadaan|Menggariskan Senario",
37
- "examples": "Contoh",
38
- "given": "*|Diberi|Bagi",
39
- "when": "*|Apabila",
40
- "then": "*|Maka|Kemudian",
41
- "and": "*|Dan",
42
- "but": "*|Tetapi|Tapi"
43
- },
44
- "bg": {
45
- "name": "Bulgarian",
46
- "native": "български",
47
- "feature": "Функционалност",
48
- "background": "Предистория",
49
- "scenario": "Сценарий",
50
- "scenario_outline": "Рамка на сценарий",
51
- "examples": "Примери",
52
- "given": "*|Дадено",
53
- "when": "*|Когато",
54
- "then": "*|То",
55
- "and": "*|И",
56
- "but": "*|Но"
57
- },
58
- "ca": {
59
- "name": "Catalan",
60
- "native": "català",
61
- "background": "Rerefons|Antecedents",
62
- "feature": "Característica|Funcionalitat",
63
- "scenario": "Escenari",
64
- "scenario_outline": "Esquema de l'escenari",
65
- "examples": "Exemples",
66
- "given": "*|Donat|Donada|Atès|Atesa",
67
- "when": "*|Quan",
68
- "then": "*|Aleshores|Cal",
69
- "and": "*|I",
70
- "but": "*|Però"
71
- },
72
- "cy-GB": {
73
- "name": "Welsh",
74
- "native": "Cymraeg",
75
- "background": "Cefndir",
76
- "feature": "Arwedd",
77
- "scenario": "Scenario",
78
- "scenario_outline": "Scenario Amlinellol",
79
- "examples": "Enghreifftiau",
80
- "given": "*|Anrhegedig a",
81
- "when": "*|Pryd",
82
- "then": "*|Yna",
83
- "and": "*|A",
84
- "but": "*|Ond"
85
- },
86
- "cs": {
87
- "name": "Czech",
88
- "native": "Česky",
89
- "feature": "Požadavek",
90
- "background": "Pozadí|Kontext",
91
- "scenario": "Scénář",
92
- "scenario_outline": "Náčrt Scénáře|Osnova scénáře",
93
- "examples": "Příklady",
94
- "given": "*|Pokud|Za předpokladu",
95
- "when": "*|Když",
96
- "then": "*|Pak",
97
- "and": "*|A také|A",
98
- "but": "*|Ale"
99
- },
100
- "da": {
101
- "name": "Danish",
102
- "native": "dansk",
103
- "feature": "Egenskab",
104
- "background": "Baggrund",
105
- "scenario": "Scenarie",
106
- "scenario_outline": "Abstrakt Scenario",
107
- "examples": "Eksempler",
108
- "given": "*|Givet",
109
- "when": "*|Når",
110
- "then": "*|Så",
111
- "and": "*|Og",
112
- "but": "*|Men"
113
- },
114
- "de": {
115
- "name": "German",
116
- "native": "Deutsch",
117
- "feature": "Funktionalität",
118
- "background": "Grundlage",
119
- "scenario": "Szenario",
120
- "scenario_outline": "Szenariogrundriss",
121
- "examples": "Beispiele",
122
- "given": "*|Angenommen|Gegeben sei|Gegeben seien",
123
- "when": "*|Wenn",
124
- "then": "*|Dann",
125
- "and": "*|Und",
126
- "but": "*|Aber"
127
- },
128
- "el": {
129
- "name": "Greek",
130
- "native": "Ελληνικά",
131
- "feature": "Δυνατότητα|Λειτουργία",
132
- "background": "Υπόβαθρο",
133
- "scenario": "Σενάριο",
134
- "scenario_outline": "Περιγραφή Σεναρίου",
135
- "examples": "Παραδείγματα|Σενάρια",
136
- "given": "*|Δεδομένου",
137
- "when": "*|Όταν",
138
- "then": "*|Τότε",
139
- "and": "*|Και",
140
- "but": "*|Αλλά"
141
- },
142
- "en-au": {
143
- "name": "Australian",
144
- "native": "Australian",
145
- "feature": "Pretty much",
146
- "background": "First off",
147
- "scenario": "Awww, look mate",
148
- "scenario_outline": "Reckon it's like",
149
- "examples": "You'll wanna",
150
- "given": "*|Y'know",
151
- "when": "*|It's just unbelievable",
152
- "then": "*|But at the end of the day I reckon",
153
- "and": "*|Too right",
154
- "but": "*|Yeah nah"
155
- },
156
- "en-lol": {
157
- "name": "LOLCAT",
158
- "native": "LOLCAT",
159
- "feature": "OH HAI",
160
- "background": "B4",
161
- "scenario": "MISHUN",
162
- "scenario_outline": "MISHUN SRSLY",
163
- "examples": "EXAMPLZ",
164
- "given": "*|I CAN HAZ",
165
- "when": "*|WEN",
166
- "then": "*|DEN",
167
- "and": "*|AN",
168
- "but": "*|BUT"
169
- },
170
- "en-old": {
171
- "name": "Old English",
172
- "native": "Englisc",
173
- "feature": "Hwaet|Hwæt",
174
- "background": "Aer|Ær",
175
- "scenario": "Swa",
176
- "scenario_outline": "Swa hwaer swa|Swa hwær swa",
177
- "examples": "Se the|Se þe|Se ðe",
178
- "given": "*|Thurh|Þurh|Ðurh",
179
- "when": "*|Tha|Þa|Ða",
180
- "then": "*|Tha|Þa|Ða|Tha the|Þa þe|Ða ðe",
181
- "and": "*|Ond|7",
182
- "but": "*|Ac"
183
- },
184
- "en-pirate": {
185
- "name": "Pirate",
186
- "native": "Pirate",
187
- "feature": "Ahoy matey!",
188
- "background": "Yo-ho-ho",
189
- "scenario": "Heave to",
190
- "scenario_outline": "Shiver me timbers",
191
- "examples": "Dead men tell no tales",
192
- "given": "*|Gangway!",
193
- "when": "*|Blimey!",
194
- "then": "*|Let go and haul",
195
- "and": "*|Aye",
196
- "but": "*|Avast!"
197
- },
198
- "en-Scouse": {
199
- "name": "Scouse",
200
- "native": "Scouse",
201
- "feature": "Feature",
202
- "background": "Dis is what went down",
203
- "scenario": "The thing of it is",
204
- "scenario_outline": "Wharrimean is",
205
- "examples": "Examples",
206
- "given": "*|Givun|Youse know when youse got",
207
- "when": "*|Wun|Youse know like when",
208
- "then": "*|Dun|Den youse gotta",
209
- "and": "*|An",
210
- "but": "*|Buh"
211
- },
212
- "en-tx": {
213
- "name": "Texan",
214
- "native": "Texan",
215
- "feature": "Feature",
216
- "background": "Background",
217
- "scenario": "Scenario",
218
- "scenario_outline": "All y'all",
219
- "examples": "Examples",
220
- "given": "*|Given y'all",
221
- "when": "*|When y'all",
222
- "then": "*|Then y'all",
223
- "and": "*|And y'all",
224
- "but": "*|But y'all"
225
- },
226
- "eo": {
227
- "name": "Esperanto",
228
- "native": "Esperanto",
229
- "feature": "Trajto",
230
- "background": "Fono",
231
- "scenario": "Scenaro",
232
- "scenario_outline": "Konturo de la scenaro",
233
- "examples": "Ekzemploj",
234
- "given": "*|Donitaĵo",
235
- "when": "*|Se",
236
- "then": "*|Do",
237
- "and": "*|Kaj",
238
- "but": "*|Sed"
239
- },
240
- "es": {
241
- "name": "Spanish",
242
- "native": "español",
243
- "background": "Antecedentes",
244
- "feature": "Característica",
245
- "scenario": "Escenario",
246
- "scenario_outline": "Esquema del escenario",
247
- "examples": "Ejemplos",
248
- "given": "*|Dado|Dada|Dados|Dadas",
249
- "when": "*|Cuando",
250
- "then": "*|Entonces",
251
- "and": "*|Y",
252
- "but": "*|Pero"
253
- },
254
- "et": {
255
- "name": "Estonian",
256
- "native": "eesti keel",
257
- "feature": "Omadus",
258
- "background": "Taust",
259
- "scenario": "Stsenaarium",
260
- "scenario_outline": "Raamstsenaarium",
261
- "examples": "Juhtumid",
262
- "given": "*|Eeldades",
263
- "when": "*|Kui",
264
- "then": "*|Siis",
265
- "and": "*|Ja",
266
- "but": "*|Kuid"
267
- },
268
- "fa": {
269
- "name": "Persian",
270
- "native": "فارسی",
271
- "feature": "وِیژگی",
272
- "background": "زمینه",
273
- "scenario": "سناریو",
274
- "scenario_outline": "الگوی سناریو",
275
- "examples": "نمونه ها",
276
- "given": "*|با فرض",
277
- "when": "*|هنگامی",
278
- "then": "*|آنگاه",
279
- "and": "*|و",
280
- "but": "*|اما"
281
- },
282
- "fi": {
283
- "name": "Finnish",
284
- "native": "suomi",
285
- "feature": "Ominaisuus",
286
- "background": "Tausta",
287
- "scenario": "Tapaus",
288
- "scenario_outline": "Tapausaihio",
289
- "examples": "Tapaukset",
290
- "given": "*|Oletetaan",
291
- "when": "*|Kun",
292
- "then": "*|Niin",
293
- "and": "*|Ja",
294
- "but": "*|Mutta"
295
- },
296
- "fr": {
297
- "name": "French",
298
- "native": "français",
299
- "feature": "Fonctionnalité",
300
- "background": "Contexte",
301
- "scenario": "Scénario",
302
- "scenario_outline": "Plan du scénario|Plan du Scénario",
303
- "examples": "Exemples",
304
- "given": "*|Soit|Etant donné|Etant donnée|Etant donnés|Etant données|Étant donné|Étant donnée|Étant donnés|Étant données",
305
- "when": "*|Quand|Lorsque|Lorsqu'<",
306
- "then": "*|Alors",
307
- "and": "*|Et",
308
- "but": "*|Mais"
309
- },
310
- "gl": {
311
- "name": "Galician",
312
- "native": "galego",
313
- "background": "Contexto",
314
- "feature": "Característica",
315
- "scenario": "Escenario",
316
- "scenario_outline": "Esbozo do escenario",
317
- "examples": "Exemplos",
318
- "given": "*|Dado|Dada|Dados|Dadas",
319
- "when": "*|Cando",
320
- "then": "*|Entón|Logo",
321
- "and": "*|E",
322
- "but": "*|Mais|Pero"
323
- },
324
- "he": {
325
- "name": "Hebrew",
326
- "native": "עברית",
327
- "feature": "תכונה",
328
- "background": "רקע",
329
- "scenario": "תרחיש",
330
- "scenario_outline": "תבנית תרחיש",
331
- "examples": "דוגמאות",
332
- "given": "*|בהינתן",
333
- "when": "*|כאשר",
334
- "then": "*|אז|אזי",
335
- "and": "*|וגם",
336
- "but": "*|אבל"
337
- },
338
- "hi": {
339
- "name": "Hindi",
340
- "native": "हिंदी",
341
- "feature": "रूप लेख",
342
- "background": "पृष्ठभूमि",
343
- "scenario": "परिदृश्य",
344
- "scenario_outline": "परिदृश्य रूपरेखा",
345
- "examples": "उदाहरण",
346
- "given": "*|अगर|यदि|चूंकि",
347
- "when": "*|जब|कदा",
348
- "then": "*|तब|तदा",
349
- "and": "*|और|तथा",
350
- "but": "*|पर|परन्तु|किन्तु"
351
- },
352
- "hr": {
353
- "name": "Croatian",
354
- "native": "hrvatski",
355
- "feature": "Osobina|Mogućnost|Mogucnost",
356
- "background": "Pozadina",
357
- "scenario": "Scenarij",
358
- "scenario_outline": "Skica|Koncept",
359
- "examples": "Primjeri|Scenariji",
360
- "given": "*|Zadan|Zadani|Zadano",
361
- "when": "*|Kada|Kad",
362
- "then": "*|Onda",
363
- "and": "*|I",
364
- "but": "*|Ali"
365
- },
366
- "hu": {
367
- "name": "Hungarian",
368
- "native": "magyar",
369
- "feature": "Jellemző",
370
- "background": "Háttér",
371
- "scenario": "Forgatókönyv",
372
- "scenario_outline": "Forgatókönyv vázlat",
373
- "examples": "Példák",
374
- "given": "*|Amennyiben|Adott",
375
- "when": "*|Majd|Ha|Amikor",
376
- "then": "*|Akkor",
377
- "and": "*|És",
378
- "but": "*|De"
379
- },
380
- "id": {
381
- "name": "Indonesian",
382
- "native": "Bahasa Indonesia",
383
- "feature": "Fitur",
384
- "background": "Dasar",
385
- "scenario": "Skenario",
386
- "scenario_outline": "Skenario konsep",
387
- "examples": "Contoh",
388
- "given": "*|Dengan",
389
- "when": "*|Ketika",
390
- "then": "*|Maka",
391
- "and": "*|Dan",
392
- "but": "*|Tapi"
393
- },
394
- "is": {
395
- "name": "Icelandic",
396
- "native": "Íslenska",
397
- "feature": "Eiginleiki",
398
- "background": "Bakgrunnur",
399
- "scenario": "Atburðarás",
400
- "scenario_outline": "Lýsing Atburðarásar|Lýsing Dæma",
401
- "examples": "Dæmi|Atburðarásir",
402
- "given": "*|Ef",
403
- "when": "*|Þegar",
404
- "then": "*|Þá",
405
- "and": "*|Og",
406
- "but": "*|En"
407
- },
408
- "it": {
409
- "name": "Italian",
410
- "native": "italiano",
411
- "feature": "Funzionalità",
412
- "background": "Contesto",
413
- "scenario": "Scenario",
414
- "scenario_outline": "Schema dello scenario",
415
- "examples": "Esempi",
416
- "given": "*|Dato|Data|Dati|Date",
417
- "when": "*|Quando",
418
- "then": "*|Allora",
419
- "and": "*|E",
420
- "but": "*|Ma"
421
- },
422
- "ja": {
423
- "name": "Japanese",
424
- "native": "日本語",
425
- "feature": "フィーチャ|機能",
426
- "background": "背景",
427
- "scenario": "シナリオ",
428
- "scenario_outline": "シナリオアウトライン|シナリオテンプレート|テンプレ|シナリオテンプレ",
429
- "examples": "例|サンプル",
430
- "given": "*|前提<",
431
- "when": "*|もし<",
432
- "then": "*|ならば<",
433
- "and": "*|かつ<",
434
- "but": "*|しかし<|但し<|ただし<"
435
- },
436
- "kn": {
437
- "name": "Kannada",
438
- "native": "ಕನ್ನಡ",
439
- "background": "ಹಿನ್ನೆಲೆ",
440
- "feature": "ಹೆಚ್ಚಳ",
441
- "scenario": "ಕಥಾಸಾರಾಂಶ",
442
- "scenario_outline": "ವಿವರಣೆ",
443
- "examples": "ಉದಾಹರಣೆಗಳು",
444
- "given": "*|ನೀಡಿದ",
445
- "when": "*|ಸ್ಥಿತಿಯನ್ನು",
446
- "then": "*|ನಂತರ",
447
- "and": "*|ಮತ್ತು",
448
- "but": "*|ಆದರೆ"
449
- },
450
- "ko": {
451
- "name": "Korean",
452
- "native": "한국어",
453
- "background": "배경",
454
- "feature": "기능",
455
- "scenario": "시나리오",
456
- "scenario_outline": "시나리오 개요",
457
- "examples": "예",
458
- "given": "*|조건<|먼저<",
459
- "when": "*|만일<|만약<",
460
- "then": "*|그러면<",
461
- "and": "*|그리고<",
462
- "but": "*|하지만<|단<"
463
- },
464
- "lt": {
465
- "name": "Lithuanian",
466
- "native": "lietuvių kalba",
467
- "feature": "Savybė",
468
- "background": "Kontekstas",
469
- "scenario": "Scenarijus",
470
- "scenario_outline": "Scenarijaus šablonas",
471
- "examples": "Pavyzdžiai|Scenarijai|Variantai",
472
- "given": "*|Duota",
473
- "when": "*|Kai",
474
- "then": "*|Tada",
475
- "and": "*|Ir",
476
- "but": "*|Bet"
477
- },
478
- "lu": {
479
- "name": "Luxemburgish",
480
- "native": "Lëtzebuergesch",
481
- "feature": "Funktionalitéit",
482
- "background": "Hannergrond",
483
- "scenario": "Szenario",
484
- "scenario_outline": "Plang vum Szenario",
485
- "examples": "Beispiller",
486
- "given": "*|ugeholl",
487
- "when": "*|wann",
488
- "then": "*|dann",
489
- "and": "*|an|a",
490
- "but": "*|awer|mä"
491
- },
492
- "lv": {
493
- "name": "Latvian",
494
- "native": "latviešu",
495
- "feature": "Funkcionalitāte|Fīča",
496
- "background": "Konteksts|Situācija",
497
- "scenario": "Scenārijs",
498
- "scenario_outline": "Scenārijs pēc parauga",
499
- "examples": "Piemēri|Paraugs",
500
- "given": "*|Kad",
501
- "when": "*|Ja",
502
- "then": "*|Tad",
503
- "and": "*|Un",
504
- "but": "*|Bet"
505
- },
506
- "nl": {
507
- "name": "Dutch",
508
- "native": "Nederlands",
509
- "feature": "Functionaliteit",
510
- "background": "Achtergrond",
511
- "scenario": "Scenario",
512
- "scenario_outline": "Abstract Scenario",
513
- "examples": "Voorbeelden",
514
- "given": "*|Gegeven|Stel",
515
- "when": "*|Als",
516
- "then": "*|Dan",
517
- "and": "*|En",
518
- "but": "*|Maar"
519
- },
520
- "no": {
521
- "name": "Norwegian",
522
- "native": "norsk",
523
- "feature": "Egenskap",
524
- "background": "Bakgrunn",
525
- "scenario": "Scenario",
526
- "scenario_outline": "Scenariomal|Abstrakt Scenario",
527
- "examples": "Eksempler",
528
- "given": "*|Gitt",
529
- "when": "*|Når",
530
- "then": "*|Så",
531
- "and": "*|Og",
532
- "but": "*|Men"
533
- },
534
- "pa": {
535
- "name": "Panjabi",
536
- "native": "ਪੰਜਾਬੀ",
537
- "feature": "ਖਾਸੀਅਤ|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ",
538
- "background": "ਪਿਛੋਕੜ",
539
- "scenario": "ਪਟਕਥਾ",
540
- "scenario_outline": "ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ",
541
- "examples": "ਉਦਾਹਰਨਾਂ",
542
- "given": "*|ਜੇਕਰ|ਜਿਵੇਂ ਕਿ",
543
- "when": "*|ਜਦੋਂ",
544
- "then": "*|ਤਦ",
545
- "and": "*|ਅਤੇ",
546
- "but": "*|ਪਰ"
547
- },
548
- "pl": {
549
- "name": "Polish",
550
- "native": "polski",
551
- "feature": "Właściwość|Funkcja|Aspekt|Potrzeba biznesowa",
552
- "background": "Założenia",
553
- "scenario": "Scenariusz",
554
- "scenario_outline": "Szablon scenariusza",
555
- "examples": "Przykłady",
556
- "given": "*|Zakładając|Mając",
557
- "when": "*|Jeżeli|Jeśli|Gdy|Kiedy",
558
- "then": "*|Wtedy",
559
- "and": "*|Oraz|I",
560
- "but": "*|Ale"
561
- },
562
- "pt": {
563
- "name": "Portuguese",
564
- "native": "português",
565
- "background": "Contexto|Cenário de Fundo|Cenario de Fundo|Fundo",
566
- "feature": "Funcionalidade|Característica|Caracteristica",
567
- "scenario": "Cenário|Cenario",
568
- "scenario_outline": "Esquema do Cenário|Esquema do Cenario|Delineação do Cenário|Delineacao do Cenario",
569
- "examples": "Exemplos|Cenários|Cenarios",
570
- "given": "*|Dado|Dada|Dados|Dadas",
571
- "when": "*|Quando",
572
- "then": "*|Então|Entao",
573
- "and": "*|E",
574
- "but": "*|Mas"
575
- },
576
- "ro": {
577
- "name": "Romanian",
578
- "native": "română",
579
- "background": "Context",
580
- "feature": "Functionalitate|Funcționalitate|Funcţionalitate",
581
- "scenario": "Scenariu",
582
- "scenario_outline": "Structura scenariu|Structură scenariu",
583
- "examples": "Exemple",
584
- "given": "*|Date fiind|Dat fiind|Dati fiind|Dați fiind|Daţi fiind",
585
- "when": "*|Cand|Când",
586
- "then": "*|Atunci",
587
- "and": "*|Si|Și|Şi",
588
- "but": "*|Dar"
589
- },
590
- "ru": {
591
- "name": "Russian",
592
- "native": "русский",
593
- "feature": "Функция|Функционал|Свойство",
594
- "background": "Предыстория|Контекст",
595
- "scenario": "Сценарий",
596
- "scenario_outline": "Структура сценария",
597
- "examples": "Примеры",
598
- "given": "*|Допустим|Дано|Пусть",
599
- "when": "*|Если|Когда",
600
- "then": "*|То|Тогда",
601
- "and": "*|И|К тому же|Также",
602
- "but": "*|Но|А"
603
- },
604
- "sv": {
605
- "name": "Swedish",
606
- "native": "Svenska",
607
- "feature": "Egenskap",
608
- "background": "Bakgrund",
609
- "scenario": "Scenario",
610
- "scenario_outline": "Abstrakt Scenario|Scenariomall",
611
- "examples": "Exempel",
612
- "given": "*|Givet",
613
- "when": "*|När",
614
- "then": "*|Så",
615
- "and": "*|Och",
616
- "but": "*|Men"
617
- },
618
- "sk": {
619
- "name": "Slovak",
620
- "native": "Slovensky",
621
- "feature": "Požiadavka|Funkcia|Vlastnosť",
622
- "background": "Pozadie",
623
- "scenario": "Scenár",
624
- "scenario_outline": "Náčrt Scenáru|Náčrt Scenára|Osnova Scenára",
625
- "examples": "Príklady",
626
- "given": "*|Pokiaľ|Za predpokladu",
627
- "when": "*|Keď|Ak",
628
- "then": "*|Tak|Potom",
629
- "and": "*|A|A tiež|A taktiež|A zároveň",
630
- "but": "*|Ale"
631
- },
632
- "sr-Latn": {
633
- "name": "Serbian (Latin)",
634
- "native": "Srpski (Latinica)",
635
- "feature": "Funkcionalnost|Mogućnost|Mogucnost|Osobina",
636
- "background": "Kontekst|Osnova|Pozadina",
637
- "scenario": "Scenario|Primer",
638
- "scenario_outline": "Struktura scenarija|Skica|Koncept",
639
- "examples": "Primeri|Scenariji",
640
- "given": "*|Zadato|Zadate|Zatati",
641
- "when": "*|Kada|Kad",
642
- "then": "*|Onda",
643
- "and": "*|I",
644
- "but": "*|Ali"
645
- },
646
- "sr-Cyrl": {
647
- "name": "Serbian",
648
- "native": "Српски",
649
- "feature": "Функционалност|Могућност|Особина",
650
- "background": "Контекст|Основа|Позадина",
651
- "scenario": "Сценарио|Пример",
652
- "scenario_outline": "Структура сценарија|Скица|Концепт",
653
- "examples": "Примери|Сценарији",
654
- "given": "*|Задато|Задате|Задати",
655
- "when": "*|Када|Кад",
656
- "then": "*|Онда",
657
- "and": "*|И",
658
- "but": "*|Али"
659
- },
660
- "tl": {
661
- "name": "Telugu",
662
- "native": "తెలుగు",
663
- "feature": "గుణము",
664
- "background": "నేపథ్యం",
665
- "scenario": "సన్నివేశం",
666
- "scenario_outline": "కథనం",
667
- "examples": "ఉదాహరణలు",
668
- "given": "*|చెప్పబడినది",
669
- "when": "*|ఈ పరిస్థితిలో",
670
- "then": "*|అప్పుడు",
671
- "and": "*|మరియు",
672
- "but": "*|కాని"
673
- },
674
- "th": {
675
- "name": "Thai",
676
- "native": "ไทย",
677
- "feature": "โครงหลัก|ความต้องการทางธุรกิจ|ความสามารถ",
678
- "background": "แนวคิด",
679
- "scenario": "เหตุการณ์",
680
- "scenario_outline": "สรุปเหตุการณ์|โครงสร้างของเหตุการณ์",
681
- "examples": "ชุดของตัวอย่าง|ชุดของเหตุการณ์",
682
- "given": "*|กำหนดให้",
683
- "when": "*|เมื่อ",
684
- "then": "*|ดังนั้น",
685
- "and": "*|และ",
686
- "but": "*|แต่"
687
- },
688
- "tr": {
689
- "name": "Turkish",
690
- "native": "Türkçe",
691
- "feature": "Özellik",
692
- "background": "Geçmiş",
693
- "scenario": "Senaryo",
694
- "scenario_outline": "Senaryo taslağı",
695
- "examples": "Örnekler",
696
- "given": "*|Diyelim ki",
697
- "when": "*|Eğer ki",
698
- "then": "*|O zaman",
699
- "and": "*|Ve",
700
- "but": "*|Fakat|Ama"
701
- },
702
- "tt": {
703
- "name": "Tatar",
704
- "native": "Татарча",
705
- "feature": "Мөмкинлек|Үзенчәлеклелек",
706
- "background": "Кереш",
707
- "scenario": "Сценарий",
708
- "scenario_outline": "Сценарийның төзелеше",
709
- "examples": "Үрнәкләр|Мисаллар",
710
- "given": "*|Әйтик",
711
- "when": "*|Әгәр",
712
- "then": "*|Нәтиҗәдә",
713
- "and": "*|Һәм|Вә",
714
- "but": "*|Ләкин|Әмма"
715
- },
716
- "uk": {
717
- "name": "Ukrainian",
718
- "native": "Українська",
719
- "feature": "Функціонал",
720
- "background": "Передумова",
721
- "scenario": "Сценарій",
722
- "scenario_outline": "Структура сценарію",
723
- "examples": "Приклади",
724
- "given": "*|Припустимо|Припустимо, що|Нехай|Дано",
725
- "when": "*|Якщо|Коли",
726
- "then": "*|То|Тоді",
727
- "and": "*|І|А також|Та",
728
- "but": "*|Але"
729
- },
730
- "uz": {
731
- "name": "Uzbek",
732
- "native": "Узбекча",
733
- "feature": "Функционал",
734
- "background": "Тарих",
735
- "scenario": "Сценарий",
736
- "scenario_outline": "Сценарий структураси",
737
- "examples": "Мисоллар",
738
- "given": "*|Агар",
739
- "when": "*|Агар",
740
- "then": "*|Унда",
741
- "and": "*|Ва",
742
- "but": "*|Лекин|Бирок|Аммо"
743
- },
744
- "vi": {
745
- "name": "Vietnamese",
746
- "native": "Tiếng Việt",
747
- "feature": "Tính năng",
748
- "background": "Bối cảnh",
749
- "scenario": "Tình huống|Kịch bản",
750
- "scenario_outline": "Khung tình huống|Khung kịch bản",
751
- "examples": "Dữ liệu",
752
- "given": "*|Biết|Cho",
753
- "when": "*|Khi",
754
- "then": "*|Thì",
755
- "and": "*|Và",
756
- "but": "*|Nhưng"
757
- },
758
- "zh-CN": {
759
- "name": "Chinese simplified",
760
- "native": "简体中文",
761
- "feature": "功能",
762
- "background": "背景",
763
- "scenario": "场景|剧本",
764
- "scenario_outline": "场景大纲|剧本大纲",
765
- "examples": "例子",
766
- "given": "*|假如<|假设<|假定<",
767
- "when": "*|当<",
768
- "then": "*|那么<",
769
- "and": "*|而且<|并且<|同时<",
770
- "but": "*|但是<"
771
- },
772
- "zh-TW": {
773
- "name": "Chinese traditional",
774
- "native": "繁體中文",
775
- "feature": "功能",
776
- "background": "背景",
777
- "scenario": "場景|劇本",
778
- "scenario_outline": "場景大綱|劇本大綱",
779
- "examples": "例子",
780
- "given": "*|假如<|假設<|假定<",
781
- "when": "*|當<",
782
- "then": "*|那麼<",
783
- "and": "*|而且<|並且<|同時<",
784
- "but": "*|但是<"
785
- }
786
- }