numbers_and_words_amuino 0.10.4.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +158 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +274 -0
- data/lib/numbers_and_words.rb +15 -0
- data/lib/numbers_and_words/core_ext.rb +3 -0
- data/lib/numbers_and_words/core_ext/array.rb +9 -0
- data/lib/numbers_and_words/core_ext/float.rb +5 -0
- data/lib/numbers_and_words/core_ext/integer.rb +5 -0
- data/lib/numbers_and_words/helper_classes.rb +2 -0
- data/lib/numbers_and_words/helper_classes/array_extensions/helpers.rb +77 -0
- data/lib/numbers_and_words/helper_classes/array_extensions/validations.rb +19 -0
- data/lib/numbers_and_words/helper_classes/figures_array.rb +22 -0
- data/lib/numbers_and_words/helper_classes/words_array.rb +15 -0
- data/lib/numbers_and_words/i18n.rb +33 -0
- data/lib/numbers_and_words/i18n/initialization.rb +12 -0
- data/lib/numbers_and_words/i18n/locales/numbers.de.yml +43 -0
- data/lib/numbers_and_words/i18n/locales/numbers.en-GB.yml +55 -0
- data/lib/numbers_and_words/i18n/locales/numbers.en.yml +67 -0
- data/lib/numbers_and_words/i18n/locales/numbers.es.yml +15 -0
- data/lib/numbers_and_words/i18n/locales/numbers.et.yml +38 -0
- data/lib/numbers_and_words/i18n/locales/numbers.fr.yml +44 -0
- data/lib/numbers_and_words/i18n/locales/numbers.hu.yml +16 -0
- data/lib/numbers_and_words/i18n/locales/numbers.it.yml +7 -0
- data/lib/numbers_and_words/i18n/locales/numbers.ka.yml +23 -0
- data/lib/numbers_and_words/i18n/locales/numbers.lt.yml +52 -0
- data/lib/numbers_and_words/i18n/locales/numbers.lv.yml +41 -0
- data/lib/numbers_and_words/i18n/locales/numbers.nl.yml +7 -0
- data/lib/numbers_and_words/i18n/locales/numbers.pt.yml +13 -0
- data/lib/numbers_and_words/i18n/locales/numbers.ru.yml +77 -0
- data/lib/numbers_and_words/i18n/locales/numbers.se.yml +7 -0
- data/lib/numbers_and_words/i18n/locales/numbers.tr.yml +7 -0
- data/lib/numbers_and_words/i18n/locales/numbers.ua.yml +65 -0
- data/lib/numbers_and_words/i18n/pluralization.rb +35 -0
- data/lib/numbers_and_words/i18n/plurals/es.rb +11 -0
- data/lib/numbers_and_words/i18n/plurals/fr.rb +15 -0
- data/lib/numbers_and_words/i18n/plurals/lt.rb +24 -0
- data/lib/numbers_and_words/i18n/plurals/lv.rb +15 -0
- data/lib/numbers_and_words/i18n/plurals/plurals.rb +7 -0
- data/lib/numbers_and_words/i18n/plurals/ru.rb +28 -0
- data/lib/numbers_and_words/i18n/plurals/ua.rb +9 -0
- data/lib/numbers_and_words/strategies.rb +16 -0
- data/lib/numbers_and_words/strategies/array_joiner.rb +23 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages.rb +23 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/base.rb +24 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/en.rb +10 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/en_gb.rb +17 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb +24 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/hu.rb +10 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/ru.rb +10 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/ua.rb +10 -0
- data/lib/numbers_and_words/strategies/figures_converter.rb +33 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators.rb +36 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/base.rb +18 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/base.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/fractional.rb +38 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/integral.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en_gb.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en_gb/base.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en_gb/fractional.rb +27 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en_gb/integral.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/base.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/fractional.rb +38 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/integral.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/base.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/fractional.rb +39 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/integral.rb +27 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/base.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/fractional.rb +39 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/integral.rb +27 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages.rb +42 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/base.rb +29 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/de.rb +66 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/en.rb +48 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/en_gb.rb +10 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/es.rb +46 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/et.rb +16 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/base.rb +77 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/cyrillic.rb +36 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/helpers.rb +36 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/latin.rb +13 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/fr.rb +37 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/hu.rb +63 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/it.rb +11 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/ka.rb +43 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/lt.rb +37 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb +29 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/nl.rb +26 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/pt.rb +30 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/ru.rb +11 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/se.rb +11 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/tr.rb +29 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/ua.rb +11 -0
- data/lib/numbers_and_words/strategies/figures_converter/options.rb +38 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en.rb +4 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb +37 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb +60 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_hyphen.rb +29 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_zero.rb +29 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en_gb.rb +4 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en_gb/hundreds_with_union.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en_gb/ordinal.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en_gb/remove_hyphen.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en_gb/remove_zero.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/hu.rb +1 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/hu/ordinal.rb +60 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ru.rb +1 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ru/gender.rb +28 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ua.rb +1 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ua/gender.rb +28 -0
- data/lib/numbers_and_words/translations.rb +32 -0
- data/lib/numbers_and_words/translations/base.rb +11 -0
- data/lib/numbers_and_words/translations/de.rb +24 -0
- data/lib/numbers_and_words/translations/en.rb +8 -0
- data/lib/numbers_and_words/translations/en_gb.rb +6 -0
- data/lib/numbers_and_words/translations/es.rb +42 -0
- data/lib/numbers_and_words/translations/et.rb +16 -0
- data/lib/numbers_and_words/translations/extensions/fraction_significance.rb +25 -0
- data/lib/numbers_and_words/translations/families/base.rb +37 -0
- data/lib/numbers_and_words/translations/families/cyrillic.rb +29 -0
- data/lib/numbers_and_words/translations/families/latin.rb +23 -0
- data/lib/numbers_and_words/translations/fr.rb +29 -0
- data/lib/numbers_and_words/translations/hu.rb +22 -0
- data/lib/numbers_and_words/translations/it.rb +15 -0
- data/lib/numbers_and_words/translations/ka.rb +72 -0
- data/lib/numbers_and_words/translations/lt.rb +21 -0
- data/lib/numbers_and_words/translations/lv.rb +21 -0
- data/lib/numbers_and_words/translations/nl.rb +15 -0
- data/lib/numbers_and_words/translations/pt.rb +27 -0
- data/lib/numbers_and_words/translations/ru.rb +25 -0
- data/lib/numbers_and_words/translations/se.rb +11 -0
- data/lib/numbers_and_words/translations/tr.rb +20 -0
- data/lib/numbers_and_words/translations/ua.rb +21 -0
- data/lib/numbers_and_words/version.rb +3 -0
- data/lib/numbers_and_words/wrappers.rb +2 -0
- data/lib/numbers_and_words/wrappers/float.rb +52 -0
- data/lib/numbers_and_words/wrappers/integer.rb +21 -0
- metadata +242 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6f230b1edb5c0f8296954976762c27af97eaea64
|
4
|
+
data.tar.gz: 6922a575acb4d886c4be17623488131ac9da3639
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ddc7431b6f826c10f75267a5e807b6dd4567005430953986970103b688e5ca0d24ceb44c3d5150235d54ed0146870e7f1add03f4098fbbecbb0f6809e76fa31e
|
7
|
+
data.tar.gz: 17c4fcb9b85530cb228d3e7c2df9aabad2dd20ac9acaa329b00c63ecc5715a4a20e144a03c1b162bafd690d668bfc7e99d6b73ac822cb6d0fd0a57e285ddaa73
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
## 0.10.4 (March 02, 2015)
|
2
|
+
|
3
|
+
### Bugs
|
4
|
+
* 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)\)
|
5
|
+
|
6
|
+
## 0.10.3 (May 8, 2014)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
* Add Georgian language. \[[#100](https://github.com/kslazarev/numbers_and_words/pull/100)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
10
|
+
|
11
|
+
### Bugs
|
12
|
+
* 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)\)
|
13
|
+
|
14
|
+
## 0.10.2 (December 18, 2013)
|
15
|
+
|
16
|
+
### Bugs
|
17
|
+
* 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)\)
|
18
|
+
|
19
|
+
### Supports
|
20
|
+
* Reach 100% coverage. \[[#89](https://github.com/kslazarev/numbers_and_words/pull/89)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
21
|
+
|
22
|
+
## 0.10.1 (October 22, 2013)
|
23
|
+
|
24
|
+
### Bugs
|
25
|
+
* 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)\)
|
26
|
+
|
27
|
+
## 0.10.0 (September 03, 2013)
|
28
|
+
|
29
|
+
### Features
|
30
|
+
* Add Estonian language. \[[#82](https://github.com/kslazarev/numbers_and_words/pull/82)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
31
|
+
* Add Lithuanian language. \[[#77](https://github.com/kslazarev/numbers_and_words/pull/77)\] \([@miks](https://github.com/miks)\) \(assignee: [@miks](https://github.com/miks)\)
|
32
|
+
|
33
|
+
### Bugs
|
34
|
+
* 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)\)
|
35
|
+
|
36
|
+
### Supports
|
37
|
+
* 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)\)
|
38
|
+
|
39
|
+
## 0.9.0 (May 19, 2013)
|
40
|
+
|
41
|
+
### Features
|
42
|
+
* Add Latvian language. \[[#70](https://github.com/kslazarev/numbers_and_words/pull/70)\] \([@martinsspringis](https://github.com/martinsspringis)\) \(assignee: [@martinsspringis](https://github.com/martinsspringis)\)
|
43
|
+
* Add German language. \[[#52](https://github.com/kslazarev/numbers_and_words/pull/52)\] \([@GSI](https://github.com/GSI)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
44
|
+
|
45
|
+
### Supports
|
46
|
+
* 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)\)
|
47
|
+
|
48
|
+
## 0.8.0 (April 29, 2013)
|
49
|
+
|
50
|
+
### Features
|
51
|
+
* 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)\)
|
52
|
+
|
53
|
+
### Supports
|
54
|
+
* 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)\)
|
55
|
+
* 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)\)
|
56
|
+
|
57
|
+
## 0.7.1 (April 22, 2013)
|
58
|
+
|
59
|
+
### Bugs
|
60
|
+
* 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)\)
|
61
|
+
|
62
|
+
## 0.7.0 (April 14, 2013)
|
63
|
+
|
64
|
+
### Features
|
65
|
+
* 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)\)
|
66
|
+
* Add British English. \[[#57](https://github.com/kslazarev/numbers_and_words/issues/57)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
67
|
+
|
68
|
+
## 0.6.1 (April 11, 2013)
|
69
|
+
|
70
|
+
### Bugs
|
71
|
+
* 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)\)
|
72
|
+
|
73
|
+
## 0.6.0 (March 25, 2013)
|
74
|
+
|
75
|
+
### Features
|
76
|
+
* 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)\)
|
77
|
+
* 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)\)
|
78
|
+
* 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)\)
|
79
|
+
* 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)\)
|
80
|
+
* 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)\)
|
81
|
+
* 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)\)
|
82
|
+
* 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)\)
|
83
|
+
* 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)\)
|
84
|
+
* Add Hungarian language. \[[#40](https://github.com/kslazarev/numbers_and_words/pull/40)\] \([@eLod](https://github.com/eLod)\) \(assignee: [@eLod](https://github.com/eLod)\)
|
85
|
+
* 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)\)
|
86
|
+
* 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)\)
|
87
|
+
|
88
|
+
### Supports
|
89
|
+
* 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)\)
|
90
|
+
* 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)\)
|
91
|
+
* 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)\)
|
92
|
+
|
93
|
+
## 0.5.0 (October 19, 2012)
|
94
|
+
|
95
|
+
### Features
|
96
|
+
* 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)\)
|
97
|
+
* 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)\)
|
98
|
+
* Add French language. \[[#29](https://github.com/kslazarev/numbers_and_words/pull/29)\] \([@sorich87](https://github.com/sorich87)\) \(assignee: [@sorich87](https://github.com/sorich87)\)
|
99
|
+
|
100
|
+
### Supports
|
101
|
+
* 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)\)
|
102
|
+
* 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)\)
|
103
|
+
* Refactoring tests. \[[#32](https://github.com/kslazarev/numbers_and_words/issues/32)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
104
|
+
* Refactoring strategies. \[[#31](https://github.com/kslazarev/numbers_and_words/issues/31)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
105
|
+
|
106
|
+
## 0.4.0 (June 24, 2012)
|
107
|
+
|
108
|
+
### Features
|
109
|
+
* 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)\)
|
110
|
+
* 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)\)
|
111
|
+
|
112
|
+
### Supports
|
113
|
+
* 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)\)
|
114
|
+
* 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)\)
|
115
|
+
|
116
|
+
## 0.3.2 (June 24, 2012)
|
117
|
+
|
118
|
+
### Bugs
|
119
|
+
* Ломает плюрализацию russian. \[[#22](https://github.com/kslazarev/numbers_and_words/issues/22)\] \([@yura](https://github.com/yura)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
120
|
+
|
121
|
+
## 0.3.1 (May 04, 2012)
|
122
|
+
|
123
|
+
### Bugs
|
124
|
+
* 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)\)
|
125
|
+
|
126
|
+
### Supports
|
127
|
+
* Add CHANGELOG.md. \[[#19](https://github.com/kslazarev/numbers_and_words/issues/19)\] \([@kslazarev](https://github.com/kslazarev)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
128
|
+
* Readable specs. \[[#16](https://github.com/kslazarev/numbers_and_words/pull/16)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@kslazarev](https://github.com/kslazarev)\)
|
129
|
+
|
130
|
+
### Deprecations
|
131
|
+
* 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)\)
|
132
|
+
|
133
|
+
## 0.3.0 (March 24, 2012)
|
134
|
+
|
135
|
+
### Bugs
|
136
|
+
* 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)\)
|
137
|
+
* 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)\)
|
138
|
+
* Namespaced NumbersAndWords. \[[#7](https://github.com/kslazarev/numbers_and_words/pull/7)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
139
|
+
|
140
|
+
### Supports
|
141
|
+
* 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)\)
|
142
|
+
* 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)\)
|
143
|
+
* Added Travis-ci. \[[#12](https://github.com/kslazarev/numbers_and_words/pull/12)\] \([@dblock](https://github.com/dblock)\) \(assignee: [@dblock](https://github.com/dblock)\)
|
144
|
+
* 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)\)
|
145
|
+
* 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)\)
|
146
|
+
* 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)\)
|
147
|
+
|
148
|
+
## 0.3.0.alpha (March 24, 2012)
|
149
|
+
|
150
|
+
### Features
|
151
|
+
* 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)\)
|
152
|
+
|
153
|
+
### Bugs
|
154
|
+
* 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)\)
|
155
|
+
|
156
|
+
### Supports
|
157
|
+
* 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)\)
|
158
|
+
* 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/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011-2012 Kirill Lazarev
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,274 @@
|
|
1
|
+
== numbers_and_words
|
2
|
+
|
3
|
+
{<img src="https://badge.fury.io/rb/numbers_and_words.svg?branch=master" alt="Gem Version" />}[http://badge.fury.io/rb/numbers_and_words]
|
4
|
+
{<img src="https://gemnasium.com/kslazarev/numbers_and_words.svg?branch=master" alt="Dependency Status" />}[https://gemnasium.com/kslazarev/numbers_and_words]
|
5
|
+
{<img src="https://codeclimate.com/github/kslazarev/numbers_and_words.svg?branch=master" />}[https://codeclimate.com/github/kslazarev/numbers_and_words]
|
6
|
+
{<img src="https://secure.travis-ci.org/kslazarev/numbers_and_words.svg?branch=master" />}[http://travis-ci.org/kslazarev/numbers_and_words]
|
7
|
+
{<img src="https://coveralls.io/repos/kslazarev/numbers_and_words/badge.svg?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/kslazarev/numbers_and_words]
|
8
|
+
|
9
|
+
Convert numbers to words using the I18n library.
|
10
|
+
|
11
|
+
Перевод чисел в слова при помощи библиотеки I18n.
|
12
|
+
|
13
|
+
Converti les nombres en lettres en utilisant la librairie I18n.
|
14
|
+
|
15
|
+
Számok betűvel írva az I18n könyvtár segítségével.
|
16
|
+
|
17
|
+
I18n kütüphanesi ile sayıları yazıya çevirir.
|
18
|
+
|
19
|
+
== Supported Languages / Языки / Langues Supportées
|
20
|
+
|
21
|
+
* English [en]
|
22
|
+
* Spanish [es]
|
23
|
+
* Русский [ru]
|
24
|
+
* Français [fr]
|
25
|
+
* Українська [ua]
|
26
|
+
* Magyar [hu]
|
27
|
+
* Lietuvių [lt]
|
28
|
+
* Latviešu [lv]
|
29
|
+
* Eesti [et]
|
30
|
+
* ქართული (Georgian) [ka]
|
31
|
+
* Türkçe [tr]
|
32
|
+
* Deutsch** [de]
|
33
|
+
* Italiano** [it]
|
34
|
+
* Nederlands** [nl]
|
35
|
+
* Swedish** [se]
|
36
|
+
* English (British)** [en-GB]
|
37
|
+
|
38
|
+
** Experimental
|
39
|
+
|
40
|
+
* {[en-AU], [en-CA], [en-IN], [en-US]}*** => [en]
|
41
|
+
* {[es-419], [es-AR], [es-CL], [es-CO], [es-MX], [es-PE], [es-VE]}*** => [es]
|
42
|
+
* {[fr-CA], [fr-CH]}*** => [fr]
|
43
|
+
* {[de], [de-AT], [de-CH]}*** => [de]
|
44
|
+
* {[it-CH]}*** => [it]
|
45
|
+
|
46
|
+
*** Aliases
|
47
|
+
|
48
|
+
== Examples / Примеры / Exemples
|
49
|
+
|
50
|
+
I18n.with_locale(:en) { 42.to_words }
|
51
|
+
=> "forty-two"
|
52
|
+
|
53
|
+
I18n.with_locale(:es) { 42.to_words }
|
54
|
+
=> "cuarenta y dos"
|
55
|
+
|
56
|
+
I18n.with_locale(:ru) { 42.to_words }
|
57
|
+
=> "сорок два"
|
58
|
+
|
59
|
+
I18n.with_locale(:fr) { 42.to_words }
|
60
|
+
=> "quarante-deux"
|
61
|
+
|
62
|
+
I18n.with_locale(:hu) { 42.to_words }
|
63
|
+
=> "negyvenkettő"
|
64
|
+
|
65
|
+
I18n.with_locale(:lt) { 42.to_words }
|
66
|
+
=> "keturiasdešimt du"
|
67
|
+
|
68
|
+
I18n.with_locale(:lv) { 42.to_words }
|
69
|
+
=> "četrdesmit divi"
|
70
|
+
|
71
|
+
I18n.with_locale(:et) { 42.to_words }
|
72
|
+
=> "nelikümmend kaks"
|
73
|
+
|
74
|
+
I18n.with_locale(:ka) { 42.to_words }
|
75
|
+
=> "ორმოცდაორი"
|
76
|
+
|
77
|
+
21.to_words
|
78
|
+
=> "twenty-one"
|
79
|
+
=> "veintiuno"
|
80
|
+
=> "двадцать один"
|
81
|
+
=> "vingt et un"
|
82
|
+
=> "двадцять один"
|
83
|
+
=> "huszonegy"
|
84
|
+
=> "dvidešimt vienas"
|
85
|
+
=> "divdesmit viens"
|
86
|
+
=> "kakskümmend üks"
|
87
|
+
=> "yirmi bir"
|
88
|
+
=> "ოცდაერთი"
|
89
|
+
=> "einundzwanzig"
|
90
|
+
=> "ventiuno"
|
91
|
+
=> "éénentwintig"
|
92
|
+
=> "tjugo-en"
|
93
|
+
|
94
|
+
231.to_words
|
95
|
+
=> "two hundred thirty-one"
|
96
|
+
=> "doscientos treinta y uno"
|
97
|
+
=> "двести тридцать один"
|
98
|
+
=> "deux cent trente-trois"
|
99
|
+
=> "двiстi тридцять один"
|
100
|
+
=> "kettőszázharmincegy"
|
101
|
+
=> "du šimtai trisdešimt vienas"
|
102
|
+
=> "divi simti trīsdesmit viens"
|
103
|
+
=> "kakssada kolmkümmend üks"
|
104
|
+
=> "ორას ოცდათერთმეტი"
|
105
|
+
=> "iki yüz otuz bir"
|
106
|
+
=> "zweihunderteinunddreißig"
|
107
|
+
=> "2 cento trentauno"
|
108
|
+
=> "tweehonderdéénendertig"
|
109
|
+
=> "två hundra trettio-en"
|
110
|
+
|
111
|
+
4030.to_words
|
112
|
+
=> "four thousand thirty"
|
113
|
+
=> "cuatro mil treinta"
|
114
|
+
=> "четыре тысячи тридцать"
|
115
|
+
=> "quatre mille trente"
|
116
|
+
=> "чотири тисячi тридцять"
|
117
|
+
=> "négyezer-harminc"
|
118
|
+
=> "keturi tūkstančiai trisdešimt"
|
119
|
+
=> "četri tūkstoši trīsdesmit"
|
120
|
+
=> "neli tuhat kolmkümmend"
|
121
|
+
=> "ოთხი ათას ოცდაათი"
|
122
|
+
=> "dört bin otuz"
|
123
|
+
=> "viertausenddreißig"
|
124
|
+
=> "quattro mille trenta"
|
125
|
+
=> "vierthousanddertig"
|
126
|
+
=> "fyra tusen trettio"
|
127
|
+
|
128
|
+
1000100.to_words
|
129
|
+
=> "one million one hundred"
|
130
|
+
=> "un millón cien"
|
131
|
+
=> "один миллион сто"
|
132
|
+
=> "un million cent"
|
133
|
+
=> "один мiльйон сто"
|
134
|
+
=> "egymillió-egyszáz"
|
135
|
+
=> "milijonas šimtas"
|
136
|
+
=> "viens miljons simts"
|
137
|
+
=> "üks miljon ükssada"
|
138
|
+
=> "ერთი მილიონ ასი"
|
139
|
+
=> "bir milyon yüz"
|
140
|
+
=> "eine Million einhundert"
|
141
|
+
=> "uno milione 1 cento"
|
142
|
+
=> "één miljoen honderd"
|
143
|
+
=> "en miljoner en hundra"
|
144
|
+
|
145
|
+
1000000000000000000000000000000000.to_words
|
146
|
+
=> "one decillion"
|
147
|
+
=> "mil quintillones"
|
148
|
+
=> "один дециллион"
|
149
|
+
=> "un quintilliard"
|
150
|
+
=> "один децильйон"
|
151
|
+
=> "egykvintilliárd"
|
152
|
+
=> "vienas decilijonas"
|
153
|
+
=> "viens deciljons"
|
154
|
+
=> "üks dekiljon"
|
155
|
+
=> "bir desilyon"
|
156
|
+
=> "eine Quintilliarde"
|
157
|
+
=> "uno decillion"
|
158
|
+
=> "één decillion"
|
159
|
+
=> "en decillion"
|
160
|
+
|
161
|
+
[1, 2, 3].to_words
|
162
|
+
=> ["one", "two", "three"]
|
163
|
+
=> ["uno", "dos", "tres"]
|
164
|
+
=> ["один", "два", "три"]
|
165
|
+
=> ["un", "deux", "trois"]
|
166
|
+
=> ["egy", "kettő", "három"]
|
167
|
+
=> ["vienas", "du", "trys"]
|
168
|
+
=> ["viens", "divi", "trīs"]
|
169
|
+
=> ["üks", "kaks", "kolm"]
|
170
|
+
=> ["ერთი", "ორი", "სამი"]
|
171
|
+
|
172
|
+
[11, 22, 133].to_words
|
173
|
+
=> ["eleven", "twenty-two", "one hundred thirty-three"]
|
174
|
+
=> ["once", "veintidós", "ciento treinta y tres"]
|
175
|
+
=> ["одиннадцать", "двадцать два", "сто тридцать три"]
|
176
|
+
=> ["onze", "vingt-deux", "cent trente-trois"]
|
177
|
+
=> ["одинадцять", "двадцять два", "сто тридцять три"]
|
178
|
+
=> ["tizenegy", "huszonkettő", "egyszázharminchárom"]
|
179
|
+
=> ["vienuolika", "dvidešimt du", "šimtas trisdešimt trys"]
|
180
|
+
=> ["vienpadsmit", "divdesmit divi", "simtu trīsdesmit trīs"]
|
181
|
+
=> ["üksteist", "kakskümmend kaks", "ükssada kolmkümmend kolm"]
|
182
|
+
=> ["თერთმეტი", "ოცდაორი", "ას ოცდაცამეტი"]
|
183
|
+
=> ["on bir", "yirmi iki", "yüz otuz üç"]
|
184
|
+
=> ["elf", "zweiundzwanzig", "einhundertdreiunddreißig"]
|
185
|
+
=> ["undici", "ventidue", "1 cento trentatre"]
|
186
|
+
=> ["elf", "tweeentwintig", "honderddrieendertig"]
|
187
|
+
=> ["elva", "tjugo-två", "en hundra trettio-tre"]
|
188
|
+
|
189
|
+
21.77.to_words
|
190
|
+
=> "twenty-one and seventy-seven hundredths"
|
191
|
+
=> "двадцать одна целая и семьдесят семь сотых"
|
192
|
+
=> "двадцять одна цiла i сiмдесят сiм сотих"
|
193
|
+
=> "huszonegy egész hetvenhét század"
|
194
|
+
=> "twenty-one point seven seven"
|
195
|
+
|
196
|
+
== Language options / Языковые опции
|
197
|
+
|
198
|
+
* English / British
|
199
|
+
|
200
|
+
Ordinal form: (ordinal: [true || false])
|
201
|
+
|
202
|
+
I18n.with_locale(:en) { 21.to_words ordinal: true }
|
203
|
+
=> "twenty-first"
|
204
|
+
|
205
|
+
Remove hyphen between tens and ones: (remove_hyphen: [true || false])
|
206
|
+
|
207
|
+
I18n.with_locale(:en) { 21.to_words remove_hyphen: true }
|
208
|
+
=> "twenty one"
|
209
|
+
|
210
|
+
Add 'and' between hundreds and tens: (hundreds_with_union: [true || false])
|
211
|
+
|
212
|
+
I18n.with_locale(:en) { 111.to_words hundreds_with_union: true }
|
213
|
+
=> "one hundred and eleven"
|
214
|
+
|
215
|
+
Remove 'zero' from integral part of float: (remove_zero: [true || false])
|
216
|
+
|
217
|
+
I18n.with_locale(:en) { 0.7.to_words remove_zero: true }
|
218
|
+
=> "seven tenths"
|
219
|
+
|
220
|
+
I18n.with_locale(:en) { [0.1, 0.31, 0.12].to_words remove_zero: true }
|
221
|
+
=> ["one tenth", "thirty-one hundredths", "twelve hundredths"]
|
222
|
+
|
223
|
+
* Russian
|
224
|
+
|
225
|
+
Change gender form: (gender: [:female || :male || :neuter])
|
226
|
+
|
227
|
+
I18n.with_locale(:ru) { 1001.to_words gender: :neuter }
|
228
|
+
=> "одна тысяча одно"
|
229
|
+
|
230
|
+
* Ukranian
|
231
|
+
|
232
|
+
Change gender form: (gender: [:female || :male || :neuter])
|
233
|
+
|
234
|
+
I18n.with_locale(:ru) { 1001.to_words gender: :neuter }
|
235
|
+
=> "одна тисяча одне"
|
236
|
+
|
237
|
+
* Hungarian
|
238
|
+
|
239
|
+
Ordinal form: (ordinal: [true || false])
|
240
|
+
|
241
|
+
I18n.with_locale(:hu) { 21.to_words ordinal: true }
|
242
|
+
=> "huszonegyedik"
|
243
|
+
|
244
|
+
== Requirements / Требования / Configuration Requise
|
245
|
+
|
246
|
+
* 1.9.3 <= Ruby (compatible with/совместимость с/compatible avec Ruby 1.9, JRuby and/и/et Rubinius);
|
247
|
+
* 1.8.7 <= Ruby <= 1.9.2 (-v 0.9.0)
|
248
|
+
* 0.5.0 <= I18n (earlier versions not tested/ранние версии не тестировались/versions précédentes non testées);
|
249
|
+
|
250
|
+
== Installation / Установка / Installation
|
251
|
+
|
252
|
+
gem install numbers_and_words
|
253
|
+
|
254
|
+
== License / Лицензия / Licence
|
255
|
+
|
256
|
+
MIT License
|
257
|
+
|
258
|
+
== Bugs and Language Support / Поправки и Новые Языки / Bugs et Support d'autres Langues
|
259
|
+
|
260
|
+
See CHANGELOG.md for last changes.
|
261
|
+
|
262
|
+
Fork the project. Make your feature addition or bug fix with tests.
|
263
|
+
|
264
|
+
Send a pull request. Bonus points for topic branches.
|
265
|
+
|
266
|
+
== Contacts / Контакты / Contacts
|
267
|
+
|
268
|
+
* Kirill Lazarev (mailto:k.s.lazarev@gmail.com)
|
269
|
+
* Daniel Doubrovkine (link:http://github.com/dblock)
|
270
|
+
* Sergey Shkirando (mailto:shkirando.s@yandex.ru)
|
271
|
+
* Ulrich Sossou (Github[http://github.com/sorich87], {Personal Page}[http://ulrichsossou.com/])
|
272
|
+
* eLod (link:http://github.com/eLod)
|
273
|
+
* Mārtiņš Spriņģis (mailto:mspringis@gmail.com)
|
274
|
+
* Miks Miķelsons (link:http://github.com/miks)
|