csl 1.4.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +26 -0
  3. data/BSDL +1 -1
  4. data/Gemfile +9 -30
  5. data/README.md +1 -5
  6. data/Rakefile +0 -8
  7. data/csl.gemspec +10 -13
  8. data/cucumber.yml +1 -1
  9. data/lib/csl/locale.rb +4 -4
  10. data/lib/csl/locale/term.rb +1 -1
  11. data/lib/csl/node.rb +2 -2
  12. data/lib/csl/treelike.rb +11 -7
  13. data/lib/csl/version.rb +1 -1
  14. metadata +30 -92
  15. data/.rspec +0 -3
  16. data/.simplecov +0 -4
  17. data/Guardfile +0 -15
  18. data/features/locales/loading.feature +0 -57
  19. data/features/locales/ordinalize.feature +0 -713
  20. data/features/parser/choose.feature +0 -16
  21. data/features/parser/info.feature +0 -27
  22. data/features/parser/localized_dates.feature +0 -35
  23. data/features/parser/terms.feature +0 -28
  24. data/features/step_definitions/locale_steps.rb +0 -36
  25. data/features/step_definitions/parser_steps.rb +0 -40
  26. data/features/step_definitions/style_steps.rb +0 -16
  27. data/features/style/loading.feature +0 -53
  28. data/features/support/env.rb +0 -24
  29. data/spec/csl/info_spec.rb +0 -278
  30. data/spec/csl/locale/date_spec.rb +0 -63
  31. data/spec/csl/locale/style_options_spec.rb +0 -19
  32. data/spec/csl/locale/term_spec.rb +0 -255
  33. data/spec/csl/locale_spec.rb +0 -245
  34. data/spec/csl/node_spec.rb +0 -273
  35. data/spec/csl/parser_spec.rb +0 -112
  36. data/spec/csl/schema_spec.rb +0 -112
  37. data/spec/csl/style/bibliography_spec.rb +0 -7
  38. data/spec/csl/style/choose_spec.rb +0 -66
  39. data/spec/csl/style/citation_spec.rb +0 -7
  40. data/spec/csl/style/date_spec.rb +0 -21
  41. data/spec/csl/style/group_spec.rb +0 -7
  42. data/spec/csl/style/label_spec.rb +0 -44
  43. data/spec/csl/style/layout_spec.rb +0 -7
  44. data/spec/csl/style/macro_spec.rb +0 -7
  45. data/spec/csl/style/names_spec.rb +0 -36
  46. data/spec/csl/style/number_spec.rb +0 -85
  47. data/spec/csl/style/sort_spec.rb +0 -11
  48. data/spec/csl/style/text_spec.rb +0 -7
  49. data/spec/csl/style_spec.rb +0 -137
  50. data/spec/csl/treelike_spec.rb +0 -151
  51. data/spec/fixtures/locales/locales-de-DE.xml +0 -298
  52. data/spec/fixtures/locales/locales-en-GB.xml +0 -304
  53. data/spec/fixtures/locales/locales-en-US.xml +0 -304
  54. data/spec/fixtures/styles/apa.csl +0 -443
  55. data/spec/spec_helper.rb +0 -57
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --format progress
3
- --require spec_helper.rb
data/.simplecov DELETED
@@ -1,4 +0,0 @@
1
- SimpleCov.start do
2
- add_filter 'spec/'
3
- add_filter 'features/'
4
- end
data/Guardfile DELETED
@@ -1,15 +0,0 @@
1
- guard 'rspec', :cmd => 'bundle exec rspec' do
2
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
- watch('spec/spec_helper.rb') { 'spec' }
5
- end
6
-
7
- guard 'cucumber' do
8
- watch(%r{^features/.+\.feature$})
9
- watch(%r{^features/support/.+$}) { 'features' }
10
- watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m|
11
- Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
12
- }
13
- end
14
-
15
- # vim: syntax=ruby
@@ -1,57 +0,0 @@
1
- Feature: Loading CSL Locales
2
- As a hacker of CSL styles
3
- I want to be able to parse CSL locales
4
-
5
- Scenario: Loading a locale from a string
6
- When I load the locale from the string
7
- """
8
- <?xml version="1.0" encoding="utf-8"?>
9
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="de-AT">
10
- <style-options punctuation-in-quote="false"/>
11
- <date form="text">
12
- <date-part name="day" suffix=". "/>
13
- <date-part name="month" suffix=" "/>
14
- <date-part name="year"/>
15
- </date>
16
- <date form="numeric">
17
- <date-part name="day" form="numeric-leading-zeros" suffix="."/>
18
- <date-part name="month" form="numeric-leading-zeros" suffix="."/>
19
- <date-part name="year"/>
20
- </date>
21
- <terms>
22
- <term name="accessed">zugegriffen</term>
23
- <term name="and others">und andere</term>
24
- <term name="edition">
25
- <single>Auflage</single>
26
- <multiple>Auflagen</multiple>
27
- </term>
28
- <term name="edition" form="short">Aufl.</term>
29
- <term name="et-al">u. a.</term>
30
- <term name="forthcoming">i. E.</term>
31
- <term name="from">von</term>
32
- <term name="ibid">ebd.</term>
33
- <term name="in">in</term>
34
- <term name="presented at">gehalten auf der</term>
35
- <term name="reference">
36
- <single>Referenz</single>
37
- <multiple>Referenzen</multiple>
38
- </term>
39
- <term name="reference" form="short">
40
- <single>Ref.</single>
41
- <multiple>Ref.</multiple>
42
- </term>
43
- <term name="retrieved">abgerufen</term>
44
-
45
- <!-- LONG ROLE FORMS -->
46
- <term name="author">
47
- <single/>
48
- <multiple/>
49
- </term>
50
- </terms>
51
- </locale>
52
- """
53
- Then the language should be "de"
54
- And the region should be "AT"
55
- And the attribute "version" should be "1.0"
56
- And the locale should should have 14 terms
57
- And the plural of the term "reference" should be "Referenzen"
@@ -1,713 +0,0 @@
1
- Feature: Converting numbers to ordinals using CSL locales
2
- In order to support the requirements of CSL styles that use ordinals
3
- As a hacker of CSL styles
4
- I want to be able to convert numbers to ordinals
5
-
6
- @v1.0 @locale @ordinals @i18n @lang-en
7
- Scenario: English CSL 1.0 locales
8
- Given the locale:
9
- """
10
- <?xml version="1.0" encoding="utf-8"?>
11
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en">
12
- <terms>
13
- <term name="ordinal-01">st</term>
14
- <term name="ordinal-02">nd</term>
15
- <term name="ordinal-03">rd</term>
16
- <term name="ordinal-04">th</term>
17
- </terms>
18
- </locale>
19
- """
20
- When I ordinalize these numbers:
21
- | number |
22
- | 0 |
23
- | 1 |
24
- | 2 |
25
- | 3 |
26
- | 4 |
27
- | 5 |
28
- | 10 |
29
- | 11 |
30
- | 12 |
31
- | 13 |
32
- | 20 |
33
- | 21 |
34
- | 22 |
35
- | 23 |
36
- | 111 |
37
- | 112 |
38
- | 113 |
39
- | -102 |
40
- Then the ordinals should be:
41
- | ordinal |
42
- | 0th |
43
- | 1st |
44
- | 2nd |
45
- | 3rd |
46
- | 4th |
47
- | 5th |
48
- | 10th |
49
- | 11th |
50
- | 12th |
51
- | 13th |
52
- | 20th |
53
- | 21st |
54
- | 22nd |
55
- | 23rd |
56
- | 111th |
57
- | 112th |
58
- | 113th |
59
- | -102nd |
60
-
61
- @v1.0.1 @locale @ordinals @i18n @lang-en
62
- Scenario: English CSL 1.0.1 locales
63
- Given the locale:
64
- """
65
- <?xml version="1.0" encoding="utf-8"?>
66
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="en">
67
- <terms>
68
- <term name="ordinal">th</term>
69
- <term name="ordinal-01">st</term>
70
- <term name="ordinal-02">nd</term>
71
- <term name="ordinal-03">rd</term>
72
- <term name="ordinal-11">th</term>
73
- <term name="ordinal-12">th</term>
74
- <term name="ordinal-13">th</term>
75
- </terms>
76
- </locale>
77
- """
78
- When I ordinalize these numbers:
79
- | num | form | gender | number |
80
- | 0 | | | |
81
- | 1 | | | |
82
- | 2 | | | |
83
- | 3 | | | |
84
- | 4 | | | |
85
- | 5 | | | |
86
- | 10 | | | |
87
- | 11 | | | |
88
- | 12 | | | |
89
- | 13 | | | |
90
- | 20 | | | |
91
- | 21 | | | |
92
- | 22 | | | |
93
- | 23 | | | |
94
- | 111 | | | |
95
- | 112 | | | |
96
- | 113 | | | |
97
- | -102 | | | |
98
- | 1 | | masculine | |
99
- | 2 | | feminine | |
100
- | 3 | | | plural |
101
- Then the ordinals should be:
102
- | ordinal |
103
- | 0th |
104
- | 1st |
105
- | 2nd |
106
- | 3rd |
107
- | 4th |
108
- | 5th |
109
- | 10th |
110
- | 11th |
111
- | 12th |
112
- | 13th |
113
- | 20th |
114
- | 21st |
115
- | 22nd |
116
- | 23rd |
117
- | 111th |
118
- | 112th |
119
- | 113th |
120
- | -102nd |
121
- | 1st |
122
- | 2nd |
123
- | 3rd |
124
-
125
- @v1.0.1 @locale @ordinals @i18n @gender @lang-de
126
- Scenario: Gendered German CSL 1.0.1 locales
127
- Given the locale:
128
- """
129
- <?xml version="1.0" encoding="utf-8"?>
130
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="de">
131
- <terms>
132
- <term name="ordinal">.</term>
133
-
134
- <term name="long-ordinal-01">erstes</term>
135
- <term name="long-ordinal-01" gender-form="feminine">
136
- <single>erste</single>
137
- <multiple>ersten</multiple>
138
- </term>
139
- <term name="long-ordinal-01" gender-form="masculine">
140
- <single>erster</single>
141
- <multiple>ersten</multiple>
142
- </term>
143
- <term name="long-ordinal-02">zweites</term>
144
- <term name="long-ordinal-02" gender-form="feminine">zweite</term>
145
- <term name="long-ordinal-02" gender-form="masculine">zweiter</term>
146
- </terms>
147
- </locale>
148
- """
149
- When I ordinalize these numbers:
150
- | num | form | gender | number |
151
- | 0 | | | |
152
- | 1 | | | |
153
- | 2 | | | |
154
- | 3 | | | |
155
- | 101 | | | |
156
- | 1 | long | | |
157
- | 2 | long | | |
158
- | 3 | long | | |
159
- | 1 | long | feminine | |
160
- | 1 | long | feminine | plural |
161
- | 1 | long | feminine | singular |
162
- | 2 | long | feminine | |
163
- | 3 | long | feminine | |
164
- | 1 | long | masculine | |
165
- | 2 | long | masculine | |
166
- | 3 | long | masculine | |
167
- Then the ordinals should be:
168
- | ordinal |
169
- | 0. |
170
- | 1. |
171
- | 2. |
172
- | 3. |
173
- | 101. |
174
- | erstes |
175
- | zweites |
176
- | 3. |
177
- | erste |
178
- | ersten |
179
- | erste |
180
- | zweite |
181
- | 3. |
182
- | erster |
183
- | zweiter |
184
- | 3. |
185
-
186
- @v1.0.1 @locale @ordinals @i18n @gender @lang-fr
187
- Scenario: Gendered French CSL 1.0.1 locales
188
- Given the locale:
189
- """
190
- <?xml version="1.0" encoding="utf-8"?>
191
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="de">
192
- <terms>
193
- <term name="ordinal">
194
- <single>e</single>
195
- <multiple>es</multiple>
196
- </term>
197
- <term name="ordinal-01" match="whole-number">
198
- <single>re</single>
199
- <multiple>res</multiple>
200
- </term>
201
- <term name="ordinal-01" gender-form="feminine" match="whole-number">
202
- <single>re</single>
203
- <multiple>res</multiple>
204
- </term>
205
- <term name="ordinal-01" gender-form="masculine" match="whole-number">
206
- <single>er</single>
207
- <multiple>ers</multiple>
208
- </term>
209
- </terms>
210
- </locale>
211
- """
212
- When I ordinalize these numbers:
213
- | num | form | gender | number |
214
- | 0 | | | |
215
- | 1 | | | |
216
- | 1 | | feminine | |
217
- | 1 | | masculine | |
218
- | 1 | | neutral | |
219
- | 1 | | feminine | plural |
220
- | 1 | | masculine | plural |
221
- | 2 | | | |
222
- | 3 | | | |
223
- | 3 | | | plural |
224
- | 999 | | | |
225
- | 11 | | | |
226
- | 21 | | | |
227
- | 101 | | | |
228
- | 1001 | | | |
229
- | 301 | | | |
230
- | 21 | | masculine | |
231
- | 1001 | | masculine | |
232
- | 42 | | masculine | |
233
- | 42 | | masculine | plural |
234
- Then the ordinals should be:
235
- | ordinal |
236
- | 0e |
237
- | 1re |
238
- | 1re |
239
- | 1er |
240
- | 1re |
241
- | 1res |
242
- | 1ers |
243
- | 2e |
244
- | 3e |
245
- | 3es |
246
- | 999e |
247
- | 11e |
248
- | 21e |
249
- | 101e |
250
- | 1001e |
251
- | 301e |
252
- | 21e |
253
- | 1001e |
254
- | 42e |
255
- | 42es |
256
-
257
- @v1.0.1 @locale @ordinals @i18n @lang-nl
258
- Scenario: Dutch CSL 1.0.1 locales (nulde form)
259
- Given the locale:
260
- """
261
- <?xml version="1.0" encoding="utf-8"?>
262
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="nl">
263
- <terms>
264
- <term name="ordinal">ste</term>
265
-
266
- <term name="ordinal-00" match="whole-number">de</term>
267
-
268
- <term name="ordinal-02" match="last-two-digits">de</term>
269
- <term name="ordinal-03" match="last-two-digits">de</term>
270
- <term name="ordinal-04" match="last-two-digits">de</term>
271
- <term name="ordinal-05" match="last-two-digits">de</term>
272
- <term name="ordinal-06" match="last-two-digits">de</term>
273
- <term name="ordinal-07" match="last-two-digits">de</term>
274
- <term name="ordinal-09" match="last-two-digits">de</term>
275
- <term name="ordinal-10">de</term>
276
- <term name="ordinal-11">de</term>
277
- <term name="ordinal-12">de</term>
278
- <term name="ordinal-13">de</term>
279
- <term name="ordinal-14">de</term>
280
- <term name="ordinal-15">de</term>
281
- <term name="ordinal-16">de</term>
282
- <term name="ordinal-17">de</term>
283
- <term name="ordinal-18">de</term>
284
- <term name="ordinal-19">de</term>
285
- </terms>
286
- </locale>
287
- """
288
- When I ordinalize these numbers:
289
- | number |
290
- | 0 |
291
- | 1 |
292
- | 2 |
293
- | 3 |
294
- | 4 |
295
- | 5 |
296
- | 6 |
297
- | 7 |
298
- | 8 |
299
- | 9 |
300
- | 10 |
301
- | 11 |
302
- | 12 |
303
- | 13 |
304
- | 14 |
305
- | 15 |
306
- | 16 |
307
- | 17 |
308
- | 18 |
309
- | 19 |
310
- | 20 |
311
- | 21 |
312
- | 22 |
313
- | 23 |
314
- | 41 |
315
- | 52 |
316
- | 63 |
317
- | 74 |
318
- | 88 |
319
- | 99 |
320
- | 101 |
321
- | 102 |
322
- | 108 |
323
- | 111 |
324
- | 112 |
325
- | 113 |
326
- Then the ordinals should be:
327
- | ordinal |
328
- | 0de |
329
- | 1ste |
330
- | 2de |
331
- | 3de |
332
- | 4de |
333
- | 5de |
334
- | 6de |
335
- | 7de |
336
- | 8ste |
337
- | 9de |
338
- | 10de |
339
- | 11de |
340
- | 12de |
341
- | 13de |
342
- | 14de |
343
- | 15de |
344
- | 16de |
345
- | 17de |
346
- | 18de |
347
- | 19de |
348
- | 20ste |
349
- | 21ste |
350
- | 22ste |
351
- | 23ste |
352
- | 41ste |
353
- | 52ste |
354
- | 63ste |
355
- | 74ste |
356
- | 88ste |
357
- | 99ste |
358
- | 101ste |
359
- | 102de |
360
- | 108ste |
361
- | 111de |
362
- | 112de |
363
- | 113de |
364
-
365
- @v1.0.1 @locale @ordinals @i18n @lang-nl
366
- Scenario: Dutch CSL 1.0.1 locales (nulste form)
367
- Given the locale:
368
- """
369
- <?xml version="1.0" encoding="utf-8"?>
370
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="nl">
371
- <terms>
372
- <term name="ordinal">ste</term>
373
-
374
- <term name="ordinal-02" match="last-two-digits">de</term>
375
- <term name="ordinal-03" match="last-two-digits">de</term>
376
- <term name="ordinal-04" match="last-two-digits">de</term>
377
- <term name="ordinal-05" match="last-two-digits">de</term>
378
- <term name="ordinal-06" match="last-two-digits">de</term>
379
- <term name="ordinal-07" match="last-two-digits">de</term>
380
- <term name="ordinal-09" match="last-two-digits">de</term>
381
- <term name="ordinal-10">de</term>
382
- <term name="ordinal-11">de</term>
383
- <term name="ordinal-12">de</term>
384
- <term name="ordinal-13">de</term>
385
- <term name="ordinal-14">de</term>
386
- <term name="ordinal-15">de</term>
387
- <term name="ordinal-16">de</term>
388
- <term name="ordinal-17">de</term>
389
- <term name="ordinal-18">de</term>
390
- <term name="ordinal-19">de</term>
391
- </terms>
392
- </locale>
393
- """
394
- When I ordinalize these numbers:
395
- | number |
396
- | 0 |
397
- | 1 |
398
- | 2 |
399
- | 3 |
400
- | 4 |
401
- | 5 |
402
- | 6 |
403
- | 7 |
404
- | 8 |
405
- | 9 |
406
- | 10 |
407
- | 11 |
408
- | 12 |
409
- | 13 |
410
- | 14 |
411
- | 15 |
412
- | 16 |
413
- | 17 |
414
- | 18 |
415
- | 19 |
416
- | 20 |
417
- | 21 |
418
- | 22 |
419
- | 23 |
420
- | 41 |
421
- | 52 |
422
- | 63 |
423
- | 74 |
424
- | 88 |
425
- | 99 |
426
- | 101 |
427
- | 102 |
428
- | 108 |
429
- | 111 |
430
- | 112 |
431
- | 113 |
432
- | 142 |
433
- | 163 |
434
- | 1216 |
435
- | 919 |
436
- | 379 |
437
- | 420 |
438
- Then the ordinals should be:
439
- | ordinal |
440
- | 0ste |
441
- | 1ste |
442
- | 2de |
443
- | 3de |
444
- | 4de |
445
- | 5de |
446
- | 6de |
447
- | 7de |
448
- | 8ste |
449
- | 9de |
450
- | 10de |
451
- | 11de |
452
- | 12de |
453
- | 13de |
454
- | 14de |
455
- | 15de |
456
- | 16de |
457
- | 17de |
458
- | 18de |
459
- | 19de |
460
- | 20ste |
461
- | 21ste |
462
- | 22ste |
463
- | 23ste |
464
- | 41ste |
465
- | 52ste |
466
- | 63ste |
467
- | 74ste |
468
- | 88ste |
469
- | 99ste |
470
- | 101ste |
471
- | 102de |
472
- | 108ste |
473
- | 111de |
474
- | 112de |
475
- | 113de |
476
- | 142ste |
477
- | 163ste |
478
- | 1216de |
479
- | 919de |
480
- | 379ste |
481
- | 420ste |
482
-
483
- @v1.0.1 @locale @ordinals @i18n @gender @lang-es
484
- Scenario: Gendered Spanish CSL 1.0.1 locales
485
- Given the locale:
486
- """
487
- <?xml version="1.0" encoding="utf-8"?>
488
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="es">
489
- <terms>
490
- <term name="ordinal">.º</term>
491
- <term name="ordinal" gender-form="masculine">.º</term>
492
- <term name="ordinal" gender-form="feminine">.ª</term>
493
- </terms>
494
- </locale>
495
- """
496
- When I ordinalize these numbers:
497
- | num | form | gender | number |
498
- | 0 | | | |
499
- | 1 | | | |
500
- | 2 | | | |
501
- | 3 | | | |
502
- | 4 | | | |
503
- | 5 | | | |
504
- | 6 | | | |
505
- | 7 | | | |
506
- | 8 | | | |
507
- | 9 | | | |
508
- | 10 | | | |
509
- | 1 | | feminine | |
510
- | 1 | | masculine | |
511
- | 1 | | masculine | singular |
512
- | 1 | | masculine | plural |
513
- | 3 | | feminine | |
514
- | 3 | | masculine | |
515
- | 2 | | feminine | |
516
- | 23 | | | |
517
- | 999 | | | |
518
- | 11 | | | |
519
- | 11 | | feminine | |
520
- | 11 | | masculine | |
521
- | 21 | | | |
522
- | 101 | | | |
523
- | 1001 | | feminine | |
524
- | 301 | | | |
525
- | 21 | | masculine | singular |
526
- | 21 | | masculine | plural |
527
- | 1001 | | masculine | |
528
- Then the ordinals should be:
529
- | ordinal |
530
- | 0.º |
531
- | 1.º |
532
- | 2.º |
533
- | 3.º |
534
- | 4.º |
535
- | 5.º |
536
- | 6.º |
537
- | 7.º |
538
- | 8.º |
539
- | 9.º |
540
- | 10.º |
541
- | 1.ª |
542
- | 1.º |
543
- | 1.º |
544
- | 1.º |
545
- | 3.ª |
546
- | 3.º |
547
- | 2.ª |
548
- | 23.º |
549
- | 999.º |
550
- | 11.º |
551
- | 11.ª |
552
- | 11.º |
553
- | 21.º |
554
- | 101.º |
555
- | 1001.ª |
556
- | 301.º |
557
- | 21.º |
558
- | 21.º |
559
- | 1001.º |
560
-
561
-
562
- @v1.0.1 @locale @ordinals @i18n @gender @lang-it
563
- Scenario: Gendered Italian CSL 1.0.1 locales
564
- Given the locale:
565
- """
566
- <?xml version="1.0" encoding="utf-8"?>
567
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="it">
568
- <terms>
569
- <term name="ordinal">º</term>
570
- <term name="ordinal" gender-form="masculine">º</term>
571
- <term name="ordinal" gender-form="feminine">ª</term>
572
- </terms>
573
- </locale>
574
- """
575
- When I ordinalize these numbers:
576
- | num | form | gender | number |
577
- | 0 | | | |
578
- | 1 | | | |
579
- | 2 | | | |
580
- | 3 | | | |
581
- | 4 | | | |
582
- | 5 | | | |
583
- | 6 | | | |
584
- | 7 | | | |
585
- | 8 | | | |
586
- | 9 | | | |
587
- | 10 | | | |
588
- | 1 | | feminine | |
589
- | 1 | | masculine | |
590
- | 1 | | masculine | singular |
591
- | 1 | | masculine | plural |
592
- | 3 | | feminine | |
593
- | 3 | | masculine | |
594
- | 2 | | feminine | |
595
- | 23 | | | |
596
- | 999 | | | |
597
- | 11 | | | |
598
- | 11 | | feminine | |
599
- | 11 | | masculine | |
600
- | 21 | | | |
601
- | 101 | | | |
602
- | 1001 | | feminine | |
603
- | 301 | | | |
604
- | 21 | | masculine | singular |
605
- | 21 | | masculine | plural |
606
- | 1001 | | masculine | |
607
- Then the ordinals should be:
608
- | ordinal |
609
- | 0º |
610
- | 1º |
611
- | 2º |
612
- | 3º |
613
- | 4º |
614
- | 5º |
615
- | 6º |
616
- | 7º |
617
- | 8º |
618
- | 9º |
619
- | 10º |
620
- | 1ª |
621
- | 1º |
622
- | 1º |
623
- | 1º |
624
- | 3ª |
625
- | 3º |
626
- | 2ª |
627
- | 23º |
628
- | 999º |
629
- | 11º |
630
- | 11ª |
631
- | 11º |
632
- | 21º |
633
- | 101º |
634
- | 1001ª |
635
- | 301º |
636
- | 21º |
637
- | 21º |
638
- | 1001º |
639
-
640
- @v1.0.1 @locale @ordinals @i18n @gender @lang-se
641
- Scenario: Gendered Swedish CSL 1.0.1 locales
642
- Given the locale:
643
- """
644
- <?xml version="1.0" encoding="utf-8"?>
645
- <locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="se">
646
- <terms>
647
- <term name="ordinal">:e</term>
648
- <term name="ordinal-01">:a</term>
649
- <term name="ordinal-02">:a</term>
650
- <term name="ordinal-11">:e</term>
651
- <term name="ordinal-12">:e</term>
652
-
653
- <term name="long-ordinal-01">första</term>
654
- <term name="long-ordinal-01" gender-form="masculine">förste</term>
655
- <term name="long-ordinal-02">andra</term>
656
- <term name="long-ordinal-02" gender-form="masculine">andre</term>
657
- </terms>
658
- </locale>
659
- """
660
- When I ordinalize these numbers:
661
- | num | form | gender | number |
662
- | 1 | | | |
663
- | 2 | | | |
664
- | 3 | | | |
665
- | 4 | | | |
666
- | 5 | | | |
667
- | 6 | | | |
668
- | 7 | | | |
669
- | 8 | | | |
670
- | 9 | | | |
671
- | 10 | | | |
672
- | 11 | | | |
673
- | 12 | | | |
674
- | 13 | | | |
675
- | 21 | | | |
676
- | 22 | | | |
677
- | 101 | | | |
678
- | 102 | | | |
679
- | 111 | | | |
680
- | 112 | | | |
681
- | 131 | | | |
682
- | 132 | | | |
683
- | 1 | long | | |
684
- | 2 | long | | |
685
- | 1 | long | masculine | |
686
- | 2 | long | masculine | |
687
- Then the ordinals should be:
688
- | ordinal |
689
- | 1:a |
690
- | 2:a |
691
- | 3:e |
692
- | 4:e |
693
- | 5:e |
694
- | 6:e |
695
- | 7:e |
696
- | 8:e |
697
- | 9:e |
698
- | 10:e |
699
- | 11:e |
700
- | 12:e |
701
- | 13:e |
702
- | 21:a |
703
- | 22:a |
704
- | 101:a |
705
- | 102:a |
706
- | 111:e |
707
- | 112:e |
708
- | 131:a |
709
- | 132:a |
710
- | första |
711
- | andra |
712
- | förste |
713
- | andre |