rodauth-i18n 0.5.0 → 0.5.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 +8 -17
- data/locales/en.yml +2 -1
- data/locales/fr.yml +2 -2
- data/rodauth-i18n.gemspec +1 -1
- 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: e19be5ed3fd4082d3c9fdbae04769a9dd92c90f089c6c6600918d0e07ea20fa8
|
4
|
+
data.tar.gz: 25cbbc72237bb90521567f50953fe925a1f1fd364c2310f69c97463f215b8110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae07b09d88066865eb91052bc30db4a6347efb473895479c81e550b3a6466724fc54e2c04286ffb8b4c8be580955e39fad322be1f813122854ef3707450adf0
|
7
|
+
data.tar.gz: 980d3cb9424245f40271094f3e2f14decad7b095f95fb9870dc39851bb137ab6576fce6d2a5a17311f7982a0787ea02856de6b4448d6af6bd6b87b85f96ab20f
|
data/README.md
CHANGED
@@ -6,22 +6,10 @@ It also includes built-in translations for various languages, which you are enco
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem "rodauth-i18n", "~> 0.4"
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
```sh
|
18
|
-
$ bundle install
|
19
|
-
```
|
20
|
-
|
21
|
-
Or install it yourself as:
|
9
|
+
Add the gem to your project:
|
22
10
|
|
23
11
|
```sh
|
24
|
-
$
|
12
|
+
$ bundle add rodauth-i18n
|
25
13
|
```
|
26
14
|
|
27
15
|
## Usage
|
@@ -146,13 +134,16 @@ route do |r|
|
|
146
134
|
all_locales = I18n.available_locales.map(&:to_s) - [I18n.default_locale.to_s]
|
147
135
|
# routes requests starting with `(/:locale)/auth/*`
|
148
136
|
r.on [*all_locales, true], "auth" do |locale|
|
149
|
-
rails_request.params[:locale] = locale
|
150
|
-
r.rodauth
|
151
|
-
break
|
137
|
+
rails_request.params[:locale] = locale # for controller callbacks (if using Rails)
|
138
|
+
r.rodauth # route Rodauth requests
|
139
|
+
break # let other (/:locale)/auth/* requests through
|
152
140
|
end
|
153
141
|
end
|
154
142
|
```
|
155
143
|
|
144
|
+
The static `/auth` path prefix is optional, it was just to show how it would be
|
145
|
+
incorporated.
|
146
|
+
|
156
147
|
## Bundling translations in your Rodauth plugin
|
157
148
|
|
158
149
|
To make texts in your Rodauth plugin translatable, use the `translatable_method` macro. Macros for defining flash messages, button texts, and page titles internally call `translatable_method`, and are thus automatically translatable.
|
data/locales/en.yml
CHANGED
@@ -42,7 +42,7 @@ en:
|
|
42
42
|
email_auth_request_error_flash: There was an error requesting an email link to authenticate
|
43
43
|
email_subject_prefix: ''
|
44
44
|
expired_jwt_access_token_message: expired JWT access token
|
45
|
-
global_logout_label: Logout all Logged In
|
45
|
+
global_logout_label: Logout all Logged In Sessions?
|
46
46
|
input_field_label_suffix: ''
|
47
47
|
invalid_jwt_format_error_message: invalid JWT format or claim in Authorization header
|
48
48
|
invalid_password_message: invalid password
|
@@ -142,6 +142,7 @@ en:
|
|
142
142
|
reset_password_error_flash: There was an error resetting your password
|
143
143
|
reset_password_explanatory_text: "<p>If you have forgotten your password, you can request a password reset:</p>"
|
144
144
|
reset_password_notice_flash: Your password has been reset
|
145
|
+
reset_password_notify_email_subject: Password Reset Completed
|
145
146
|
reset_password_page_title: Reset Password
|
146
147
|
reset_password_request_button: Request Password Reset
|
147
148
|
reset_password_request_error_flash: There was an error requesting a password reset
|
data/locales/fr.yml
CHANGED
@@ -30,8 +30,8 @@ fr:
|
|
30
30
|
contains_null_byte_message: contient un byte nul
|
31
31
|
create_account_button: Créer un compte
|
32
32
|
create_account_error_flash: Erreur lors de la création de votre compte
|
33
|
-
create_account_link_text:
|
34
|
-
create_account_notice_flash:
|
33
|
+
create_account_link_text: Créer un compte
|
34
|
+
create_account_notice_flash: Votre compte a été créé
|
35
35
|
create_account_page_title: Créer un nouveau compte
|
36
36
|
email_auth_email_recently_sent_error_flash: Un email vous a été envoyé avec un lien pour vous connecter
|
37
37
|
email_auth_email_sent_notice_flash: Un email vous a été envoyé avec un lien pour accéder à votre compte
|
data/rodauth-i18n.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth-i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rodauth
|