numbers_and_words 0.11.10 → 0.11.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +264 -0
- data/README.rdoc +5 -5
- data/lib/numbers_and_words/helper_classes/array_extensions/helpers.rb +4 -0
- data/lib/numbers_and_words/i18n/locales/numbers.nl.yml +3 -1
- data/lib/numbers_and_words/i18n/pluralization.rb +0 -1
- data/lib/numbers_and_words/i18n/plurals/plurals.rb +8 -10
- data/lib/numbers_and_words/strategies/figures_converter/languages/base.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/de.rb +2 -2
- data/lib/numbers_and_words/strategies/figures_converter/languages/es.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/fr.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/hu.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/ka.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/lt.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/nl.rb +29 -3
- data/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/tr.rb +1 -1
- data/lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb +3 -3
- data/lib/numbers_and_words/strategies/figures_converter/options/nl/tens_of_hundreds.rb +30 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/nl.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/options.rb +1 -0
- data/lib/numbers_and_words/translations/nl.rb +9 -1
- data/lib/numbers_and_words/version.rb +1 -1
- data/lib/numbers_and_words/wrappers/integer.rb +1 -1
- metadata +8 -5
- data/lib/numbers_and_words/i18n/plurals/fr.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0cae184fece1fb7a27a25a61b57d0055ab90119374f7837755df26c8683eaf8
|
4
|
+
data.tar.gz: 913165cd689041cf5ffc006549951bdac7886e9119eab763a920080138e51e7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d85520a2eb111cf5b872974d226fccea4403451f429e85b19c803e62339925c9a75a5e13a87b88243318a26818854cbbce4e974c02ad603be8e2369c26a7941
|
7
|
+
data.tar.gz: 40bb39e40013a3209f9c64b69938e4b56cdfb5a94a2cc270b5e7b143b320efa724111e5a9ebd59e73989cd509115b87b42ee705b8b4b439e35a061fdcf5df803
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,264 @@
|
|
1
|
+
## 0.11.13 (Next)
|
2
|
+
|
3
|
+
### Features
|
4
|
+
* Your contribution here.
|
5
|
+
|
6
|
+
## 0.11.12 (April 22, 2023)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
* Add support for Ruby 3.1. \[[#187](https://github.com/kslazarev/numbers_and_words/pull/187)\]
|
10
|
+
* Drop support for Ruby 2.5. \[[#180](https://github.com/kslazarev/numbers_and_words/pull/180)\]
|
11
|
+
* Drop support for Ruby 2.6. \[[#190](https://github.com/kslazarev/numbers_and_words/pull/190)\]
|
12
|
+
* Add support for Ruby 3.2. \[[#193](https://github.com/kslazarev/numbers_and_words/pull/193)\]
|
13
|
+
|
14
|
+
### Bugs
|
15
|
+
* Properly handle Dutch year numbers. \[[#183](https://github.com/kslazarev/numbers_and_words/pull/183)\] \([@mvz](https://github.com/mvz)\)
|
16
|
+
* Remove pluralization rules for French. \[[#195](https://github.com/kslazarev/numbers_and_words/pull/195)\]
|
17
|
+
|
18
|
+
## 0.11.11 (July 5, 2021)
|
19
|
+
|
20
|
+
### Bugs
|
21
|
+
* Fix edge cases in Dutch. \[[#182](https://github.com/kslazarev/numbers_and_words/pull/182)\] \([@mvz](https://github.com/mvz)\)
|
22
|
+
|
23
|
+
## 0.11.10 (January 5, 2021)
|
24
|
+
|
25
|
+
### Bugs
|
26
|
+
* Avoid adding all array extensions to the standard Array class. \[[#179](https://github.com/kslazarev/numbers_and_words/pull/179)\]
|
27
|
+
|
28
|
+
## 0.11.9 (January 4, 2021)
|
29
|
+
|
30
|
+
### Features
|
31
|
+
* Add support for Ruby 3.0. \[[#178](https://github.com/kslazarev/numbers_and_words/pull/178)\]
|
32
|
+
|
33
|
+
## 0.11.8 (June 6, 2020)
|
34
|
+
|
35
|
+
### Features
|
36
|
+
* Add support for Kazakh language. \[[#175](https://github.com/kslazarev/numbers_and_words/pull/175)\] \([@j8sus](https://github.com/j8sus)\)
|
37
|
+
|
38
|
+
## 0.11.7 (June 1, 2020)
|
39
|
+
|
40
|
+
### Features
|
41
|
+
* Add support for Ruby 2.7. \[[#172](https://github.com/kslazarev/numbers_and_words/pull/172)\]
|
42
|
+
* Drop support for Ruby 2.4.
|
43
|
+
|
44
|
+
## 0.11.6 (April 14, 2019)
|
45
|
+
|
46
|
+
### Bugs
|
47
|
+
* Fix wrong spelling in Spanish with precision. \[[#165](https://github.com/kslazarev/numbers_and_words/pull/165)\]
|
48
|
+
|
49
|
+
### Features
|
50
|
+
* Add support for Ruby 2.6. \[[#161](https://github.com/kslazarev/numbers_and_words/pull/161)\]
|
51
|
+
* Drop support for Ruby 2.2.
|
52
|
+
* Drop support for Ruby 2.3.
|
53
|
+
|
54
|
+
## 0.11.5 (March 22, 2018)
|
55
|
+
|
56
|
+
### Bugs
|
57
|
+
* Fix Armenian megs capacity words. \[[#156](https://github.com/kslazarev/numbers_and_words/pull/156)\]
|
58
|
+
|
59
|
+
## 0.11.4 (March 20, 2018)
|
60
|
+
|
61
|
+
### Features
|
62
|
+
* Add support for Armenian language. \[[#155](https://github.com/kslazarev/numbers_and_words/pull/155)\]
|
63
|
+
* Improve CI.
|
64
|
+
* Improve code readability.
|
65
|
+
|
66
|
+
## 0.11.3 (December 3, 2017)
|
67
|
+
|
68
|
+
### Features
|
69
|
+
* Add support for Vietnamese language. \[[#152](https://github.com/kslazarev/numbers_and_words/pull/152)\]
|
70
|
+
|
71
|
+
## 0.11.2 (August 14, 2017)
|
72
|
+
|
73
|
+
### Features
|
74
|
+
* Add full support for Czech language. \[[#148](https://github.com/kslazarev/numbers_and_words/pull/148)\]
|
75
|
+
|
76
|
+
## 0.11.1 (July 23, 2017)
|
77
|
+
|
78
|
+
### Features
|
79
|
+
* Add support for Spanish floating-point numbers. \[[#146](https://github.com/kslazarev/numbers_and_words/pull/146)\]
|
80
|
+
* Add support for French floating-point numbers. \[[#144](https://github.com/kslazarev/numbers_and_words/pull/144)\]
|
81
|
+
|
82
|
+
## 0.11.0 (June 26, 2017)
|
83
|
+
|
84
|
+
### Features
|
85
|
+
* Remove dependency on `ActiveSupport` gem. \[[#141](https://github.com/kslazarev/numbers_and_words/pull/141)\]
|
86
|
+
|
87
|
+
## 0.10.6 (June 11, 2017)
|
88
|
+
|
89
|
+
### Features
|
90
|
+
* Add full support for Brazilian Portuguese. \[[#139](https://github.com/kslazarev/numbers_and_words/pull/139)\]
|
91
|
+
* Add option `precision` to `to_words`. \[[#134](https://github.com/kslazarev/numbers_and_words/issues/134)\] \([@neodelf](https://github.com/neodelf)\) \(assignee: [@neodelf](https://github.com/neodelf)\)
|
92
|
+
|
93
|
+
### Bugs
|
94
|
+
* Fix README typo for 231 in French. \(assignee: [@poilon](https://github.com/poilon)\)
|
95
|
+
* Fix big numbers in Spanish. \[[#129](https://github.com/kslazarev/numbers_and_words/pull/129)\] \([@jlduran](https://github.com/jlduran)\) \(assignee: [@jlduran](https://github.com/jlduran)\)
|
96
|
+
* Fix typo for number twenty-one in Spanish. \[[#127](https://github.com/kslazarev/numbers_and_words/pull/127)\] \([@jlduran](https://github.com/jlduran)\) \(assignee: [@jlduran](https://github.com/jlduran)\)
|
97
|
+
|
98
|
+
## 0.10.5 (March 9, 2016)
|
99
|
+
|
100
|
+
### Bugs
|
101
|
+
* Fix pluralization rules for Spanish. \[[#122](https://github.com/kslazarev/numbers_and_words/pull/122)\] \([@jlduran](https://github.com/jlduran)\)
|
102
|
+
* Fix long scale names in Spanish. \[[#112](https://github.com/kslazarev/numbers_and_words/pull/112)\] \([@jlduran](https://github.com/jlduran)\)
|
103
|
+
* Fix Turkish hundred and thousand numbers. \[[#113](https://github.com/kslazarev/numbers_and_words/pull/113)\] \([@cbilgili](https://github.com/cbilgili)\)
|
104
|
+
* Fix one/other convention in Spanish and French. \[[#116](https://github.com/kslazarev/numbers_and_words/pull/116)\] \([@joseramonc](https://github.com/joseramonc)\)
|
105
|
+
* Fix hundreds in Lithuanian. \[[#117](https://github.com/kslazarev/numbers_and_words/pull/117)\] \([@osegrums](https://github.com/osegrums)\)
|
106
|
+
|
107
|
+
## 0.10.4 (March 02, 2015)
|
108
|
+
|
109
|
+
### Bugs
|
110
|
+
* Fix Lithuanian `other` spelling errors. \[[#109](https://github.com/kslazarev/numbers_and_words/pull/109)\] \([@ViliusLuneckas](https://github.com/ViliusLuneckas)\) \(assignee: [@miks](https://github.com/miks)\)
|
111
|
+
|
112
|
+
## 0.10.3 (May 8, 2014)
|
113
|
+
|
114
|
+
### Features
|
115
|
+
* Add Georgian language. \[[#100](https://github.com/kslazarev/numbers_and_words/pull/100)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
116
|
+
|
117
|
+
### Bugs
|
118
|
+
* Simplify estonian tens with ones method. \[[#101](https://github.com/kslazarev/numbers_and_words/pull/101)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
119
|
+
|
120
|
+
## 0.10.2 (December 18, 2013)
|
121
|
+
|
122
|
+
### Bugs
|
123
|
+
* Fix latvian one thousand case. \[[#88](https://github.com/kslazarev/numbers_and_words/pull/88)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
124
|
+
|
125
|
+
### Supports
|
126
|
+
* Reach 100% coverage. \[[#89](https://github.com/kslazarev/numbers_and_words/pull/89)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
127
|
+
|
128
|
+
## 0.10.1 (October 22, 2013)
|
129
|
+
|
130
|
+
### Bugs
|
131
|
+
* Minor orthographic typo in Spanish language. \[[#85](https://github.com/kslazarev/numbers_and_words/pull/85)\] \([@jlduran](https://github.com/jlduran)\) \(assignee: [@jlduran](https://github.com/jlduran)\)
|
132
|
+
|
133
|
+
## 0.10.0 (September 03, 2013)
|
134
|
+
|
135
|
+
### Features
|
136
|
+
* Add Estonian language. \[[#82](https://github.com/kslazarev/numbers_and_words/pull/82)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
137
|
+
* Add Lithuanian language. \[[#77](https://github.com/kslazarev/numbers_and_words/pull/77)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
138
|
+
|
139
|
+
### Bugs
|
140
|
+
* Fix latvian one hundread cases. \[[#81](https://github.com/kslazarev/numbers_and_words/pull/81)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
141
|
+
|
142
|
+
### Supports
|
143
|
+
* Added @miks contacts to contributors list in README. \[[#79](https://github.com/kslazarev/numbers_and_words/issues/79)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@miks](https://github.com/miks)\)
|
144
|
+
|
145
|
+
## 0.9.0 (May 19, 2013)
|
146
|
+
|
147
|
+
### Features
|
148
|
+
* Add Latvian language. \[[#70](https://github.com/kslazarev/numbers_and_words/pull/70)\] \([@martinsspringis](https://github.com/martinsspringis)\) \(assignee: [@martinsspringis](https://github.com/martinsspringis)\)
|
149
|
+
* Add German language. \[[#52](https://github.com/kslazarev/numbers_and_words/pull/52)\] \([@GSI](https://github.com/GSI)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
150
|
+
|
151
|
+
### Supports
|
152
|
+
* Add @martinsspringis contacts and some examples on Latvian language to README. \[[#71](https://github.com/kslazarev/numbers_and_words/issues/71)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@martinsspringis](https://github.com/martinsspringis)\)
|
153
|
+
|
154
|
+
## 0.8.0 (April 29, 2013)
|
155
|
+
|
156
|
+
### Features
|
157
|
+
* Try to use global language by default, if regional language is missing (EnUs is missing). \[[#65](https://github.com/kslazarev/numbers_and_words/issues/65)\] \([@hubrix](https://github.com/hubrix)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
158
|
+
|
159
|
+
### Supports
|
160
|
+
* Add regional languages aliases to README. \[[#67](https://github.com/kslazarev/numbers_and_words/issues/67)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
161
|
+
* Remove all warnings in gem. (ruby -w). \[[#66](https://github.com/kslazarev/numbers_and_words/pull/66)\] \([@nikhaldi](https://github.com/nikhaldi)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
162
|
+
|
163
|
+
## 0.7.1 (April 22, 2013)
|
164
|
+
|
165
|
+
### Bugs
|
166
|
+
* Wrong hundreds separator with British. \[[#62](https://github.com/kslazarev/numbers_and_words/issues/62)\] \([@eLod](https://github.com/eLod)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
167
|
+
|
168
|
+
## 0.7.0 (April 14, 2013)
|
169
|
+
|
170
|
+
### Features
|
171
|
+
* Send number's options through array. \[[#60](https://github.com/kslazarev/numbers_and_words/issues/60)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
172
|
+
* Add British English. \[[#57](https://github.com/kslazarev/numbers_and_words/issues/57)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
173
|
+
|
174
|
+
## 0.6.1 (April 11, 2013)
|
175
|
+
|
176
|
+
### Bugs
|
177
|
+
* Extra 'and' added after round hundreds (using hundreds_with_union: true) in English. \[[#58](https://github.com/kslazarev/numbers_and_words/issues/58)\] \([@mafraba](https://github.com/mafraba)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
178
|
+
|
179
|
+
## 0.6.0 (March 25, 2013)
|
180
|
+
|
181
|
+
### Features
|
182
|
+
* Support fractional form for Ukranian. \[[#54](https://github.com/kslazarev/numbers_and_words/issues/54)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@Shk-Serji](https://github.com/Shk-Serji)\)
|
183
|
+
* Support fractional form for Russian. \[[#53](https://github.com/kslazarev/numbers_and_words/issues/53)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
184
|
+
* Added functionality for spanish . \[[#51](https://github.com/kslazarev/numbers_and_words/pull/51)\] \([@jaambros](https://github.com/jaambros)\) \(assignee: [@jaambros](https://github.com/jaambros)\)
|
185
|
+
* Support ordinal form for English and Hungarian. \[[#50](https://github.com/kslazarev/numbers_and_words/issues/50)\] \([@eLod](https://github.com/eLod)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
186
|
+
* Add option :remove_hyphen for English language. \[[#45](https://github.com/kslazarev/numbers_and_words/issues/45)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
187
|
+
* Add option :hundreds_with_union for English language. \[[#44](https://github.com/kslazarev/numbers_and_words/issues/44)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
188
|
+
* Add Spanish language. (experimental). \[[#42](https://github.com/kslazarev/numbers_and_words/issues/42)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
189
|
+
* Add Swedish language. (experimental). \[[#41](https://github.com/kslazarev/numbers_and_words/issues/41)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
190
|
+
* Add Hungarian language. \[[#40](https://github.com/kslazarev/numbers_and_words/pull/40)\] \([@eLod](https://github.com/eLod)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
191
|
+
* Add option :gender for Russian language. \[[#39](https://github.com/kslazarev/numbers_and_words/issues/39)\] \([@ermolaev](https://github.com/ermolaev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
192
|
+
* Gem numbers_and_words not working for decimal values. \[[#38](https://github.com/kslazarev/numbers_and_words/issues/38)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
193
|
+
|
194
|
+
### Supports
|
195
|
+
* Update 'code climate' badge. \[[#47](https://github.com/kslazarev/numbers_and_words/issues/47)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
196
|
+
* Add @eLog contacts and project description on Hungarian language to README. \[[#46](https://github.com/kslazarev/numbers_and_words/issues/46)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
197
|
+
* Add language specific options. \[[#43](https://github.com/kslazarev/numbers_and_words/issues/43)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
198
|
+
|
199
|
+
## 0.5.0 (October 19, 2012)
|
200
|
+
|
201
|
+
### Features
|
202
|
+
* Add Italian language. (experimental). \[[#34](https://github.com/kslazarev/numbers_and_words/issues/34)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
203
|
+
* Add Dutch language. (experimental). \[[#33](https://github.com/kslazarev/numbers_and_words/issues/33)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
204
|
+
* Add French language. \[[#29](https://github.com/kslazarev/numbers_and_words/pull/29)\] \([@sorich87](https://github.com/sorich87)\) \(assignee: [@sorich87](https://github.com/sorich87)\)
|
205
|
+
|
206
|
+
### Supports
|
207
|
+
* Add @sorich87 contacts to README. \[[#36](https://github.com/kslazarev/numbers_and_words/issues/36)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@sorich87](https://github.com/sorich87)\)
|
208
|
+
* Add Code Climate badge. \[[#35](https://github.com/kslazarev/numbers_and_words/issues/35)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
209
|
+
* Refactoring tests. \[[#32](https://github.com/kslazarev/numbers_and_words/issues/32)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
210
|
+
* Refactoring strategies. \[[#31](https://github.com/kslazarev/numbers_and_words/issues/31)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
211
|
+
|
212
|
+
## 0.4.0 (June 24, 2012)
|
213
|
+
|
214
|
+
### Features
|
215
|
+
* Add Turkish language. \[[#26](https://github.com/kslazarev/numbers_and_words/issues/26)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@Shk-Serji](https://github.com/Shk-Serji)\)
|
216
|
+
* Add Ukrainian language. \[[#25](https://github.com/kslazarev/numbers_and_words/issues/25)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@Shk-Serji](https://github.com/Shk-Serji)\)
|
217
|
+
|
218
|
+
### Supports
|
219
|
+
* Combine all connections with i18n library in one sub-module. \[[#28](https://github.com/kslazarev/numbers_and_words/issues/28)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
220
|
+
* Add separate logics for pluralization in different languages. \[[#27](https://github.com/kslazarev/numbers_and_words/issues/27)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
221
|
+
|
222
|
+
## 0.3.2 (June 24, 2012)
|
223
|
+
|
224
|
+
### Bugs
|
225
|
+
* Ломает плюрализацию russian. \[[#22](https://github.com/kslazarev/numbers_and_words/issues/22)\] \([@yura](https://github.com/yura)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
226
|
+
|
227
|
+
## 0.3.1 (May 04, 2012)
|
228
|
+
|
229
|
+
### Bugs
|
230
|
+
* Fixes 80 in English. \[[#18](https://github.com/kslazarev/numbers_and_words/pull/18)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
231
|
+
|
232
|
+
### Supports
|
233
|
+
* Add CHANGELOG.md. \[[#19](https://github.com/kslazarev/numbers_and_words/issues/19)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
234
|
+
* Readable specs. \[[#16](https://github.com/kslazarev/numbers_and_words/pull/16)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
235
|
+
|
236
|
+
### Deprecations
|
237
|
+
* Add deprecation warning for using gem 'number_to_words_ru' . \[[#21](https://github.com/kslazarev/numbers_and_words/issues/21)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
238
|
+
|
239
|
+
## 0.3.0 (March 24, 2012)
|
240
|
+
|
241
|
+
### Bugs
|
242
|
+
* Rails 3 will choke on a nested array. \[[#10](https://github.com/kslazarev/numbers_and_words/pull/10)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
243
|
+
* English fixes and tests. \[[#9](https://github.com/kslazarev/numbers_and_words/pull/9)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
244
|
+
* Namespaced NumbersAndWords. \[[#7](https://github.com/kslazarev/numbers_and_words/pull/7)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
245
|
+
|
246
|
+
### Supports
|
247
|
+
* Add contacts to README. \[[#14](https://github.com/kslazarev/numbers_and_words/issues/14)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
248
|
+
* Fixed typo in readme. \[[#13](https://github.com/kslazarev/numbers_and_words/pull/13)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
249
|
+
* Added Travis-ci. \[[#12](https://github.com/kslazarev/numbers_and_words/pull/12)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
250
|
+
* Fix README (Russian & English). \[[#11](https://github.com/kslazarev/numbers_and_words/pull/11)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
251
|
+
* Rename the repo at https://github.com/kslazarev/number_to_words_ru. \[[#8](https://github.com/kslazarev/numbers_and_words/issues/8)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
252
|
+
* Switch a hard-coded gemspec to Jeweler. \[[#6](https://github.com/kslazarev/numbers_and_words/pull/6)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
253
|
+
|
254
|
+
## 0.3.0.alpha (March 24, 2012)
|
255
|
+
|
256
|
+
### Features
|
257
|
+
* Check working with ruby 1.9.3. \[[#4](https://github.com/kslazarev/numbers_and_words/issues/4)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
258
|
+
|
259
|
+
### Bugs
|
260
|
+
* Bundle exec rake problem. \[[#3](https://github.com/kslazarev/numbers_and_words/issues/3)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
261
|
+
|
262
|
+
### Supports
|
263
|
+
* Remove temporary file Gemfile.lock. \[[#5](https://github.com/kslazarev/numbers_and_words/issues/5)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
264
|
+
* Renamed gem from number_to_words_ru to numbers_and_words. \[[#2](https://github.com/kslazarev/numbers_and_words/pull/2)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
data/README.rdoc
CHANGED
@@ -34,7 +34,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
34
34
|
* Türkçe [tr]
|
35
35
|
* Deutsch** [de]
|
36
36
|
* Italiano** [it]
|
37
|
-
* Nederlands
|
37
|
+
* Nederlands [nl]
|
38
38
|
* Swedish** [se]
|
39
39
|
* English (British)** [en-GB]
|
40
40
|
* Česky [cs]
|
@@ -107,7 +107,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
107
107
|
=> "ოცდაერთი"
|
108
108
|
=> "einundzwanzig"
|
109
109
|
=> "ventiuno"
|
110
|
-
=> "
|
110
|
+
=> "eenentwintig"
|
111
111
|
=> "tjugo-en"
|
112
112
|
=> "dvacetjedna"
|
113
113
|
=> "vinte e um"
|
@@ -129,7 +129,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
129
129
|
=> "iki yüz otuz bir"
|
130
130
|
=> "zweihunderteinunddreißig"
|
131
131
|
=> "2 cento trentauno"
|
132
|
-
=> "
|
132
|
+
=> "tweehonderdeenendertig"
|
133
133
|
=> "två hundra trettio-en"
|
134
134
|
=> "dvě stě třicetjedna"
|
135
135
|
=> "duzentos e trinta e um"
|
@@ -226,7 +226,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
226
226
|
=> ["on bir", "yirmi iki", "yüz otuz üç"]
|
227
227
|
=> ["elf", "zweiundzwanzig", "einhundertdreiunddreißig"]
|
228
228
|
=> ["undici", "ventidue", "1 cento trentatre"]
|
229
|
-
=> ["elf", "
|
229
|
+
=> ["elf", "tweeëntwintig", "honderddrieëndertig"]
|
230
230
|
=> ["elva", "tjugo-två", "en hundra trettio-tre"]
|
231
231
|
=> ["jedenáct", "dvacetdva", "jedno sto třicettři"]
|
232
232
|
=> ["mười một", "hai mươi hai", "một trăm ba mươi ba"]
|
@@ -367,7 +367,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
367
367
|
|
368
368
|
== Requirements / Требования / Configuration Requise
|
369
369
|
|
370
|
-
* 2.
|
370
|
+
* 2.7 <= Ruby (compatible with/совместимость с/compatible avec Ruby 2.7 and/и/et JRuby);
|
371
371
|
* 0.5.0 <= I18n (earlier versions not tested/ранние версии не тестировались/versions précédentes non testées);
|
372
372
|
|
373
373
|
== Installation / Установка / Installation
|
@@ -1,8 +1,10 @@
|
|
1
1
|
nl:
|
2
2
|
numbers:
|
3
|
-
ones: [nul,
|
3
|
+
ones: [nul, een, twee, drie, vier, vijf, zes, zeven, acht, negen]
|
4
|
+
loose_one: één
|
4
5
|
teens: [_, elf, twaalf, dertien, veertien, vijftien, zestien, zeventien, achttien, negentien]
|
5
6
|
tens: [_, tien, twintig, dertig, veertig, vijftig, zestig, zeventig, tachtig, negentig]
|
6
7
|
hundreds: honderd
|
7
8
|
mega: [_, duizend, miljoen, miljard, biljoen, biljard, triljoen, triljard, septiljoen, octillion, noniljoen, decillion]
|
8
9
|
union: en
|
10
|
+
union2or3: ën
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require 'numbers_and_words/i18n/plurals/cs'
|
4
4
|
require 'numbers_and_words/i18n/plurals/ru'
|
5
5
|
require 'numbers_and_words/i18n/plurals/ua'
|
6
|
-
require 'numbers_and_words/i18n/plurals/fr'
|
7
6
|
require 'numbers_and_words/i18n/plurals/lv'
|
8
7
|
require 'numbers_and_words/i18n/plurals/lt'
|
9
8
|
|
@@ -1,13 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
rule: Object.const_get("NumbersAndWords::I18n::Plurals::#{language.split('-').collect(&:capitalize).join}::RULE")
|
9
|
-
}
|
3
|
+
NumbersAndWords::I18n::Pluralization.languages.to_h do |language|
|
4
|
+
[language.to_sym, {
|
5
|
+
i18n: {
|
6
|
+
plural: {
|
7
|
+
rule: Object.const_get("NumbersAndWords::I18n::Plurals::#{language.split('-').collect(&:capitalize).join}::RULE")
|
10
8
|
}
|
11
|
-
}
|
12
|
-
|
13
|
-
|
9
|
+
}
|
10
|
+
}]
|
11
|
+
end
|
@@ -39,8 +39,8 @@ module NumbersAndWords
|
|
39
39
|
private
|
40
40
|
|
41
41
|
def print_megs
|
42
|
-
complex_part[1
|
43
|
-
[el[1
|
42
|
+
complex_part[1..].map do |el|
|
43
|
+
[el[1..].to_a.reverse.join, el.first].join(' ')
|
44
44
|
end.reject(&:empty?).reverse.join(' ')
|
45
45
|
end
|
46
46
|
|
@@ -10,13 +10,39 @@ module NumbersAndWords
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def capacity_iteration
|
13
|
-
if FiguresArray::THOUSAND_CAPACITY
|
14
|
-
|
15
|
-
|
13
|
+
return super if @current_capacity != FiguresArray::THOUSAND_CAPACITY
|
14
|
+
return [] if apply_tens_of_hundreds?
|
15
|
+
return megs if figures.number_in_capacity(@current_capacity) == 1
|
16
|
+
|
17
|
+
capacity_words = words_in_capacity(@current_capacity)
|
18
|
+
capacity_words.empty? ? [] : [capacity_words, megs].join
|
19
|
+
end
|
20
|
+
|
21
|
+
def simple_number_to_words
|
22
|
+
if @figures.only_ones && @figures.ones == 1
|
23
|
+
[@translations.t(:loose_one)]
|
16
24
|
else
|
17
25
|
super
|
18
26
|
end
|
19
27
|
end
|
28
|
+
|
29
|
+
def number_without_capacity_to_words
|
30
|
+
return super unless apply_tens_of_hundreds?
|
31
|
+
|
32
|
+
base = save_parent_figures do
|
33
|
+
@figures = @parent_figures[2, 2].to_figures
|
34
|
+
simple_number_to_words
|
35
|
+
end
|
36
|
+
[([base, translate(:hundreds, 1)] + simple_number_to_words).join]
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def apply_tens_of_hundreds?
|
42
|
+
@options.tens_of_hundreds.result &&
|
43
|
+
(1..9).cover?(figures.number_in_capacity(FiguresArray::THOUSAND_CAPACITY)) &&
|
44
|
+
figures.hundreds
|
45
|
+
end
|
20
46
|
end
|
21
47
|
end
|
22
48
|
end
|
@@ -12,7 +12,7 @@ module NumbersAndWords
|
|
12
12
|
|
13
13
|
def result(type)
|
14
14
|
@type = type
|
15
|
-
|
15
|
+
type == MEGS_TYPE ? check_megs_numbers : check_simple_numbers
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
@@ -27,8 +27,8 @@ module NumbersAndWords
|
|
27
27
|
|
28
28
|
def simple_numbers_condition
|
29
29
|
current_capacity.nil? &&
|
30
|
-
(
|
31
|
-
|
30
|
+
(@type != HUNDRED_TYPE ||
|
31
|
+
(@type == HUNDRED_TYPE && simple_number_to_words.empty?))
|
32
32
|
end
|
33
33
|
|
34
34
|
def megs_numbers_condition
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NumbersAndWords
|
4
|
+
module Strategies
|
5
|
+
module FiguresConverter
|
6
|
+
module Options
|
7
|
+
module Nl
|
8
|
+
class TensOfHundreds
|
9
|
+
attr_accessor :strategy, :options
|
10
|
+
|
11
|
+
def initialize(proxy, *_args)
|
12
|
+
@strategy = proxy.strategy
|
13
|
+
@options = proxy.options
|
14
|
+
end
|
15
|
+
|
16
|
+
def result
|
17
|
+
active?
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def active?
|
23
|
+
@options[:tens_of_hundreds]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -5,6 +5,7 @@ require 'numbers_and_words/strategies/figures_converter/options/en'
|
|
5
5
|
require 'numbers_and_words/strategies/figures_converter/options/en-GB'
|
6
6
|
require 'numbers_and_words/strategies/figures_converter/options/es'
|
7
7
|
require 'numbers_and_words/strategies/figures_converter/options/hu'
|
8
|
+
require 'numbers_and_words/strategies/figures_converter/options/nl'
|
8
9
|
require 'numbers_and_words/strategies/figures_converter/options/pt-BR'
|
9
10
|
require 'numbers_and_words/strategies/figures_converter/options/ru'
|
10
11
|
require 'numbers_and_words/strategies/figures_converter/options/ua'
|
@@ -6,7 +6,7 @@ module NumbersAndWords
|
|
6
6
|
include NumbersAndWords::Translations::Families::Latin
|
7
7
|
|
8
8
|
def tens_with_ones(numbers, _options = {})
|
9
|
-
[ones(numbers[0]), tens(numbers[1])].join(union)
|
9
|
+
[ones(numbers[0]), tens(numbers[1])].join(union(numbers[0]))
|
10
10
|
end
|
11
11
|
|
12
12
|
def hundreds(number, _options = {})
|
@@ -14,6 +14,14 @@ module NumbersAndWords
|
|
14
14
|
|
15
15
|
super number, separator: ''
|
16
16
|
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def union(units)
|
21
|
+
return t :union2or3 if [2, 3].include?(units)
|
22
|
+
|
23
|
+
t :union
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numbers_and_words
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Lazarev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -57,9 +57,11 @@ email: k.s.lazarev@gmail.com
|
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files:
|
60
|
+
- CHANGELOG.md
|
60
61
|
- LICENSE.txt
|
61
62
|
- README.rdoc
|
62
63
|
files:
|
64
|
+
- CHANGELOG.md
|
63
65
|
- LICENSE.txt
|
64
66
|
- README.rdoc
|
65
67
|
- lib/numbers_and_words.rb
|
@@ -97,7 +99,6 @@ files:
|
|
97
99
|
- lib/numbers_and_words/i18n/locales/numbers.vi.yml
|
98
100
|
- lib/numbers_and_words/i18n/pluralization.rb
|
99
101
|
- lib/numbers_and_words/i18n/plurals/cs.rb
|
100
|
-
- lib/numbers_and_words/i18n/plurals/fr.rb
|
101
102
|
- lib/numbers_and_words/i18n/plurals/lt.rb
|
102
103
|
- lib/numbers_and_words/i18n/plurals/lv.rb
|
103
104
|
- lib/numbers_and_words/i18n/plurals/plurals.rb
|
@@ -215,6 +216,8 @@ files:
|
|
215
216
|
- lib/numbers_and_words/strategies/figures_converter/options/es/remove_zero.rb
|
216
217
|
- lib/numbers_and_words/strategies/figures_converter/options/hu.rb
|
217
218
|
- lib/numbers_and_words/strategies/figures_converter/options/hu/ordinal.rb
|
219
|
+
- lib/numbers_and_words/strategies/figures_converter/options/nl.rb
|
220
|
+
- lib/numbers_and_words/strategies/figures_converter/options/nl/tens_of_hundreds.rb
|
218
221
|
- lib/numbers_and_words/strategies/figures_converter/options/pt-BR.rb
|
219
222
|
- lib/numbers_and_words/strategies/figures_converter/options/pt-BR/gender.rb
|
220
223
|
- lib/numbers_and_words/strategies/figures_converter/options/pt-BR/ordinal.rb
|
@@ -267,14 +270,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
267
270
|
requirements:
|
268
271
|
- - ">="
|
269
272
|
- !ruby/object:Gem::Version
|
270
|
-
version: 2.
|
273
|
+
version: 2.7.0
|
271
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
272
275
|
requirements:
|
273
276
|
- - ">="
|
274
277
|
- !ruby/object:Gem::Version
|
275
278
|
version: '0'
|
276
279
|
requirements: []
|
277
|
-
rubygems_version: 3.
|
280
|
+
rubygems_version: 3.4.8
|
278
281
|
signing_key:
|
279
282
|
specification_version: 4
|
280
283
|
summary: Spell out numbers in several languages
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module NumbersAndWords
|
4
|
-
module I18n
|
5
|
-
module Plurals
|
6
|
-
module Fr
|
7
|
-
module_function
|
8
|
-
|
9
|
-
RULE = ->(number) { one_conditions(number) ? :one : :other }
|
10
|
-
|
11
|
-
def one_conditions(number)
|
12
|
-
number % 10 == 1 && number % 100 != 11
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|