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 +4 -4
- data/README.md +32 -2
- data/VERSION +1 -1
- data/rails/locales/es-MX.yml +2 -2
- data/rails/locales/es.yml +2 -2
- data/rails/locales/fr.yml +1 -1
- data/rails/locales/it.yml +2 -2
- data/rails/locales/pt-BR.yml +2 -2
- data/rails/locales/ru.yml +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abd6d983f698a740e7cf966321793f6c89af0ba6092f6b33a73139cea66d540b
|
4
|
+
data.tar.gz: 8bee2de329d3519c71a017fe52b3119e83398c6b6d29fee122c0088003fd6037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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.9.2
|
data/rails/locales/es-MX.yml
CHANGED
@@ -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
|
61
|
-
message:
|
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
|
data/rails/locales/es.yml
CHANGED
@@ -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:
|
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
|
data/rails/locales/fr.yml
CHANGED
@@ -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
|
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
|
data/rails/locales/it.yml
CHANGED
@@ -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:
|
data/rails/locales/pt-BR.yml
CHANGED
@@ -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:
|
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:
|
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.
|
data/rails/locales/ru.yml
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: devise
|