devise-i18n 1.9.1 → 1.9.2

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
  SHA256:
3
- metadata.gz: 68958cf19e39bd9d0baa4ba43d748338f620c6075cc5604eb4bb13ef0b61490d
4
- data.tar.gz: ff9b9a1a64445104ae8acbe9097ef1ddd9572c656008fd3cd7097c947fd62bce
3
+ metadata.gz: abd6d983f698a740e7cf966321793f6c89af0ba6092f6b33a73139cea66d540b
4
+ data.tar.gz: 8bee2de329d3519c71a017fe52b3119e83398c6b6d29fee122c0088003fd6037
5
5
  SHA512:
6
- metadata.gz: 3ea2a88694c7767f1b849b6fc15220875e9bbe64d862257a618862eec7c3fc0e28e28b34b333bba2cd4c50293cfc4de652c1490e3ee9bdd291d196de9bd88e84
7
- data.tar.gz: b19915c125e6bfebb284fc333a190daf9a4204e0bf6869763070d186faeabd761ea560dd5f22bdc436a686b587ca850cdc0eeb523f44d62a566fd82d508669bc
6
+ metadata.gz: 46b556d05dbb75d51d8591e2f5bd3765e86968aa74a52fc99e15b710f5bbd235347a63271539b4309e6c4f89f5bbecea719ad8cb707c096d9b6745cc432a88e6
7
+ data.tar.gz: c6d6bdb0c2fbbdab68a8853396ece59f41534929dad9741c4fedf6e88d6cd8a0d3ae221e896312373bd618a25faccfa3006aba48cb6c9d57feb2ed960b1785de
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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.1
1
+ 1.9.2
@@ -57,8 +57,8 @@ es-MX:
57
57
  message: Te estamos contactando para notificarte que tu email ha cambiado a %{email}
58
58
  subject: El email cambió
59
59
  password_change:
60
- greeting: "¡Hola, %{recipient}!"
61
- message: Le estamos contactando para notificarle que su contraseña ha cambiado
60
+ greeting: "¡Hola %{recipient}!"
61
+ message: Lo estamos contactando para notificarle que su contraseña ha cambiado.
62
62
  subject: Contraseña cambiada
63
63
  reset_password_instructions:
64
64
  action: Cambiar mi contraseña
@@ -57,8 +57,8 @@ es:
57
57
  message: Estamos contactando contigo para notificarte que tu email ha sido cambiado a %{email}.
58
58
  subject: Email cambiado
59
59
  password_change:
60
- greeting: Hola %{recipient}!
61
- message: Le estamos contactando para notificarle que su contraseña ha sido cambiada.
60
+ greeting: Hola %{recipient}!"
61
+ message: Lo estamos contactando para notificarle que su contraseña ha sido cambiada.
62
62
  subject: Contraseña cambiada
63
63
  reset_password_instructions:
64
64
  action: Cambiar mi contraseña
@@ -10,7 +10,7 @@ fr:
10
10
  current_sign_in_at: Date de la connexion actuelle
11
11
  current_sign_in_ip: IP de la connexion actuelle
12
12
  email: Courriel
13
- encrypted_password: Mot de passe crypté
13
+ encrypted_password: Mot de passe chiffré
14
14
  failed_attempts: Tentatives échouées
15
15
  last_sign_in_at: Date de la dernière connexion
16
16
  last_sign_in_ip: IP de la dernière connexion
@@ -54,7 +54,7 @@ it:
54
54
  subject: Istruzioni per la conferma
55
55
  email_changed:
56
56
  greeting: Ciao %{recipient}!
57
- message:
57
+ message: Ti stiamo contattando per notificarti che la tua email è stata cambiata in %{email}.
58
58
  subject: Email modificata
59
59
  password_change:
60
60
  greeting: Ciao %{recipient}!
@@ -109,7 +109,7 @@ it:
109
109
  signed_up_but_unconfirmed: Ti è stato inviato un messaggio con un link di conferma. Ti invitiamo a visitare il link per attivare il tuo account.
110
110
  update_needs_confirmation: Il tuo account è stato aggiornato, ma dobbiamo verificare la tua email. Ti invitiamo a consultare la tua email e cliccare sul link di conferma.
111
111
  updated: Il tuo account è stato aggiornato.
112
- updated_but_not_signed_in:
112
+ updated_but_not_signed_in: Il tuo account è stato aggiornato con successo, ma dato che la tua password è cambiata, devi accedere di nuovo.
113
113
  sessions:
114
114
  already_signed_out: Sei uscito correttamente.
115
115
  new:
@@ -37,10 +37,10 @@ pt-BR:
37
37
  failure:
38
38
  already_authenticated: Você já está autenticado.
39
39
  inactive: A sua conta ainda não foi ativada.
40
- invalid: Inválido %{authentication_keys} ou senha.
40
+ invalid: "%{authentication_keys} ou senha inválidos."
41
41
  last_attempt: Você tem mais uma única tentativa antes de sua conta ser bloqueada.
42
42
  locked: A sua conta está bloqueada.
43
- not_found_in_database: Inválido %{authentication_keys} ou senha.
43
+ not_found_in_database: "%{authentication_keys} ou senha inválidos."
44
44
  timeout: A sua sessão expirou, por favor, faça login novamente para continuar.
45
45
  unauthenticated: Para continuar, faça login ou registre-se.
46
46
  unconfirmed: Antes de continuar, confirme a sua conta.
@@ -51,7 +51,7 @@ ru:
51
51
  mailer:
52
52
  confirmation_instructions:
53
53
  action: Активировать
54
- greeting: Здравствуйте, %{recipient} !
54
+ greeting: Здравствуйте, %{recipient}!
55
55
  instruction: 'Вы можете активировать свою учетную запись, нажав ссылку снизу:'
56
56
  subject: Инструкции по подтверждению учетной записи
57
57
  email_changed:
@@ -100,7 +100,7 @@ ru:
100
100
  currently_waiting_confirmation_for_email: 'Ожидается подтверждение адреса E-mail: %{email}'
101
101
  leave_blank_if_you_don_t_want_to_change_it: оставьте поле пустым, если не хотите его менять
102
102
  title: Редактировать %{resource}
103
- unhappy: Разочарованы
103
+ unhappy: Разочарованы?
104
104
  update: Обновить
105
105
  we_need_your_current_password_to_confirm_your_changes: введите текущий пароль для подтверждения изменений
106
106
  new:
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.9.1
4
+ version: 1.9.2
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: 2020-03-29 00:00:00.000000000 Z
13
+ date: 2020-08-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: devise