diff --git a/lms/static/js/learner_dashboard/spec/sidebar_view_spec.js b/lms/static/js/learner_dashboard/spec/sidebar_view_spec.js index 81606b6e39..8812221cc6 100644 --- a/lms/static/js/learner_dashboard/spec/sidebar_view_spec.js +++ b/lms/static/js/learner_dashboard/spec/sidebar_view_spec.js @@ -45,10 +45,10 @@ describe('Sidebar View', () => { expect(view.$('.js-subscription-upsell .badge').html().trim()) .toEqual('New'); expect(view.$('.js-subscription-upsell h4').html().trim()) - .toEqual('Monthly program subscriptions now available'); - expect(view.$('.js-subscription-upsell .advertise-message')) - .toContainText( - 'An easier way to access popular programs with more control over how much you spend.' + .toMatch(/^Monthly program subscriptions . more flexible, more affordable$/); + expect(view.$('.js-subscription-upsell .advertise-message').html().trim()) + .toEqual( + 'Now available for many popular programs, affordable monthly subscription pricing can help you manage your budget more effectively. Subscriptions start at $39/month USD per program, after a 7-day full access free trial. Cancel at any time.' ); expect(view.$('.js-subscription-upsell a span:last').html().trim()) .toEqual('Explore subscription options'); diff --git a/lms/static/js/learner_dashboard/views/program_alert_list_view.js b/lms/static/js/learner_dashboard/views/program_alert_list_view.js index 78ed3ae494..687be87991 100644 --- a/lms/static/js/learner_dashboard/views/program_alert_list_view.js +++ b/lms/static/js/learner_dashboard/views/program_alert_list_view.js @@ -55,33 +55,20 @@ class ProgramAlertListView extends Backbone.View { }) ); return alertList.concat(this.trialEndingAlerts.map( - ({ title: programName, remainingDays, ...data }) => { - const title = 'Subscription trial expires in {remainingDays} day'; - const message = 'Your {programName} trial will expire in {remainingDays} day at {trialEndTime} on {trialEndDate} and the card on file will be charged {subscriptionPrice}/month.'; - - return { - title: StringUtils.interpolate( - ngettext( - title, - title.replace(/\bday\b/, 'days'), - remainingDays - ), - { remainingDays } - ), - message: StringUtils.interpolate( - ngettext( - message, - message.replace(/\bday\b/, 'days'), - remainingDays - ), - { - programName, - remainingDays, - ...data, - } - ), - }; - } + ({ title: programName, remainingDays, ...data }) => ({ + title: StringUtils.interpolate( + ngettext('Subscription trial expires in {remainingDays} day', 'Subscription trial expires in {remainingDays} days', remainingDays), + { remainingDays } + ), + message: StringUtils.interpolate( + ngettext('Your {programName} trial will expire in {remainingDays} day at {trialEndTime} on {trialEndDate} and the card on file will be charged {subscriptionPrice}/month.', 'Your {programName} trial will expire in {remainingDays} days at {trialEndTime} on {trialEndDate} and the card on file will be charged {subscriptionPrice}/month.', remainingDays), + { + programName, + remainingDays, + ...data, + } + ), + }) )); } } diff --git a/lms/templates/learner_dashboard/program_details_sidebar.underscore b/lms/templates/learner_dashboard/program_details_sidebar.underscore index 067833fdae..0f562fffc4 100644 --- a/lms/templates/learner_dashboard/program_details_sidebar.underscore +++ b/lms/templates/learner_dashboard/program_details_sidebar.underscore @@ -11,24 +11,23 @@ <% if (isSubscriptionEligible) { %>