authlogic-i18n 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +62 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +6 -0
- data/authlogic-i18n.gemspec +26 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/authlogic-i18n.rb +2 -0
- data/lib/authlogic_i18n/railtie.rb +28 -0
- data/lib/authlogic_i18n/version.rb +3 -0
- data/locales/en.yml +26 -0
- data/locales/zh-CN.yml +26 -0
- metadata +62 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 941c2833976d08c381bbd49c33e8542ce3a93e7678491a39607d398df0b6416a
|
|
4
|
+
data.tar.gz: 36c412ba23c3a9a5bcac69adb18a6ad7040dfd49207a9271119031e0ceed6065
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2dcf8dd13c514aa8297996355c7ce0ea9dea798ae7b56e3101c042684cc08ef54c2cd83d3ae7a05a4098e7c14c6fc8185d5af6c5397204d8b391ee2a185faf6d
|
|
7
|
+
data.tar.gz: 42ed38812f8aa08b6188ad36dfbae4c492f47a5331a754861cd452e23292f78aef1056b7704aa540ee4c5395c9e650fa2d8b763bbbc3d7dca7515380abf23a7b
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at luciacachn@gmail.com. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: https://contributor-covenant.org
|
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
authlogic-i18n (0.1.0)
|
|
5
|
+
|
|
6
|
+
GEM
|
|
7
|
+
remote: https://rubygems.org/
|
|
8
|
+
specs:
|
|
9
|
+
activemodel (6.0.3.2)
|
|
10
|
+
activesupport (= 6.0.3.2)
|
|
11
|
+
activerecord (6.0.3.2)
|
|
12
|
+
activemodel (= 6.0.3.2)
|
|
13
|
+
activesupport (= 6.0.3.2)
|
|
14
|
+
activesupport (6.0.3.2)
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
16
|
+
i18n (>= 0.7, < 2)
|
|
17
|
+
minitest (~> 5.1)
|
|
18
|
+
tzinfo (~> 1.1)
|
|
19
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
20
|
+
authlogic (6.1.0)
|
|
21
|
+
activemodel (>= 5.2, < 6.1)
|
|
22
|
+
activerecord (>= 5.2, < 6.1)
|
|
23
|
+
activesupport (>= 5.2, < 6.1)
|
|
24
|
+
request_store (~> 1.0)
|
|
25
|
+
concurrent-ruby (1.1.6)
|
|
26
|
+
diff-lcs (1.3)
|
|
27
|
+
i18n (1.8.3)
|
|
28
|
+
concurrent-ruby (~> 1.0)
|
|
29
|
+
minitest (5.14.1)
|
|
30
|
+
rack (2.2.3)
|
|
31
|
+
rake (12.3.3)
|
|
32
|
+
request_store (1.5.0)
|
|
33
|
+
rack (>= 1.4)
|
|
34
|
+
rspec (3.9.0)
|
|
35
|
+
rspec-core (~> 3.9.0)
|
|
36
|
+
rspec-expectations (~> 3.9.0)
|
|
37
|
+
rspec-mocks (~> 3.9.0)
|
|
38
|
+
rspec-core (3.9.2)
|
|
39
|
+
rspec-support (~> 3.9.3)
|
|
40
|
+
rspec-expectations (3.9.2)
|
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
42
|
+
rspec-support (~> 3.9.0)
|
|
43
|
+
rspec-mocks (3.9.1)
|
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
+
rspec-support (~> 3.9.0)
|
|
46
|
+
rspec-support (3.9.3)
|
|
47
|
+
thread_safe (0.3.6)
|
|
48
|
+
tzinfo (1.2.7)
|
|
49
|
+
thread_safe (~> 0.1)
|
|
50
|
+
zeitwerk (2.3.1)
|
|
51
|
+
|
|
52
|
+
PLATFORMS
|
|
53
|
+
ruby
|
|
54
|
+
|
|
55
|
+
DEPENDENCIES
|
|
56
|
+
authlogic
|
|
57
|
+
authlogic-i18n!
|
|
58
|
+
rake (~> 12.0)
|
|
59
|
+
rspec (~> 3.0)
|
|
60
|
+
|
|
61
|
+
BUNDLED WITH
|
|
62
|
+
2.1.4
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 lucia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Authlogic::I18n
|
|
2
|
+
|
|
3
|
+
Translations for the authlogic gem.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'authlogic-i18n'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And then execute:
|
|
14
|
+
|
|
15
|
+
$ bundle install
|
|
16
|
+
|
|
17
|
+
Or install it yourself as:
|
|
18
|
+
|
|
19
|
+
$ gem install authlogic-i18n
|
|
20
|
+
|
|
21
|
+
## Development
|
|
22
|
+
|
|
23
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
24
|
+
|
|
25
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
26
|
+
|
|
27
|
+
## Contributing
|
|
28
|
+
|
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/authlogic-i18n. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/authlogic-i18n/blob/master/CODE_OF_CONDUCT.md).
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
35
|
+
|
|
36
|
+
## Code of Conduct
|
|
37
|
+
|
|
38
|
+
Everyone interacting in the Authlogic::I18n project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/authlogic-i18n/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require_relative 'lib/authlogic_i18n/version'
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |spec|
|
|
4
|
+
spec.name = "authlogic-i18n"
|
|
5
|
+
spec.version = AuthlogicI18n::VERSION
|
|
6
|
+
spec.authors = ["lucia"]
|
|
7
|
+
spec.email = ["luciacachn@gmail.com"]
|
|
8
|
+
|
|
9
|
+
spec.summary = "Translations for the authlogic gem"
|
|
10
|
+
spec.description = "Translations for the authlogic gem"
|
|
11
|
+
spec.homepage = "https://github.com/Lupeipei/authlogic-i18n"
|
|
12
|
+
spec.license = "MIT"
|
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
|
14
|
+
|
|
15
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
17
|
+
|
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
20
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
22
|
+
end
|
|
23
|
+
spec.bindir = "exe"
|
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
25
|
+
spec.require_paths = ["lib"]
|
|
26
|
+
end
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "authlogic/i18n"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'rails'
|
|
2
|
+
|
|
3
|
+
module AuthlogicI18n
|
|
4
|
+
class Engine < ::Rails::Engine
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
class Railtie < ::Rails::Railtie
|
|
8
|
+
initializer 'authlogic-i18n' do |app|
|
|
9
|
+
AuthlogicI18n::Railtie.instance_eval do
|
|
10
|
+
pattern = pattern_from app.config.i18n.available_locales
|
|
11
|
+
|
|
12
|
+
add("locales/#{pattern}.yml")
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
protected
|
|
17
|
+
|
|
18
|
+
def self.add(pattern)
|
|
19
|
+
files = Dir[File.join(File.dirname(__FILE__), '../..', pattern)]
|
|
20
|
+
I18n.load_path.concat(files)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.pattern_from(args)
|
|
24
|
+
array = Array(args || [])
|
|
25
|
+
array.blank? ? '*' : "{#{array.join ','}}"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/locales/en.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
en:
|
|
2
|
+
authlogic:
|
|
3
|
+
error_messages:
|
|
4
|
+
login_blank: can not be blank
|
|
5
|
+
login_not_found: is not valid
|
|
6
|
+
login_invalid: should use only letters, numbers, spaces, and .-_@+ please.
|
|
7
|
+
consecutive_failed_logins_limit_exceeded: >
|
|
8
|
+
Consecutive failed logins limit exceeded, account is disabled.
|
|
9
|
+
email_invalid: should look like an email address.
|
|
10
|
+
email_invalid_international: should look like an international email address.
|
|
11
|
+
password_blank: can not be blank
|
|
12
|
+
password_invalid: is not valid
|
|
13
|
+
not_active: Your account is not active
|
|
14
|
+
not_confirmed: Your account is not confirmed
|
|
15
|
+
not_approved: Your account is not approved
|
|
16
|
+
no_authentication_details: You did not provide any details for authentication.
|
|
17
|
+
general_credentials_error: Login/Password combination is not valid
|
|
18
|
+
session_invalid: Your session is invalid and has the following errors:
|
|
19
|
+
models:
|
|
20
|
+
user_session: UserSession (or whatever name you are using)
|
|
21
|
+
attributes:
|
|
22
|
+
user_session: (or whatever name you are using)
|
|
23
|
+
login: login
|
|
24
|
+
email: email
|
|
25
|
+
password: password
|
|
26
|
+
remember_me: remember me
|
data/locales/zh-CN.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
zh-CN:
|
|
2
|
+
authlogic:
|
|
3
|
+
error_messages:
|
|
4
|
+
login_blank: 不能为空
|
|
5
|
+
login_not_found: 是无效的
|
|
6
|
+
login_invalid: 只允许使用字母,数字,空格和.-_@+。
|
|
7
|
+
consecutive_failed_logins_limit_exceeded: >
|
|
8
|
+
连续登录失败次数超过限制,帐户被禁用。
|
|
9
|
+
email_invalid: 邮箱地址无效
|
|
10
|
+
email_invalid_international: 国际邮箱地址无效
|
|
11
|
+
password_blank: 不能为空
|
|
12
|
+
password_invalid: 是无效的
|
|
13
|
+
not_active: 您的账户未激活
|
|
14
|
+
not_confirmed: 您的账户未确认
|
|
15
|
+
not_approved: 您的账户未批准
|
|
16
|
+
no_authentication_details: 您未提供任何认证细节。
|
|
17
|
+
general_credentials_error: 登陆名/密码无效
|
|
18
|
+
session_invalid: 你的会话无效,错误如下:
|
|
19
|
+
models:
|
|
20
|
+
user_session: 用户会话
|
|
21
|
+
attributes:
|
|
22
|
+
user_session: 用户会话
|
|
23
|
+
login: 登陆名
|
|
24
|
+
email: 邮箱
|
|
25
|
+
password: 密码
|
|
26
|
+
remember_me: 记住登录信息
|
metadata
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: authlogic-i18n
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- lucia
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Translations for the authlogic gem
|
|
14
|
+
email:
|
|
15
|
+
- luciacachn@gmail.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- ".gitignore"
|
|
21
|
+
- ".rspec"
|
|
22
|
+
- ".travis.yml"
|
|
23
|
+
- CODE_OF_CONDUCT.md
|
|
24
|
+
- Gemfile
|
|
25
|
+
- Gemfile.lock
|
|
26
|
+
- LICENSE.txt
|
|
27
|
+
- README.md
|
|
28
|
+
- Rakefile
|
|
29
|
+
- authlogic-i18n.gemspec
|
|
30
|
+
- bin/console
|
|
31
|
+
- bin/setup
|
|
32
|
+
- lib/authlogic-i18n.rb
|
|
33
|
+
- lib/authlogic_i18n/railtie.rb
|
|
34
|
+
- lib/authlogic_i18n/version.rb
|
|
35
|
+
- locales/en.yml
|
|
36
|
+
- locales/zh-CN.yml
|
|
37
|
+
homepage: https://github.com/Lupeipei/authlogic-i18n
|
|
38
|
+
licenses:
|
|
39
|
+
- MIT
|
|
40
|
+
metadata:
|
|
41
|
+
homepage_uri: https://github.com/Lupeipei/authlogic-i18n
|
|
42
|
+
source_code_uri: https://github.com/Lupeipei/authlogic-i18n
|
|
43
|
+
post_install_message:
|
|
44
|
+
rdoc_options: []
|
|
45
|
+
require_paths:
|
|
46
|
+
- lib
|
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 2.3.0
|
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - ">="
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '0'
|
|
57
|
+
requirements: []
|
|
58
|
+
rubygems_version: 3.0.3
|
|
59
|
+
signing_key:
|
|
60
|
+
specification_version: 4
|
|
61
|
+
summary: Translations for the authlogic gem
|
|
62
|
+
test_files: []
|