l10n 1.0.0 → 1.0.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
2
  SHA1:
3
- metadata.gz: 5ab27dbdb740c4220ad55fb7b9fc27ab5edf1d51
4
- data.tar.gz: f7e40005e73373e64a6240bd729381223080b971
3
+ metadata.gz: 36eedbf1cd75adfb0c60b0d129946830e3a51061
4
+ data.tar.gz: 7761e7398936575ac035ed7127f7bad266a79ba2
5
5
  SHA512:
6
- metadata.gz: 90f3081b3d195719668091d4f004990f98119ced1e7671e78f1a30d3635965be32010c729f80391a97f81fdd12dd0952c0d128098f697d445e0b632d6873faa9
7
- data.tar.gz: 3b4f33bd868fbc3a0f9a69ec8184d6f821761cf31db80232c01e3c59f1e30fb8063661f45972e4f90f4184aeea0289b17429bf0286ad7f26dd00b4bd1356743d
6
+ metadata.gz: 6a10d2ca1eb7c673c2dd710d09b1a6c991a48d986550f11ea7fa8dacb9acb64efe47711affc4bbea0d7f9aa69981003ffcb41df89f05d3554b01b0c2ad297cb6
7
+ data.tar.gz: 2ca30313f972703e11c4e22d1704649cd9c7347b1e33f4c236270a2bc34301674f1ce82b38859fc3392ff8d41fb895173fa5bd5391e229c7118fae0c3ec72025
data/lib/l10n/forms.rb CHANGED
@@ -3,7 +3,8 @@ module L10n
3
3
  module FormBuilder
4
4
 
5
5
  def amount_field(field, options = {})
6
- value = L10n.number_to_rounded(object.send(field))
6
+ format_options = options.extract!(:locale, :precision, :significant, :separator, :delimiter, :strip_insignificant_zeros)
7
+ value = L10n.number_to_rounded(object.public_send(field), format_options)
7
8
  options[:value] = value
8
9
  options[:class] = "#{options[:class]} amount_field"
9
10
  text_field(field, options)
@@ -0,0 +1,15 @@
1
+ module L10n
2
+ module JavaScriptHelper
3
+
4
+ def i18n_script_tag
5
+ javascript_tag(%%
6
+ var I18n = I18n || {};
7
+
8
+ I18n.locale = function() {
9
+ return("#{I18n.locale}");
10
+ };
11
+ %)
12
+ end
13
+
14
+ end
15
+ end
data/lib/l10n/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module L10n
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
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.0.0
4
+ version: 1.0.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: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: debugger
84
+ name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -143,6 +143,7 @@ files:
143
143
  - lib/l10n/forms.rb
144
144
  - lib/l10n/i18n_extensions.rb
145
145
  - lib/l10n/inflections.rb
146
+ - lib/l10n/javascript_helper.rb
146
147
  - lib/l10n/numeric_column_conversions.rb
147
148
  - lib/l10n/request.rb
148
149
  - lib/l10n/translation_validator.rb
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  version: '0'
169
170
  requirements: []
170
171
  rubyforge_project:
171
- rubygems_version: 2.2.0
172
+ rubygems_version: 2.2.2
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Extensions for Rails I18n