numbers_and_words 0.11.10 → 0.11.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -4
- data/lib/numbers_and_words/helper_classes/array_extensions/helpers.rb +4 -0
- data/lib/numbers_and_words/i18n/locales/numbers.nl.yml +3 -1
- data/lib/numbers_and_words/i18n/plurals/plurals.rb +8 -10
- data/lib/numbers_and_words/strategies/figures_converter/languages/nl.rb +10 -3
- data/lib/numbers_and_words/translations/nl.rb +9 -1
- data/lib/numbers_and_words/version.rb +1 -1
- data/lib/numbers_and_words/wrappers/integer.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fbb352f4dff4e1515b73e36972350bb7161cf0c5d8f931565da3c9ace866b30
|
4
|
+
data.tar.gz: cab2aaac07c83e7f0c19d97f814608083c573ba36840a8499a7d6334875fa5cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b1af1ea9a76b79bbcdcd98fbd57e10eb677d042ac12ab02648e693b77b83ec7551bfc008e3af7c3615e33cd56295cef1f01c5e2ad213adca7e8aef403efc0c
|
7
|
+
data.tar.gz: e7334d4acf4752d1974c55ae76f897c91a64a110b44fea55c42d82913a65fa621737617048067a9ae47ba7bea94d2908d3a937297a348339b4494ed39d01cbeb
|
data/README.rdoc
CHANGED
@@ -34,7 +34,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
34
34
|
* Türkçe [tr]
|
35
35
|
* Deutsch** [de]
|
36
36
|
* Italiano** [it]
|
37
|
-
* Nederlands
|
37
|
+
* Nederlands [nl]
|
38
38
|
* Swedish** [se]
|
39
39
|
* English (British)** [en-GB]
|
40
40
|
* Česky [cs]
|
@@ -107,7 +107,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
107
107
|
=> "ოცდაერთი"
|
108
108
|
=> "einundzwanzig"
|
109
109
|
=> "ventiuno"
|
110
|
-
=> "
|
110
|
+
=> "eenentwintig"
|
111
111
|
=> "tjugo-en"
|
112
112
|
=> "dvacetjedna"
|
113
113
|
=> "vinte e um"
|
@@ -129,7 +129,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
129
129
|
=> "iki yüz otuz bir"
|
130
130
|
=> "zweihunderteinunddreißig"
|
131
131
|
=> "2 cento trentauno"
|
132
|
-
=> "
|
132
|
+
=> "tweehonderdeenendertig"
|
133
133
|
=> "två hundra trettio-en"
|
134
134
|
=> "dvě stě třicetjedna"
|
135
135
|
=> "duzentos e trinta e um"
|
@@ -226,7 +226,7 @@ Deletrea números en varios idiomas utilizando la gema I18n.
|
|
226
226
|
=> ["on bir", "yirmi iki", "yüz otuz üç"]
|
227
227
|
=> ["elf", "zweiundzwanzig", "einhundertdreiunddreißig"]
|
228
228
|
=> ["undici", "ventidue", "1 cento trentatre"]
|
229
|
-
=> ["elf", "
|
229
|
+
=> ["elf", "tweeëntwintig", "honderddrieëndertig"]
|
230
230
|
=> ["elva", "tjugo-två", "en hundra trettio-tre"]
|
231
231
|
=> ["jedenáct", "dvacetdva", "jedno sto třicettři"]
|
232
232
|
=> ["mười một", "hai mươi hai", "một trăm ba mươi ba"]
|
@@ -1,8 +1,10 @@
|
|
1
1
|
nl:
|
2
2
|
numbers:
|
3
|
-
ones: [nul,
|
3
|
+
ones: [nul, een, twee, drie, vier, vijf, zes, zeven, acht, negen]
|
4
|
+
loose_one: één
|
4
5
|
teens: [_, elf, twaalf, dertien, veertien, vijftien, zestien, zeventien, achttien, negentien]
|
5
6
|
tens: [_, tien, twintig, dertig, veertig, vijftig, zestig, zeventig, tachtig, negentig]
|
6
7
|
hundreds: honderd
|
7
8
|
mega: [_, duizend, miljoen, miljard, biljoen, biljard, triljoen, triljard, septiljoen, octillion, noniljoen, decillion]
|
8
9
|
union: en
|
10
|
+
union2or3: ën
|
@@ -1,13 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
rule: Object.const_get("NumbersAndWords::I18n::Plurals::#{language.split('-').collect(&:capitalize).join}::RULE")
|
9
|
-
}
|
3
|
+
NumbersAndWords::I18n::Pluralization.languages.map do |language|
|
4
|
+
[language.to_sym, {
|
5
|
+
i18n: {
|
6
|
+
plural: {
|
7
|
+
rule: Object.const_get("NumbersAndWords::I18n::Plurals::#{language.split('-').collect(&:capitalize).join}::RULE")
|
10
8
|
}
|
11
|
-
}
|
12
|
-
|
13
|
-
|
9
|
+
}
|
10
|
+
}]
|
11
|
+
end.to_h
|
@@ -10,9 +10,16 @@ module NumbersAndWords
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def capacity_iteration
|
13
|
-
if FiguresArray::THOUSAND_CAPACITY
|
14
|
-
|
15
|
-
|
13
|
+
return super if FiguresArray::THOUSAND_CAPACITY != @current_capacity
|
14
|
+
return megs if figures.number_in_capacity(@current_capacity) == 1
|
15
|
+
|
16
|
+
capacity_words = words_in_capacity(@current_capacity)
|
17
|
+
capacity_words.empty? ? [] : [capacity_words, megs].join
|
18
|
+
end
|
19
|
+
|
20
|
+
def simple_number_to_words
|
21
|
+
if @figures.only_ones && @figures.ones == 1
|
22
|
+
[@translations.t(:loose_one)]
|
16
23
|
else
|
17
24
|
super
|
18
25
|
end
|
@@ -6,7 +6,7 @@ module NumbersAndWords
|
|
6
6
|
include NumbersAndWords::Translations::Families::Latin
|
7
7
|
|
8
8
|
def tens_with_ones(numbers, _options = {})
|
9
|
-
[ones(numbers[0]), tens(numbers[1])].join(union)
|
9
|
+
[ones(numbers[0]), tens(numbers[1])].join(union(numbers[0]))
|
10
10
|
end
|
11
11
|
|
12
12
|
def hundreds(number, _options = {})
|
@@ -14,6 +14,14 @@ module NumbersAndWords
|
|
14
14
|
|
15
15
|
super number, separator: ''
|
16
16
|
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def union(units)
|
21
|
+
return t :union2or3 if [2, 3].include?(units)
|
22
|
+
|
23
|
+
t :union
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numbers_and_words
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Lazarev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
|
-
rubygems_version: 3.2.
|
277
|
+
rubygems_version: 3.2.21
|
278
278
|
signing_key:
|
279
279
|
specification_version: 4
|
280
280
|
summary: Spell out numbers in several languages
|