l10n 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/l10n/numericality_validator.rb +8 -12
- data/lib/l10n/request.rb +1 -1
- data/lib/l10n/version.rb +1 -1
- metadata +31 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98edc4c6d3ba2537048f259a94513f30cc63d724ef47d2b58d485e8851e6b1a2
|
4
|
+
data.tar.gz: 9ce041fb0b01bfbfbf519614f9a04491bf83d72394094268cedbe7a3d64f1d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4669d8e182957b4a8b38c8d4eb3fa10812942fe06f43bd2539e0aeff7b49851c26f45144f02fa507328ab1a048582935b47e4c9bd0b1c28fe7bb81ada423922d
|
7
|
+
data.tar.gz: 48132d2234210fd4f1007c1732ea59a663ff7fd3de0487ca666e0fa3557d80b7367d88f5258c4b44330b712af560f4c8638e788534be73c4b819cb3282489a6f
|
@@ -1,20 +1,16 @@
|
|
1
1
|
module L10n
|
2
2
|
module NumericalityValidatorExt
|
3
3
|
|
4
|
-
|
4
|
+
private
|
5
5
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
rescue ArgumentError, TypeError
|
14
|
-
nil
|
6
|
+
def parse_as_number(raw_value)
|
7
|
+
raw_value = Numeric.delocalize(raw_value) if is_localized_number?(raw_value)
|
8
|
+
super(raw_value)
|
9
|
+
end
|
10
|
+
|
11
|
+
def is_localized_number?(value)
|
12
|
+
numeric_exp_for_current_locale === value
|
15
13
|
end
|
16
|
-
|
17
|
-
private
|
18
14
|
|
19
15
|
def numeric_exp_for_current_locale
|
20
16
|
separator = I18n.t(:'number.format.separator')
|
data/lib/l10n/request.rb
CHANGED
data/lib/l10n/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: l10n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -28,96 +28,96 @@ dependencies:
|
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '5.2'
|
34
31
|
- - ">="
|
35
32
|
- !ruby/object:Gem::Version
|
36
33
|
version: 5.2.0
|
34
|
+
- - "~>"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 5.2.3
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "~>"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '5.2'
|
44
41
|
- - ">="
|
45
42
|
- !ruby/object:Gem::Version
|
46
43
|
version: 5.2.0
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 5.2.3
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activesupport
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '5.2'
|
54
51
|
- - ">="
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 5.2.0
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 5.2.3
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '5.2'
|
64
61
|
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: 5.2.0
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 5.2.3
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: actionpack
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '5.2'
|
74
71
|
- - ">="
|
75
72
|
- !ruby/object:Gem::Version
|
76
73
|
version: 5.2.0
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 5.2.3
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '5.2'
|
84
81
|
- - ">="
|
85
82
|
- !ruby/object:Gem::Version
|
86
83
|
version: 5.2.0
|
84
|
+
- - "~>"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 5.2.3
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: railties
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- - "~>"
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '5.2'
|
94
91
|
- - ">="
|
95
92
|
- !ruby/object:Gem::Version
|
96
93
|
version: 5.2.0
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 5.2.3
|
97
97
|
type: :runtime
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '5.2'
|
104
101
|
- - ">="
|
105
102
|
- !ruby/object:Gem::Version
|
106
103
|
version: 5.2.0
|
104
|
+
- - "~>"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 5.2.3
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: sqlite3
|
109
109
|
requirement: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - "
|
111
|
+
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
113
|
+
version: '0'
|
114
114
|
type: :development
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - "
|
118
|
+
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
120
|
+
version: '0'
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: byebug
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,8 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: '0'
|
212
212
|
requirements: []
|
213
|
-
|
214
|
-
rubygems_version: 2.7.6
|
213
|
+
rubygems_version: 3.0.3
|
215
214
|
signing_key:
|
216
215
|
specification_version: 4
|
217
216
|
summary: Make I18n roar again
|