From b9e81f208daff814a62c36028604029cad9a0e9e Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Fri, 27 Mar 2020 10:34:06 +0100 Subject: [PATCH] Fix i18n --- app/assets/stylesheets/sign_up.scss | 8 ++++++++ app/assets/stylesheets/sing_in.scss | 4 ++++ app/helpers/form_tag_helper.rb | 4 +--- app/views/users/registrations/new.html.erb | 10 +++++----- config/locales/en.yml | 2 ++ 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/sign_up.scss b/app/assets/stylesheets/sign_up.scss index 5e227f9eb..385f93697 100644 --- a/app/assets/stylesheets/sign_up.scss +++ b/app/assets/stylesheets/sign_up.scss @@ -27,6 +27,10 @@ .sci-input-container { margin-bottom: 24px; + + .minimum-password-length { + @include font-small; + } } .sign-up-button { @@ -38,6 +42,10 @@ .linkedin-link { margin-right: 15px; + + &:hover { + text-decoration: none; + } } .linkedin-signin-button { diff --git a/app/assets/stylesheets/sing_in.scss b/app/assets/stylesheets/sing_in.scss index d9d72996f..7292cd67d 100644 --- a/app/assets/stylesheets/sing_in.scss +++ b/app/assets/stylesheets/sing_in.scss @@ -43,6 +43,10 @@ .linkedin-link { margin-right: 15px; + + &:hover { + text-decoration: none; + } } .linkedin-signin-button { diff --git a/app/helpers/form_tag_helper.rb b/app/helpers/form_tag_helper.rb index 8352395ef..7fd67bf08 100644 --- a/app/helpers/form_tag_helper.rb +++ b/app/helpers/form_tag_helper.rb @@ -1,12 +1,10 @@ -# frozen_string_literal: true - module FormTagHelper def recaptcha_input_tag if Rails.configuration.x.enable_recaptcha res = "
" - res << label_tag(:recaptcha_label, 'Let us know you’re human. Enter the captcha below.') + res << label_tag(:recaptcha_label, I18n.t('users.registrations.new.captcha_description')) res << recaptcha_tags if flash[:recaptcha_error] res << "" diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 4db26ff70..162fa6ebb 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -16,25 +16,25 @@ <%= form_for(:user, as: resource_name, url: registration_path(resource_name), html: { id: "sign-up-form" } ) do |f| %>
- <%= f.label :full_name %> + <%= f.label :full_name, t('users.registrations.new.full_name_label') %> <%= f.text_field :full_name, autofocus: true, class: 'form-control sci-input-field' %>
- <%= f.label :email %> + <%= f.label :email, t('users.registrations.new.email_label') %> <%= f.email_field :email, class: 'form-control sci-input-field' %>
- <%= f.label :password %> + <%= f.label :password, t('users.registrations.new.password_label') %> <% if @minimum_password_length %> - (<%= @minimum_password_length %> characters minimum) + <%= t('users.registrations.new.minimum_password_length', password_length: @minimum_password_length) %> <% end %> <%= f.password_field :password, autocomplete: 'off', class: 'form-control sci-input-field' %>
- <%= f.label :password_confirmation %> + <%= f.label :password_confirmation, t('users.registrations.new.password_confirmation_label') %> <%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control sci-input-field' %>
<% if Rails.configuration.x.new_team_on_signup %> diff --git a/config/locales/en.yml b/config/locales/en.yml index a76a07306..7781bb3f4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1542,7 +1542,9 @@ en: email_label: "E-mail" full_name_label: "Full name" password_label: "Password" + minimum_password_length: "(%{password_length} characters minimum)" password_confirmation_label: "Password confirmation" + captcha_description: "Let us know you’re human. Enter the captcha below." new_with_provider: head_title: "Complete the Sign up" statistics: