devise-i18n 1.5.1 → 1.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +33 -3
  3. data/VERSION +1 -1
  4. data/app/views/devise/confirmations/new.html.erb +2 -2
  5. data/app/views/devise/mailer/confirmation_instructions.html.erb +3 -3
  6. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  7. data/app/views/devise/mailer/password_change.html.erb +0 -1
  8. data/app/views/devise/mailer/reset_password_instructions.html.erb +1 -2
  9. data/app/views/devise/mailer/unlock_instructions.html.erb +1 -2
  10. data/app/views/devise/passwords/edit.html.erb +6 -3
  11. data/app/views/devise/passwords/new.html.erb +2 -2
  12. data/app/views/devise/registrations/edit.html.erb +15 -11
  13. data/app/views/devise/registrations/new.html.erb +8 -5
  14. data/app/views/devise/sessions/new.html.erb +2 -2
  15. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  16. data/app/views/devise/shared/_links.html.erb +9 -9
  17. data/app/views/devise/unlocks/new.html.erb +2 -2
  18. data/lib/generators/devise/templates/simple_form_for/confirmations/new.html.erb +5 -1
  19. data/lib/generators/devise/templates/simple_form_for/passwords/edit.html.erb +10 -2
  20. data/lib/generators/devise/templates/simple_form_for/passwords/new.html.erb +4 -1
  21. data/lib/generators/devise/templates/simple_form_for/registrations/edit.html.erb +13 -7
  22. data/lib/generators/devise/templates/simple_form_for/registrations/new.html.erb +11 -3
  23. data/lib/generators/devise/templates/simple_form_for/sessions/new.html.erb +7 -2
  24. data/lib/generators/devise/templates/simple_form_for/unlocks/new.html.erb +4 -1
  25. data/rails/locales/af.yml +25 -18
  26. data/rails/locales/ar.yml +110 -103
  27. data/rails/locales/az.yml +95 -88
  28. data/rails/locales/be.yml +109 -102
  29. data/rails/locales/bg.yml +112 -105
  30. data/rails/locales/bn.yml +111 -104
  31. data/rails/locales/bs.yml +74 -67
  32. data/rails/locales/ca.yml +27 -18
  33. data/rails/locales/cs.yml +60 -50
  34. data/rails/locales/da.yml +101 -92
  35. data/rails/locales/de-CH.yml +30 -21
  36. data/rails/locales/de.yml +37 -26
  37. data/rails/locales/el.yml +110 -101
  38. data/rails/locales/en-GB.yml +31 -21
  39. data/rails/locales/en.yml +17 -6
  40. data/rails/locales/es-CO.yml +143 -0
  41. data/rails/locales/es-MX.yml +17 -6
  42. data/rails/locales/es.yml +25 -14
  43. data/rails/locales/et.yml +8 -1
  44. data/rails/locales/fa.yml +111 -104
  45. data/rails/locales/fi.yml +9 -0
  46. data/rails/locales/fr-CA.yml +50 -41
  47. data/rails/locales/fr.yml +49 -40
  48. data/rails/locales/ha.yml +25 -18
  49. data/rails/locales/he.yml +113 -104
  50. data/rails/locales/hi.yml +149 -0
  51. data/rails/locales/hr.yml +74 -67
  52. data/rails/locales/hu.yml +32 -25
  53. data/rails/locales/id.yml +12 -5
  54. data/rails/locales/ig.yml +25 -18
  55. data/rails/locales/is.yml +25 -16
  56. data/rails/locales/it.yml +20 -9
  57. data/rails/locales/ja.yml +100 -93
  58. data/rails/locales/ka.yml +110 -102
  59. data/rails/locales/km.yml +141 -0
  60. data/rails/locales/ko.yml +102 -95
  61. data/rails/locales/lo-LA.yml +116 -109
  62. data/rails/locales/lt.yml +73 -66
  63. data/rails/locales/lv.yml +43 -33
  64. data/rails/locales/mk.yml +146 -0
  65. data/rails/locales/ms.yml +9 -2
  66. data/rails/locales/nb.yml +11 -2
  67. data/rails/locales/nl.yml +27 -18
  68. data/rails/locales/nn-NO.yml +10 -3
  69. data/rails/locales/no.yml +10 -3
  70. data/rails/locales/pap-AW.yml +143 -0
  71. data/rails/locales/pap-CW.yml +143 -0
  72. data/rails/locales/pl.yml +41 -27
  73. data/rails/locales/pt-BR.yml +22 -13
  74. data/rails/locales/pt.yml +64 -53
  75. data/rails/locales/ro.yml +33 -23
  76. data/rails/locales/ru.yml +115 -100
  77. data/rails/locales/si.yml +110 -103
  78. data/rails/locales/sk.yml +17 -7
  79. data/rails/locales/sl.yml +33 -26
  80. data/rails/locales/sq.yml +147 -0
  81. data/rails/locales/sr-RS.yml +118 -103
  82. data/rails/locales/sr.yml +75 -64
  83. data/rails/locales/sv.yml +20 -11
  84. data/rails/locales/th.yml +110 -103
  85. data/rails/locales/tl.yml +33 -26
  86. data/rails/locales/tr.yml +40 -33
  87. data/rails/locales/uk.yml +115 -104
  88. data/rails/locales/ur.yml +106 -99
  89. data/rails/locales/vi.yml +29 -20
  90. data/rails/locales/yo.yml +97 -74
  91. data/rails/locales/zh-CN.yml +111 -104
  92. data/rails/locales/zh-HK.yml +111 -104
  93. data/rails/locales/zh-TW.yml +112 -105
  94. data/rails/locales/zh-YUE.yml +111 -104
  95. metadata +49 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 81073171fabab1e696d907c582fb2f24761f78e9
4
- data.tar.gz: 0fbd1307cb25a416fe90d50a2295dc0fadbe6d4c
2
+ SHA256:
3
+ metadata.gz: b1c2fef9262ab425f0be6032c1754f354caa752789f02c49b0d1d712aa7c362c
4
+ data.tar.gz: 728bddbbdb6e1bd4e493defb6f0b53b7409535780a84cce9d6f0dea514330f19
5
5
  SHA512:
6
- metadata.gz: 8e3e28f775712f79c436d35ee42a5767ea9166430574e5e83d246447f225befee923075642b1a7ebfdd509173e081ac08cfa4bf09b980f1acba47920b400cacc
7
- data.tar.gz: '0821e21b06d9bbdd21e444478b91472919cdd1968e54e2a9da1be91ff935d4a5fbdf217068d90932b8c0b0c0d430794582d253200d7165977425d7baf1d92d49'
6
+ metadata.gz: f2f7f3ad8686168951a928df5a0c31df647b81f457c4a7aabf66b93ac3406f8d820bbd6c86d802132a76c4ac32a21187dc7b2b08cebd10e6c140a01e238d00d1
7
+ data.tar.gz: c5eed45a15d6f328ffe225988ba307dceb41ab0311fd825e3ebc537bdc6c68c372977c3f104b9d5e26fc6103bef33587b0d1b40692a58ee29f525ff3b5de0d3d
data/README.md CHANGED
@@ -13,9 +13,37 @@ Add to your Gemfile:
13
13
  gem 'devise-i18n'
14
14
  ```
15
15
 
16
- Assuming you have _not_ previously generated Devise's views into your project, that's all you need to do. If you _have_ previously done this, you will need to regenerate your views (see the next section) and then reapply whatever customizations that made you do this in the first place.
16
+ Assuming you have _not_ previously generated Devise's views into your project, that's all you need to do. If you _have_ previously done this, you will need to regenerate your views (see "Customizing views" below) and then reapply whatever customizations that made you do this in the first place.
17
17
 
18
- NOTE: If you have the ```simple_form``` gem in your Gemfile, this command will generate the corresponding views using the simple_form form builder.
18
+ ## Setting your locale
19
+
20
+ You will need to set a locale in your application as described in the [Rails Internationalization Guide](https://guides.rubyonrails.org/i18n.html).
21
+
22
+ If you are setting the locale per request (because your application supports multiple locales), the suggested code in that guide (using `I18n.with_locale` inside an `around_action`) will not work properly with devise-i18n. Due to [a bug in warden](https://github.com/wardencommunity/warden/issues/180), some error messages will not be translated. Instead, you can set the locale in a `before_action`:
23
+
24
+ ```ruby
25
+ before_action do
26
+ I18n.locale = :es # Or whatever logic you use to choose.
27
+ end
28
+ ```
29
+
30
+ or in middleware:
31
+
32
+ ```ruby
33
+ class LocaleMiddleware
34
+ def initialize(app)
35
+ @app = app
36
+ end
37
+
38
+ def call(env)
39
+ I18n.locale = :es # Or whatever logic you use to choose.
40
+ status, headers, body = @app.call(env)
41
+ end
42
+ end
43
+ ```
44
+ ```ruby
45
+ config.middleware.use ::LocaleMiddleware
46
+ ```
19
47
 
20
48
  ## Customizing views
21
49
 
@@ -26,6 +54,8 @@ rails g devise:i18n:views
26
54
  ```
27
55
  You should only do this if you really need to, though, because doing this will make it so that you won't get the updated views should they change in a future version of devise-i18n. To "uncustomize" the views, just delete them, and your app will go back to grabbing devise-i18n's default views.
28
56
 
57
+ If you have ```simple_form``` in your Gemfile, this command will generate the corresponding views using the simple_form form builder.
58
+
29
59
  ## Scoped views
30
60
 
31
61
  If you need to use scoped views (for example, if you have different ones for users and admins), you can include the scope in this command.
@@ -33,7 +63,7 @@ If you need to use scoped views (for example, if you have different ones for use
33
63
  rails g devise:i18n:views user
34
64
  ```
35
65
 
36
- You will additionally need to generate the the translations into your app per the following section and then add keys in each file for the scope you are using.
66
+ You will additionally need to generate the translations into your app per the following section and then add keys in each file for the scope you are using.
37
67
 
38
68
  ## Customizing translations
39
69
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.9.4
@@ -1,11 +1,11 @@
1
1
  <h2><%= t('.resend_confirmation_instructions') %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9
9
  </div>
10
10
 
11
11
  <div class="actions">
@@ -1,5 +1,5 @@
1
- <% require 'devise/version' %>
2
- <p><%= t('.greeting', recipient: @resource.email) %></p>
1
+ <p><%= t('.greeting', recipient: @email) %></p>
3
2
 
4
3
  <p><%= t('.instruction') %></p>
5
- <p><%= link_to t('.action'), confirmation_url(@resource, :confirmation_token => @token) %></p>
4
+
5
+ <p><%= link_to t('.action'), confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p><%= t('.greeting', recipient: @email) %></p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p><%= t('.message_unconfirmed', email: @resource.unconfirmed_email) %></p>
5
+ <% else %>
6
+ <p><%= t('.message', email: @resource.email) %></p>
7
+ <% end %>
@@ -1,4 +1,3 @@
1
- <% require 'devise/version' %>
2
1
  <p><%= t('.greeting', recipient: @resource.email) %></p>
3
2
 
4
3
  <p><%= t('.message') %></p>
@@ -1,9 +1,8 @@
1
- <% require 'devise/version' %>
2
1
  <p><%= t('.greeting', recipient: @resource.email) %></p>
3
2
 
4
3
  <p><%= t('.instruction') %></p>
5
4
 
6
- <p><%= link_to t('.action'), edit_password_url(@resource, :reset_password_token => @token) %></p>
5
+ <p><%= link_to t('.action'), edit_password_url(@resource, reset_password_token: @token) %></p>
7
6
 
8
7
  <p><%= t('.instruction_2') %></p>
9
8
  <p><%= t('.instruction_3') %></p>
@@ -1,8 +1,7 @@
1
- <% require 'devise/version' %>
2
1
  <p><%= t('.greeting', recipient: @resource.email) %></p>
3
2
 
4
3
  <p><%= t('.message') %></p>
5
4
 
6
5
  <p><%= t('.instruction') %></p>
7
6
 
8
- <p><%= link_to t('.action'), unlock_url(@resource, :unlock_token => @token) %></p>
7
+ <p><%= link_to t('.action'), unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,17 +1,20 @@
1
1
  <h2><%= t('.change_your_password') %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
  <%= f.hidden_field :reset_password_token %>
6
6
 
7
7
  <div class="field">
8
8
  <%= f.label :password, t('.new_password') %><br />
9
- <%= f.password_field :password, autocomplete: "off" %>
9
+ <% if @minimum_password_length %>
10
+ <em><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></em><br />
11
+ <% end %>
12
+ <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
10
13
  </div>
11
14
 
12
15
  <div class="field">
13
16
  <%= f.label :password_confirmation, t('.confirm_new_password') %><br />
14
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
17
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
15
18
  </div>
16
19
 
17
20
  <div class="actions">
@@ -1,11 +1,11 @@
1
1
  <h2><%= t('.forgot_your_password') %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
9
  </div>
10
10
 
11
11
  <div class="actions">
@@ -1,39 +1,43 @@
1
- <h2><%= t('.title', resource: resource_class.model_name.human) %></h2>
1
+ <h2><%= t('.title', resource: resource.model_name.human) %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
9
  </div>
10
10
 
11
11
  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12
- <p>
13
- <%= t('.currently_waiting_confirmation_for_email', email: resource.unconfirmed_email) %>
14
- </p>
12
+ <div><%= t('.currently_waiting_confirmation_for_email', email: resource.unconfirmed_email) %></div>
15
13
  <% end %>
16
14
 
17
15
  <div class="field">
18
16
  <%= f.label :password %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it') %>)</i><br />
19
- <%= f.password_field :password, autocomplete: "off" %>
17
+ <%= f.password_field :password, autocomplete: "new-password" %>
18
+ <% if @minimum_password_length %>
19
+ <br />
20
+ <em><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></em>
21
+ <% end %>
20
22
  </div>
21
23
 
22
24
  <div class="field">
23
25
  <%= f.label :password_confirmation %><br />
24
- <%= f.password_field :password_confirmation %>
26
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
25
27
  </div>
26
28
 
27
29
  <div class="field">
28
30
  <%= f.label :current_password %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes') %>)</i><br />
29
- <%= f.password_field :current_password %>
31
+ <%= f.password_field :current_password, autocomplete: "current-password" %>
30
32
  </div>
31
33
 
32
- <div><%= f.submit t('.update') %></div>
34
+ <div class="actions">
35
+ <%= f.submit t('.update') %>
36
+ </div>
33
37
  <% end %>
34
38
 
35
39
  <h3><%= t('.cancel_my_account') %></h3>
36
40
 
37
- <p><%= t('.unhappy') %> <%= link_to t('.cancel_my_account'), registration_path(resource_name), data: { confirm: t('.are_you_sure') }, method: :delete %>.</p>
41
+ <p><%= t('.unhappy') %> <%= button_to t('.cancel_my_account'), registration_path(resource_name), data: { confirm: t('.are_you_sure') }, method: :delete %></p>
38
42
 
39
43
  <%= link_to t('devise.shared.links.back'), :back %>
@@ -1,21 +1,24 @@
1
1
  <h2><%= t('.sign_up') %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
9
  </div>
10
10
 
11
11
  <div class="field">
12
- <%= f.label :password %><br />
13
- <%= f.password_field :password, autocomplete: "off" %>
12
+ <%= f.label :password %>
13
+ <% if @minimum_password_length %>
14
+ <em><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></em>
15
+ <% end %><br />
16
+ <%= f.password_field :password, autocomplete: "new-password" %>
14
17
  </div>
15
18
 
16
19
  <div class="field">
17
20
  <%= f.label :password_confirmation %><br />
18
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
21
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
19
22
  </div>
20
23
 
21
24
  <div class="actions">
@@ -3,12 +3,12 @@
3
3
  <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
4
  <div class="field">
5
5
  <%= f.label :email %><br />
6
- <%= f.email_field :email, autofocus: true %>
6
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
7
  </div>
8
8
 
9
9
  <div class="field">
10
10
  <%= f.label :password %><br />
11
- <%= f.password_field :password, autocomplete: "off" %>
11
+ <%= f.password_field :password, autocomplete: "current-password" %>
12
12
  </div>
13
13
 
14
14
  <% if devise_mapping.rememberable? %>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation">
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul>
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -1,25 +1,25 @@
1
1
  <%- if controller_name != 'sessions' %>
2
2
  <%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
3
- <% end -%>
3
+ <% end %>
4
4
 
5
5
  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
6
  <%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
7
- <% end -%>
7
+ <% end %>
8
8
 
9
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
10
  <%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br />
11
- <% end -%>
11
+ <% end %>
12
12
 
13
13
  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
14
  <%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br />
15
- <% end -%>
15
+ <% end %>
16
16
 
17
17
  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
18
  <%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
19
- <% end -%>
19
+ <% end %>
20
20
 
21
21
  <%- if devise_mapping.omniauthable? %>
22
22
  <%- resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to t('.sign_in_with_provider', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br />
24
- <% end -%>
25
- <% end -%>
23
+ <%= link_to t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
24
+ <% end %>
25
+ <% end %>
@@ -1,11 +1,11 @@
1
1
  <h2><%= t('.resend_unlock_instructions') %></h2>
2
2
 
3
3
  <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= devise_error_messages! %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
9
  </div>
10
10
 
11
11
  <div class="actions">
@@ -5,7 +5,11 @@
5
5
  <%= f.full_error :confirmation_token %>
6
6
 
7
7
  <div class="form-inputs">
8
- <%= f.input :email, required: true, autofocus: true %>
8
+ <%= f.input :email,
9
+ required: true,
10
+ autofocus: true,
11
+ value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
12
+ input_html: { autocomplete: "email" } %>
9
13
  </div>
10
14
 
11
15
  <div class="form-actions">
@@ -7,8 +7,16 @@
7
7
  <%= f.full_error :reset_password_token %>
8
8
 
9
9
  <div class="form-inputs">
10
- <%= f.input :password, label: t(".new_password"), required: true, autofocus: true %>
11
- <%= f.input :password_confirmation, label: t(".confirm_new_password"), required: true %>
10
+ <%= f.input :password,
11
+ label: t(".new_password"),
12
+ required: true,
13
+ autofocus: true,
14
+ hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
15
+ input_html: { autocomplete: "new-password" } %>
16
+ <%= f.input :password_confirmation,
17
+ label: t(".confirm_new_password"),
18
+ required: true,
19
+ input_html: { autocomplete: "new-password" } %>
12
20
  </div>
13
21
 
14
22
  <div class="form-actions">
@@ -4,7 +4,10 @@
4
4
  <%= f.error_notification %>
5
5
 
6
6
  <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
7
+ <%= f.input :email,
8
+ required: true,
9
+ autofocus: true,
10
+ input_html: { autocomplete: "email" } %>
8
11
  </div>
9
12
 
10
13
  <div class="form-actions">
@@ -1,4 +1,4 @@
1
- <h2><%= t(".title", resource: resource_class.model_name.human) %></h2>
1
+ <h2><%= t(".title", resource: resource.model_name.human) %></h2>
2
2
 
3
3
  <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
4
  <%= f.error_notification %>
@@ -7,14 +7,20 @@
7
7
  <%= f.input :email, required: true, autofocus: true %>
8
8
 
9
9
  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
- <p>
11
- <%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %>
12
- </p>
10
+ <p><%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %></p>
13
11
  <% end %>
14
12
 
15
- <%= f.input :password, autocomplete: "off", hint: t(".leave_blank_if_you_don_t_want_to_change_it"), required: false %>
16
- <%= f.input :password_confirmation, required: false %>
17
- <%= f.input :current_password, hint: t(".we_need_your_current_password_to_confirm_your_changes"), required: true %>
13
+ <%= f.input :password,
14
+ hint: t(".leave_blank_if_you_don_t_want_to_change_it"),
15
+ required: false,
16
+ input_html: { autocomplete: "new-password" } %>
17
+ <%= f.input :password_confirmation,
18
+ required: false,
19
+ input_html: { autocomplete: "new-password" } %>
20
+ <%= f.input :current_password,
21
+ hint: t(".we_need_your_current_password_to_confirm_your_changes"),
22
+ required: true,
23
+ input_html: { autocomplete: "current-password" } %>
18
24
  </div>
19
25
 
20
26
  <div class="form-actions">
@@ -4,9 +4,17 @@
4
4
  <%= f.error_notification %>
5
5
 
6
6
  <div class="form-inputs">
7
- <%= f.input :email, required: true, autofocus: true %>
8
- <%= f.input :password, required: true %>
9
- <%= f.input :password_confirmation, required: true %>
7
+ <%= f.input :email,
8
+ required: true,
9
+ autofocus: true ,
10
+ input_html: { autocomplete: "email" }%>
11
+ <%= f.input :password,
12
+ required: true,
13
+ hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
14
+ input_html: { autocomplete: "new-password" } %>
15
+ <%= f.input :password_confirmation,
16
+ required: true,
17
+ input_html: { autocomplete: "new-password" } %>
10
18
  </div>
11
19
 
12
20
  <div class="form-actions">
@@ -2,8 +2,13 @@
2
2
 
3
3
  <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
4
  <div class="form-inputs">
5
- <%= f.input :email, required: false, autofocus: true %>
6
- <%= f.input :password, required: false %>
5
+ <%= f.input :email,
6
+ required: false,
7
+ autofocus: true,
8
+ input_html: { autocomplete: "email" } %>
9
+ <%= f.input :password,
10
+ required: false,
11
+ input_html: { autocomplete: "current-password" } %>
7
12
  <%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
8
13
  </div>
9
14
 
@@ -5,7 +5,10 @@
5
5
  <%= f.full_error :unlock_token %>
6
6
 
7
7
  <div class="form-inputs">
8
- <%= f.input :email, required: true, autofocus: true %>
8
+ <%= f.input :email,
9
+ required: true,
10
+ autofocus: true,
11
+ input_html: { autocomplete: "email" } %>
9
12
  </div>
10
13
 
11
14
  <div class="form-actions">
data/rails/locales/af.yml CHANGED
@@ -2,29 +2,29 @@ af:
2
2
  activerecord:
3
3
  attributes:
4
4
  user:
5
- confirmation_sent_at:
6
- confirmation_token:
7
- confirmed_at:
8
- created_at:
5
+ confirmation_sent_at:
6
+ confirmation_token:
7
+ confirmed_at:
8
+ created_at:
9
9
  current_password: Huidige wagwoord
10
- current_sign_in_at:
11
- current_sign_in_ip:
10
+ current_sign_in_at:
11
+ current_sign_in_ip:
12
12
  email: E-pos
13
- encrypted_password:
14
- failed_attempts:
15
- last_sign_in_at:
16
- last_sign_in_ip:
17
- locked_at:
13
+ encrypted_password:
14
+ failed_attempts:
15
+ last_sign_in_at:
16
+ last_sign_in_ip:
17
+ locked_at:
18
18
  password: Wagwoord
19
19
  password_confirmation: Wagwoord bevestiging
20
- remember_created_at:
20
+ remember_created_at:
21
21
  remember_me: Onthou my
22
- reset_password_sent_at:
22
+ reset_password_sent_at:
23
23
  reset_password_token: Herstel wagwoord egtheidsbewys
24
- sign_in_count:
25
- unconfirmed_email:
24
+ sign_in_count:
25
+ unconfirmed_email:
26
26
  unlock_token: Ontsluit egtheidsbewys
27
- updated_at:
27
+ updated_at:
28
28
  models:
29
29
  user: Gebruiker
30
30
  devise:
@@ -37,10 +37,10 @@ af:
37
37
  failure:
38
38
  already_authenticated: Jy is alreeds aangeteken.
39
39
  inactive: Jou rekening is nog nie geaktiveer nie.
40
- invalid:
40
+ invalid:
41
41
  last_attempt: Jy het nog een poging voor jou rekening gesluit sal word.
42
42
  locked: Jou rekening is gesluit.
43
- not_found_in_database:
43
+ not_found_in_database:
44
44
  timeout: Jou sessie het verstryk. Teken asseblief aan om voort te gaan.
45
45
  unauthenticated: Jy moet aanteken of inteken voor jy voortgaan.
46
46
  unconfirmed: Jy moet jou e-posadres bevestig voor jy voortgaan.
@@ -50,6 +50,11 @@ af:
50
50
  greeting: Welkom %{recipient}!
51
51
  instruction: 'Jy kan jou rekening e-pos bevestig deur die onderstaande skakel:'
52
52
  subject: Bevestigingsinstruksies
53
+ email_changed:
54
+ greeting:
55
+ message:
56
+ message_unconfirmed:
57
+ subject:
53
58
  password_change:
54
59
  greeting: Hallo %{recipient}!
55
60
  message: Ons kontak jou om jou in kennis te stel dat jou wagwoord verander is.
@@ -103,6 +108,7 @@ af:
103
108
  signed_up_but_unconfirmed: "'n Boodskap met 'n bevestigingsskakel was gestuur na jou e-posadres. Volg asseblief die skakel om jou rekening te aktiveer."
104
109
  update_needs_confirmation: Jy het jou rekening suksesvol opgedateer, maar ons moet eerst jou nuwe e-posadres verifieer. Kyk asseblief na jou e-posse en volg die bevestigingsskakel om jou nuwe e-posadres te bevestig.
105
110
  updated: Jou rekening was suksesvol opgedateer.
111
+ updated_but_not_signed_in:
106
112
  sessions:
107
113
  already_signed_out: Suksesvol uitgeteken.
108
114
  new:
@@ -118,6 +124,7 @@ af:
118
124
  sign_in: Teken aan
119
125
  sign_in_with_provider: Teken aan met %{provider}
120
126
  sign_up: Teken in
127
+ minimum_password_length:
121
128
  unlocks:
122
129
  new:
123
130
  resend_unlock_instructions: Stuur weer ontsluitingsinstruksies