csl 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/csl.gemspec +1 -1
- data/features/locales/ordinalize.feature +78 -3
- data/lib/csl/locale.rb +4 -0
- data/lib/csl/node.rb +1 -1
- data/lib/csl/treelike.rb +1 -1
- data/lib/csl/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e9a04436494ad7b0835b2ad4047f4c0619e2ed9
|
4
|
+
data.tar.gz: e45ef6316ed80e5df5e384172a79ba312c12cb1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0c793a99ea9fcb56bb0a13d07a3e20fe9a754dd986f4a052a91fc5f0c0886d0b8f9f958882a9dc50f9ee2e5053005070f96476fba228951ec409487a8a1f279
|
7
|
+
data.tar.gz: 6aceddaa4130fd9d8031c4c295eb1c19dd44f362bad9abe5a2b5459e35d20db98933a34f0fd24eaed1dd872edf8850305beb42d4f1d80ee349a8066fb703efe5
|
data/csl.gemspec
CHANGED
@@ -130,7 +130,7 @@ Feature: Converting numbers to ordinals using CSL locales
|
|
130
130
|
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="de">
|
131
131
|
<terms>
|
132
132
|
<term name="ordinal">.</term>
|
133
|
-
|
133
|
+
|
134
134
|
<term name="long-ordinal-01">erstes</term>
|
135
135
|
<term name="long-ordinal-01" gender-form="feminine">
|
136
136
|
<single>erste</single>
|
@@ -262,9 +262,9 @@ Feature: Converting numbers to ordinals using CSL locales
|
|
262
262
|
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0.1" xml:lang="nl">
|
263
263
|
<terms>
|
264
264
|
<term name="ordinal">ste</term>
|
265
|
-
|
265
|
+
|
266
266
|
<term name="ordinal-00" match="whole-number">de</term>
|
267
|
-
|
267
|
+
|
268
268
|
<term name="ordinal-02" match="last-two-digits">de</term>
|
269
269
|
<term name="ordinal-03" match="last-two-digits">de</term>
|
270
270
|
<term name="ordinal-04" match="last-two-digits">de</term>
|
@@ -636,3 +636,78 @@ Feature: Converting numbers to ordinals using CSL locales
|
|
636
636
|
| 21º |
|
637
637
|
| 21º |
|
638
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 |
|
data/lib/csl/locale.rb
CHANGED
data/lib/csl/node.rb
CHANGED
@@ -538,7 +538,7 @@ module CSL
|
|
538
538
|
def match_conditions_for(name, conditions)
|
539
539
|
case name
|
540
540
|
when Node
|
541
|
-
|
541
|
+
conditions, name = name.attributes.to_hash, name.nodename
|
542
542
|
when Hash
|
543
543
|
conditions, name = name, nodename
|
544
544
|
when Symbol
|
data/lib/csl/treelike.rb
CHANGED
data/lib/csl/version.rb
CHANGED
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.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|
@@ -121,7 +121,7 @@ files:
|
|
121
121
|
- vendor/schema/csl.rng
|
122
122
|
homepage: https://github.com/inukshuk/csl-ruby
|
123
123
|
licenses:
|
124
|
-
- AGPL
|
124
|
+
- AGPL-3.0
|
125
125
|
metadata: {}
|
126
126
|
post_install_message:
|
127
127
|
rdoc_options: []
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.5.1
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: A Ruby CSL parser and library
|