ordinalize_full 1.1.2 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 138ec310cbec58d37cb50d1603d2d2391055c4b0
4
- data.tar.gz: f507d03109c909f583aa6358a4ba664702f11b8b
3
+ metadata.gz: 9c4ec1c859df34e7e1fc4406dc770305b8edacbe
4
+ data.tar.gz: 4489967b56b7b24185081858c528ec1b1d273790
5
5
  SHA512:
6
- metadata.gz: 67ad92dfc2fadea518276f68d86f3de40d04a9b253278220e62ffdc2cdc510a989676ac3742056aef4b54daecbc498ad6f23c7b5d7a5c626be53e1def1a2bd68
7
- data.tar.gz: 5bc4602e12c86b5e572bfddcf49a775c8661e8122469accf1ccc05665b1699005cafe8bc64da90e1edf290f6b0b8fca4f1afb3cde57e8b9cccb3329e41d03e70
6
+ metadata.gz: 28177340ea0e2048af4b6c13b3653e19266331ff1b3a349df2ea05befacbaf9da034e2d075f9d008be9512e3a37f82fa5e77d8e3c6088da13c60998b7dc44123
7
+ data.tar.gz: 4fda783b4bcd3e7440c64883e2dfef93056a9dd05bdd31f5ee36c190ddcf9cc4ec2d0f861ab2ca4857d69a7f77abb94aa24a9c24cea5bd1640fc6daa3e00020e
data/README.md CHANGED
@@ -40,5 +40,5 @@ MyIntegerLikeClass.new.ordinalize_in_full #=> "forty second"
40
40
  ## Limitations
41
41
 
42
42
  - only works up to 100 (for now)
43
- - locales only available in English and French (pull requests welcome!)
43
+ - locales only available in English, French and Italian (pull requests welcome!)
44
44
 
@@ -35,6 +35,8 @@ private
35
35
  end
36
36
  when :fr
37
37
  self == 1 ? "er" : "ème"
38
+ when :it
39
+ "°"
38
40
  else
39
41
  raise NotImplementedError, "Unknown locale #{I18n.locale}"
40
42
  end
@@ -0,0 +1,102 @@
1
+ it:
2
+ ordinalize_full:
3
+ n_1: primo
4
+ n_2: secondo
5
+ n_3: terzo
6
+ n_4: quarto
7
+ n_5: quinto
8
+ n_6: sesto
9
+ n_7: settimo
10
+ n_8: ottavo
11
+ n_9: nono
12
+ n_10: decimo
13
+ n_11: undicesimo
14
+ n_12: dodicesimo
15
+ n_13: tredicesimo
16
+ n_14: quattordicesimo
17
+ n_15: quindicesimo
18
+ n_16: sedicesimo
19
+ n_17: diciassettesimo
20
+ n_18: diciottesimo
21
+ n_19: diciannovesimo
22
+ n_20: ventesimo
23
+ n_21: ventunesimo
24
+ n_22: ventiduesima
25
+ n_23: ventitreesima
26
+ n_24: ventiquattresimo
27
+ n_25: venticinque
28
+ n_26: ventiseisima
29
+ n_27: ventisettesimo
30
+ n_28: ventiottesimo
31
+ n_29: ventinovesimo
32
+ n_30: trentesimo
33
+ n_31: trentunesimo
34
+ n_32: trentiduesima
35
+ n_33: trentitreesime
36
+ n_34: trentiquattresimo
37
+ n_35: trenticinquesima
38
+ n_36: trentiseisime
39
+ n_37: trentisettesime
40
+ n_38: trentiottesima
41
+ n_39: trentinovesima
42
+ n_40: quarantesimo
43
+ n_41: quarantunesima
44
+ n_42: quarantiduesime
45
+ n_43: quarantitreesimo
46
+ n_44: quarantiquattresimo
47
+ n_45: quaranticinquesima
48
+ n_46: quarantiseisime
49
+ n_47: quarantisettesima
50
+ n_48: quarantiottesimo
51
+ n_49: quarantinovesima
52
+ n_50: cinquantesimo
53
+ n_51: cinquantunesima
54
+ n_52: cinquantiduesimo
55
+ n_53: cinquantitreesime
56
+ n_54: cinquantiquattresimo
57
+ n_55: cinquanticinquesima
58
+ n_56: cinquantiseisimo
59
+ n_57: cinquantisettesime
60
+ n_58: cinquantiottesime
61
+ n_59: cinquantinovesima
62
+ n_60: sessantesimo
63
+ n_61: sessantunesimo
64
+ n_62: sessantiduesima
65
+ n_63: sessantitreesima
66
+ n_64: sessantiquattresime
67
+ n_65: sessanticinquesime
68
+ n_66: sessantiseisimo
69
+ n_67: sessantisettesima
70
+ n_68: sessantiottesimo
71
+ n_69: sessantinovesime
72
+ n_70: settantesimo
73
+ n_71: settantunesime
74
+ n_72: settantiduesime
75
+ n_73: settantitreesime
76
+ n_74: settantiquattresima
77
+ n_75: settanticinquesime
78
+ n_76: settantiseisimo
79
+ n_77: settantisettesima
80
+ n_78: settantiottesime
81
+ n_79: settantinovesime
82
+ n_80: ottantesimo
83
+ n_81: ottantunesime
84
+ n_82: ottantiduesimo
85
+ n_83: ottantitreesima
86
+ n_84: ottantiquattresimo
87
+ n_85: ottanticinquesime
88
+ n_86: ottantiseisima
89
+ n_87: ottantisettesime
90
+ n_88: ottantiottesimo
91
+ n_89: ottantinovesimo
92
+ n_90: novantesimo
93
+ n_91: novantunesimo
94
+ n_92: novantiduesimo
95
+ n_93: novantitreesima
96
+ n_94: novantiquattresime
97
+ n_95: novanticinquesima
98
+ n_96: novantiseisima
99
+ n_97: novantisettesimo
100
+ n_98: novantiottesimo
101
+ n_99: novantinovesime
102
+ n_100: centesimo
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "ordinalize_full"
7
- spec.version = "1.1.2"
7
+ spec.version = "1.2.0"
8
8
  spec.authors = ["Cédric Félizard"]
9
9
  spec.email = ["cedric@felizard.fr"]
10
10
  spec.summary = %q{Turns a number into an ordinal string such as first, second, third or 1st, 2nd, 3rd.}
@@ -41,6 +41,13 @@ describe OrdinalizeFull do
41
41
  specify { expect(1.ordinalize(in_full: false)).to eq("1er") }
42
42
  end
43
43
 
44
+ context "with locale = :it" do
45
+ before { I18n.locale = :it }
46
+
47
+ specify { expect(1.ordinalize(in_full: true)).to eq("primo") }
48
+ specify { expect(1.ordinalize(in_full: false)).to eq("1°") }
49
+ end
50
+
44
51
  it "raises for unknown locales" do
45
52
  I18n.locale = :zz
46
53
  expect { 1.ordinalize(in_full: false) }.to raise_error(NotImplementedError)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ordinalize_full
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cédric Félizard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-20 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -84,6 +84,7 @@ files:
84
84
  - lib/ordinalize_full/integer.rb
85
85
  - lib/ordinalize_full/locales/en.yml
86
86
  - lib/ordinalize_full/locales/fr.yml
87
+ - lib/ordinalize_full/locales/it.yml
87
88
  - ordinalize_full.gemspec
88
89
  - spec/ordinalize_full_spec.rb
89
90
  homepage: https://github.com/infertux/ordinalize_full