numbers_and_words 0.11.7 → 0.11.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +46 -4
- data/lib/numbers_and_words/i18n/locales/numbers.kz.yml +7 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages.rb +1 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/kz.rb +12 -0
- data/lib/numbers_and_words/translations.rb +1 -0
- data/lib/numbers_and_words/translations/kz.rb +9 -0
- data/lib/numbers_and_words/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea9d33b86d78e18e90469a44a76b104680aab00f84a7adc231c6b39dd6c658be
|
4
|
+
data.tar.gz: 35fc2539c95700e447913526265a62d43006b8e963ee9bf61324fd1f0c1d4075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1b10a1a58c9db1e44d43bdeefe11c4f9ccb1e7ada04fae531edcc1d85055eb51b3c0ce1ed9086fcdc144387c1d45c9762263433e0187c3d1d9d73426bd9c9a5
|
7
|
+
data.tar.gz: 743962ff8a5e9b2406e609da7be0b35d246592ab2c108b5469c9682f1887c1b59ca1bb77b3304f777be339edaa60077621cdb79e5a6e4f0440971f9e1074fd60
|
data/README.rdoc
CHANGED
@@ -17,6 +17,8 @@ I18n kütüphanesi ile sayıları yazıya çevirir.
|
|
17
17
|
|
18
18
|
Soletra números em vários idiomas utilizando a biblioteca I18n.
|
19
19
|
|
20
|
+
Deletrea números en varios idiomas utilizando la gema I18n.
|
21
|
+
|
20
22
|
== Supported Languages / Языки / Langues Supportées
|
21
23
|
|
22
24
|
* English [en]
|
@@ -39,11 +41,11 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
39
41
|
* Português [pt]
|
40
42
|
* Português Brasileiro [pt-BR]
|
41
43
|
* հայերեն (Armenian) [hy]
|
44
|
+
* Қазақша [kz]
|
42
45
|
|
43
46
|
** Experimental
|
44
47
|
|
45
48
|
* {[en-AU], [en-CA], [en-IN], [en-US]}*** => [en]
|
46
|
-
* {[es-419], [es-AR], [es-CL], [es-CO], [es-MX], [es-PE], [es-VE]}*** => [es]
|
47
49
|
* {[fr-CA], [fr-CH]}*** => [fr]
|
48
50
|
* {[de], [de-AT], [de-CH]}*** => [de]
|
49
51
|
* {[it-CH]}*** => [it]
|
@@ -88,6 +90,9 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
88
90
|
I18n.with_locale(:hy) { 42.to_words }
|
89
91
|
=> "քառասուն երկու"
|
90
92
|
|
93
|
+
I18n.with_locale(:kz) { 42.to_words }
|
94
|
+
=> "қырық екi"
|
95
|
+
|
91
96
|
21.to_words
|
92
97
|
=> "twenty-one"
|
93
98
|
=> "veintiuno"
|
@@ -108,6 +113,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
108
113
|
=> "vinte e um"
|
109
114
|
=> "hai mươi mốt"
|
110
115
|
=> "քսան մեկ"
|
116
|
+
=> "жиырма бiр"
|
111
117
|
|
112
118
|
231.to_words
|
113
119
|
=> "two hundred thirty-one"
|
@@ -129,6 +135,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
129
135
|
=> "duzentos e trinta e um"
|
130
136
|
=> "hai trăm ba mươi mốt"
|
131
137
|
=> "երկու հարյուր երեսուն մեկ"
|
138
|
+
=> "екi жүз отыз бiр"
|
132
139
|
|
133
140
|
4030.to_words
|
134
141
|
=> "four thousand thirty"
|
@@ -149,6 +156,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
149
156
|
=> "čtyři tisíce třicet"
|
150
157
|
=> "bốn nghìn không trăm ba mươi"
|
151
158
|
=> "չորս հազար երեսուն"
|
159
|
+
=> "төрт мың отыз"
|
152
160
|
|
153
161
|
1000100.to_words
|
154
162
|
=> "one million one hundred"
|
@@ -169,6 +177,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
169
177
|
=> "jeden milión jedno sto"
|
170
178
|
=> "một triệu một trăm"
|
171
179
|
=> "մեկ միլիոն հարյուր"
|
180
|
+
=> "бiр миллион бiр жүз"
|
172
181
|
|
173
182
|
1000000000000000000000000000000000.to_words
|
174
183
|
=> "one decillion"
|
@@ -186,6 +195,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
186
195
|
=> "één decillion"
|
187
196
|
=> "en decillion"
|
188
197
|
=> "decilijon"
|
198
|
+
=> "бiр дециллион"
|
189
199
|
|
190
200
|
[1, 2, 3].to_words
|
191
201
|
=> ["one", "two", "three"]
|
@@ -200,6 +210,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
200
210
|
=> ["jedna", "dva", "tři"]
|
201
211
|
=> ["một", "hai", "ba"]
|
202
212
|
=> ["մեկ", "երկու", "երեք"]
|
213
|
+
=> ["бiр", "екi", "үш"]
|
203
214
|
|
204
215
|
[11, 22, 133].to_words
|
205
216
|
=> ["eleven", "twenty-two", "one hundred thirty-three"]
|
@@ -220,6 +231,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
220
231
|
=> ["jedenáct", "dvacetdva", "jedno sto třicettři"]
|
221
232
|
=> ["mười một", "hai mươi hai", "một trăm ba mươi ba"]
|
222
233
|
=> ["տասնմեկ", "քսան երկու", "հարյուր երեսուն երեք"]
|
234
|
+
=> ["он бiр", "жиырма екi", "бiр жүз отыз үш"]
|
223
235
|
|
224
236
|
21.77.to_words
|
225
237
|
=> "twenty-one and seventy-seven hundredths"
|
@@ -279,7 +291,7 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
279
291
|
|
280
292
|
* Brazilian Portuguese
|
281
293
|
|
282
|
-
Change gender form: (gender: [:female || :male
|
294
|
+
Change gender form: (gender: [:female || :male])
|
283
295
|
|
284
296
|
I18n.with_locale(:'pt-BR') { 1000000001.to_words gender: :female }
|
285
297
|
=> "um bilhão e uma"
|
@@ -297,7 +309,6 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
297
309
|
I18n.with_locale(:'cs') { 1.to_words gender: :neuter }
|
298
310
|
=> "jedno"
|
299
311
|
|
300
|
-
|
301
312
|
Remove 'zero' from integral part of float: (remove_zero: [true || false])
|
302
313
|
|
303
314
|
I18n.with_locale(:cs) { 0.7.to_words }
|
@@ -314,15 +325,46 @@ Soletra números em vários idiomas utilizando a biblioteca I18n.
|
|
314
325
|
I18n.with_locale(:cs) { 21.to_words gender: :female, ordinal: true }
|
315
326
|
=> "dvacátá první"
|
316
327
|
|
328
|
+
* Spanish
|
329
|
+
|
330
|
+
Change gender form: (gender: [:female || :male])
|
331
|
+
|
332
|
+
I18n.with_locale(:es) { 1.to_words gender: :female }
|
333
|
+
=> "una"
|
334
|
+
|
335
|
+
I18n.with_locale(:es) { 1.to_words gender: :male }
|
336
|
+
=> "uno"
|
337
|
+
|
338
|
+
Use the apocopated (shortened) form: (apocopated: [true || false])
|
339
|
+
|
340
|
+
I18n.with_locale(:es) { 1.to_words apocopated: true }
|
341
|
+
=> "un"
|
342
|
+
|
343
|
+
Mix gender and apocopated forms:
|
344
|
+
|
345
|
+
I18n.with_locale(:es) { 201.to_words gender: :female, apocopated: true }
|
346
|
+
=> "doscientas un"
|
347
|
+
|
348
|
+
Remove 'zero' from integral part of float: (remove_zero: [true || false])
|
349
|
+
|
350
|
+
I18n.with_locale(:es) { 0.7.to_words }
|
351
|
+
=> "cero con siete décimas"
|
352
|
+
|
353
|
+
I18n.with_locale(:es) { 0.7.to_words remove_zero: true }
|
354
|
+
=> "siete décimas"
|
355
|
+
|
317
356
|
== Other options / Другие опции
|
318
357
|
|
319
|
-
*
|
358
|
+
* Precision
|
320
359
|
|
321
360
|
You may pass argument :precision that added zeros to the end of float number:
|
322
361
|
|
323
362
|
I18n.with_locale(:ru) { 0.1.to_words precision: 3 }
|
324
363
|
=> ноль целых и десять сотых
|
325
364
|
|
365
|
+
I18n.with_locale(:es) { 0.2.to_words precision: 2 }
|
366
|
+
=> cero con veinte centésimas
|
367
|
+
|
326
368
|
== Requirements / Требования / Configuration Requise
|
327
369
|
|
328
370
|
* 2.5 <= Ruby (compatible with/совместимость с/compatible avec Ruby 2.5 and/и/et JRuby);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
kz:
|
2
|
+
numbers:
|
3
|
+
ones: [нөл, бiр, екi, үш, төрт, бес, алты, жетi, сегiз, тоғыз]
|
4
|
+
teens: [_, он бiр, он екi, он үш, он төрт, он бес, он алты, он жетi, он сегiз, он тоғыз]
|
5
|
+
tens: [_, он, жиырма, отыз, қырық, елу, алпыс, жетпiс, сексен, тоқсан]
|
6
|
+
hundreds: жүз
|
7
|
+
mega: [_, мың, миллион, миллиард, триллион, квадриллион, квинтиллион, секстиллион, септиллион, октиллион, нониллион, дециллион]
|
@@ -22,6 +22,7 @@ require 'numbers_and_words/strategies/figures_converter/languages/pt'
|
|
22
22
|
require 'numbers_and_words/strategies/figures_converter/languages/se'
|
23
23
|
require 'numbers_and_words/strategies/figures_converter/languages/tr'
|
24
24
|
require 'numbers_and_words/strategies/figures_converter/languages/hy'
|
25
|
+
require 'numbers_and_words/strategies/figures_converter/languages/kz'
|
25
26
|
|
26
27
|
require 'numbers_and_words/strategies/figures_converter/languages/families/cyrillic'
|
27
28
|
require 'numbers_and_words/strategies/figures_converter/languages/ru'
|
@@ -26,6 +26,7 @@ require 'numbers_and_words/translations/ka'
|
|
26
26
|
require 'numbers_and_words/translations/cs'
|
27
27
|
require 'numbers_and_words/translations/vi'
|
28
28
|
require 'numbers_and_words/translations/hy'
|
29
|
+
require 'numbers_and_words/translations/kz'
|
29
30
|
|
30
31
|
module NumbersAndWords
|
31
32
|
module Translations
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Lazarev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-06 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/numbers_and_words/i18n/locales/numbers.hy.yml
|
85
85
|
- lib/numbers_and_words/i18n/locales/numbers.it.yml
|
86
86
|
- lib/numbers_and_words/i18n/locales/numbers.ka.yml
|
87
|
+
- lib/numbers_and_words/i18n/locales/numbers.kz.yml
|
87
88
|
- lib/numbers_and_words/i18n/locales/numbers.lt.yml
|
88
89
|
- lib/numbers_and_words/i18n/locales/numbers.lv.yml
|
89
90
|
- lib/numbers_and_words/i18n/locales/numbers.nl.yml
|
@@ -176,6 +177,7 @@ files:
|
|
176
177
|
- lib/numbers_and_words/strategies/figures_converter/languages/hy.rb
|
177
178
|
- lib/numbers_and_words/strategies/figures_converter/languages/it.rb
|
178
179
|
- lib/numbers_and_words/strategies/figures_converter/languages/ka.rb
|
180
|
+
- lib/numbers_and_words/strategies/figures_converter/languages/kz.rb
|
179
181
|
- lib/numbers_and_words/strategies/figures_converter/languages/lt.rb
|
180
182
|
- lib/numbers_and_words/strategies/figures_converter/languages/lv.rb
|
181
183
|
- lib/numbers_and_words/strategies/figures_converter/languages/nl.rb
|
@@ -238,6 +240,7 @@ files:
|
|
238
240
|
- lib/numbers_and_words/translations/hy.rb
|
239
241
|
- lib/numbers_and_words/translations/it.rb
|
240
242
|
- lib/numbers_and_words/translations/ka.rb
|
243
|
+
- lib/numbers_and_words/translations/kz.rb
|
241
244
|
- lib/numbers_and_words/translations/lt.rb
|
242
245
|
- lib/numbers_and_words/translations/lv.rb
|
243
246
|
- lib/numbers_and_words/translations/nl.rb
|
@@ -271,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
274
|
- !ruby/object:Gem::Version
|
272
275
|
version: '0'
|
273
276
|
requirements: []
|
274
|
-
rubygems_version: 3.1.
|
277
|
+
rubygems_version: 3.1.4
|
275
278
|
signing_key:
|
276
279
|
specification_version: 4
|
277
280
|
summary: Spell out numbers in several languages
|