rodauth-select-account 0.0.4 → 0.1.0

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: 6c881e5c48400dfdb20e8c6d4c085ca195fe901477ac632cbc901217ab745b34
4
- data.tar.gz: 8af197d3e4766928985775c4532954d3c7f519231872b1875411936b80c46fb6
3
+ metadata.gz: e1268790cfe1720860c39c93bced3253c0cb1bf83dacec424d21cf7facd2f0a3
4
+ data.tar.gz: d161bade62b8e1b935fb192ebec45d3641b546b4cf52896cccc3f225a01450ca
5
5
  SHA512:
6
- metadata.gz: a65a384392c409fba38c4d04087c59bd78a278fa795924414c7ff4e3269191bf07a271e448e800d843332d6e70c3bfadb861b69c64fb09d841d6b2ec15cd11df
7
- data.tar.gz: e7ebbc98509dea51383abc86fe54f633620e5f2e16b2fa503a68c14754f8aef75016cca9d54717c26e93ac3ddae85b0880bb10060397ffcc5eed56468658b690
6
+ metadata.gz: cd003394cba3aaad1c103ffae1dd008cea6e3788cb9cd96636074021854891a20d2c9d43f83351ba938cd78b923fab171de7d31609d32638a18a0c2202b139d0
7
+ data.tar.gz: c489337600b4e06912ecf4e650dcf4b58b2ad69524d9acbe6cbe45df6ab8a1c75faa8b23481456eac12b6d4d42fb19779f2b22934e2ac175a84db597b61a687a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.1.0
6
+
7
+ Support for internationalization (I18n) by hooking up with [rodauth-i18n](https://github.com/janko/rodauth-i18n). Shipping translation for english under `locales/` dir.
8
+
5
9
  ## 0.0.4
6
10
 
7
11
  Cookies used for selected account are now secure by default (httponly on, secure if request is TLS-enabled);
data/README.md CHANGED
@@ -110,7 +110,7 @@ The following options and methods are also available to override, and names shou
110
110
  * `add_account_redirect`
111
111
  * `select_account_notice_flash`
112
112
  * `select_account_error_flash`
113
- * `require_select_account_error_flash
113
+ * `require_select_account_error_flash`
114
114
  * `before_select_account_route`
115
115
  * `before_select_account`
116
116
  * `after_select_account`
@@ -125,6 +125,14 @@ These are also available methods:
125
125
  * `accounts_in_session`: returns all the available accounts in session
126
126
  * `require_select_account`: to be used like `require_account`, as a filter to actions that require a user to explicitly select an account before allowing it.
127
127
 
128
+ #### Internationalization (i18n)
129
+
130
+ `rodauth-select-account` supports translating all user-facing text found in all pages and forms and buttons, by integrating with [rodauth-i18n](https://github.com/janko/rodauth-i18n). Just set it up in your application and `rodauth` configuration.
131
+
132
+ Default translations shipping with `rodauth-select-account` can be found [in this directory](https://gitlab.com/honeyryderchuck/rodauth-select-account/-/tree/master/locales). If they're not available for the languages you'd like to support, consider getting them translated from the english text, and contributing them to this repository via a Merge Request.
133
+
134
+ (This feature is available since `v0.1`.)
135
+
128
136
  ## Ruby support policy
129
137
 
130
138
  The minimum Ruby version required to run `rodauth-select-account` is 2.4 . Besides that, it supports all rubies that rodauth and roda support, including JRuby and truffleruby.
@@ -136,4 +144,3 @@ After checking out the repo, run `bundle install` to install dependencies. Then,
136
144
  ## Contributing
137
145
 
138
146
  Bug reports and pull requests are welcome on Gitlab at https://gitlab.com/honeyryderchuck/rodauth-select-account.
139
-
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rodauth
4
4
  module SelectAccount
5
- VERSION = "0.0.4"
5
+ VERSION = "0.1.0"
6
6
  end
7
7
  end
@@ -3,3 +3,5 @@
3
3
  require "rodauth"
4
4
 
5
5
  require "rodauth/select-account/version"
6
+
7
+ Rodauth::I18n.directories << File.expand_path(File.join(__dir__, "..", "..", "locales")) if defined?(Rodauth::I18n)
data/locales/en.yml ADDED
@@ -0,0 +1,12 @@
1
+ en:
2
+ rodauth:
3
+ add_account_notice_flash: "You have added a new account"
4
+ add_account_error_flash: "There was an error adding the new account"
5
+ require_add_account_error_flash: "Please add account to continue"
6
+ add_account_page_title: "Add Account"
7
+ add_account_button: "Add Account"
8
+ select_account_notice_flash: "You have selected an account"
9
+ select_account_error_flash: "There was an error selecting the account"
10
+ require_select_account_error_flash: "Please select account to continue"
11
+ select_account_page_title: "Select Account"
12
+ no_account_message: "could not select account"
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-select-account
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-16 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2021-12-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rodauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  description: Multiple authenticated accounts per session in rodauth.
14
28
  email:
15
29
  - cardoso_tiago@hotmail.com
@@ -26,6 +40,7 @@ files:
26
40
  - lib/rodauth/features/select_account.rb
27
41
  - lib/rodauth/select-account.rb
28
42
  - lib/rodauth/select-account/version.rb
43
+ - locales/en.yml
29
44
  - templates/add-account-form.str
30
45
  - templates/add-account.str
31
46
  - templates/select-account.str
@@ -50,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
65
  - !ruby/object:Gem::Version
51
66
  version: '0'
52
67
  requirements: []
53
- rubygems_version: 3.1.4
68
+ rubygems_version: 3.2.22
54
69
  signing_key:
55
70
  specification_version: 4
56
71
  summary: Multiple authenticated accounts per session in rodauth.