devise_token_auth 0.1.37.beta4 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise_token_auth might be problematic. Click here for more details.

Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/app/controllers/devise_token_auth/application_controller.rb +4 -0
  4. data/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb +5 -5
  5. data/app/controllers/devise_token_auth/passwords_controller.rb +3 -3
  6. data/app/controllers/devise_token_auth/registrations_controller.rb +9 -8
  7. data/app/controllers/devise_token_auth/sessions_controller.rb +3 -3
  8. data/app/controllers/devise_token_auth/token_validations_controller.rb +2 -2
  9. data/app/models/devise_token_auth/concerns/user.rb +17 -3
  10. data/app/validators/email_validator.rb +6 -6
  11. data/config/locales/de.yml +12 -12
  12. data/config/locales/en.yml +20 -20
  13. data/config/locales/es.yml +24 -24
  14. data/config/locales/fr.yml +17 -17
  15. data/config/locales/pl.yml +15 -15
  16. data/config/locales/pt-BR.yml +9 -12
  17. data/config/locales/pt.yml +7 -7
  18. data/config/locales/ru.yml +18 -18
  19. data/config/locales/zh-HK.yml +49 -0
  20. data/config/locales/zh-TW.yml +49 -0
  21. data/lib/devise_token_auth/controllers/helpers.rb +11 -7
  22. data/lib/devise_token_auth/engine.rb +3 -1
  23. data/lib/devise_token_auth/rails/routes.rb +7 -1
  24. data/lib/devise_token_auth/version.rb +1 -1
  25. data/lib/generators/devise_token_auth/templates/devise_token_auth.rb +2 -2
  26. data/test/controllers/demo_user_controller_test.rb +42 -0
  27. data/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb +0 -13
  28. data/test/controllers/devise_token_auth/token_validations_controller_test.rb +25 -0
  29. data/test/dummy/app/controllers/application_controller.rb +6 -5
  30. data/test/dummy/{tmp/generators/app/models/user.rb → app/models/scoped_user.rb} +1 -5
  31. data/test/dummy/config/routes.rb +13 -0
  32. data/test/dummy/{tmp/generators/db/migrate/20151027080542_devise_token_auth_create_users.rb → db/migrate/20160103235141_devise_token_auth_create_scoped_users.rb} +15 -9
  33. data/test/dummy/db/schema.rb +30 -1
  34. data/test/dummy/tmp/generators/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  35. data/test/dummy/tmp/generators/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  36. metadata +27 -17
  37. data/test/dummy/tmp/generators/config/initializers/devise_token_auth.rb +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c1401be1479787b9115c2aa8fd04adab21776de
4
- data.tar.gz: 4bf54ad1a795451ae573144a78ba1b414437b223
3
+ metadata.gz: 7cb47a5fba41d7ebd8bc1d0c8f3ca0efb1895de7
4
+ data.tar.gz: f249fd363679cb78330361b84b73538c897cf148
5
5
  SHA512:
6
- metadata.gz: 701cb424a22649841c9c3ece6a60417a1b31869c0b10fab9e38a6861090707cd379aa9cfe4b0d3f85308026ec247445df3347f49f19858a9a78ba48b7752522e
7
- data.tar.gz: a94ca49f3d48a15c8af51e4ef502c428059c510088e32f63d3f29a0a4488a4ebab635c0cc8201470044a3bd4089d229b614c6f9ed5bcb3270e0e95fd90c7d101
6
+ metadata.gz: 70f0be0bdf639d61b7f508d402b13c859250439fd11d9d18332b72c1e8a3a676ed151b90743cb43984e31b14237ad385e333f4672f3cbdc968043e50f09de611
7
+ data.tar.gz: e53a3f7c326d34c265fe99087441d299f19c711e408f62cae81a486258613c2a40b7eecbb6e9b42b9aa83f09d6bc02d2fc78d30d38d9116ba842f060217796cf
data/README.md CHANGED
@@ -161,10 +161,11 @@ The following settings are available for configuration in `config/initializers/d
161
161
  | **`token_lifespan`** | `2.weeks` | Set the length of your tokens' lifespans. Users will need to re-authenticate after this duration of time has passed since their last login. |
162
162
  | **`batch_request_buffer_throttle`** | `5.seconds` | Sometimes it's necessary to make several requests to the API at the same time. In this case, each request in the batch will need to share the same auth token. This setting determines how far apart the requests can be while still using the same auth token. [Read more](#about-batch-requests). |
163
163
  | **`omniauth_prefix`** | `"/omniauth"` | This route will be the prefix for all oauth2 redirect callbacks. For example, using the default '/omniauth' setting, the github oauth2 provider will redirect successful authentications to '/omniauth/github/callback'. [Read more](#omniauth-provider-settings). |
164
- | **`default_confirm_success_url`** | `nil` | By default this value is expected to be sent by the client so that the API knows where to redirect users after successful email confirmation. If this param is set, the API will redirect to this value when no value is provided by the cilent. |
165
- | **`default_password_reset_url`** | `nil` | By default this value is expected to be sent by the client so that the API knows where to redirect users after successful password resets. If this param is set, the API will redirect to this value when no value is provided by the cilent. |
164
+ | **`default_confirm_success_url`** | `nil` | By default this value is expected to be sent by the client so that the API knows where to redirect users after successful email confirmation. If this param is set, the API will redirect to this value when no value is provided by the client. |
165
+ | **`default_password_reset_url`** | `nil` | By default this value is expected to be sent by the client so that the API knows where to redirect users after successful password resets. If this param is set, the API will redirect to this value when no value is provided by the client. |
166
166
  | **`redirect_whitelist`** | `nil` | As an added security measure, you can limit the URLs to which the API will redirect after email token validation (password reset, email confirmation, etc.). This value should be an array containing exact matches to the client URLs to be visited after validation. |
167
167
  | **`enable_standard_devise_support`** | `false` | By default, only Bearer Token authentication is implemented out of the box. If, however, you wish to integrate with legacy Devise authentication, you can do so by enabling this flag. NOTE: This feature is highly experimental! |
168
+ | **`remove_tokens_after_password_reset`** | `false` | By default, old tokens are not invalidated when password is changed. Enable this option if you want to make passwords updates to logout other devices. |
168
169
 
169
170
 
170
171
  Additionally, you can configure other aspects of devise by manually creating the traditional devise.rb file at `config/initializers/devise.rb`. Here are some examples of what you can do in this file:
@@ -4,6 +4,10 @@ module DeviseTokenAuth
4
4
 
5
5
  protected
6
6
 
7
+ def params_for_resource(resource)
8
+ devise_parameter_sanitizer.instance_values['permitted'][resource]
9
+ end
10
+
7
11
  def resource_class(m=nil)
8
12
  if m
9
13
  mapping = Devise.mappings[m]
@@ -2,8 +2,8 @@ module DeviseTokenAuth
2
2
  class OmniauthCallbacksController < DeviseTokenAuth::ApplicationController
3
3
 
4
4
  attr_reader :auth_params
5
- skip_before_filter :set_user_by_token
6
- skip_after_filter :update_auth_header
5
+ skip_before_action :set_user_by_token
6
+ skip_after_action :update_auth_header
7
7
 
8
8
  # intermediary route for successful omniauth authentication. omniauth does
9
9
  # not support multiple models, so we must resort to this terrible hack.
@@ -11,8 +11,8 @@ module DeviseTokenAuth
11
11
 
12
12
  # derive target redirect route from 'resource_class' param, which was set
13
13
  # before authentication.
14
- devise_mapping = request.env['omniauth.params']['resource_class'].underscore.to_sym
15
- redirect_route = "#{request.protocol}#{request.host_with_port}/#{Devise.mappings[devise_mapping].as_json["path"]}/#{params[:provider]}/callback"
14
+ devise_mapping = request.env['omniauth.params']['resource_class'].underscore.gsub("/", "_").to_sym
15
+ redirect_route = "#{request.protocol}#{request.host_with_port}/#{Devise.mappings[devise_mapping].fullpath}/#{params[:provider]}/callback"
16
16
 
17
17
  # preserve omniauth info for success route. ignore 'extra' in twitter
18
18
  # auth response to avoid CookieOverflow.
@@ -86,7 +86,7 @@ module DeviseTokenAuth
86
86
 
87
87
  # derive allowed params from the standard devise parameter sanitizer
88
88
  def whitelisted_params
89
- whitelist = devise_parameter_sanitizer.for(:sign_up)
89
+ whitelist = params_for_resource(:sign_up)
90
90
 
91
91
  whitelist.inject({}){|coll, key|
92
92
  param = omniauth_params[key.to_s]
@@ -1,7 +1,7 @@
1
1
  module DeviseTokenAuth
2
2
  class PasswordsController < DeviseTokenAuth::ApplicationController
3
- before_filter :set_user_by_token, :only => [:update]
4
- skip_after_filter :update_auth_header, :only => [:create, :edit]
3
+ before_action :set_user_by_token, :only => [:update]
4
+ skip_after_action :update_auth_header, :only => [:create, :edit]
5
5
 
6
6
  # this action is responsible for generating password reset tokens and
7
7
  # sending emails
@@ -228,7 +228,7 @@ module DeviseTokenAuth
228
228
  end
229
229
 
230
230
  def password_resource_params
231
- params.permit(devise_parameter_sanitizer.for(:account_update))
231
+ params.permit(*params_for_resource(:account_update))
232
232
  end
233
233
 
234
234
  end
@@ -1,9 +1,9 @@
1
1
  module DeviseTokenAuth
2
2
  class RegistrationsController < DeviseTokenAuth::ApplicationController
3
- before_filter :set_user_by_token, :only => [:destroy, :update]
4
- before_filter :validate_sign_up_params, :only => :create
5
- before_filter :validate_account_update_params, :only => :update
6
- skip_after_filter :update_auth_header, :only => [:create, :destroy]
3
+ before_action :set_user_by_token, :only => [:destroy, :update]
4
+ before_action :validate_sign_up_params, :only => :create
5
+ before_action :validate_account_update_params, :only => :update
6
+ skip_after_action :update_auth_header, :only => [:create, :destroy]
7
7
 
8
8
  def create
9
9
  @resource = resource_class.new(sign_up_params)
@@ -36,6 +36,7 @@ module DeviseTokenAuth
36
36
 
37
37
  begin
38
38
  # override email confirmation, must be sent manually from ctrl
39
+ resource_class.set_callback("create", :after, :send_on_create_confirmation_instructions)
39
40
  resource_class.skip_callback("create", :after, :send_on_create_confirmation_instructions)
40
41
  if @resource.save
41
42
  yield @resource if block_given?
@@ -97,11 +98,11 @@ module DeviseTokenAuth
97
98
  end
98
99
 
99
100
  def sign_up_params
100
- params.permit(devise_parameter_sanitizer.for(:sign_up))
101
+ params.permit(*params_for_resource(:sign_up))
101
102
  end
102
103
 
103
104
  def account_update_params
104
- params.permit(devise_parameter_sanitizer.for(:account_update))
105
+ params.permit(*params_for_resource(:account_update))
105
106
  end
106
107
 
107
108
  protected
@@ -195,11 +196,11 @@ module DeviseTokenAuth
195
196
  end
196
197
 
197
198
  def validate_sign_up_params
198
- validate_post_data sign_up_params, I18n.t("errors.validate_sign_up_params")
199
+ validate_post_data sign_up_params, I18n.t("errors.messages.validate_sign_up_params")
199
200
  end
200
201
 
201
202
  def validate_account_update_params
202
- validate_post_data account_update_params, I18n.t("errors.validate_account_update_params")
203
+ validate_post_data account_update_params, I18n.t("errors.messages.validate_account_update_params")
203
204
  end
204
205
 
205
206
  def validate_post_data which, message
@@ -1,7 +1,7 @@
1
1
  # see http://www.emilsoman.com/blog/2013/05/18/building-a-tested/
2
2
  module DeviseTokenAuth
3
3
  class SessionsController < DeviseTokenAuth::ApplicationController
4
- before_filter :set_user_by_token, :only => [:destroy]
4
+ before_action :set_user_by_token, :only => [:destroy]
5
5
  after_action :reset_session, :only => [:destroy]
6
6
 
7
7
  def new
@@ -53,7 +53,7 @@ module DeviseTokenAuth
53
53
  end
54
54
 
55
55
  def destroy
56
- # remove auth instance variables so that after_filter does not run
56
+ # remove auth instance variables so that after_action does not run
57
57
  user = remove_instance_variable(:@resource) if @resource
58
58
  client_id = remove_instance_variable(:@client_id) if @client_id
59
59
  remove_instance_variable(:@token) if @token
@@ -141,7 +141,7 @@ module DeviseTokenAuth
141
141
  private
142
142
 
143
143
  def resource_params
144
- params.permit(devise_parameter_sanitizer.for(:sign_in))
144
+ params.permit(*params_for_resource(:sign_in))
145
145
  end
146
146
 
147
147
  end
@@ -1,7 +1,7 @@
1
1
  module DeviseTokenAuth
2
2
  class TokenValidationsController < DeviseTokenAuth::ApplicationController
3
- skip_before_filter :assert_is_devise_resource!, :only => [:validate_token]
4
- before_filter :set_user_by_token, :only => [:validate_token]
3
+ skip_before_action :assert_is_devise_resource!, :only => [:validate_token]
4
+ before_action :set_user_by_token, :only => [:validate_token]
5
5
 
6
6
  def validate_token
7
7
  # @resource will have been set by set_user_token concern
@@ -44,6 +44,9 @@ module DeviseTokenAuth::Concerns::User
44
44
  # get rid of dead tokens
45
45
  before_save :destroy_expired_tokens
46
46
 
47
+ # remove old tokens if password has changed
48
+ before_save :remove_tokens_after_password_reset
49
+
47
50
  # allows user to change password without current_password
48
51
  attr_writer :allow_password_change
49
52
  def allow_password_change
@@ -178,12 +181,12 @@ module DeviseTokenAuth::Concerns::User
178
181
  last_token: last_token,
179
182
  updated_at: Time.now
180
183
  }
181
-
184
+
182
185
  max_clients = DeviseTokenAuth.max_number_of_devices
183
186
  while self.tokens.keys.length > 0 and max_clients < self.tokens.keys.length
184
187
  oldest_token = self.tokens.min_by { |cid, v| v[:expiry] || v["expiry"] }
185
188
  self.tokens.delete(oldest_token.first)
186
- end
189
+ end
187
190
 
188
191
  self.save!
189
192
 
@@ -239,7 +242,7 @@ module DeviseTokenAuth::Concerns::User
239
242
  # only validate unique email among users that registered by email
240
243
  def unique_email_user
241
244
  if provider == 'email' and self.class.where(provider: 'email', email: email).count > 0
242
- errors.add(:email, :already_in_use)
245
+ errors.add(:email, I18n.t("errors.messages.already_in_use"))
243
246
  end
244
247
  end
245
248
 
@@ -260,4 +263,15 @@ module DeviseTokenAuth::Concerns::User
260
263
  end
261
264
  end
262
265
 
266
+ def remove_tokens_after_password_reset
267
+ there_is_more_than_one_token = self.tokens && self.tokens.keys.length > 1
268
+ should_remove_old_tokens = DeviseTokenAuth.remove_tokens_after_password_reset &&
269
+ encrypted_password_changed? && there_is_more_than_one_token
270
+
271
+ if should_remove_old_tokens
272
+ latest_token = self.tokens.max_by { |cid, v| v[:expiry] || v["expiry"] }
273
+ self.tokens = {latest_token.first => latest_token.last}
274
+ end
275
+ end
276
+
263
277
  end
@@ -4,18 +4,18 @@ class EmailValidator < ActiveModel::EachValidator
4
4
  record.errors[attribute] << email_invalid_message
5
5
  end
6
6
  end
7
-
7
+
8
8
  private
9
-
9
+
10
10
  def email_invalid_message
11
11
  # Try strictly set message:
12
12
  message = options[:message]
13
-
13
+
14
14
  if message.nil?
15
15
  # Try DeviceTokenAuth translations or fallback to ActiveModel translations
16
- message = I18n.t(:'errors.not_email', default: :'errors.messages.invalid')
16
+ message = I18n.t(:'errors.messages.not_email', default: :'errors.messages.invalid')
17
17
  end
18
-
18
+
19
19
  message
20
- end
20
+ end
21
21
  end
@@ -1,33 +1,33 @@
1
1
  de:
2
2
  devise_token_auth:
3
3
  sessions:
4
- not_confirmed: "Ein E-Mail zu Bestätigung wurde an Ihre Adresse %{email} gesendet. Sie müssen den Anleitungsschritten im E-Mail folgen, um Ihren Account zu aktivieren"
4
+ not_confirmed: "Ein E-Mail zu Bestätigung wurde an Ihre Adresse '%{email}'' gesendet. Sie müssen den Anleitungsschritten im E-Mail folgen, um Ihren Account zu aktivieren"
5
5
  bad_credentials: "Ungültige Anmeldeinformationen. Bitte versuchen Sie es erneut."
6
6
  not_supported: "Verwenden Sie POST /sign_in zur Anmeldung. GET wird nicht unterstützt."
7
7
  user_not_found: "Benutzer wurde nicht gefunden oder konnte nicht angemeldet werden."
8
8
  token_validations:
9
9
  invalid: "Ungültige Anmeldeinformationen"
10
10
  registrations:
11
- missing_confirm_success_url: "Fehlender Paramter `confirm_success_url`."
12
- redirect_url_not_allowed: "Weiterleitung zu %{redirect_url} ist nicht gestattet."
13
- email_already_exists: "Es gibt bereits einen Account für %{email}."
14
- account_with_uid_destroyed: "Account mit der uid %{uid} wurde gelöscht."
11
+ missing_confirm_success_url: "Fehlender Paramter 'confirm_success_url'."
12
+ redirect_url_not_allowed: "Weiterleitung zu '%{redirect_url}' ist nicht gestattet."
13
+ email_already_exists: "Es gibt bereits einen Account für '%{email}'."
14
+ account_with_uid_destroyed: "Account mit der uid '%{uid}' wurde gelöscht."
15
15
  account_to_destroy_not_found: "Der Account, der gelöscht werden soll, kann nicht gefunden werden."
16
16
  user_not_found: "Benutzer kann nicht gefunden werden."
17
17
  passwords:
18
18
  missing_email: "Sie müssen eine E-Mail Adresse angeben."
19
19
  missing_redirect_url: "Es fehlt der URL zu Weiterleitung."
20
- not_allowed_redirect_url: "Weiterleitung zu %{redirect_url} ist nicht gestattet."
21
- sended: "Ein E-Mail mit Anleitung zum Rücksetzen Ihres Passwortes wurde an %{email} gesendet."
20
+ not_allowed_redirect_url: "Weiterleitung zu '%{redirect_url}' ist nicht gestattet."
21
+ sended: "Ein E-Mail mit Anleitung zum Rücksetzen Ihres Passwortes wurde an '%{email}' gesendet."
22
22
  user_not_found: "Der Benutzer mit E-Mail-Adresse '%{email}' kann nicht gefunden werden."
23
- password_not_required: "Dieser Account benötigt kein Passwort. Melden Sie Sich stattdessen über Ihren Account bei %{provider} an."
24
- missing_passwords: 'Sie müssen die Felder "Passwort" and "Passwortbestätigung" ausfüllen.'
23
+ password_not_required: "Dieser Account benötigt kein Passwort. Melden Sie Sich stattdessen über Ihren Account bei '%{provider}' an."
24
+ missing_passwords: "Sie müssen die Felder 'Passwort' and 'Passwortbestätigung' ausfüllen."
25
25
  successfully_updated: "Ihr Passwort wurde erfolgreich aktualisiert."
26
26
  errors:
27
- validate_sign_up_params: "Bitte übermitteln sie vollständige Anmeldeinformationen im Body des Requests."
28
- validate_account_update_params: "Bitte übermitteln sie vollständige Informationen zur Aktualisierung im Body des Requests."
29
- not_email: "ist keine E-Mail Adresse"
30
27
  messages:
28
+ validate_sign_up_params: "Bitte übermitteln sie vollständige Anmeldeinformationen im Body des Requests."
29
+ validate_account_update_params: "Bitte übermitteln sie vollständige Informationen zur Aktualisierung im Body des Requests."
30
+ not_email: "ist keine E-Mail Adresse"
31
31
  already_in_use: "bereits in Verwendung"
32
32
  devise:
33
33
  mailer:
@@ -1,47 +1,47 @@
1
1
  en:
2
2
  devise_token_auth:
3
3
  sessions:
4
- not_confirmed: "A confirmation email was sent to your account at %{email}. You must follow the instructions in the email before your account can be activated"
4
+ not_confirmed: "A confirmation email was sent to your account at '%{email}'. You must follow the instructions in the email before your account can be activated"
5
5
  bad_credentials: "Invalid login credentials. Please try again."
6
6
  not_supported: "Use POST /sign_in to sign in. GET is not supported."
7
7
  user_not_found: "User was not found or was not logged in."
8
8
  token_validations:
9
9
  invalid: "Invalid login credentials"
10
10
  registrations:
11
- missing_confirm_success_url: "Missing `confirm_success_url` param."
12
- redirect_url_not_allowed: "Redirect to %{redirect_url} not allowed."
13
- email_already_exists: "An account already exists for %{email}"
14
- account_with_uid_destroyed: "Account with uid %{uid} has been destroyed."
11
+ missing_confirm_success_url: "Missing 'confirm_success_url' parameter."
12
+ redirect_url_not_allowed: "Redirect to '%{redirect_url}' not allowed."
13
+ email_already_exists: "An account already exists for '%{email}'"
14
+ account_with_uid_destroyed: "Account with UID '%{uid}' has been destroyed."
15
15
  account_to_destroy_not_found: "Unable to locate account for destruction."
16
16
  user_not_found: "User not found."
17
17
  passwords:
18
18
  missing_email: "You must provide an email address."
19
- missing_redirect_url: "Missing redirect url."
20
- not_allowed_redirect_url: "Redirect to %{redirect_url} not allowed."
21
- sended: "An email has been sent to %{email} containing instructions for resetting your password."
19
+ missing_redirect_url: "Missing redirect URL."
20
+ not_allowed_redirect_url: "Redirect to '%{redirect_url}' not allowed."
21
+ sended: "An email has been sent to '%{email}' containing instructions for resetting your password."
22
22
  user_not_found: "Unable to find user with email '%{email}'."
23
- password_not_required: "This account does not require a password. Sign in using your %{provider} account instead."
24
- missing_passwords: 'You must fill out the fields labeled "password" and "password confirmation".'
23
+ password_not_required: "This account does not require a password. Sign in using your '%{provider}' account instead."
24
+ missing_passwords: "You must fill out the fields labeled 'Password' and 'Password confirmation'."
25
25
  successfully_updated: "Your password has been successfully updated."
26
26
  errors:
27
- validate_sign_up_params: "Please submit proper sign up data in request body."
28
- validate_account_update_params: "Please submit proper account update data in request body."
29
- not_email: "is not an email"
30
27
  messages:
31
- already_in_use: already in use
28
+ already_in_use: "already in use"
29
+ validate_sign_up_params: "Please submit proper sign up data in request body."
30
+ validate_account_update_params: "Please submit proper account update data in request body."
31
+ not_email: "is not an email"
32
32
  devise:
33
33
  mailer:
34
34
  confirmation_instructions:
35
35
  confirm_link_msg: "You can confirm your account email through the link below:"
36
- confirm_account_link: Confirm my account
36
+ confirm_account_link: "Confirm my account"
37
37
  reset_password_instructions:
38
38
  request_reset_link_msg: "Someone has requested a link to change your password. You can do this through the link below."
39
- password_change_link: Change my password
39
+ password_change_link: "Change my password"
40
40
  ignore_mail_msg: "If you didn't request this, please ignore this email."
41
41
  no_changes_msg: "Your password won't change until you access the link above and create a new one."
42
42
  unlock_instructions:
43
- account_lock_msg: Your account has been locked due to an excessive number of unsuccessful sign in attempts.
43
+ account_lock_msg: "Your account has been locked due to an excessive number of unsuccessful sign in attempts."
44
44
  unlock_link_msg: "Click the link below to unlock your account:"
45
- unlock_link: Unlock my account
46
- hello: hello
47
- welcome: welcome
45
+ unlock_link: "Unlock my account"
46
+ hello: "hello"
47
+ welcome: "welcome"
@@ -1,50 +1,50 @@
1
1
  es:
2
2
  devise_token_auth:
3
3
  sessions:
4
- not_confirmed: "Un correo electrónico de confirmación de su cuenta ha sido enviado a %{email}. Por favor, siga las instrucciones para validar su cuenta"
4
+ not_confirmed: "Un correo electrónico de confirmación de su cuenta ha sido enviado a '%{email}'. Por favor, siga las instrucciones para validar su cuenta"
5
5
  bad_credentials: "Identidad o contraseña no válida."
6
6
  not_supported: "Use POST /sign_in para la conexión. GET no esta disponible."
7
7
  user_not_found: "Usuario desconocido o no está conectado."
8
8
  token_validations:
9
9
  invalid: "Identidad o contraseña no válida."
10
10
  registrations:
11
- missing_confirm_success_url: "El parámetro `confirm_success_url` no esta presente."
12
- redirect_url_not_allowed: "Redirección hacia %{redirect_url} no esta permitida."
13
- email_already_exists: "Una cuenta ya existe con este correo electrónico: %{email}"
14
- account_with_uid_destroyed: "La cuenta con el identificador %{uid} se ha eliminado."
11
+ missing_confirm_success_url: "El parámetro 'confirm_success_url' no esta presente."
12
+ redirect_url_not_allowed: "Redirección hacia '%{redirect_url}' no esta permitida."
13
+ email_already_exists: "Una cuenta ya existe con este correo electrónico '%{email}'"
14
+ account_with_uid_destroyed: "La cuenta con el identificador '%{uid}' se ha eliminado."
15
15
  account_to_destroy_not_found: "No se puede encontrar la cuenta a borrar."
16
16
  user_not_found: "Usuario no encontrado."
17
17
  passwords:
18
18
  missing_email: "Debe incluir un correo electrónico."
19
19
  missing_redirect_url: "Falta el Url de redirección."
20
- not_allowed_redirect_url: "Redirección hacia %{redirect_url} no esta permitida."
21
- sended: "Un correo electrónico ha sido enviado a %{email} con las instrucciones para restablecer su contraseña."
22
- user_not_found: "No se pudo encontrar un usuario con este correo electrónico: '%{email}'."
23
- password_not_required: "Esta cuenta no requiere contraseña. Iniciar sesión utilizando %{provider}."
24
- missing_passwords: 'Debe llenar los campos "contraseña" y "confirmación de contraseña".'
20
+ not_allowed_redirect_url: "Redirección hacia '%{redirect_url}' no esta permitida."
21
+ sended: "Un correo electrónico ha sido enviado a '%{email}' con las instrucciones para restablecer su contraseña."
22
+ user_not_found: "No se pudo encontrar un usuario con este correo electrónico '%{email}'."
23
+ password_not_required: "Esta cuenta no requiere contraseña. Iniciar sesión utilizando '%{provider}'."
24
+ missing_passwords: "Debe llenar los campos 'Contraseña' y 'Confirmación de contraseña'."
25
25
  successfully_updated: "Su contraseña ha sido actualizada con éxito."
26
26
  errors:
27
- validate_sign_up_params: "Los datos introducidos en la solicitud de acceso no son válidos."
28
- validate_account_update_params: "Los datos introducidos en la solicitud de actualización no son válidos."
29
- not_email: "no es un correo electrónico"
30
27
  messages:
31
- already_in_use: ya ha sido ocupado
28
+ validate_sign_up_params: "Los datos introducidos en la solicitud de acceso no son válidos."
29
+ validate_account_update_params: "Los datos introducidos en la solicitud de actualización no son válidos."
30
+ not_email: "no es un correo electrónico"
31
+ already_in_use: "ya ha sido ocupado"
32
32
  devise:
33
33
  mailer:
34
34
  confirmation_instructions:
35
- subject: Instrucciones de confirmación
35
+ subject: "Instrucciones de confirmación"
36
36
  confirm_link_msg: "Para confirmar su cuenta ingrese en el siguiente link:"
37
- confirm_account_link: Confirmar cuenta
37
+ confirm_account_link: "Confirmar cuenta"
38
38
  reset_password_instructions:
39
- subject: Instrucciones para restablecer su contraseña
39
+ subject: "Instrucciones para restablecer su contraseña"
40
40
  request_reset_link_msg: "Ha solicitado un cambio de contraseña. Para continuar ingrese en el siguiente link:"
41
- password_change_link: Cambiar contraseña
42
- ignore_mail_msg: Por favor ignore este mensaje si no ha solicitado esta acción.
41
+ password_change_link: "Cambiar contraseña"
42
+ ignore_mail_msg: "Por favor ignore este mensaje si no ha solicitado esta acción."
43
43
  no_changes_msg: "Importante: Su contraseña no será actualizada a menos que ingrese en el link."
44
44
  unlock_instructions:
45
- subject: Instrucciones de desbloqueo
46
- account_lock_msg: Su cuenta ha sido bloqueada debido a sucesivos intentos de ingresos fallidos
45
+ subject: "Instrucciones de desbloqueo"
46
+ account_lock_msg: "Su cuenta ha sido bloqueada debido a sucesivos intentos de ingresos fallidos"
47
47
  unlock_link_msg: "Para desbloquear su cuenta ingrese en el siguiente link:"
48
- unlock_link: Desbloquear cuenta
49
- hello: hola
50
- welcome: bienvenido
48
+ unlock_link: "Desbloquear cuenta"
49
+ hello: "hola"
50
+ welcome: "bienvenido"
@@ -1,34 +1,34 @@
1
1
  fr:
2
2
  devise_token_auth:
3
3
  sessions:
4
- not_confirmed: "Un e-mail de confirmation de votre compte a été envoyé à %{email}. Merci de suivre les instructions afin de valider votre compte"
4
+ not_confirmed: "Un e-mail de confirmation de votre compte a été envoyé à '%{email}'. Merci de suivre les instructions afin de valider votre compte"
5
5
  bad_credentials: "Mot de passe ou identifiant invalide."
6
6
  not_supported: "Utilisez POST /sign_in pour la connexion. GET n'est pas supporté."
7
7
  user_not_found: "L'utilisateur est inconnu ou n'est pas connecté."
8
8
  token_validations:
9
9
  invalid: "Mot de passe ou identifiant invalide."
10
10
  registrations:
11
- missing_confirm_success_url: "Le paramètre `confirm_success_url` est manquant."
12
- redirect_url_not_allowed: "Redirection vers %{redirect_url} n'est pas autorisée."
13
- email_already_exists: "Un compte existe déjà avec cette addresse e-mail: %{email}"
14
- account_with_uid_destroyed: "Le compte avec l'identifiant %{uid} a été supprimé."
11
+ missing_confirm_success_url: "Le paramètre 'confirm_success_url' est manquant."
12
+ redirect_url_not_allowed: "Redirection vers '%{redirect_url}' n'est pas autorisée."
13
+ email_already_exists: "Un compte existe déjà avec l'adresse e-mail suivante '%{email}'"
14
+ account_with_uid_destroyed: "Le compte avec l'identifiant '%{uid}' a été supprimé."
15
15
  account_to_destroy_not_found: "Le compte à supprimer est introuvable."
16
16
  user_not_found: "Utilisateur introuvable."
17
17
  passwords:
18
18
  missing_email: "Vous devez soumettre un e-mail."
19
19
  missing_redirect_url: "URL de redirection manquante."
20
- not_allowed_redirect_url: "Redirection vers %{redirect_url} n'est pas autorisée."
21
- sended: "Un e-mail a été envoyé à %{email} avec les instructions de réinitialisation du mot de passe."
22
- user_not_found: "Impossible de trouver l'utilisateur avec l'adresse e-mail: '%{email}'."
23
- password_not_required: "Ce compte ne demande pas de mot de passe. Connectez vous en utilisant %{provider}."
24
- missing_passwords: 'Vous devez remplir les champs "mot de passe" et "confirmation de mot de passe".'
20
+ not_allowed_redirect_url: "Redirection vers '%{redirect_url}' n'est pas autorisée."
21
+ sended: "Un e-mail a été envoyé à '%{email}' avec les instructions de réinitialisation du mot de passe."
22
+ user_not_found: "Impossible de trouver l'utilisateur avec l'adresse e-mail suivante '%{email}'."
23
+ password_not_required: "Ce compte ne demande pas de mot de passe. Connectez vous en utilisant '%{provider}'."
24
+ missing_passwords: "Vous devez remplir les champs 'Mot de passe' et 'Confirmation de mot de passe'."
25
25
  successfully_updated: "Votre mot de passe a été correctement mis à jour."
26
26
  errors:
27
- validate_sign_up_params: "Les données d'inscription dans le corps de la requête ne sont pas valides."
28
- validate_account_update_params: "Les données de mise à jour dans le corps de la requête ne sont pas valides."
29
- not_email: "n'est pas une adresse e-mail"
30
27
  messages:
31
- already_in_use: "déjà utilisé"
28
+ already_in_use: "déjà utilisé(e)"
29
+ validate_sign_up_params: "Les données d'inscription dans le corps de la requête ne sont pas valides."
30
+ validate_account_update_params: "Les données de mise à jour dans le corps de la requête ne sont pas valides."
31
+ not_email: "n'est pas une adresse e-mail"
32
32
  devise:
33
33
  mailer:
34
34
  confirmation_instructions:
@@ -43,8 +43,8 @@ fr:
43
43
  no_changes_msg: "Votre mot de passe ne changera pas tant que vous n'accédez pas au lien ci-dessus pour en créer un nouveau."
44
44
  unlock_instructions:
45
45
  subject: "Instructions de déblocage"
46
- account_lock_msg: "Votre compte a été bloqué en raison de nombreuses tentatives de connection erronées."
46
+ account_lock_msg: "Votre compte a été bloqué en raison de nombreuses tentatives de connexion erronées."
47
47
  unlock_link_msg: "Cliquez sur le lien ci-dessous pour déverrouiller votre compte:"
48
48
  unlock_link: "Déverrouiller mon compte"
49
- hello: bonjour
50
- welcome: bienvenue
49
+ hello: "bonjour"
50
+ welcome: "bienvenue"