Skip to content

Commit

Permalink
Add no sign-up locale variant for "require user" option
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Aug 9, 2024
1 parent f19f7c9 commit 1e267c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/views/application/_questionbox.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
%strong= t(".status.locked")
- elsif !user_signed_in? && user.privacy_require_user?
.text-center
%strong= t(".status.require_user_html",
sign_in: link_to(t("voc.login"), new_user_session_path),
sign_up: link_to(t("voc.register"), new_user_registration_path))
- if Retrospring::Config.registrations_enabled?
%strong= t(".status.require_user_html",
sign_in: link_to(t("voc.login"), new_user_session_path),
sign_up: link_to(t("voc.register"), new_user_registration_path))
- else
%strong= t(".status.require_user_no_registration_html",
sign_in: link_to(t("voc.login"), new_user_session_path))
- else
- if user_signed_in? || user.privacy_allow_anonymous_questions?
#question-box{
Expand Down
3 changes: 3 additions & 0 deletions config/locales/views.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ en:
require_user_html: |
This user requires others to be logged in to ask questions. <br/>
(%{sign_in} or %{sign_up})
require_user_no_registration_html: |
This user requires others to be logged in to ask questions. <br/>
(%{sign_in})
non_anonymous_html: |
This user does not want to receive anonymous questions. <br/>
(%{sign_in} or %{sign_up})
Expand Down

0 comments on commit 1e267c8

Please sign in to comment.