revise_auth 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +75 -6
  3. data/app/controllers/revise_auth/email_controller.rb +3 -3
  4. data/app/controllers/revise_auth/password_controller.rb +2 -2
  5. data/app/controllers/revise_auth/password_resets_controller.rb +5 -7
  6. data/app/controllers/revise_auth/registrations_controller.rb +4 -4
  7. data/app/controllers/revise_auth/sessions_controller.rb +1 -1
  8. data/app/views/revise_auth/mailer/confirm_email.html.erb +4 -4
  9. data/app/views/revise_auth/mailer/password_reset.html.erb +3 -4
  10. data/app/views/revise_auth/password_resets/edit.html.erb +3 -3
  11. data/app/views/revise_auth/password_resets/new.html.erb +2 -2
  12. data/app/views/revise_auth/registrations/edit.html.erb +13 -13
  13. data/app/views/revise_auth/registrations/new.html.erb +3 -3
  14. data/app/views/revise_auth/sessions/new.html.erb +3 -3
  15. data/config/i18n-tasks.yml +161 -0
  16. data/config/locales/cs.yml +64 -0
  17. data/config/locales/de.yml +62 -14
  18. data/config/locales/el.yml +62 -14
  19. data/config/locales/en.yml +62 -16
  20. data/config/locales/es.yml +64 -0
  21. data/config/locales/fr.yml +62 -14
  22. data/config/locales/nl.yml +63 -15
  23. data/config/locales/pt.yml +62 -14
  24. data/config/locales/tr.yml +62 -14
  25. data/config/locales/zh-TW.yml +62 -14
  26. data/lib/generators/revise_auth/model_generator.rb +12 -30
  27. data/lib/generators/revise_auth/templates/README +4 -1
  28. data/lib/generators/revise_auth/templates/initializer.rb +5 -0
  29. data/lib/revise_auth/model.rb +7 -2
  30. data/lib/revise_auth/version.rb +1 -1
  31. data/lib/revise_auth.rb +5 -0
  32. metadata +7 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f24ed4142195b9a07307505fe8f3c5c88bd2da2c7740f69dc02ac4d65154d07
4
- data.tar.gz: 2d1a7e07138b6806ac73dd290666542f8eab2ad3b83acb11a889339b19a59d23
3
+ metadata.gz: 82891afa84e7065812fdd1cc0df0ad42e095d0aa9ed8617f103ac3604f022bb0
4
+ data.tar.gz: f13795454d91f4083a30039cbbc83d56789ba26ac3e96193784c129705e56aab
5
5
  SHA512:
6
- metadata.gz: 426b8d1832b1ff2eab5e44da0f67833fdacfdd19fe8ed02690140005435554f05e287cc2ff048336a0ca58355fcf01eef85b598facff497aec397a14a4296647
7
- data.tar.gz: e3eb35bed4d5484e566e575841bb5edff8c79c7e7c3a07875aa21d2bb97e7e21f8f1d0815167fd2cdd0517083a51b4a4eb389104b6ae2eb323abdeab44d77cf0
6
+ metadata.gz: dfcf294a0c3d681d2e9c3a1f446568d13313c632f484d6bdda5b3cff0a5c31cb50fef6865467ac16db054ddf93c22a65d4900f8f7fe83e8a61ea19f4ba5669ee
7
+ data.tar.gz: f36f99adcac73323ad42aa9b6ec2902426a32d807f32add9155e259587232f16203bac64c679c7e97a874e913f7e0ea10bfd1453e3280287e9a9f3f877787abb
data/README.md CHANGED
@@ -9,20 +9,40 @@ A pure Ruby on Rails authentication system like Devise.
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
+ gem "revise_auth"
13
+ ```
14
+
15
+ and then run `bundle install`.
16
+
17
+ Or run this command:
18
+
19
+ ```bash
12
20
  bundle add "revise_auth"
13
21
  ```
14
22
 
15
- And then execute the following to generate a `User` model (optionally adding other fields such as `first_name` and `last_name`):
23
+ ## Usage
24
+
25
+ ### Models
26
+
27
+ ReviseAuth is designed around a single `User` model. Execute the following to generate the `User` model:
28
+
29
+ ```bash
30
+ $ rails g revise_auth:model
31
+ ```
32
+
33
+ Optionally, you can add other fields such as `first_name` and `last_name`:
34
+
16
35
  ```bash
17
36
  $ rails g revise_auth:model User first_name last_name
18
- $ rails db:migrate
19
37
  ```
20
38
 
21
- ## Usage
39
+ And then run:
22
40
 
23
- ReviseAuth is designed around a single `User` model.
41
+ ```bash
42
+ $ rails db:migrate
43
+ ```
24
44
 
25
- ### Roles / Other User Types
45
+ #### Roles / Other User Types
26
46
 
27
47
  ReviseAuth only works with a single model to keep things simple. We recommend adding roles to handle other types of users.
28
48
 
@@ -31,6 +51,44 @@ You can accomplish this in a few different ways:
31
51
  * A `roles` attribute on the `User` model
32
52
  * The Rolify gem
33
53
 
54
+ ### Routes
55
+
56
+ Tell your router to add ReviseAuth's controllers:
57
+
58
+ ```
59
+ # config/routes.rb
60
+
61
+ revise_auth
62
+ ```
63
+
64
+ You will want to define a root path. After login (see below), the user will be redirected to the root path.
65
+
66
+ ### Filters and Helpers
67
+
68
+ To protect your actions from unauthenticated users, you can use the `authenticate_user!` filter:
69
+
70
+ ```ruby
71
+ before_action :authenticate_user!
72
+ ```
73
+
74
+ In your views, you can use `user_signed_in?` to verify if a user is signed in and `current_user` for using the signed in user.
75
+
76
+ ### Mailer
77
+
78
+ ReviseAuth will send some emails:
79
+
80
+ * password reset
81
+ * confirmation instructions
82
+
83
+ Make sure you have the default url options set:
84
+
85
+ ```ruby
86
+ # in config/environments/development.rb
87
+ config.action_mailer.default_url_options = {host: "localhost", port: 3000}
88
+ ```
89
+
90
+ Note: This should be set in all environments.
91
+
34
92
  ## Customizing
35
93
 
36
94
  To customize views, you can run:
@@ -41,11 +99,22 @@ $ rails g revise_auth:views
41
99
 
42
100
  This will copy the views into `app/views/revise_auth` in your application.
43
101
 
102
+ ### Form Permitted Params
103
+
104
+ To customize the form parameters, you can add/remove params in `config/initializers/revise_auth.rb`
105
+
106
+ ```ruby
107
+ ReviseAuth.configure do |config|
108
+ config.sign_up_params += [:time_zone]
109
+ config.update_params += [:time_zone]
110
+ end
111
+ ```
112
+
44
113
  ### After Login Path
45
114
 
46
115
  After a user logs in they will be redirected to the stashed location or the root path, by default. When a GET request hits `authenticate_user!`, it will stash the request path in the session and redirect back after login.
47
116
 
48
- To override this, define `after_login_path` in your ApplicationController. You can also override `ReviseAuthController` and define it there.
117
+ To override this, define `after_login_path` in your `ApplicationController`. You can also override `ReviseAuthController` and define it there.
49
118
 
50
119
  ```ruby
51
120
  class ApplicationController < ActionController::Base
@@ -4,17 +4,17 @@ class ReviseAuth::EmailController < ReviseAuthController
4
4
  # GET /profile/email?confirmation_token=abcdef
5
5
  def show
6
6
  if User.find_by_token_for(:email_verification, params[:confirmation_token])&.confirm_email_change
7
- flash[:notice] = I18n.t("revise_auth.email_confirmed")
7
+ flash[:notice] = t(".email_confirmed")
8
8
  redirect_to(user_signed_in? ? profile_path : root_path)
9
9
  else
10
- redirect_to root_path, alert: I18n.t("revise_auth.email_confirm_failed")
10
+ redirect_to root_path, alert: t(".email_confirm_failed")
11
11
  end
12
12
  end
13
13
 
14
14
  def update
15
15
  if current_user.update(email_params)
16
16
  current_user.send_confirmation_instructions
17
- flash[:notice] = I18n.t("revise_auth.confirmation_email_sent", email: current_user.unconfirmed_email)
17
+ flash[:notice] = t(".confirmation_email_sent", email: current_user.unconfirmed_email)
18
18
  end
19
19
 
20
20
  redirect_to profile_path
@@ -3,9 +3,9 @@ class ReviseAuth::PasswordController < ReviseAuthController
3
3
 
4
4
  def update
5
5
  if current_user.update(password_params)
6
- redirect_to profile_path, notice: I18n.t("revise_auth.password_changed")
6
+ redirect_to profile_path, notice: t(".password_changed")
7
7
  else
8
- flash[:alert] = I18n.t("revise_auth.incorrect_password")
8
+ flash[:alert] = t(".incorrect_password")
9
9
  render "revise_auth/registrations/edit", status: :unprocessable_entity
10
10
  end
11
11
  end
@@ -6,12 +6,10 @@ class ReviseAuth::PasswordResetsController < ReviseAuthController
6
6
  end
7
7
 
8
8
  def create
9
- if (user = User.find_by(email: user_params[:email]))
10
- token = user.generate_token_for(:password_reset)
11
- ReviseAuth::Mailer.with(user: user, token: token).password_reset.deliver_later
12
- end
9
+ user = User.find_by(email: user_params[:email])
10
+ user&.send_password_reset_instructions
13
11
 
14
- flash[:notice] = I18n.t("revise_auth.password_reset_sent")
12
+ flash[:notice] = t(".password_reset_sent")
15
13
  redirect_to login_path
16
14
  end
17
15
 
@@ -20,7 +18,7 @@ class ReviseAuth::PasswordResetsController < ReviseAuthController
20
18
 
21
19
  def update
22
20
  if @user.update(password_params)
23
- flash[:notice] = I18n.t("revise_auth.password_changed")
21
+ flash[:notice] = t("revise_auth.password.update.password_changed")
24
22
  redirect_to login_path
25
23
  else
26
24
  render :edit, status: :unprocessable_entity
@@ -34,7 +32,7 @@ class ReviseAuth::PasswordResetsController < ReviseAuthController
34
32
 
35
33
  return if @user.present?
36
34
 
37
- flash[:alert] = I18n.t("revise_auth.password_link_invalid")
35
+ flash[:alert] = t(".invalid_password_link")
38
36
  redirect_to new_password_reset_path
39
37
  end
40
38
 
@@ -20,7 +20,7 @@ class ReviseAuth::RegistrationsController < ReviseAuthController
20
20
 
21
21
  def update
22
22
  if current_user.update(profile_params)
23
- redirect_to profile_path, notice: I18n.t("revise_auth.account_updated")
23
+ redirect_to profile_path, notice: t(".account_updated")
24
24
  else
25
25
  render :edit, status: :unprocessable_entity
26
26
  end
@@ -29,16 +29,16 @@ class ReviseAuth::RegistrationsController < ReviseAuthController
29
29
  def destroy
30
30
  current_user.destroy
31
31
  logout
32
- redirect_to root_path, status: :see_other, alert: I18n.t("revise_auth.account_deleted")
32
+ redirect_to root_path, status: :see_other, alert: t(".account_deleted")
33
33
  end
34
34
 
35
35
  private
36
36
 
37
37
  def sign_up_params
38
- params.require(:user).permit(:name, :email, :password, :password_confirmation)
38
+ params.require(:user).permit(ReviseAuth.sign_up_params)
39
39
  end
40
40
 
41
41
  def profile_params
42
- params.require(:user).permit(:name)
42
+ params.require(:user).permit(ReviseAuth.update_params)
43
43
  end
44
44
  end
@@ -7,7 +7,7 @@ class ReviseAuth::SessionsController < ReviseAuthController
7
7
  login(user)
8
8
  redirect_to resolve_after_login_path
9
9
  else
10
- flash[:alert] = I18n.t("revise_auth.invalid_email_or_password")
10
+ flash[:alert] = t(".invalid_email_or_password")
11
11
  render :new, status: :unprocessable_entity
12
12
  end
13
13
  end
@@ -1,7 +1,7 @@
1
- <p>Welcome <%= @user.unconfirmed_email %>!</p>
1
+ <p><%=t ".welcome", email: @user.unconfirmed_email %></p>
2
2
 
3
- <p>You can confirm your account email through the link below:</p>
3
+ <p><%=t ".confirm_below" %></p>
4
4
 
5
- <p><%= link_to "Confirm my account", profile_email_url(confirmation_token: @token) %></p>
5
+ <p><%= link_to t(".confirm"), profile_email_url(confirmation_token: @token) %></p>
6
6
 
7
- <p>This link will expire in 24 hours.</p>
7
+ <p><%=t ".expiration_notice" %></p>
@@ -1,6 +1,5 @@
1
- <p>We've received a password reset request for your login. If this was you just visit the
2
- the link below to finish up. If it wasn't you, you can simply ignore this email.</p>
1
+ <p><%=t ".reset_password_below" %></p>
3
2
 
4
- <p><%= link_to "Reset my password", edit_password_reset_url(token: @token) %></p>
3
+ <p><%= link_to t(".reset_password"), edit_password_reset_url(token: @token) %></p>
5
4
 
6
- <p>This link will expire in 1 hour.</p>
5
+ <p><%=t ".expiration_notice" %></p>
@@ -1,6 +1,6 @@
1
- <h1>Reset Your Password</h1>
1
+ <h1><%=t ".reset_password" %></h1>
2
2
 
3
- <%= form_with model: @user, url: sign_up_path do |form| %>
3
+ <%= form_with model: @user, url: password_reset_path do |form| %>
4
4
  <% if form.object.errors.any? %>
5
5
  <ul>
6
6
  <% form.object.errors.full_messages.each do |message| %>
@@ -20,6 +20,6 @@
20
20
  </div>
21
21
 
22
22
  <div>
23
- <%= form.button "Reset password" %>
23
+ <%= form.button t(".reset_password") %>
24
24
  </div>
25
25
  <% end %>
@@ -1,4 +1,4 @@
1
- <h1>Send Password Reset Instructions</h1>
1
+ <h1><%=t ".send_password_reset_instructions" %></h1>
2
2
 
3
3
  <%= form_with model: @user, url: password_resets_path do |form| %>
4
4
  <% if form.object.errors.any? %>
@@ -15,6 +15,6 @@
15
15
  </div>
16
16
 
17
17
  <div>
18
- <%= form.button "Send Reset Instructions" %>
18
+ <%= form.button t(".send_password_reset_instructions") %>
19
19
  </div>
20
20
  <% end %>
@@ -1,11 +1,11 @@
1
- <h1>Profile</h1>
1
+ <h1><%=t ".profile" %></h1>
2
2
 
3
3
  <%= form_with model: current_user, url: profile_email_path do |form| %>
4
4
  <fieldset>
5
- <legend>Change Email Address</legend>
5
+ <legend><%=t ".change_email_address" %></legend>
6
6
 
7
7
  <% if current_user.unconfirmed_email? %>
8
- <p>Waiting for confirmation of <%= current_user.unconfirmed_email %></p>
8
+ <p><%=t ".waiting_confirmation", email: current_user.unconfirmed_email %></p>
9
9
  <% end %>
10
10
 
11
11
  <% if form.object.errors.any? %>
@@ -16,23 +16,23 @@
16
16
  </ul>
17
17
  <% end %>
18
18
 
19
- <p>Your email address is: <%= current_user.email %></p>
20
- <p>To change your email, we will send a confirmation email to your new address to complete the change.</p>
19
+ <p><%=t ".current_email_address", email: current_user.email %></p>
20
+ <p><%=t ".confirmation_instructions" %></p>
21
21
 
22
22
  <div>
23
- <%= form.label :unconfirmed_email, "Email address" %>
23
+ <%= form.label :unconfirmed_email, t(".new_email") %>
24
24
  <%= form.email_field :unconfirmed_email, required: true %>
25
25
  </div>
26
26
 
27
27
  <div>
28
- <%= form.button "Save Changes" %>
28
+ <%= form.button t(".save") %>
29
29
  </div>
30
30
  </fieldset>
31
31
  <% end %>
32
32
 
33
33
  <%= form_with model: current_user, url: profile_password_path do |form| %>
34
34
  <fieldset>
35
- <legend>Change Password</legend>
35
+ <legend><%=t ".change_password" %></legend>
36
36
 
37
37
  <% if form.object.errors.any? %>
38
38
  <ul>
@@ -43,12 +43,12 @@
43
43
  <% end %>
44
44
 
45
45
  <div>
46
- <%= form.label :password_challenge, "Current password" %>
46
+ <%= form.label :password_challenge %>
47
47
  <%= form.password_field :password_challenge, required: true %>
48
48
  </div>
49
49
 
50
50
  <div>
51
- <%= form.label :password, "New password" %>
51
+ <%= form.label :password, t(".new_password") %>
52
52
  <%= form.password_field :password, required: true %>
53
53
  </div>
54
54
 
@@ -58,14 +58,14 @@
58
58
  </div>
59
59
 
60
60
  <div>
61
- <%= form.button "Save Changes" %>
61
+ <%= form.button t(".save") %>
62
62
  </div>
63
63
  </fieldset>
64
64
  <% end %>
65
65
 
66
66
  <%= form_with url: profile_path, method: :delete do |form| %>
67
67
  <fieldset>
68
- <legend>Delete my account</legend>
69
- <%= form.button "Delete account", data: { turbo_confirm: "Are you sure?" } %>
68
+ <legend><%=t ".delete_account" %></legend>
69
+ <%= form.button t(".delete_account"), data: { turbo_confirm: t(".confirm") } %>
70
70
  </fieldset>
71
71
  <% end %>
@@ -1,4 +1,4 @@
1
- <h1>Sign Up</h1>
1
+ <h1><%=t ".sign_up" %></h1>
2
2
 
3
3
  <%= form_with model: @user, url: sign_up_path do |form| %>
4
4
  <% if form.object.errors.any? %>
@@ -6,9 +6,9 @@
6
6
  <% form.object.errors.full_messages.each do |message| %>
7
7
  <li><%= message %></li>
8
8
  <% end %>
9
- </ul>
10
9
  <% end %>
11
10
 
11
+ </ul>
12
12
  <div>
13
13
  <%= form.label :email %>
14
14
  <%= form.email_field :email, required: true, autofocus: true %>
@@ -25,6 +25,6 @@
25
25
  </div>
26
26
 
27
27
  <div>
28
- <%= form.button "Sign Up" %>
28
+ <%= form.button t(".sign_up") %>
29
29
  </div>
30
30
  <% end %>
@@ -1,4 +1,4 @@
1
- <h1>Log in</h1>
1
+ <h1><%=t ".log_in" %></h1>
2
2
 
3
3
  <%= form_with url: login_path do |form| %>
4
4
  <div>
@@ -12,10 +12,10 @@
12
12
  </div>
13
13
 
14
14
  <div>
15
- <%= form.button "Login" %>
15
+ <%= form.button t(".log_in") %>
16
16
  </div>
17
17
 
18
18
  <div>
19
- <%= link_to "Reset your password", new_password_reset_path %>
19
+ <%= link_to t(".reset_password"), new_password_reset_path %>
20
20
  </div>
21
21
  <% end %>
@@ -0,0 +1,161 @@
1
+ # i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
2
+
3
+ # The "main" locale.
4
+ base_locale: en
5
+ ## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
6
+ # locales: [es, fr]
7
+ ## Reporting locale, default: en. Available: en, ru.
8
+ # internal_locale: en
9
+
10
+ # Read and write translations.
11
+ data:
12
+ ## Translations are read from the file system. Supported format: YAML, JSON.
13
+ ## Provide a custom adapter:
14
+ # adapter: I18n::Tasks::Data::FileSystem
15
+
16
+ # Locale files or `Find.find` patterns where translations are read from:
17
+ read:
18
+ ## Default:
19
+ # - config/locales/%{locale}.yml
20
+ ## More files:
21
+ # - config/locales/**/*.%{locale}.yml
22
+
23
+ # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
24
+ # `i18n-tasks normalize -p` will force move the keys according to these rules
25
+ write:
26
+ ## For example, write devise and simple form keys to their respective files:
27
+ # - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
28
+ ## Catch-all default:
29
+ # - config/locales/%{locale}.yml
30
+
31
+ # External locale data (e.g. gems).
32
+ # This data is not considered unused and is never written to.
33
+ external:
34
+ ## Example (replace %#= with %=):
35
+ # - "<%#= %x[bundle info vagrant --path].chomp %>/templates/locales/%{locale}.yml"
36
+
37
+ ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class.
38
+ # router: conservative_router
39
+
40
+ yaml:
41
+ write:
42
+ # do not wrap lines at 80 characters
43
+ line_width: -1
44
+
45
+ ## Pretty-print JSON:
46
+ # json:
47
+ # write:
48
+ # indent: ' '
49
+ # space: ' '
50
+ # object_nl: "\n"
51
+ # array_nl: "\n"
52
+
53
+ # Find translate calls
54
+ search:
55
+ ## Paths or `Find.find` patterns to search in:
56
+ # paths:
57
+ # - app/
58
+
59
+ ## Root directories for relative keys resolution.
60
+ # relative_roots:
61
+ # - app/controllers
62
+ # - app/helpers
63
+ # - app/mailers
64
+ # - app/presenters
65
+ # - app/views
66
+
67
+ ## Directories where method names which should not be part of a relative key resolution.
68
+ # By default, if a relative translation is used inside a method, the name of the method will be considered part of the resolved key.
69
+ # Directories listed here will not consider the name of the method part of the resolved key
70
+ #
71
+ # relative_exclude_method_name_paths:
72
+ # -
73
+
74
+ ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting:
75
+ ## *.jpg *.jpeg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less
76
+ ## *.yml *.json *.zip *.tar.gz *.swf *.flv *.mp3 *.wav *.flac *.webm *.mp4 *.ogg *.opus *.webp *.map *.xlsx
77
+ exclude:
78
+ - app/assets/images
79
+ - app/assets/fonts
80
+ - app/assets/videos
81
+ - app/assets/builds
82
+
83
+ ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`:
84
+ ## If specified, this settings takes priority over `exclude`, but `exclude` still applies.
85
+ # only: ["*.rb", "*.html.slim"]
86
+
87
+ ## If `strict` is `false`, guess usages such as t("categories.#{category}.title"). The default is `true`.
88
+ # strict: true
89
+
90
+ ## Allows adding ast_matchers for finding translations using the AST-scanners
91
+ ## The available matchers are:
92
+ ## - RailsModelMatcher
93
+ ## Matches ActiveRecord translations like
94
+ ## User.human_attribute_name(:email) and User.model_name.human
95
+ ##
96
+ ## To implement your own, please see `I18n::Tasks::Scanners::AstMatchers::BaseMatcher`.
97
+ # <%# I18n::Tasks.add_ast_matcher('I18n::Tasks::Scanners::AstMatchers::RailsModelMatcher') %>
98
+
99
+ ## Multiple scanners can be used. Their results are merged.
100
+ ## The options specified above are passed down to each scanner. Per-scanner options can be specified as well.
101
+ ## See this example of a custom scanner: https://github.com/glebm/i18n-tasks/wiki/A-custom-scanner-example
102
+
103
+ ## Translation Services
104
+ # translation:
105
+ # # Google Translate
106
+ # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
107
+ # google_translate_api_key: "AbC-dEf5"
108
+ # # DeepL Pro Translate
109
+ # # Get an API key and subscription at https://www.deepl.com/pro to use DeepL Pro
110
+ # deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
111
+ # # deepl_host: "https://api.deepl.com"
112
+ # # deepl_version: "v2"
113
+ # # add additional options to the DeepL.translate call: https://www.deepl.com/docs-api/translate-text/translate-text/
114
+ # deepl_options:
115
+ # formality: prefer_less
116
+ ## Do not consider these keys missing:
117
+ # ignore_missing:
118
+ # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
119
+ # - '{devise,simple_form}.*'
120
+ ignore_missing:
121
+ - revise_auth.password_resets.set_user.invalid_password_link
122
+
123
+ ## Consider these keys used:
124
+ # ignore_unused:
125
+ # - 'activerecord.attributes.*'
126
+ # - '{devise,kaminari,will_paginate}.*'
127
+ # - 'simple_form.{yes,no}'
128
+ # - 'simple_form.{placeholders,hints,labels}.*'
129
+ # - 'simple_form.{error_notification,required}.:'
130
+ ignore_unused:
131
+ - "activerecord.attributes.*"
132
+ - "revise_auth.sign_up_or_login"
133
+ - "revise_auth.password_resets.edit.invalid_password_link"
134
+
135
+ ## Exclude these keys from the `i18n-tasks eq-base' report:
136
+ # ignore_eq_base:
137
+ # all:
138
+ # - common.ok
139
+ # fr,es:
140
+ # - common.brand
141
+
142
+ ## Exclude these keys from the `i18n-tasks check-consistent-interpolations` report:
143
+ # ignore_inconsistent_interpolations:
144
+ # - 'activerecord.attributes.*'
145
+
146
+ ## Ignore these keys completely:
147
+ # ignore:
148
+ # - kaminari.*
149
+
150
+ ## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
151
+ ## e.g. in case of a relative key defined in a helper method.
152
+ ## In these cases you can use the built-in PatternMapper to map patterns to keys, e.g.:
153
+ #
154
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
155
+ # only: %w(*.html.haml *.html.slim),
156
+ # patterns: [['= title\b', '.page_title']] %>
157
+ #
158
+ # The PatternMapper can also match key literals via a special %{key} interpolation, e.g.:
159
+ #
160
+ # <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
161
+ # patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
@@ -0,0 +1,64 @@
1
+ ---
2
+ cs:
3
+ activerecord:
4
+ attributes:
5
+ user:
6
+ email: Email
7
+ password: Password
8
+ password_challenge: Current password
9
+ password_confirmation: Password confirmation
10
+ revise_auth:
11
+ email:
12
+ show:
13
+ email_confirm_failed: Vaši e-mailovou adresu nelze potvrdit.
14
+ email_confirmed: Vaše e-mailová adresa byla úspěšně potvrzena.
15
+ update:
16
+ confirmation_email_sent: Potvrzující e-mail byl odeslán na adresu %{email}.
17
+ mailer:
18
+ confirm_email:
19
+ confirm: Confirm my account
20
+ confirm_below: 'You can confirm your account email through the link below:'
21
+ expiration_notice: This link will expire in 24 hours.
22
+ welcome: Welcome %{email}!
23
+ password_reset:
24
+ expiration_notice: This link will expire in 1 hour.
25
+ reset_password: Reset my password
26
+ reset_password_below: We've received a password reset request for your login. If this was you just visit the link below to finish up. If it wasn't you, you can simply ignore this email.
27
+ password:
28
+ update:
29
+ incorrect_password: Vaše aktuální heslo je nesprávné. Zkuste to prosím znovu.
30
+ password_changed: Vaše heslo bylo úspěšně změněno.
31
+ password_resets:
32
+ create:
33
+ password_reset_sent: E-mail s pokyny pro obnovení hesla byl odeslán.
34
+ edit:
35
+ invalid_password_link: Odkaz pro obnovení hesla je neplatný.
36
+ reset_password: Reset password
37
+ new:
38
+ send_password_reset_instructions: Send Password Reset Instructions
39
+ registrations:
40
+ destroy:
41
+ account_deleted: Váš účet byl smazán.
42
+ edit:
43
+ change_email_address: Change Email Address
44
+ change_password: Change Password
45
+ confirm: Are you sure?
46
+ confirmation_instructions: To change your email, we will send a confirmation email to your new address to complete the change.
47
+ current_email_address: 'Your email address is: %{email}.'
48
+ delete_account: Delete my account
49
+ new_email: New Email
50
+ new_password: New password
51
+ profile: Profile
52
+ save: Save Changes
53
+ waiting_confirmation: Waiting for confirmation of %{email}.
54
+ new:
55
+ sign_up: Sign up
56
+ update:
57
+ account_updated: Účet byl úspěšně aktualizován.
58
+ sessions:
59
+ create:
60
+ invalid_email_or_password: Neplatný e-mail nebo heslo.
61
+ new:
62
+ log_in: Log in
63
+ reset_password: Reset your password
64
+ sign_up_or_login: Pro pokračování se zaregistruje nebo přihlaste