Skip to content

Commit

Permalink
Fix: the account creation page content (#401)
Browse files Browse the repository at this point in the history
* Fix locales EN and FR with a bunch of changes  (#391)

* Fixing fr and en locales (step 1)

* Fixing fr and en locales (step 2)

* Fixing fr and en locales (step 3)

* change the display of errors text

* fix changes of texts on lost password page

* change the register text in account page

* update the orchid error text

---------

Co-authored-by: Clement Jonquet <jonquet@lirmm.fr>
Co-authored-by: Syphax bouazzouni <gs_bouazzouni@esi.dz>
  • Loading branch information
3 people authored Dec 6, 2023
1 parent fafb0ca commit 8d3972f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def validate(params)
end
end
if ((!params[:orcidId].match(/^\d{4}+(-\d{4})+$/)) || (params[:orcidId].length != 19)) && !(params[:orcidId].nil? || params[:orcidId].length < 1)
errors << "Please enter a valide orcid id"
errors << "Please enter a valid ORCID."
end

if params[:username].nil? || params[:username].length < 1 || !params[:username].match(/^[a-zA-Z0-9]([._-](?![._-])|[a-zA-Z0-9]){3,18}[a-zA-Z0-9]$/)
Expand All @@ -251,7 +251,7 @@ def validate_update(params)
errors << "Last name field is required"
end
if params[:orcidId].present? && ((!params[:orcidId].match(/^\d{4}-\d{4}-\d{4}-\d{4}$/)) || (params[:orcidId].length != 19))
errors << "Please enter a valide orcide id"
errors << "Please enter a valid ORCID."
end
if !params[:password].eql?(params[:password_confirmation])
errors << "Your Password and Password Confirmation do not match"
Expand Down
2 changes: 1 addition & 1 deletion app/views/login/lost_password.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Recover password
%hr#lost-password-title-line/
%div
%p.lost-password-description Enter the email associated with your account and we will send an email with instructions to reset your password
%p.lost-password-description Enter the email address associated with your account and we will send an email with instructions to reset your password.
%p.lost-password-input-title Email
= text_field 'user', :email,class: "lost-password-input", placeholder: "Enter the email"
%input.lost-password-button{:type => "submit", :value => "Send instructions"}/
2 changes: 1 addition & 1 deletion app/views/login/lost_password_success.html.haml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
= render(CardMessageComponent.new(message: "A password reset email has been sent to your email, please follow the instructions in the email to reset your password.", button_text: "Back home", type:"success"))
= render(CardMessageComponent.new(message: "A password reset email has been sent to your email address, please follow the instructions to reset your password.", button_text: "Back home", type:"success"))
2 changes: 1 addition & 1 deletion app/views/users/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
= t('register.account_errors')
%ul
- for error in @errors
%li= error
%li= error.is_a?(Array) ? error.last : error
= render :partial => 'form', :locals => {:f => f}
2 changes: 1 addition & 1 deletion app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
.account-page-card-container
.account-page-card-sub-container
%h4.account-page-card-title Mailing List Subscription
%p.account-page-card-desc= "#{portal_name} announcements email list"
%p.account-page-card-desc="Register to the #{portal_name} announcements mailing list."
- subscribed = false
- if subscribed
%a.account-page-subscribe-button{:href =>"mailto:#{$ANNOUNCE_SERVICE_HOST}?Subject=unsubscribe%20#{$ANNOUNCE_LIST}"}
Expand Down
2 changes: 0 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ en:
about_us: About Us
projects: D2KAB
team: Team


login:
enter_email: Enter your username
enter_password: Enter your password
Expand Down
1 change: 0 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ fr:
about_us: À propos de nous
projects: D2KAB
team: Équipe


login:
enter_email: Saisissez votre nom d'utilisateur
Expand Down

0 comments on commit 8d3972f

Please sign in to comment.