numbers_and_words 0.11.2 → 0.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +23 -5
- data/lib/numbers_and_words.rb +2 -0
- data/lib/numbers_and_words/core_ext.rb +2 -0
- data/lib/numbers_and_words/core_ext/array.rb +2 -0
- data/lib/numbers_and_words/core_ext/float.rb +2 -0
- data/lib/numbers_and_words/core_ext/integer.rb +2 -0
- data/lib/numbers_and_words/helper_classes.rb +2 -0
- data/lib/numbers_and_words/helper_classes/array_extensions/helpers.rb +6 -4
- data/lib/numbers_and_words/helper_classes/figures_array.rb +2 -0
- data/lib/numbers_and_words/helper_classes/words_array.rb +2 -0
- data/lib/numbers_and_words/i18n.rb +2 -0
- data/lib/numbers_and_words/i18n/initialization.rb +2 -0
- data/lib/numbers_and_words/i18n/locales/numbers.cs.yml +37 -26
- data/lib/numbers_and_words/i18n/locales/numbers.de.yml +5 -4
- data/lib/numbers_and_words/i18n/locales/numbers.en-GB.yml +24 -8
- data/lib/numbers_and_words/i18n/locales/numbers.en.yml +10 -6
- data/lib/numbers_and_words/i18n/locales/numbers.es.yml +6 -5
- data/lib/numbers_and_words/i18n/locales/numbers.et.yml +4 -4
- data/lib/numbers_and_words/i18n/locales/numbers.fr.yml +45 -41
- data/lib/numbers_and_words/i18n/locales/numbers.hu.yml +11 -7
- data/lib/numbers_and_words/i18n/locales/numbers.hy.yml +7 -0
- data/lib/numbers_and_words/i18n/locales/numbers.it.yml +3 -3
- data/lib/numbers_and_words/i18n/locales/numbers.ka.yml +6 -14
- data/lib/numbers_and_words/i18n/locales/numbers.lt.yml +4 -5
- data/lib/numbers_and_words/i18n/locales/numbers.lv.yml +4 -5
- data/lib/numbers_and_words/i18n/locales/numbers.nl.yml +4 -3
- data/lib/numbers_and_words/i18n/locales/numbers.pt-BR.yml +51 -22
- data/lib/numbers_and_words/i18n/locales/numbers.pt.yml +21 -8
- data/lib/numbers_and_words/i18n/locales/numbers.ru.yml +39 -27
- data/lib/numbers_and_words/i18n/locales/numbers.se.yml +3 -3
- data/lib/numbers_and_words/i18n/locales/numbers.tr.yml +3 -3
- data/lib/numbers_and_words/i18n/locales/numbers.ua.yml +39 -15
- data/lib/numbers_and_words/i18n/locales/numbers.vi.yml +13 -0
- data/lib/numbers_and_words/i18n/pluralization.rb +3 -1
- data/lib/numbers_and_words/i18n/plurals/cs.rb +15 -10
- data/lib/numbers_and_words/i18n/plurals/fr.rb +5 -3
- data/lib/numbers_and_words/i18n/plurals/lt.rb +10 -7
- data/lib/numbers_and_words/i18n/plurals/lv.rb +5 -3
- data/lib/numbers_and_words/i18n/plurals/plurals.rb +2 -0
- data/lib/numbers_and_words/i18n/plurals/ru.rb +15 -10
- data/lib/numbers_and_words/i18n/plurals/ua.rb +2 -0
- data/lib/numbers_and_words/strategies.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages.rb +3 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/base.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/cs.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/en-GB.rb +3 -1
- data/lib/numbers_and_words/strategies/array_joiner/languages/en.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/es.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb +5 -3
- data/lib/numbers_and_words/strategies/array_joiner/languages/fr.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/hu.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/pt-BR.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/ru.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/ua.rb +2 -0
- data/lib/numbers_and_words/strategies/array_joiner/languages/vi.rb +12 -0
- data/lib/numbers_and_words/strategies/figures_converter.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/cs.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/cs/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/cs/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/cs/integral.rb +3 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en-GB.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en-GB/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en-GB/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en-GB/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/en/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/es.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/es/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/es/fractional.rb +3 -1
- data/lib/numbers_and_words/strategies/figures_converter/decorators/es/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/fr.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/fr/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/fractional.rb +3 -1
- data/lib/numbers_and_words/strategies/figures_converter/decorators/hu/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/pt-BR.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/pt-BR/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/pt-BR/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/pt-BR/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ru/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/fractional.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/ua/integral.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/vi.rb +5 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/vi/base.rb +14 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/vi/fractional.rb +14 -0
- data/lib/numbers_and_words/strategies/figures_converter/decorators/vi/integral.rb +14 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages.rb +14 -15
- data/lib/numbers_and_words/strategies/figures_converter/languages/base.rb +4 -2
- data/lib/numbers_and_words/strategies/figures_converter/languages/cs.rb +4 -4
- data/lib/numbers_and_words/strategies/figures_converter/languages/de.rb +7 -7
- data/lib/numbers_and_words/strategies/figures_converter/languages/en-GB.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/en.rb +3 -9
- data/lib/numbers_and_words/strategies/figures_converter/languages/es.rb +11 -13
- data/lib/numbers_and_words/strategies/figures_converter/languages/et.rb +2 -2
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/base.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/cyrillic.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/families/helpers.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/fr.rb +12 -12
- data/lib/numbers_and_words/strategies/figures_converter/languages/hu.rb +2 -2
- data/lib/numbers_and_words/strategies/figures_converter/languages/{families/latin.rb → hy.rb} +3 -4
- data/lib/numbers_and_words/strategies/figures_converter/languages/it.rb +2 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/ka.rb +13 -15
- data/lib/numbers_and_words/strategies/figures_converter/languages/lt.rb +8 -12
- data/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb +4 -14
- data/lib/numbers_and_words/strategies/figures_converter/languages/nl.rb +3 -5
- data/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb +14 -12
- data/lib/numbers_and_words/strategies/figures_converter/languages/pt.rb +3 -3
- data/lib/numbers_and_words/strategies/figures_converter/languages/ru.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/se.rb +2 -1
- data/lib/numbers_and_words/strategies/figures_converter/languages/tr.rb +4 -4
- data/lib/numbers_and_words/strategies/figures_converter/languages/ua.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/languages/vi.rb +100 -0
- data/lib/numbers_and_words/strategies/figures_converter/options.rb +15 -2
- data/lib/numbers_and_words/strategies/figures_converter/options/base.rb +5 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/base/gender.rb +30 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/base/ordinal.rb +28 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/base/remove_zero.rb +30 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/cs.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/cs/gender.rb +3 -14
- data/lib/numbers_and_words/strategies/figures_converter/options/cs/ordinal.rb +3 -15
- data/lib/numbers_and_words/strategies/figures_converter/options/cs/remove_zero.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/hundreds_with_union.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/ordinal.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/pronounced.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/remove_hyphen.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en-GB/remove_zero.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb +3 -10
- data/lib/numbers_and_words/strategies/figures_converter/options/en/pronounced.rb +6 -13
- data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_hyphen.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/en/remove_zero.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/es.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/es/apocopated.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/es/gender.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/es/remove_zero.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/hu.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/hu/ordinal.rb +3 -50
- data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/gender.rb +3 -18
- data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/ordinal.rb +3 -15
- data/lib/numbers_and_words/strategies/figures_converter/options/pt-BR/remove_zero.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/ru.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ru/gender.rb +3 -17
- data/lib/numbers_and_words/strategies/figures_converter/options/ua.rb +2 -0
- data/lib/numbers_and_words/strategies/figures_converter/options/ua/gender.rb +3 -17
- data/lib/numbers_and_words/translations.rb +4 -0
- data/lib/numbers_and_words/translations/base.rb +3 -1
- data/lib/numbers_and_words/translations/cs.rb +6 -31
- data/lib/numbers_and_words/translations/de.rb +5 -3
- data/lib/numbers_and_words/translations/en-GB.rb +5 -1
- data/lib/numbers_and_words/translations/en.rb +2 -0
- data/lib/numbers_and_words/translations/es.rb +15 -25
- data/lib/numbers_and_words/translations/et.rb +4 -7
- data/lib/numbers_and_words/translations/extensions/fraction_significance.rb +6 -4
- data/lib/numbers_and_words/translations/families/base.rb +5 -3
- data/lib/numbers_and_words/translations/families/cyrillic.rb +6 -8
- data/lib/numbers_and_words/translations/families/latin.rb +2 -0
- data/lib/numbers_and_words/translations/fr.rb +15 -18
- data/lib/numbers_and_words/translations/hu.rb +4 -7
- data/lib/numbers_and_words/translations/hy.rb +21 -0
- data/lib/numbers_and_words/translations/it.rb +2 -0
- data/lib/numbers_and_words/translations/ka.rb +6 -14
- data/lib/numbers_and_words/translations/lt.rb +4 -11
- data/lib/numbers_and_words/translations/lv.rb +4 -11
- data/lib/numbers_and_words/translations/nl.rb +6 -2
- data/lib/numbers_and_words/translations/pt-BR.rb +23 -23
- data/lib/numbers_and_words/translations/pt.rb +5 -11
- data/lib/numbers_and_words/translations/ru.rb +2 -17
- data/lib/numbers_and_words/translations/se.rb +2 -0
- data/lib/numbers_and_words/translations/tr.rb +2 -4
- data/lib/numbers_and_words/translations/ua.rb +2 -13
- data/lib/numbers_and_words/translations/vi.rb +24 -0
- data/lib/numbers_and_words/version.rb +3 -1
- data/lib/numbers_and_words/wrappers.rb +2 -0
- data/lib/numbers_and_words/wrappers/float.rb +3 -1
- data/lib/numbers_and_words/wrappers/integer.rb +2 -0
- metadata +33 -20
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/en'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/en-GB'
|
@@ -8,6 +10,7 @@ require 'numbers_and_words/strategies/figures_converter/decorators/pt-BR'
|
|
8
10
|
require 'numbers_and_words/strategies/figures_converter/decorators/hu'
|
9
11
|
require 'numbers_and_words/strategies/figures_converter/decorators/ua'
|
10
12
|
require 'numbers_and_words/strategies/figures_converter/decorators/cs'
|
13
|
+
require 'numbers_and_words/strategies/figures_converter/decorators/vi'
|
11
14
|
|
12
15
|
module NumbersAndWords
|
13
16
|
module Strategies
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/cs/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/cs/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/cs/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module NumbersAndWords
|
2
4
|
module Strategies
|
3
5
|
module FiguresConverter
|
@@ -14,6 +16,7 @@ module NumbersAndWords
|
|
14
16
|
def integral_significance
|
15
17
|
figs = figures.reverse.join.to_i
|
16
18
|
return nil if @options[:remove_zero] && figs.zero?
|
19
|
+
|
17
20
|
@strategy.translations.integral figs
|
18
21
|
end
|
19
22
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/en-GB/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/en-GB/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/en-GB/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/en/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/en/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/en/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/es/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/es/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/es/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/fr/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/fr/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/fr/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/hu/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/hu/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/hu/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module NumbersAndWords
|
2
4
|
module Strategies
|
3
5
|
module FiguresConverter
|
@@ -11,7 +13,7 @@ module NumbersAndWords
|
|
11
13
|
private
|
12
14
|
|
13
15
|
def fraction_significance
|
14
|
-
@strategy.translations.micros full_fraction.fraction_capacity
|
16
|
+
@strategy.translations.micros full_fraction.fraction_capacity
|
15
17
|
end
|
16
18
|
|
17
19
|
def full_fraction
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/pt-BR/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/pt-BR/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/pt-BR/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/ru/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/ru/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/ru/integral'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/decorators/ua/base'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/decorators/ua/fractional'
|
3
5
|
require 'numbers_and_words/strategies/figures_converter/decorators/ua/integral'
|
@@ -0,0 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'numbers_and_words/strategies/figures_converter/decorators/vi/base'
|
4
|
+
require 'numbers_and_words/strategies/figures_converter/decorators/vi/fractional'
|
5
|
+
require 'numbers_and_words/strategies/figures_converter/decorators/vi/integral'
|
@@ -1,33 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'numbers_and_words/strategies/figures_converter/languages/families/helpers'
|
2
4
|
require 'numbers_and_words/strategies/figures_converter/languages/families/base'
|
3
|
-
|
4
5
|
require 'numbers_and_words/strategies/figures_converter/languages/base'
|
5
6
|
|
6
|
-
require 'numbers_and_words/strategies/figures_converter/languages/
|
7
|
-
|
7
|
+
require 'numbers_and_words/strategies/figures_converter/languages/cs'
|
8
|
+
require 'numbers_and_words/strategies/figures_converter/languages/de'
|
8
9
|
require 'numbers_and_words/strategies/figures_converter/languages/en'
|
9
10
|
require 'numbers_and_words/strategies/figures_converter/languages/en-GB'
|
11
|
+
require 'numbers_and_words/strategies/figures_converter/languages/es'
|
12
|
+
require 'numbers_and_words/strategies/figures_converter/languages/et'
|
10
13
|
require 'numbers_and_words/strategies/figures_converter/languages/fr'
|
11
14
|
require 'numbers_and_words/strategies/figures_converter/languages/hu'
|
12
|
-
require 'numbers_and_words/strategies/figures_converter/languages/et'
|
13
|
-
require 'numbers_and_words/strategies/figures_converter/languages/se'
|
14
15
|
require 'numbers_and_words/strategies/figures_converter/languages/it'
|
16
|
+
require 'numbers_and_words/strategies/figures_converter/languages/ka'
|
17
|
+
require 'numbers_and_words/strategies/figures_converter/languages/lt'
|
18
|
+
require 'numbers_and_words/strategies/figures_converter/languages/lv'
|
15
19
|
require 'numbers_and_words/strategies/figures_converter/languages/nl'
|
20
|
+
require 'numbers_and_words/strategies/figures_converter/languages/pt-BR'
|
21
|
+
require 'numbers_and_words/strategies/figures_converter/languages/pt'
|
22
|
+
require 'numbers_and_words/strategies/figures_converter/languages/se'
|
16
23
|
require 'numbers_and_words/strategies/figures_converter/languages/tr'
|
17
|
-
require 'numbers_and_words/strategies/figures_converter/languages/
|
18
|
-
require 'numbers_and_words/strategies/figures_converter/languages/lv'
|
19
|
-
require 'numbers_and_words/strategies/figures_converter/languages/lt'
|
20
|
-
require 'numbers_and_words/strategies/figures_converter/languages/de'
|
24
|
+
require 'numbers_and_words/strategies/figures_converter/languages/hy'
|
21
25
|
|
22
26
|
require 'numbers_and_words/strategies/figures_converter/languages/families/cyrillic'
|
23
|
-
|
24
27
|
require 'numbers_and_words/strategies/figures_converter/languages/ru'
|
25
28
|
require 'numbers_and_words/strategies/figures_converter/languages/ua'
|
26
|
-
require 'numbers_and_words/strategies/figures_converter/languages/
|
27
|
-
require 'numbers_and_words/strategies/figures_converter/languages/pt-BR'
|
28
|
-
require 'numbers_and_words/strategies/figures_converter/languages/cs'
|
29
|
-
|
30
|
-
require 'numbers_and_words/strategies/figures_converter/languages/ka'
|
29
|
+
require 'numbers_and_words/strategies/figures_converter/languages/vi'
|
31
30
|
|
32
31
|
module NumbersAndWords
|
33
32
|
module Strategies
|
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module NumbersAndWords
|
2
4
|
module Strategies
|
3
5
|
module FiguresConverter
|
4
6
|
module Languages
|
5
7
|
class Base
|
6
|
-
include
|
8
|
+
include Families::Base
|
7
9
|
|
8
10
|
attr_accessor :strategy, :figures, :translations, :strings, :options
|
9
11
|
|
@@ -20,7 +22,7 @@ module NumbersAndWords
|
|
20
22
|
end
|
21
23
|
|
22
24
|
def print_words
|
23
|
-
@strings.reverse.join
|
25
|
+
@strings.reverse.join(' ')
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module NumbersAndWords
|
2
4
|
module Strategies
|
3
5
|
module FiguresConverter
|
4
6
|
module Languages
|
5
7
|
class Cs < Base
|
6
|
-
include Families::Latin
|
7
|
-
|
8
8
|
# methods in translations/cs.rb which can work with :gender or :ordinal
|
9
9
|
%i[ones teens tens tens_with_ones hundreds].each do |method_name|
|
10
10
|
define_method(method_name) do
|
@@ -21,13 +21,13 @@ module NumbersAndWords
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def gender
|
24
|
-
@current_capacity ||= 0
|
25
24
|
# @current_capacity = order of block of 3 digits, backwards (0 = hundreds tens ones)
|
25
|
+
@current_capacity ||= 0
|
26
26
|
|
27
27
|
if @current_capacity.zero?
|
28
28
|
options.gender.result
|
29
29
|
elsif @current_capacity > 2 && @current_capacity.odd?
|
30
|
-
:female # miliardy, biliardy, triliardy
|
30
|
+
:female # miliardy, biliardy, triliardy...
|
31
31
|
else
|
32
32
|
:male
|
33
33
|
end
|