From ae6cab503f2be271b40673900d2657665ce59426 Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Mon, 12 Aug 2024 11:53:45 -0700 Subject: [PATCH] Standardize sing up button language and use translation strings --- app/views/chapter/show.html.haml | 2 +- app/views/dashboard/show.html.haml | 2 +- app/views/events/_event_actions.html.haml | 2 +- app/views/meetings/_meeting_actions.html.haml | 2 +- app/views/workshops/_actions.html.haml | 2 +- spec/features/view_event_spec.rb | 4 ++-- .../shared_examples/behaves_like_viewing_workshop_actions.rb | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/chapter/show.html.haml b/app/views/chapter/show.html.haml index 7be9162c0..820efc786 100644 --- a/app/views/chapter/show.html.haml +++ b/app/views/chapter/show.html.haml @@ -19,7 +19,7 @@ - if logged_in? = render partial: 'subscriptions' - else - = link_to 'Join our community', new_member_path, class: 'btn btn-primary' + = link_to t('members.sign_up'), new_member_path, class: 'btn btn-primary' .container.py-4.py-lg-5 .row diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 923df37e8..5eddd5bc7 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -7,7 +7,7 @@ .container.d-flex .col-md-5.offset-md-1.p-3.text %p.lead.mb-0= raw t('homepage.intro') - = link_to ('Join our community'), new_member_path, class: 'btn btn-primary btn-lg mt-4' + = link_to t('members.sign_up'), new_member_path, class: 'btn btn-primary btn-lg mt-4' .py-4.py-lg-5.bg-light .container diff --git a/app/views/events/_event_actions.html.haml b/app/views/events/_event_actions.html.haml index 28f0e3cc6..aebcbc7d2 100644 --- a/app/views/events/_event_actions.html.haml +++ b/app/views/events/_event_actions.html.haml @@ -14,7 +14,7 @@ = link_to event_coach_rsvp_path(@event), class: 'btn btn-primary' do = t('events.attend_as_coach') - else - = link_to 'Sign up', new_member_path, class: 'btn btn-primary me-2' + = link_to t('members.sign_up'), new_member_path, class: 'btn btn-primary me-2' = link_to 'Log in', login_path, class: 'btn btn-primary' - else %p.badge.bg-primary= t('events.not_open_for_rsvp') diff --git a/app/views/meetings/_meeting_actions.html.haml b/app/views/meetings/_meeting_actions.html.haml index 27b1ead0e..b8325de2a 100644 --- a/app/views/meetings/_meeting_actions.html.haml +++ b/app/views/meetings/_meeting_actions.html.haml @@ -41,5 +41,5 @@ %strong This event is not open for RSVP. - else - = link_to 'Sign up', new_member_path, class: 'btn btn-primary' + = link_to t('members.sign_up'), new_member_path, class: 'btn btn-primary' = link_to 'Log in', login_path, class: 'btn btn-primary' diff --git a/app/views/workshops/_actions.html.haml b/app/views/workshops/_actions.html.haml index 3d6976ba0..a67ccb332 100644 --- a/app/views/workshops/_actions.html.haml +++ b/app/views/workshops/_actions.html.haml @@ -30,5 +30,5 @@ - elsif not logged_in? %div - = link_to 'Sign up', new_member_path, class: 'btn btn-primary' + = link_to t('members.sign_up'), new_member_path, class: 'btn btn-primary' = link_to 'Log in', login_path, class: 'btn btn-primary' diff --git a/spec/features/view_event_spec.rb b/spec/features/view_event_spec.rb index 700b4447f..0e3d2716c 100644 --- a/spec/features/view_event_spec.rb +++ b/spec/features/view_event_spec.rb @@ -18,13 +18,13 @@ scenario 'a student cannot RSVP if they are not logged in' do expect(page).to have_link('Log in') - expect(page).to have_link('Sign up') + expect(page).to have_link('Join our community') expect(page).to_not have_link('Attend as a student') end scenario 'a coach cannot RSVP if they are not logged in' do expect(page).to have_link('Log in') - expect(page).to have_link('Sign up') + expect(page).to have_link('Join our community') expect(page).to_not have_link('Attend as a coach') end end diff --git a/spec/support/shared_examples/behaves_like_viewing_workshop_actions.rb b/spec/support/shared_examples/behaves_like_viewing_workshop_actions.rb index 4053b574e..db0ef2f6a 100644 --- a/spec/support/shared_examples/behaves_like_viewing_workshop_actions.rb +++ b/spec/support/shared_examples/behaves_like_viewing_workshop_actions.rb @@ -1,6 +1,6 @@ RSpec.shared_examples 'viewing workshop actions' do scenario 'signing up or signing in' do - expect(page).to have_content('Sign up') + expect(page).to have_content('Join our community') expect(page).to have_content('Log in') end end