devise-i18n-views 0.2.0 → 0.2.2
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.
- data/README.md +2 -2
- data/VERSION +1 -1
- data/app/views/devise/mailer/confirmation_instructions.html.erb +3 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +5 -5
- data/app/views/devise/mailer/unlock_instructions.html.erb +4 -4
- data/devise-i18n-views.gemspec +3 -3
- data/lib/generators/devise/views/locale/locale_generator.rb +10 -0
- metadata +4 -4
- data/lib/generators/devise_i18n_views/locale/locale_generator.rb +0 -8
data/README.md
CHANGED
@@ -12,10 +12,10 @@ gem 'devise-i18n-views'
|
|
12
12
|
|
13
13
|
and run `bundle install`.
|
14
14
|
|
15
|
-
Then you need to install the required translations in your `config/locales`. You can do this either manually (downloading them from [devise-i18n-views/locales](https://github.com/mcasimir/devise-i18n-views/tree/master/locales)) or through the apposite generator `
|
15
|
+
Then you need to install the required translations in your `config/locales`. You can do this either manually (downloading them from [devise-i18n-views/locales](https://github.com/mcasimir/devise-i18n-views/tree/master/locales)) or through the apposite generator `devise:views:locale`, eg.
|
16
16
|
|
17
17
|
``` sh
|
18
|
-
rails g
|
18
|
+
rails g devise:views:locale it
|
19
19
|
```
|
20
20
|
|
21
21
|
will generate `config/locales/devise.views.it.yml`.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<p><%= t('
|
1
|
+
<p><%= t('.greeting', :recepient => @resource.email, :default => "Welcome #{@resource.email}!") %></p>
|
2
2
|
|
3
|
-
<p><%= t('
|
3
|
+
<p><%= t('.instruction', :default => "You can confirm your account email through the link below:") %></p>
|
4
4
|
|
5
|
-
<p><%= link_to t('
|
5
|
+
<p><%= link_to t('.action', :default => "Confirm my account"),
|
6
6
|
confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<p><%= t('
|
1
|
+
<p><%= t('.greeting', :recepient => @resource.email, :default => "Hello #{@resource.email}!") %></p>
|
2
2
|
|
3
|
-
<p><%= t('
|
3
|
+
<p><%= t('.instruction', :default => "Someone has requested a link to change your password, and you can do this through the link below.") %></p>
|
4
4
|
|
5
|
-
<p><%= link_to t('
|
5
|
+
<p><%= link_to t('.action', :default => "Change my password"), edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
6
6
|
|
7
|
-
<p><%= t('
|
8
|
-
<p><%= t('
|
7
|
+
<p><%= t('.instruction_2', :default => "If you didn't request this, please ignore this email.") %></p>
|
8
|
+
<p><%= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.") %></p>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<p><%= t('
|
1
|
+
<p><%= t('.greeting', :recepient => @resource.email, :default => "Hello #{@resource.email}!") %></p>
|
2
2
|
|
3
|
-
<p><%= t('
|
3
|
+
<p><%= t('.message', :default => "Your account has been locked due to an excessive amount of unsuccessful sign in attempts.") %></p>
|
4
4
|
|
5
|
-
<p><%= t('
|
5
|
+
<p><%= t('.instruction', :default => "Click the link below to unlock your account:") %></p>
|
6
6
|
|
7
|
-
<p><%= link_to t('
|
7
|
+
<p><%= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
data/devise-i18n-views.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "devise-i18n-views"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["mcasimir"]
|
12
|
-
s.date = "2012-07-
|
12
|
+
s.date = "2012-07-25"
|
13
13
|
s.description = "I18n support for devise views"
|
14
14
|
s.email = "maurizio.cas@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
"app/views/devise/unlocks/new.html.erb",
|
39
39
|
"devise-i18n-views.gemspec",
|
40
40
|
"lib/devise-i18n-views.rb",
|
41
|
-
"lib/generators/
|
41
|
+
"lib/generators/devise/views/locale/locale_generator.rb",
|
42
42
|
"locales/en.yml",
|
43
43
|
"locales/it.yml"
|
44
44
|
]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Devise
|
2
|
+
module Views
|
3
|
+
class LocaleGenerator < Rails::Generators::NamedBase
|
4
|
+
source_root File.expand_path('../../../../../../locales', __FILE__)
|
5
|
+
def copy_locale
|
6
|
+
copy_file("#{name}.yml", Rails.root.join("config", "locales", "devise.views.#{name}.yml"))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-i18n-views
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -72,7 +72,7 @@ files:
|
|
72
72
|
- app/views/devise/unlocks/new.html.erb
|
73
73
|
- devise-i18n-views.gemspec
|
74
74
|
- lib/devise-i18n-views.rb
|
75
|
-
- lib/generators/
|
75
|
+
- lib/generators/devise/views/locale/locale_generator.rb
|
76
76
|
- locales/en.yml
|
77
77
|
- locales/it.yml
|
78
78
|
homepage: http://github.com/mcasimir/devise-i18n-views
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
segments:
|
92
92
|
- 0
|
93
|
-
hash: -
|
93
|
+
hash: -927592630435595216
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
@@ -1,8 +0,0 @@
|
|
1
|
-
module DeviseI18nViews
|
2
|
-
class LocaleGenerator < Rails::Generators::NamedBase
|
3
|
-
source_root File.expand_path('../../../../../locales', __FILE__)
|
4
|
-
def copy_locale
|
5
|
-
copy_file("#{name}.yml", Rails.root.join("config", "locales", "devise.views.#{name}.yml"))
|
6
|
-
end
|
7
|
-
end
|
8
|
-
end
|