i18n-complements 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/i18n/complements/localize_extension.rb +3 -1
- data/lib/i18n/complements/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cdd3051546defefbdea07a93d272b73e439afed392c5d122cabae378e85ce74b
|
4
|
+
data.tar.gz: ce785fa0d3bd1807751dfb744eca066904823afe5280a40dea8bccda8ac19178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe42ba93dc9828cb432e713cba3dda7134a04dd4f0574dd5dd6849f71a3f8c62f906948172859a94cb3b43637b3c21b3682e5e96fe391bf2f986db3e39682dbd
|
7
|
+
data.tar.gz: 73eb8bc1073b0c877eec418e93457369a5449bd827834bb89091d66d73edb1ffe6d11bbad8915244eb942a5964504e500e7b5dbf58685c6130b29077b7ed1c04
|
@@ -23,13 +23,15 @@ module I18n
|
|
23
23
|
object = object.abs
|
24
24
|
end
|
25
25
|
|
26
|
+
formatter[:delimiter] = "\u{00A0}" if formatter[:delimiter] == ' '
|
27
|
+
|
26
28
|
value = object.to_s.split(/\./)
|
27
29
|
integrals = value[0].to_s
|
28
30
|
decimals = value[1].to_s
|
29
31
|
value = integrals.gsub(/^0+[1-9]+/, '').gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{formatter[:delimiter]}")
|
30
32
|
decimals = '0' if decimals.to_s.match(/^\s*$/) && object.is_a?(Float)
|
31
33
|
unless decimals.to_s =~ /^\s*$/
|
32
|
-
after = decimals.gsub(/0+$/, '').ljust(formatter[:precision], '0').scan(/.{1,3}/).join(
|
34
|
+
after = decimals.gsub(/0+$/, '').ljust(formatter[:precision], '0').scan(/.{1,3}/).join('')
|
33
35
|
unless after =~ /\A[[:space:]]*\z/
|
34
36
|
value << formatter[:separator] + after
|
35
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-complements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Texier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - ">"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '10'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email: burisu@oneiros.fr
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
@@ -113,7 +113,7 @@ homepage: http://github.com/burisu/i18n-complements
|
|
113
113
|
licenses:
|
114
114
|
- MIT
|
115
115
|
metadata: {}
|
116
|
-
post_install_message:
|
116
|
+
post_install_message:
|
117
117
|
rdoc_options: []
|
118
118
|
require_paths:
|
119
119
|
- lib
|
@@ -128,9 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
|
132
|
-
|
133
|
-
signing_key:
|
131
|
+
rubygems_version: 3.0.3
|
132
|
+
signing_key:
|
134
133
|
specification_version: 4
|
135
134
|
summary: I18n missing functionnalities
|
136
135
|
test_files:
|