devise-i18n 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2da76cbd6f601a76a7923c43fb8655c4a5cd66f6
4
- data.tar.gz: b36fe70af8111dfba0ba8db21f97dff355a45234
3
+ metadata.gz: 833c00c74986723737b9eb23ecd0f13027f1919c
4
+ data.tar.gz: e3fd099f093abe2ae9be7dd3af6fe33931260313
5
5
  SHA512:
6
- metadata.gz: b772ff93cd3d5a26f50dedac39c0057ecc3493f779dd1e3821abc9aca0d548026b296a19f3a9b3204f9d7afadf831b008400a255298d97f9842d674c3ca7e17e
7
- data.tar.gz: 6155538a692aa458b210422afce1915f7f343c6b47fdd3a37b3980a345cf984a96b39393618d36c5989970c62b96bad528394e2992b0a7578cdce826513ba78e
6
+ metadata.gz: 9428605c2d089d1592efe9b173c5293c6963c2aeab23cfbfe1322e896e558f680afdc79465cc565e4923d66aef7a05834d3170490d37b7b1c70d5e82a66cd573
7
+ data.tar.gz: 72ce83f4b50eebc0ac22b4cadd873d96e3ae2c245ca45fe696fd4fdde2131cdd5590352859853986c88855fcd8d0e188b3b5e29f431984c492d70652d1608e2a
data/README.md CHANGED
@@ -6,9 +6,6 @@
6
6
 
7
7
  Devise supports i18n in controllers, models, and in other areas, but it does not have support for internationalized views. devise-i18n adds this support. Devise also does not include the actual translations. devise-i18n does this too.
8
8
 
9
- devise-18n is for devise v2 and later. For devise v1.5, use the **[devise-1.5 branch](https://github.com/tigrish/devise-i18n/tree/devise-1.5)**.
10
-
11
-
12
9
  ## Installation
13
10
 
14
11
  Add to your Gemfile:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.4.0
@@ -2,4 +2,4 @@
2
2
  <p><%= t('.greeting', recipient: @resource.email) %></p>
3
3
 
4
4
  <p><%= t('.instruction') %></p>
5
- <p><%= link_to t('.action'), confirmation_url(@resource, :confirmation_token => resource_confirmation_token) %></p>
5
+ <p><%= link_to t('.action'), confirmation_url(@resource, :confirmation_token => @token) %></p>
@@ -3,7 +3,7 @@
3
3
 
4
4
  <p><%= t('.instruction') %></p>
5
5
 
6
- <p><%= link_to t('.action'), edit_password_url(@resource, :reset_password_token => resource_reset_password_token) %></p>
6
+ <p><%= link_to t('.action'), edit_password_url(@resource, :reset_password_token => @token) %></p>
7
7
 
8
8
  <p><%= t('.instruction_2') %></p>
9
9
  <p><%= t('.instruction_3') %></p>
@@ -5,4 +5,4 @@
5
5
 
6
6
  <p><%= t('.instruction') %></p>
7
7
 
8
- <p><%= link_to t('.action'), unlock_url(@resource, :unlock_token => resource_unlock_token) %></p>
8
+ <p><%= link_to t('.action'), unlock_url(@resource, :unlock_token => @token) %></p>
data/lib/devise-i18n.rb CHANGED
@@ -1,2 +1 @@
1
1
  require 'devise-i18n/railtie' if defined?(Rails)
2
- require 'devise-i18n/view_helpers'
@@ -14,10 +14,6 @@ module DeviseI18n
14
14
  end
15
15
  end
16
16
 
17
- initializer 'devise-i18n.view_helpers' do
18
- ActionView::Base.include(ViewHelpers)
19
- end
20
-
21
17
  protected
22
18
 
23
19
  def self.add(pattern)
data/rails/locales/ja.yml CHANGED
@@ -38,7 +38,7 @@ ja:
38
38
  already_authenticated: "すでにログインしています。"
39
39
  inactive: "アカウントが有効化されていません。メールに記載された手順にしたがって、アカウントを有効化してください。"
40
40
  invalid: "メールアドレスまたはパスワードが違います。"
41
- last_attempt: "アカウントがロックされる前に、あと1回操作できます。"
41
+ last_attempt: "もう一回誤るとアカウントがロックされます。"
42
42
  locked: "アカウントは凍結されています。"
43
43
  not_found_in_database: "メールアドレスまたはパスワードが違います。"
44
44
  timeout: "セッションがタイムアウトしました。もう一度ログインしてください。"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Dell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-10-13 00:00:00.000000000 Z
13
+ date: 2017-10-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: devise
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '2.0'
21
+ version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '2.0'
28
+ version: '3.1'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rspec
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -135,7 +135,6 @@ files:
135
135
  - app/views/devise/unlocks/new.html.erb
136
136
  - lib/devise-i18n.rb
137
137
  - lib/devise-i18n/railtie.rb
138
- - lib/devise-i18n/view_helpers.rb
139
138
  - lib/generators/devise/i18n/locale_generator.rb
140
139
  - lib/generators/devise/i18n/views_generator.rb
141
140
  - lib/generators/devise/templates/simple_form_for/confirmations/new.html.erb
@@ -1,24 +0,0 @@
1
- module DeviseI18n
2
- module ViewHelpers
3
- def resource_confirmation_token
4
- resource_token(:confirmation)
5
- end
6
-
7
- def resource_reset_password_token
8
- resource_token(:reset_password)
9
- end
10
-
11
- def resource_unlock_token
12
- resource_token(:unlock)
13
- end
14
-
15
- def resource_token(type)
16
- if Devise::VERSION.start_with?('1.', '2.')
17
- @resource.public_send("#{type}_token")
18
- else
19
- @token
20
- end
21
- end
22
- end
23
- end
24
-