num2words 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/config/locales/ar.yml +176 -17
  4. data/config/locales/be.yml +182 -15
  5. data/config/locales/bg.yml +183 -16
  6. data/config/locales/bn.yml +185 -12
  7. data/config/locales/cs.yml +180 -13
  8. data/config/locales/da.yml +182 -15
  9. data/config/locales/de.yml +181 -14
  10. data/config/locales/el.yml +183 -21
  11. data/config/locales/en.yml +129 -12
  12. data/config/locales/es.yml +180 -13
  13. data/config/locales/et.yml +185 -13
  14. data/config/locales/fa.yml +179 -12
  15. data/config/locales/fi.yml +180 -8
  16. data/config/locales/fr.yml +180 -13
  17. data/config/locales/gu.yml +182 -10
  18. data/config/locales/he.yml +182 -20
  19. data/config/locales/hi.yml +182 -15
  20. data/config/locales/hr.yml +181 -14
  21. data/config/locales/hu.yml +180 -13
  22. data/config/locales/id.yml +179 -12
  23. data/config/locales/it.yml +181 -14
  24. data/config/locales/ja.yml +188 -21
  25. data/config/locales/ru.yml +131 -9
  26. data/lib/num2words/config.rb +62 -0
  27. data/lib/num2words/converter.rb +44 -36
  28. data/lib/num2words/locales/ar.rb +10 -2
  29. data/lib/num2words/locales/be.rb +10 -2
  30. data/lib/num2words/locales/bg.rb +10 -2
  31. data/lib/num2words/locales/bn.rb +10 -2
  32. data/lib/num2words/locales/cs.rb +10 -2
  33. data/lib/num2words/locales/da.rb +10 -2
  34. data/lib/num2words/locales/de.rb +10 -2
  35. data/lib/num2words/locales/el.rb +10 -2
  36. data/lib/num2words/locales/en.rb +0 -3
  37. data/lib/num2words/locales/es.rb +10 -2
  38. data/lib/num2words/locales/et.rb +10 -2
  39. data/lib/num2words/locales/fa.rb +10 -2
  40. data/lib/num2words/locales/fi.rb +10 -2
  41. data/lib/num2words/locales/fr.rb +10 -2
  42. data/lib/num2words/locales/gu.rb +10 -2
  43. data/lib/num2words/locales/he.rb +10 -2
  44. data/lib/num2words/locales/hi.rb +10 -2
  45. data/lib/num2words/locales/hr.rb +10 -2
  46. data/lib/num2words/locales/hu.rb +10 -2
  47. data/lib/num2words/locales/id.rb +10 -2
  48. data/lib/num2words/locales/it.rb +10 -2
  49. data/lib/num2words/locales/ja.rb +10 -2
  50. data/lib/num2words/locales/ru.rb +0 -3
  51. data/lib/num2words/version.rb +1 -1
  52. data/lib/num2words.rb +1 -0
  53. metadata +4 -3
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :gu)
11
11
  SCALES = I18n.t("num2words.scales", locale: :gu)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.INR.name", locale: :gu)
14
- MINOR_UNIT = I18n.t("num2words.currencies.INR.fractional.name", locale: :gu)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :gu)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :gu)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :gu)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :gu)
18
+ TIME = I18n.t("num2words.time", locale: :gu)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :gu)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :gu)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :gu)
15
23
  end
16
24
 
17
25
  register :gu, GU
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :he)
11
11
  SCALES = I18n.t("num2words.scales", locale: :he)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.ILS.name", locale: :he)
14
- MINOR_UNIT = I18n.t("num2words.currencies.ILS.fractional.name", locale: :he)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :he)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :he)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :he)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :he)
18
+ TIME = I18n.t("num2words.time", locale: :he)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :he)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :he)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :he)
15
23
  end
16
24
 
17
25
  register :he, HE
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :hi)
11
11
  SCALES = I18n.t("num2words.scales", locale: :hi)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.INR.name", locale: :hi)
14
- MINOR_UNIT = I18n.t("num2words.currencies.INR.fractional.name", locale: :hi)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :hi)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :hi)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :hi)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :hi)
18
+ TIME = I18n.t("num2words.time", locale: :hi)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :hi)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :hi)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :hi)
15
23
  end
16
24
 
17
25
  register :hi, HI
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :hr)
11
11
  SCALES = I18n.t("num2words.scales", locale: :hr)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.EUR.name", locale: :hr)
14
- MINOR_UNIT = I18n.t("num2words.currencies.EUR.fractional.name", locale: :hr)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :hr)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :hr)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :hr)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :hr)
18
+ TIME = I18n.t("num2words.time", locale: :hr)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :hr)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :hr)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :hr)
15
23
  end
16
24
 
17
25
  register :hr, HR
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :hu)
11
11
  SCALES = I18n.t("num2words.scales", locale: :hu)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.HUF.name", locale: :hu)
14
- MINOR_UNIT = I18n.t("num2words.currencies.HUF.fractional.name", locale: :hu)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :hu)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :hu)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :hu)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :hu)
18
+ TIME = I18n.t("num2words.time", locale: :hu)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :hu)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :hu)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :hu)
15
23
  end
16
24
 
17
25
  register :hu, HU
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :id)
11
11
  SCALES = I18n.t("num2words.scales", locale: :id)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.IDR.name", locale: :id)
14
- MINOR_UNIT = I18n.t("num2words.currencies.IDR.fractional.name", locale: :id)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :id)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :id)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :id)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :id)
18
+ TIME = I18n.t("num2words.time", locale: :id)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :id)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :id)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :id)
15
23
  end
16
24
 
17
25
  register :id, ID
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :it)
11
11
  SCALES = I18n.t("num2words.scales", locale: :it)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.EUR.name", locale: :it)
14
- MINOR_UNIT = I18n.t("num2words.currencies.EUR.fractional.name", locale: :it)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :it)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :it)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :it)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :it)
18
+ TIME = I18n.t("num2words.time", locale: :it)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :it)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :it)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :it)
15
23
  end
16
24
 
17
25
  register :it, IT
@@ -10,8 +10,16 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :ja)
11
11
  SCALES = I18n.t("num2words.scales", locale: :ja)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.JPY.name", locale: :ja)
14
- MINOR_UNIT = I18n.t("num2words.currencies.JPY.fractional.name", locale: :ja)
13
+ FRACTIONS = I18n.t("num2words.fractions", locale: :ja)
14
+ GRAMMAR = I18n.t("num2words.grammar", locale: :ja)
15
+
16
+ DATE = I18n.t("num2words.date", locale: :ja)
17
+ DATE_TEMPLATE = I18n.t("num2words.date.template", locale: :ja)
18
+ TIME = I18n.t("num2words.time", locale: :ja)
19
+ TIME_TEMPLATE = I18n.t("num2words.time.template", locale: :ja)
20
+ DATETIME_TEMPLATE = I18n.t("num2words.datetime.template", locale: :ja)
21
+
22
+ ORDINALS = I18n.t("num2words.numbers.ordinals", locale: :ja)
15
23
  end
16
24
 
17
25
  register :ja, JA
@@ -10,9 +10,6 @@ module Num2words
10
10
  HUNDREDS = I18n.t("num2words.hundreds", locale: :ru)
11
11
  SCALES = I18n.t("num2words.scales", locale: :ru)
12
12
 
13
- MAJOR_UNIT = I18n.t("num2words.currencies.RUB.name", locale: :ru)
14
- MINOR_UNIT = I18n.t("num2words.currencies.RUB.fractional.name", locale: :ru)
15
-
16
13
  FRACTIONS = I18n.t("num2words.fractions", locale: :ru)
17
14
  GRAMMAR = I18n.t("num2words.grammar", locale: :ru)
18
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Num2words
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/num2words.rb CHANGED
@@ -5,6 +5,7 @@ require_relative "num2words/version"
5
5
  require_relative "num2words/converter"
6
6
  require_relative "num2words/core_ext"
7
7
  require_relative "num2words/locales"
8
+ require_relative "num2words/config"
8
9
 
9
10
  module Num2words
10
11
  def self.to_words(number, *args, **opts)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: num2words
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Fedotov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-22 00:00:00.000000000 Z
11
+ date: 2025-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -91,6 +91,7 @@ files:
91
91
  - config/locales/vi.yml
92
92
  - config/locales/zh.yml
93
93
  - lib/num2words.rb
94
+ - lib/num2words/config.rb
94
95
  - lib/num2words/converter.rb
95
96
  - lib/num2words/core_ext.rb
96
97
  - lib/num2words/i18n.rb
@@ -169,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
170
  - !ruby/object:Gem::Version
170
171
  version: '0'
171
172
  requirements: []
172
- rubygems_version: 3.1.2
173
+ rubygems_version: 3.1.6
173
174
  signing_key:
174
175
  specification_version: 4
175
176
  summary: Russian number-to-words with currency (руб/коп) and correct declensions