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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7dda6ac868f33ce669414e1ccd72b713018a1540
4
- data.tar.gz: 5dfb9a290c3b542c2d633b9e41f97e63a90a25ca
2
+ SHA256:
3
+ metadata.gz: cdd3051546defefbdea07a93d272b73e439afed392c5d122cabae378e85ce74b
4
+ data.tar.gz: ce785fa0d3bd1807751dfb744eca066904823afe5280a40dea8bccda8ac19178
5
5
  SHA512:
6
- metadata.gz: 02421e944a7a2d5c1720b1f444b5fe42bd85befc811b2f089248e460bb9e9b08f2e3b83df9479a95651efb593d120ae22222c9e6deec58b3997e05802c2cb097
7
- data.tar.gz: 3855cdc267a8cdfe9a6763b103e8f26cfdd733ab93e54f4df759e6bedfc29f143154ac23d15c8b793f7c3b57db9a2e204ab75d07fb2dd97b220bb1b032f68bb0
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(formatter[:delimiter])
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
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Complements
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.1.1'.freeze
4
4
  end
5
5
  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.0
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: 2016-06-30 00:00:00.000000000 Z
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
- rubyforge_project:
132
- rubygems_version: 2.4.5.1
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: