csl 1.4.5 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -30
  3. data/Rakefile +1 -1
  4. data/csl.gemspec +10 -13
  5. data/lib/csl/locale/term.rb +1 -1
  6. data/lib/csl/version.rb +1 -1
  7. metadata +11 -88
  8. data/.rspec +0 -3
  9. data/.simplecov +0 -4
  10. data/Guardfile +0 -15
  11. data/features/locales/loading.feature +0 -57
  12. data/features/locales/ordinalize.feature +0 -713
  13. data/features/parser/choose.feature +0 -16
  14. data/features/parser/info.feature +0 -27
  15. data/features/parser/localized_dates.feature +0 -35
  16. data/features/parser/terms.feature +0 -28
  17. data/features/step_definitions/locale_steps.rb +0 -36
  18. data/features/step_definitions/parser_steps.rb +0 -40
  19. data/features/step_definitions/style_steps.rb +0 -16
  20. data/features/style/loading.feature +0 -53
  21. data/features/support/env.rb +0 -24
  22. data/spec/csl/info_spec.rb +0 -278
  23. data/spec/csl/locale/date_spec.rb +0 -63
  24. data/spec/csl/locale/style_options_spec.rb +0 -19
  25. data/spec/csl/locale/term_spec.rb +0 -255
  26. data/spec/csl/locale_spec.rb +0 -245
  27. data/spec/csl/node_spec.rb +0 -273
  28. data/spec/csl/parser_spec.rb +0 -112
  29. data/spec/csl/schema_spec.rb +0 -112
  30. data/spec/csl/style/bibliography_spec.rb +0 -7
  31. data/spec/csl/style/choose_spec.rb +0 -66
  32. data/spec/csl/style/citation_spec.rb +0 -7
  33. data/spec/csl/style/date_spec.rb +0 -21
  34. data/spec/csl/style/group_spec.rb +0 -7
  35. data/spec/csl/style/label_spec.rb +0 -44
  36. data/spec/csl/style/layout_spec.rb +0 -7
  37. data/spec/csl/style/macro_spec.rb +0 -7
  38. data/spec/csl/style/names_spec.rb +0 -36
  39. data/spec/csl/style/number_spec.rb +0 -85
  40. data/spec/csl/style/sort_spec.rb +0 -11
  41. data/spec/csl/style/text_spec.rb +0 -7
  42. data/spec/csl/style_spec.rb +0 -137
  43. data/spec/csl/treelike_spec.rb +0 -151
  44. data/spec/fixtures/locales/locales-de-DE.xml +0 -298
  45. data/spec/fixtures/locales/locales-en-GB.xml +0 -304
  46. data/spec/fixtures/locales/locales-en-US.xml +0 -304
  47. data/spec/fixtures/styles/apa.csl +0 -443
  48. data/spec/spec_helper.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0713aebef8b4b19124d4c66d1e676fcad67f00f6
4
- data.tar.gz: cdf39965329842bca3883f1990f5e274af212576
3
+ metadata.gz: 3891b313aec0cbbfec56bbcecd6fd874097197ce
4
+ data.tar.gz: a39948e8a466db44d15805ba18c0213582b49725
5
5
  SHA512:
6
- metadata.gz: dec7d5d77b9b9e480cf8bb7adcc626054a8702cfb4733a1fb084dd00f09e5acaf141b71da301f21021bf5c0667afc6479f101a39b7a7bd3c8dcff7f9f138f7e9
7
- data.tar.gz: e59701c6f0016b4610429df1a4c17edc201dad11efd416c92134e6f22a23abd55d62a58cd5fd25b9987644f93012b331229562dbf0e0968532f206d7577b6e25
6
+ metadata.gz: d0f086551f952a7e7b06c1cbd0979d9316812a96a01cee97e142859bb2cf60b1f1980ab0f69e477b9f6bc0bb315b1aaaf80d160b2666bf64894f8b196f0c6e8c
7
+ data.tar.gz: ca47300596bec6740d303d856e07e68b6742e724e6bde74b27a7183d0a8240fe14f711b68eae74c13b25010f13ed33510ba15ccea3c8f7a5ebc96d03e6bc1955
data/Gemfile CHANGED
@@ -2,50 +2,30 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  group :development, :test do
5
- gem 'rake', '~>10.0'
6
- gem 'rspec', '~>3.0'
7
- gem 'cucumber', '~>1.2'
5
+ gem 'rake'
6
+ gem 'rspec'
7
+ gem 'cucumber'
8
8
  end
9
9
 
10
10
  group :debug do
11
- if RUBY_VERSION >= '2.0'
12
- gem 'byebug', :require => false, :platforms => :mri
13
- else
14
- gem 'debugger', :require => false, :platforms => :mri
15
- end
16
-
17
- gem 'ruby-debug', :require => false, :platforms => :jruby
18
-
19
- gem 'rubinius-debugger', :require => false, :platforms => :rbx
20
- gem 'rubinius-compiler', :require => false, :platforms => :rbx
11
+ gem 'byebug', require: false, platforms: :mri
12
+ gem 'ruby-debug', require: false, platforms: :jruby
21
13
  end
22
14
 
23
15
  group :optional do
24
- gem 'nokogiri', '~> 1.6'
16
+ gem 'nokogiri'
25
17
  end
26
18
 
27
19
  group :extra do
28
- gem 'guard', '~>2.2'
29
- gem 'guard-rspec'
30
- gem 'guard-cucumber'
31
- gem 'bond'
32
20
  gem 'diff-lcs'
33
21
  gem 'pry'
34
- gem 'rb-fsevent', '~>0.9', :platforms => :ruby
35
- gem 'yard', '~>0.8', :platforms => :mri
36
- gem 'redcarpet', '~>3.0', :platforms => :mri
22
+ gem 'yard', platforms: :mri
23
+ gem 'redcarpet', platforms: :mri
37
24
  end
38
25
 
39
26
  group :coverage do
40
- gem 'coveralls', :require => false
41
- gem 'simplecov', '~>0.8', :require => false
42
- gem 'rubinius-coverage', :platform => :rbx
43
- end
44
-
45
- group :rbx do
46
- gem 'rubysl', '~>2.0', :platforms => :rbx
47
- gem 'racc', :platforms => :rbx
48
- gem 'json', '~>1.8', :platforms => :rbx
27
+ gem 'coveralls', require: false if ENV['CI']
28
+ gem 'simplecov', require: false
49
29
  end
50
30
 
51
31
  # vim: syntax=ruby
data/Rakefile CHANGED
@@ -40,7 +40,7 @@ begin
40
40
  task :test_with_coveralls => [:spec, :cucumber, 'coveralls:push']
41
41
  rescue LoadError => e
42
42
  # ignore
43
- end
43
+ end if ENV['CI']
44
44
 
45
45
  task :release do |t|
46
46
  system "gem build csl.gemspec"
@@ -8,7 +8,9 @@ EXCLUDES = %w{
8
8
  .coveralls.yml
9
9
  .travis.yml
10
10
  .csl.gemspec
11
- }
11
+ .simplecov
12
+ .rspec
13
+ } | `git ls-files -- {spec,features}/*`.split("\n")
12
14
 
13
15
  Gem::Specification.new do |s|
14
16
  s.name = 'csl'
@@ -17,27 +19,22 @@ Gem::Specification.new do |s|
17
19
  s.authors = ['Sylvester Keil']
18
20
  s.email = ['http://sylvester.keil.or.at']
19
21
  s.homepage = 'https://github.com/inukshuk/csl-ruby'
22
+ s.license = 'AGPL-3.0'
23
+ s.date = Time.now.strftime('%Y-%m-%d')
20
24
  s.summary = 'A Ruby CSL parser and library'
21
- s.description =
22
- """
25
+ s.description = <<~EOS
23
26
  A Ruby parser and full API for the Citation Style Language (CSL),
24
27
  an open XML-based language to describe the formatting of citations
25
28
  and bibliographies.
26
- """
27
-
28
- s.license = 'AGPL-3.0'
29
- s.date = Time.now.strftime('%Y-%m-%d')
29
+ EOS
30
30
 
31
- s.required_ruby_version = '>= 1.9.3'
32
31
 
33
- s.add_dependency('namae', ['~>0.7'])
32
+ s.required_ruby_version = '>= 2.2'
33
+ s.add_dependency('namae', ['~>1.0'])
34
34
 
35
35
  s.files = `git ls-files`.split("\n") - EXCLUDES
36
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
37
- s.executables = []
38
36
  s.require_path = 'lib'
39
-
40
- s.has_rdoc = 'yard'
37
+ s.has_rdoc = 'yard'
41
38
  end
42
39
 
43
40
  # vim: syntax=ruby
@@ -441,7 +441,7 @@ module CSL
441
441
  when options.key?(:number) || options.key?('number')
442
442
  key = options[:number] || options['number']
443
443
 
444
- if key.is_a?(Fixnum) || key.to_s =~ /^[+-]?\d+$/
444
+ if key.is_a?(Integer) || key.to_s =~ /^[+-]?\d+$/
445
445
  key.to_i > 1
446
446
  else
447
447
  !key.blank? && key.to_s =~ /^plural/i
@@ -1,3 +1,3 @@
1
1
  module CSL
2
- VERSION = '1.4.5'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-05 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae
@@ -16,16 +16,18 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.7'
27
- description: "\n\t\tA Ruby parser and full API for the Citation Style Language (CSL),\n\t\tan
28
- open XML-based language to describe the formatting of citations\n\t\tand bibliographies.\n\t\t"
26
+ version: '1.0'
27
+ description: |
28
+ A Ruby parser and full API for the Citation Style Language (CSL),
29
+ an open XML-based language to describe the formatting of citations
30
+ and bibliographies.
29
31
  email:
30
32
  - http://sylvester.keil.or.at
31
33
  executables: []
@@ -34,28 +36,14 @@ extra_rdoc_files: []
34
36
  files:
35
37
  - ".document"
36
38
  - ".gitignore"
37
- - ".rspec"
38
- - ".simplecov"
39
39
  - ".yardopts"
40
40
  - AGPL
41
41
  - BSDL
42
42
  - Gemfile
43
- - Guardfile
44
43
  - README.md
45
44
  - Rakefile
46
45
  - csl.gemspec
47
46
  - cucumber.yml
48
- - features/locales/loading.feature
49
- - features/locales/ordinalize.feature
50
- - features/parser/choose.feature
51
- - features/parser/info.feature
52
- - features/parser/localized_dates.feature
53
- - features/parser/terms.feature
54
- - features/step_definitions/locale_steps.rb
55
- - features/step_definitions/parser_steps.rb
56
- - features/step_definitions/style_steps.rb
57
- - features/style/loading.feature
58
- - features/support/env.rb
59
47
  - lib/csl.rb
60
48
  - lib/csl/compatibility.rb
61
49
  - lib/csl/date_part.rb
@@ -87,33 +75,6 @@ files:
87
75
  - lib/csl/style/text.rb
88
76
  - lib/csl/treelike.rb
89
77
  - lib/csl/version.rb
90
- - spec/csl/info_spec.rb
91
- - spec/csl/locale/date_spec.rb
92
- - spec/csl/locale/style_options_spec.rb
93
- - spec/csl/locale/term_spec.rb
94
- - spec/csl/locale_spec.rb
95
- - spec/csl/node_spec.rb
96
- - spec/csl/parser_spec.rb
97
- - spec/csl/schema_spec.rb
98
- - spec/csl/style/bibliography_spec.rb
99
- - spec/csl/style/choose_spec.rb
100
- - spec/csl/style/citation_spec.rb
101
- - spec/csl/style/date_spec.rb
102
- - spec/csl/style/group_spec.rb
103
- - spec/csl/style/label_spec.rb
104
- - spec/csl/style/layout_spec.rb
105
- - spec/csl/style/macro_spec.rb
106
- - spec/csl/style/names_spec.rb
107
- - spec/csl/style/number_spec.rb
108
- - spec/csl/style/sort_spec.rb
109
- - spec/csl/style/text_spec.rb
110
- - spec/csl/style_spec.rb
111
- - spec/csl/treelike_spec.rb
112
- - spec/fixtures/locales/locales-de-DE.xml
113
- - spec/fixtures/locales/locales-en-GB.xml
114
- - spec/fixtures/locales/locales-en-US.xml
115
- - spec/fixtures/styles/apa.csl
116
- - spec/spec_helper.rb
117
78
  - vendor/schema/csl-categories.rng
118
79
  - vendor/schema/csl-terms.rng
119
80
  - vendor/schema/csl-types.rng
@@ -131,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
92
  requirements:
132
93
  - - ">="
133
94
  - !ruby/object:Gem::Version
134
- version: 1.9.3
95
+ version: '2.2'
135
96
  required_rubygems_version: !ruby/object:Gem::Requirement
136
97
  requirements:
137
98
  - - ">="
@@ -139,46 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
100
  version: '0'
140
101
  requirements: []
141
102
  rubyforge_project:
142
- rubygems_version: 2.6.3
103
+ rubygems_version: 2.6.13
143
104
  signing_key:
144
105
  specification_version: 4
145
106
  summary: A Ruby CSL parser and library
146
- test_files:
147
- - features/locales/loading.feature
148
- - features/locales/ordinalize.feature
149
- - features/parser/choose.feature
150
- - features/parser/info.feature
151
- - features/parser/localized_dates.feature
152
- - features/parser/terms.feature
153
- - features/step_definitions/locale_steps.rb
154
- - features/step_definitions/parser_steps.rb
155
- - features/step_definitions/style_steps.rb
156
- - features/style/loading.feature
157
- - features/support/env.rb
158
- - spec/csl/info_spec.rb
159
- - spec/csl/locale/date_spec.rb
160
- - spec/csl/locale/style_options_spec.rb
161
- - spec/csl/locale/term_spec.rb
162
- - spec/csl/locale_spec.rb
163
- - spec/csl/node_spec.rb
164
- - spec/csl/parser_spec.rb
165
- - spec/csl/schema_spec.rb
166
- - spec/csl/style/bibliography_spec.rb
167
- - spec/csl/style/choose_spec.rb
168
- - spec/csl/style/citation_spec.rb
169
- - spec/csl/style/date_spec.rb
170
- - spec/csl/style/group_spec.rb
171
- - spec/csl/style/label_spec.rb
172
- - spec/csl/style/layout_spec.rb
173
- - spec/csl/style/macro_spec.rb
174
- - spec/csl/style/names_spec.rb
175
- - spec/csl/style/number_spec.rb
176
- - spec/csl/style/sort_spec.rb
177
- - spec/csl/style/text_spec.rb
178
- - spec/csl/style_spec.rb
179
- - spec/csl/treelike_spec.rb
180
- - spec/fixtures/locales/locales-de-DE.xml
181
- - spec/fixtures/locales/locales-en-GB.xml
182
- - spec/fixtures/locales/locales-en-US.xml
183
- - spec/fixtures/styles/apa.csl
184
- - spec/spec_helper.rb
107
+ test_files: []
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 |