numbers_and_words 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/numbers_and_words/core_ext/array.rb +2 -2
  3. data/lib/numbers_and_words/core_ext/float.rb +1 -1
  4. data/lib/numbers_and_words/core_ext/integer.rb +1 -1
  5. data/lib/numbers_and_words/helper_classes.rb +1 -1
  6. data/lib/numbers_and_words/helper_classes/array_extensions/helpers.rb +11 -12
  7. data/lib/numbers_and_words/helper_classes/figures_array.rb +1 -4
  8. data/lib/numbers_and_words/helper_classes/words_array.rb +2 -4
  9. data/lib/numbers_and_words/i18n.rb +4 -4
  10. data/lib/numbers_and_words/i18n/initialization.rb +2 -2
  11. data/lib/numbers_and_words/i18n/locales/numbers.en.yml +3 -3
  12. data/lib/numbers_and_words/i18n/locales/numbers.es.yml +86 -25
  13. data/lib/numbers_and_words/i18n/locales/numbers.fr.yml +54 -1
  14. data/lib/numbers_and_words/i18n/locales/numbers.pt-BR.yml +4 -4
  15. data/lib/numbers_and_words/i18n/locales/numbers.pt.yml +0 -1
  16. data/lib/numbers_and_words/i18n/pluralization.rb +2 -3
  17. data/lib/numbers_and_words/i18n/plurals/fr.rb +3 -3
  18. data/lib/numbers_and_words/i18n/plurals/lt.rb +11 -8
  19. data/lib/numbers_and_words/i18n/plurals/lv.rb +3 -3
  20. data/lib/numbers_and_words/i18n/plurals/ru.rb +15 -10
  21. data/lib/numbers_and_words/strategies.rb +1 -1
  22. data/lib/numbers_and_words/strategies/array_joiner.rb +1 -2
  23. data/lib/numbers_and_words/strategies/array_joiner/languages.rb +3 -1
  24. data/lib/numbers_and_words/strategies/array_joiner/languages/base.rb +1 -1
  25. data/lib/numbers_and_words/strategies/array_joiner/languages/es.rb +10 -0
  26. data/lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb +0 -1
  27. data/lib/numbers_and_words/strategies/array_joiner/languages/fr.rb +10 -0
  28. data/lib/numbers_and_words/strategies/figures_converter.rb +1 -2
  29. data/lib/numbers_and_words/strategies/figures_converter/decorators.rb +8 -6
  30. data/lib/numbers_and_words/strategies/figures_converter/decorators/base.rb +2 -2
  31. data/lib/numbers_and_words/strategies/figures_converter/decorators/en/base.rb +1 -1
  32. data/lib/numbers_and_words/strategies/figures_converter/decorators/en/fractional.rb +2 -3
  33. data/lib/numbers_and_words/strategies/figures_converter/decorators/en/integral.rb +1 -1
  34. data/lib/numbers_and_words/strategies/figures_converter/decorators/es.rb +3 -0
  35. data/lib/numbers_and_words/strategies/figures_converter/decorators/es/base.rb +12 -0
  36. data/lib/numbers_and_words/strategies/figures_converter/decorators/es/fractional.rb +38 -0
  37. data/lib/numbers_and_words/strategies/figures_converter/decorators/es/integral.rb +12 -0
  38. data/lib/numbers_and_words/strategies/figures_converter/decorators/fr.rb +3 -0
  39. data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/base.rb +12 -0
  40. data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/fractional.rb +37 -0
  41. data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/integral.rb +12 -0
  42. data/lib/numbers_and_words/strategies/figures_converter/decorators/hu.rb +1 -1
  43. data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/base.rb +1 -1
  44. data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/fractional.rb +2 -3
  45. data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/integral.rb +1 -1
  46. data/lib/numbers_and_words/strategies/figures_converter/decorators/pt-BR/fractional.rb +1 -2
  47. data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/base.rb +1 -1
  48. data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/fractional.rb +2 -3
  49. data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/integral.rb +1 -2
  50. data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/base.rb +1 -1
  51. data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/fractional.rb +2 -3
  52. data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/integral.rb +1 -2
  53. data/lib/numbers_and_words/strategies/figures_converter/languages.rb +1 -1
  54. data/lib/numbers_and_words/strategies/figures_converter/languages/base.rb +1 -1
  55. data/lib/numbers_and_words/strategies/figures_converter/languages/de.rb +9 -9
  56. data/lib/numbers_and_words/strategies/figures_converter/languages/en-GB.rb +1 -1
  57. data/lib/numbers_and_words/strategies/figures_converter/languages/en.rb +17 -19
  58. data/lib/numbers_and_words/strategies/figures_converter/languages/es.rb +50 -25
  59. data/lib/numbers_and_words/strategies/figures_converter/languages/et.rb +1 -2
  60. data/lib/numbers_and_words/strategies/figures_converter/languages/families/base.rb +5 -5
  61. data/lib/numbers_and_words/strategies/figures_converter/languages/families/cyrillic.rb +5 -5
  62. data/lib/numbers_and_words/strategies/figures_converter/languages/families/helpers.rb +10 -14
  63. data/lib/numbers_and_words/strategies/figures_converter/languages/fr.rb +7 -7
  64. data/lib/numbers_and_words/strategies/figures_converter/languages/hu.rb +8 -8
  65. data/lib/numbers_and_words/strategies/figures_converter/languages/ka.rb +8 -10
  66. data/lib/numbers_and_words/strategies/figures_converter/languages/lt.rb +6 -6
  67. data/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb +2 -2
  68. data/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb +24 -26
  69. data/lib/numbers_and_words/strategies/figures_converter/languages/pt.rb +6 -7
  70. data/lib/numbers_and_words/strategies/figures_converter/languages/tr.rb +4 -4
  71. data/lib/numbers_and_words/strategies/figures_converter/options.rb +6 -5
  72. data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/hundreds_with_union.rb +1 -1
  73. data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/ordinal.rb +1 -1
  74. data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/remove_hyphen.rb +1 -1
  75. data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/remove_zero.rb +1 -1
  76. data/lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb +3 -3
  77. data/lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb +3 -3
  78. data/lib/numbers_and_words/strategies/figures_converter/options/en/pronounced.rb +14 -23
  79. data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_hyphen.rb +2 -3
  80. data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_zero.rb +2 -2
  81. data/lib/numbers_and_words/strategies/figures_converter/options/es.rb +3 -0
  82. data/lib/numbers_and_words/strategies/figures_converter/options/es/apocopated.rb +28 -0
  83. data/lib/numbers_and_words/strategies/figures_converter/options/es/gender.rb +28 -0
  84. data/lib/numbers_and_words/strategies/figures_converter/options/es/remove_zero.rb +28 -0
  85. data/lib/numbers_and_words/strategies/figures_converter/options/hu/ordinal.rb +3 -3
  86. data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/gender.rb +2 -2
  87. data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/ordinal.rb +1 -1
  88. data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/remove_zero.rb +1 -1
  89. data/lib/numbers_and_words/strategies/figures_converter/options/ru/gender.rb +2 -2
  90. data/lib/numbers_and_words/strategies/figures_converter/options/ua/gender.rb +2 -2
  91. data/lib/numbers_and_words/translations/base.rb +2 -2
  92. data/lib/numbers_and_words/translations/de.rb +5 -5
  93. data/lib/numbers_and_words/translations/es.rb +29 -24
  94. data/lib/numbers_and_words/translations/et.rb +3 -3
  95. data/lib/numbers_and_words/translations/extensions/fraction_significance.rb +4 -5
  96. data/lib/numbers_and_words/translations/families/base.rb +8 -8
  97. data/lib/numbers_and_words/translations/families/cyrillic.rb +6 -6
  98. data/lib/numbers_and_words/translations/families/latin.rb +6 -6
  99. data/lib/numbers_and_words/translations/fr.rb +16 -8
  100. data/lib/numbers_and_words/translations/hu.rb +3 -3
  101. data/lib/numbers_and_words/translations/it.rb +3 -3
  102. data/lib/numbers_and_words/translations/ka.rb +13 -13
  103. data/lib/numbers_and_words/translations/lt.rb +4 -5
  104. data/lib/numbers_and_words/translations/lv.rb +4 -5
  105. data/lib/numbers_and_words/translations/nl.rb +3 -3
  106. data/lib/numbers_and_words/translations/pt-BR.rb +18 -18
  107. data/lib/numbers_and_words/translations/pt.rb +4 -5
  108. data/lib/numbers_and_words/translations/ru.rb +5 -5
  109. data/lib/numbers_and_words/translations/se.rb +2 -2
  110. data/lib/numbers_and_words/translations/tr.rb +3 -4
  111. data/lib/numbers_and_words/translations/ua.rb +3 -3
  112. data/lib/numbers_and_words/version.rb +1 -1
  113. data/lib/numbers_and_words/wrappers.rb +1 -1
  114. data/lib/numbers_and_words/wrappers/float.rb +9 -9
  115. data/lib/numbers_and_words/wrappers/integer.rb +3 -3
  116. metadata +16 -4
  117. data/lib/numbers_and_words/helper_classes/array_extensions/validations.rb +0 -19
  118. data/lib/numbers_and_words/i18n/plurals/pt-BR.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24a1ed3859badac70258bc6dc9e7022514766a51
4
- data.tar.gz: 9a9ac6192b4b521abbffab58a6a391deee38673d
3
+ metadata.gz: 8b50a55c2c09583685e41253468a0b3461c8abdc
4
+ data.tar.gz: 0cdf8caaadf8489c87525c989cb169a9fd4987ae
5
5
  SHA512:
6
- metadata.gz: 8bc908a953dad008f8755560f167ea8b5a10af08e6b9de6c4702267f9c170be4e6f07542ded27744779ccfac223801454d47e1a622f23443ef6c44ef0eefcbab
7
- data.tar.gz: cf962a846fbc4a7a7f65464a810ebb9aaa1279c585622da2d0f89035c3441b1dd0637d10bc999027717a1030264d43154bf311b3be165d3c2ca1d09c24e0f0f0
6
+ metadata.gz: a7c2b223dd06568a4537c95c8b732f1bba9a1ca387715eb38c7d8c6c95cd472f15dfcabd84b40a2ddd67edbf47f932d7846c8b6925f7cf4ac0690c10daeda406
7
+ data.tar.gz: 56e6a9a53264ebb40db6e4e9bee0a19565a8d1d4e0d37eadd0e7e04d67442bb0dad1d2bb77db272a6cc08d50750fab6616a68491d0f500d078bc61bb761e804f
@@ -1,6 +1,6 @@
1
1
  class Array
2
- def to_words options = {}
3
- map{|element| element.to_words options}
2
+ def to_words(options = {})
3
+ map { |element| element.to_words options }
4
4
  end
5
5
 
6
6
  def to_figures
@@ -1,5 +1,5 @@
1
1
  class Float
2
- def to_words options = {}
2
+ def to_words(options = {})
3
3
  NumbersAndWords::Wrappers::Float.new(self).to_words options
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class Integer
2
- def to_words options = {}
2
+ def to_words(options = {})
3
3
  NumbersAndWords::Wrappers::Integer.new(self).to_words options
4
4
  end
5
5
  end
@@ -1,2 +1,2 @@
1
1
  require 'numbers_and_words/helper_classes/figures_array'
2
- require 'numbers_and_words/helper_classes/words_array'
2
+ require 'numbers_and_words/helper_classes/words_array'
@@ -12,40 +12,40 @@ module NumbersAndWords
12
12
 
13
13
  def capacity_count
14
14
  count = capacity_length / FIGURES_IN_CAPACITY
15
- 0 == count ? nil : count
15
+ count.zero? ? nil : count
16
16
  end
17
17
 
18
- def figures_array_in_capacity capacity
18
+ def figures_array_in_capacity(capacity)
19
19
  self[capacity * FIGURES_IN_CAPACITY, FIGURES_IN_CAPACITY]
20
20
  end
21
21
 
22
- def number_in_capacity capacity
22
+ def number_in_capacity(capacity)
23
23
  figures_array_in_capacity(capacity).reverse.join.to_i
24
24
  end
25
25
 
26
- def number_under_capacity capacity
26
+ def number_under_capacity(capacity)
27
27
  figures_array_under_capacity(capacity).reverse.join.to_i
28
28
  end
29
29
 
30
- def is_opaque? capacity
30
+ def opaque?(capacity)
31
31
  figures_under = figures_array_under_capacity(capacity)
32
32
  figures_under.count(0) == figures_under.length
33
33
  end
34
34
 
35
- def figures_array_under_capacity capacity
35
+ def figures_array_under_capacity(capacity)
36
36
  self[0..(capacity * FIGURES_IN_CAPACITY) - ONES_SHIFT]
37
37
  end
38
38
 
39
39
  def ones
40
- self[0].to_i if 0 < self[0].to_i
40
+ self[0].to_i if self[0].to_i > 0
41
41
  end
42
42
 
43
43
  def teens
44
- tens_with_ones if 1 == tens
44
+ tens_with_ones if tens == 1
45
45
  end
46
46
 
47
47
  def tens
48
- self[1].to_i if self[1] && 0 < self[1].to_i
48
+ self[1].to_i if self[1] && self[1].to_i > 0
49
49
  end
50
50
 
51
51
  def tens_with_ones
@@ -53,7 +53,7 @@ module NumbersAndWords
53
53
  end
54
54
 
55
55
  def hundreds
56
- self[2].to_i if 0 < self[2].to_i
56
+ self[2].to_i if self[2].to_i > 0
57
57
  end
58
58
 
59
59
  def round_hundred?
@@ -82,9 +82,8 @@ module NumbersAndWords
82
82
 
83
83
  def ordinal_capacity
84
84
  count = ordinal_index / FIGURES_IN_CAPACITY
85
- 0 == count ? nil : count
85
+ count.zero? ? nil : count
86
86
  end
87
87
  end
88
88
  end
89
89
  end
90
-
@@ -1,13 +1,10 @@
1
1
  require 'numbers_and_words/helper_classes/array_extensions/helpers'
2
- require 'numbers_and_words/helper_classes/array_extensions/validations'
3
2
 
4
3
  module NumbersAndWords
5
4
  class FiguresArray < Array
6
5
  include ArrayExtensions::Helpers
7
- include ArrayExtensions::Validations
8
6
 
9
- def to_words options = {}
10
- validate_figure_array!
7
+ def to_words(options = {})
11
8
  local_language { Strategies.figures_converter.new(self, options).run }
12
9
  end
13
10
 
@@ -1,11 +1,9 @@
1
1
  require 'numbers_and_words/helper_classes/array_extensions/helpers'
2
- require 'numbers_and_words/helper_classes/array_extensions/validations'
3
2
 
4
3
  module NumbersAndWords
5
4
  class WordsArray < Array
6
-
7
- def join options = {}
8
- local_language { Strategies.array_joiner.new(self.to_a, options).run }
5
+ def join(options = {})
6
+ local_language { Strategies.array_joiner.new(to_a, options).run }
9
7
  end
10
8
 
11
9
  def local_language
@@ -3,13 +3,13 @@ require 'numbers_and_words/i18n/initialization'
3
3
 
4
4
  module NumbersAndWords
5
5
  module I18n
6
- extend self
6
+ module_function
7
7
 
8
8
  def languages
9
- @languages ||= (locale_files.map { |path| path.split(/[\/.]/)[-2].to_sym })
9
+ @languages ||= (locale_files.map { |path| path.split(%r{[/.]})[-2].to_sym })
10
10
  end
11
11
 
12
- def local_language locale = ::I18n.locale
12
+ def local_language(locale = ::I18n.locale)
13
13
  if languages.include?(locale)
14
14
  locale
15
15
  else
@@ -26,7 +26,7 @@ module NumbersAndWords
26
26
  files 'locales', '*.*'
27
27
  end
28
28
 
29
- def files directory, ext
29
+ def files(directory, ext)
30
30
  Dir[File.join File.dirname(__FILE__), "i18n/#{directory}", "**/#{ext}"]
31
31
  end
32
32
  end
@@ -1,10 +1,10 @@
1
1
  module NumbersAndWords
2
2
  module I18n
3
3
  module Initialization
4
- extend self
4
+ module_function
5
5
 
6
6
  def init
7
- I18n.locale_files.each { |locale_file| ::I18n.load_path << locale_file}
7
+ I18n.locale_files.each { |locale_file| ::I18n.load_path << locale_file }
8
8
  NumbersAndWords::I18n::Pluralization.init
9
9
  end
10
10
  end
@@ -55,13 +55,13 @@ en:
55
55
  undecillionths:
56
56
  one: undecillionth
57
57
  other: undecillionths
58
- duodecillion:
58
+ duodecillionths:
59
59
  one: duodecillionth
60
60
  other: duodecillionths
61
- tredecillion:
61
+ tredecillionths:
62
62
  one: tredecillionth
63
63
  other: tredecillionths
64
- quattuordecillion:
64
+ quattuordecillionths:
65
65
  one: quattuordecillionth
66
66
  other: quattuordecillionths
67
67
  union: and
@@ -1,42 +1,103 @@
1
1
  es:
2
2
  numbers:
3
- one: un
4
- ones: [cero, uno, dos, tres, cuatro, cinco, seis, siete, ocho, nueve]
5
- one_twenties: ún
6
- ones_twenties: [_, uno, dós, trés, cuatro, cinco, séis, siete, ocho, nueve]
7
- teens: [diez, once, doce, trece, catorce, quince, dieciséis, diecisiete, dieciocho, diecinueve]
8
- tens: [_, diez, veinti, treinta, cuarenta, cincuenta, sesenta, setenta, ochenta, noventa]
9
- twenty: veinte
10
- hundreds: [ciento, doscientos, trescientos, cuatrocientos, quinientos, seiscientos, setecientos, ochocientos, novecientos]
11
- one_hundred: cien
12
- mega: [_, thousand, million, billion, trillion, quadrillion, quintillion, sextillion, septillion, octillion, nonillion, decillion, undecillion, duodecillion, tredecillion, quattuordecillion]
13
- thousand: mil
14
- million:
3
+ ones:
4
+ apocopated: un
5
+ male: [cero, uno, dos, tres, cuatro, cinco, seis, siete, ocho, nueve]
6
+ female: [cero, una, dos, tres, cuatro, cinco, seis, siete, ocho, nueve]
7
+ teens: [_, once, doce, trece, catorce, quince, dieciséis, diecisiete, dieciocho, diecinueve]
8
+ tens: [_, diez, veinte, treinta, cuarenta, cincuenta, sesenta, setenta, ochenta, noventa]
9
+ twenties:
10
+ apocopated: veintiún
11
+ male: [_, veintiuno, veintidós, veintitrés, veinticuatro, veinticinco, veintiséis, veintisiete, veintiocho, veintinueve]
12
+ female: [_, veintiuna, veintidós, veintitrés, veinticuatro, veinticinco, veintiséis, veintisiete, veintiocho, veintinueve]
13
+ hundreds:
14
+ apocopated: cien
15
+ male: [_, ciento, doscientos, trescientos, cuatrocientos, quinientos, seiscientos, setecientos, ochocientos, novecientos]
16
+ female: [_, ciento, doscientas, trescientas, cuatrocientas, quinientas, seiscientas, setecientas, ochocientas, novecientas]
17
+ mega: [_, thousands, millions, billions, trillions, quadrillions, quintillions, sextillions, septillions, octillions, nonillions, decillions, undecillions, duodecillions, tredecillions, quattuordecillions]
18
+ thousands: mil
19
+ millions:
15
20
  one: millón
16
21
  other: millones
17
- billion: mil millones
18
- trillion:
22
+ billions: mil millones
23
+ trillions:
19
24
  one: billón
20
25
  other: billones
21
- quadrillion: mil billones
22
- quintillion:
26
+ quadrillions: mil billones
27
+ quintillions:
23
28
  one: trillón
24
29
  other: trillones
25
- sextillion: mil trillones
26
- septillion:
30
+ sextillions: mil trillones
31
+ septillions:
27
32
  one: cuatrillón
28
33
  other: cuatrillones
29
- octillion: mil cuatrillones
30
- nonillion:
34
+ octillions: mil cuatrillones
35
+ nonillions:
31
36
  one: quintillón
32
37
  other: quintillones
33
- decillion: mil quintillones
34
- undecillion:
38
+ decillions: mil quintillones
39
+ undecillions:
35
40
  one: sextillón
36
41
  other: sextillones
37
- duodecillion: mil sextillones
38
- tredecillion:
42
+ duodecillions: mil sextillones
43
+ tredecillions:
39
44
  one: septillón
40
45
  other: septillones
41
- quattuordecillion: mil septillones
46
+ quattuordecillions: mil septillones
47
+ union_separator: con
48
+ micro: [_, tenths, hundredths, thousandths, millionths, billionths, trillionths, quadrillionths, quintillionths, sextillionths, septillionths, octillionths, nonillionths, decillionths, undecillionths, duodecillionths, tredecillionths, quattuordecillionths]
49
+ micro_prefix:
50
+ tens: diez
51
+ hundreds: cien
52
+ tenths:
53
+ one: décima
54
+ other: décimas
55
+ hundredths:
56
+ one: centésima
57
+ other: centésimas
58
+ thousandths:
59
+ one: milésima
60
+ other: milésimas
61
+ millionths:
62
+ one: millonésima
63
+ other: millonésimas
64
+ billionths:
65
+ one: milmillonésima
66
+ other: milmillonésimas
67
+ trillionths:
68
+ one: billonésima
69
+ other: billonésimas
70
+ quadrillionths:
71
+ one: milbillonésima
72
+ other: milbillonésimas
73
+ quintillionths:
74
+ one: trillonésima
75
+ other: trillonésimas
76
+ sextillionths:
77
+ one: miltrillonésima
78
+ other: miltrillonésimas
79
+ septillionths:
80
+ one: cuatrillonésima
81
+ other: cuatrillonésimas
82
+ octillionths:
83
+ one: milcuatrillonésima
84
+ other: milcuatrillonésimas
85
+ nonillionths:
86
+ one: quintillonésima
87
+ other: quintillonésimas
88
+ decillionths:
89
+ one: milquintillonésima
90
+ other: milquintillonésimas
91
+ undecillionths:
92
+ one: sextillonésima
93
+ other: sextillonésimas
94
+ duodecillionths:
95
+ one: milsextillonésima
96
+ other: milsextillonésimas
97
+ tredecillionths:
98
+ one: septillonésima
99
+ other: septillonésimas
100
+ quattuordecillionths:
101
+ one: milseptillonésima
102
+ other: milseptillonésimas
42
103
  union: y
@@ -5,13 +5,66 @@ fr:
5
5
  tens: [zéro, dix, vingt, trente, quarante, cinquante, soixante, soixante-dix, quatre-vingt, quatre-vingt-dix]
6
6
  mega: [ones, thousands, millions, billions, trillions, quadrillions, quintillion, sextillions, septillions, octillions, nonillions, decillions]
7
7
  eighty: quatre-vingts
8
+ union_separator: et
9
+ union: et
10
+ micro: [_, tenths, hundredths, thousandths, millionths, billionths, trillionths, quadrillionths, quintillionths, sextillionths, septillionths, octillionths, nonillionths, decillionths, undecillionths, duodecillionths, tredecillionths, quattuordecillionths]
11
+ tenths:
12
+ one: dixième
13
+ other: dixièmes
14
+ hundredths:
15
+ one: centième
16
+ other: centièmes
17
+ thousandths:
18
+ one: millième
19
+ other: millièmes
20
+ millionths:
21
+ one: millionième
22
+ other: millionièmes
23
+ billionths:
24
+ one: milliardième
25
+ other: milliardièmes
26
+ trillionths:
27
+ one: billionième
28
+ other: billionièmes
29
+ quadrillionths:
30
+ one: billiardième
31
+ other: billiardièmes
32
+ quintillionths:
33
+ one: trillionième
34
+ other: trillionièmes
35
+ sextillionths:
36
+ one: trilliardième
37
+ other: trilliardièmes
38
+ septillionths:
39
+ one: quadrillionième
40
+ other: quadrillionièmes
41
+ octillionths:
42
+ one: quadrilliardième
43
+ other: quadrilliardièmes
44
+ nonillionths:
45
+ one: quintillionième
46
+ other: quintillionièmes
47
+ decillionths:
48
+ one: quintilliardième
49
+ other: quintilliardièmes
50
+ undecillionths:
51
+ one: sextillionième
52
+ other: sextillionièmes
53
+ duodecillionths:
54
+ one: sextilliardième
55
+ other: sextilliardièmes
56
+ tredecillionths:
57
+ one: septillionième
58
+ other: septillionièmes
59
+ quattuordecillionths:
60
+ one: septilliardième
61
+ other: septilliardièmes
8
62
  hundreds:
9
63
  one: cent
10
64
  other: cents
11
65
  thousands:
12
66
  one: mille
13
67
  other: mille
14
- other: mille
15
68
  millions:
16
69
  one: million
17
70
  other: millions
@@ -8,7 +8,6 @@ pt-BR:
8
8
  ones:
9
9
  male: [zero, um, dois, três, quatro, cinco, seis, sete, oito, nove]
10
10
  female: [zero, uma, duas, três, quatro, cinco, seis, sete, oito, nove]
11
- ones_twenties: [zero, um, dois, três, quatro, cinco, seis, sete, oito, nove]
12
11
  one: um
13
12
  teens: [dez, onze, doze, treze, quatorze, quinze, dezesseis, dezessete, dezoito, dezenove]
14
13
  tens: [zero, dez, vinte, trinta, quarenta, cinquenta, sessenta, setenta, oitenta, noventa]
@@ -39,6 +38,7 @@ pt-BR:
39
38
  hundreds:
40
39
  one: centésimo
41
40
  other: centésimos
41
+ separator: de
42
42
  tenths:
43
43
  one: décimo
44
44
  other: décimos
@@ -81,12 +81,12 @@ pt-BR:
81
81
  undecillionths:
82
82
  one: undecilionésimo
83
83
  other: undecilionésimos
84
- duodecillion:
84
+ duodecillionths:
85
85
  one: duodecilionésimo
86
86
  other: duodecilionésimos
87
- tredecillion:
87
+ tredecillionths:
88
88
  one: trecentilionésimo
89
89
  other: trecentilionésimos
90
- quattuordecillion:
90
+ quattuordecillionths:
91
91
  one: quadringentilionésimo
92
92
  other: quadringentilionésimos
@@ -2,7 +2,6 @@ pt:
2
2
  numbers:
3
3
  union: e
4
4
  ones: [zero, um, dois, três, quatro, cinco, seis, sete, oito, nove]
5
- ones_twenties: [zero, um, dois, três, quatro, cinco, seis, sete, oito, nove]
6
5
  one: um
7
6
  teens: [dez, onze, doze, treze, quatorze, quinze, dezesseis, dezessete, dezoito, dezenove]
8
7
  tens: [zero, dez, vinte, trinta, quarenta, cinquenta, sessenta, setenta, oitenta, noventa]
@@ -3,12 +3,11 @@ require 'numbers_and_words/i18n/plurals/ua'
3
3
  require 'numbers_and_words/i18n/plurals/fr'
4
4
  require 'numbers_and_words/i18n/plurals/lv'
5
5
  require 'numbers_and_words/i18n/plurals/lt'
6
- require 'numbers_and_words/i18n/plurals/pt-BR'
7
6
 
8
7
  module NumbersAndWords
9
8
  module I18n
10
9
  module Pluralization
11
- extend self
10
+ module_function
12
11
 
13
12
  def init
14
13
  ::I18n.load_path << config_file
@@ -28,7 +27,7 @@ module NumbersAndWords
28
27
  end
29
28
 
30
29
  def languages
31
- plurals_files.map{|path| path.split(/[\/.]/)[-2]}
30
+ plurals_files.map { |path| path.split(%r{[/.]})[-2] }
32
31
  end
33
32
  end
34
33
  end