Skip to content

Commit 79bdeba

Browse files
committed
💬(frontend) adjust messages and translations for pricing
Remove mentions of certification, avoiding full stops, and minimizing references to the word “course” wherever possible, as the platform also includes trainings, and will propose programs Resolve #2626
1 parent 2dc3b3f commit 79bdeba

File tree

5 files changed

+67
-71
lines changed

5 files changed

+67
-71
lines changed

src/frontend/js/components/CourseGlimpse/CourseGlimpseFooter.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@ import { CourseOffer } from 'types/Course';
66

77
const messages = defineMessages({
88
dateIconAlt: {
9-
defaultMessage: 'Course date',
9+
defaultMessage: 'Availability',
1010
description: 'Course date logo alternative text for screen reader users',
1111
id: 'components.CourseGlimpseFooter.dateIconAlt',
1212
},
1313
enrollmentOfferIconFreeAlt: {
14-
defaultMessage: 'The entire course can be completed for free.',
14+
defaultMessage: 'All content is available for free',
1515
description: 'Course offers free alternative text',
1616
id: 'components.CourseGlimpseFooter.enrollmentOfferIconFreeAlt',
1717
},
1818
enrollmentOfferIconPartiallyFreeAlt: {
19-
defaultMessage: 'More than half of the course is for free.',
19+
defaultMessage: 'Most of the content is available for free',
2020
description: 'Course offers partially free alternative text',
2121
id: 'components.CourseGlimpseFooter.enrollmentOfferIconPartiallyFreeAlt',
2222
},
2323
enrollmentOfferIconPaidAlt: {
24-
defaultMessage: 'Course requires a payment.',
24+
defaultMessage: 'Access requires payment',
2525
description: 'Course offers paid alternative text',
2626
id: 'components.CourseGlimpseFooter.enrollmentOfferIconPaidAlt',
2727
},
2828
enrollmentOfferIconSubscriptionAlt: {
29-
defaultMessage: 'Course requires to be a subscriber or a paid member.',
29+
defaultMessage: 'Access requires a subscription',
3030
description: 'Course offers subscription alternative text',
3131
id: 'components.CourseGlimpseFooter.enrollmentOfferIconSubscriptionAlt',
3232
},
3333
certificateOfferIconAlt: {
34-
defaultMessage: 'The course offers a certification.',
34+
defaultMessage: 'An exam is available',
3535
description: 'Course certificate offer alternative text',
3636
id: 'components.CourseGlimpseFooter.certificateOfferIconAlt',
3737
},

src/frontend/js/components/CourseGlimpse/index.spec.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe('widgets/Search/components/CourseGlimpse', () => {
8585
screen.getByText('Some Organization');
8686
screen.getByText('Category');
8787
// Matches on 'Starting on March 14, 2019', date is wrapped with intl <span>
88-
screen.getByLabelText('Course date');
88+
screen.getByLabelText('Availability');
8989
screen.getByText('Starting on March 14, 2019');
9090

9191
// Check course logo
@@ -110,10 +110,10 @@ describe('widgets/Search/components/CourseGlimpse', () => {
110110
expect(orgImg).toHaveAttribute('src', '/thumbs/org_small.png');
111111

112112
// Check certificate offer
113-
within(container).getByRole('img', { name: 'The course offers a certification.' });
113+
within(container).getByRole('img', { name: 'An exam is available' });
114114

115115
// Check offer information
116-
const offerIcon = within(container).getByRole('img', { name: 'Course requires a payment.' });
116+
const offerIcon = within(container).getByRole('img', { name: 'Access requires payment' });
117117
const useElement = offerIcon.lastChild;
118118
expect(useElement).toHaveAttribute('href', '#icon-offer-paid');
119119

@@ -193,7 +193,7 @@ describe('widgets/Search/components/CourseGlimpse', () => {
193193
expect(containerElement).toHaveClass('course-glimpse--offer-free');
194194

195195
const offerIcon = within(container).getByRole('img', {
196-
name: 'The entire course can be completed for free.',
196+
name: 'All content is available for free',
197197
});
198198
const useElement = offerIcon.lastChild;
199199
expect(useElement).toHaveAttribute('href', '#icon-offer-free');
@@ -203,10 +203,10 @@ describe('widgets/Search/components/CourseGlimpse', () => {
203203
});
204204

205205
it.each([
206-
[CourseOffer.FREE, 'The entire course can be completed for free.'],
207-
[CourseOffer.PARTIALLY_FREE, 'More than half of the course is for free.'],
208-
[CourseOffer.PAID, 'Course requires a payment.'],
209-
[CourseOffer.SUBSCRIPTION, 'Course requires to be a subscriber or a paid member.'],
206+
[CourseOffer.FREE, 'All content is available for free'],
207+
[CourseOffer.PARTIALLY_FREE, 'Most of the content is available for free'],
208+
[CourseOffer.PAID, 'Access requires payment'],
209+
[CourseOffer.SUBSCRIPTION, 'Access requires a subscription'],
210210
])('does show a specific course offer icon', (offer, altText) => {
211211
const { container } = renderCourseGlimpse({
212212
contextProps,

src/frontend/js/widgets/SyllabusCourseRunsList/components/SyllabusCourseRun/index.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,42 +54,42 @@ const messages = defineMessages({
5454
certificationPrice: {
5555
id: 'components.SyllabusCourseRun.certificationPrice',
5656
description: 'Title of the certification price section of an opened course run block',
57-
defaultMessage: 'Certification price',
57+
defaultMessage: 'Certificate enrollment fee (optional)',
5858
},
5959
coursePaidOffer: {
6060
id: 'components.SyllabusCourseRun.coursePaidOffer',
6161
description: 'Message for the paid course offer of an opened course run block',
62-
defaultMessage: 'The course content is paid.',
62+
defaultMessage: 'Paid access',
6363
},
6464
courseFreeOffer: {
6565
id: 'components.SyllabusCourseRun.courseFreeOffer',
6666
description: 'Message for the free course offer of an opened course run block',
67-
defaultMessage: 'The course content is free.',
67+
defaultMessage: 'Free access',
6868
},
6969
coursePartiallyFree: {
7070
id: 'components.SyllabusCourseRun.coursePartiallyFree',
7171
description: 'Message for the partially free course offer of an opened course run block',
72-
defaultMessage: 'The course content is free.',
72+
defaultMessage: 'Partially free access',
7373
},
7474
courseSubscriptionOffer: {
7575
id: 'components.SyllabusCourseRun.courseSubscriptionOffer',
7676
description: 'Message for the subscription course offer of an opened course run block',
77-
defaultMessage: 'Subscribe to access the course content.',
77+
defaultMessage: 'Subscribe to access the course content',
7878
},
7979
certificatePaidOffer: {
8080
id: 'components.SyllabusCourseRun.certificatePaidOffer',
81-
description: 'Messagge for the paid certification offer of an opened course run block',
82-
defaultMessage: 'The certification process is paid.',
81+
description: 'Message for the paid certification offer of an opened course run block',
82+
defaultMessage: 'Paid certificate',
8383
},
8484
certificateFreeOffer: {
8585
id: 'components.SyllabusCourseRun.certificateFreeOffer',
8686
description: 'Message for the free certification offer of an opened course run block',
87-
defaultMessage: 'The certification process is free.',
87+
defaultMessage: 'Free certificate',
8888
},
8989
certificateSubscriptionOffer: {
9090
id: 'components.SyllabusCourseRun.certificateSubscriptionOffer',
9191
description: 'Message for the subscription certification offer of an opened course run block',
92-
defaultMessage: 'The certification process is offered through subscription.',
92+
defaultMessage: 'Offered certificate through subscription',
9393
},
9494
});
9595

src/frontend/js/widgets/SyllabusCourseRunsList/components/SyllabusCourseRunCompacted/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,42 +49,42 @@ const messages = defineMessages({
4949
certificationPrice: {
5050
id: 'components.SyllabusCourseRunCompacted.certificationPrice',
5151
description: 'Title of the certification price section of an opened course run block',
52-
defaultMessage: 'Certification price',
52+
defaultMessage: 'Certificate enrollment fee (optional)',
5353
},
5454
coursePaidOffer: {
5555
id: 'components.SyllabusCourseRunCompacted.coursePaidOffer',
5656
description: 'Message for the paid course offer of an opened course run block',
57-
defaultMessage: 'The course content is paid.',
57+
defaultMessage: 'Paid access',
5858
},
5959
courseFreeOffer: {
6060
id: 'components.SyllabusCourseRunCompacted.courseFreeOffer',
6161
description: 'Message for the free course offer of an opened course run block',
62-
defaultMessage: 'The course content is free.',
62+
defaultMessage: 'Free access',
6363
},
6464
coursePartiallyFree: {
6565
id: 'components.SyllabusCourseRunCompacted.coursePartiallyFree',
6666
description: 'Message for the partially free course offer of an opened course run block',
67-
defaultMessage: 'The course content is free.',
67+
defaultMessage: 'Partially free access',
6868
},
6969
courseSubscriptionOffer: {
7070
id: 'components.SyllabusCourseRunCompacted.courseSubscriptionOffer',
7171
description: 'Message for the subscription course offer of an opened course run block',
72-
defaultMessage: 'Subscribe to access the course content.',
72+
defaultMessage: 'Subscribe to access the course content',
7373
},
7474
certificatePaidOffer: {
7575
id: 'components.SyllabusCourseRunCompacted.certificatePaidOffer',
7676
description: 'Messagge for the paid certification offer of an opened course run block',
77-
defaultMessage: 'The certification process is paid.',
77+
defaultMessage: 'Paid certificate',
7878
},
7979
certificateFreeOffer: {
8080
id: 'components.SyllabusCourseRunCompacted.certificateFreeOffer',
8181
description: 'Message for the free certification offer of an opened course run block',
82-
defaultMessage: 'The certification process is free.',
82+
defaultMessage: 'Free certificate',
8383
},
8484
certificateSubscriptionOffer: {
8585
id: 'components.SyllabusCourseRunCompacted.certificateSubscriptionOffer',
8686
description: 'Message for the subscription certification offer of an opened course run block',
87-
defaultMessage: 'The certification process is offered through subscription.',
87+
defaultMessage: 'Offered certificate through subscription',
8888
},
8989
});
9090

src/frontend/js/widgets/SyllabusCourseRunsList/index.spec.tsx

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,8 @@ describe('<SyllabusCourseRunsList/>', () => {
10441044
);
10451045

10461046
const content = getHeaderContainer().innerHTML;
1047-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1048-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1047+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1048+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
10491049
});
10501050

10511051
it('renders price information as subscription on SyllabusCourseRunCompacted', async () => {
@@ -1066,10 +1066,8 @@ describe('<SyllabusCourseRunsList/>', () => {
10661066
);
10671067

10681068
const content = getHeaderContainer().innerHTML;
1069-
expect(content).toContain('<dd>Subscribe to access the course content.<br>€49.99</dd>');
1070-
expect(content).toContain(
1071-
'<dd>The certification process is offered through subscription.<br>€59.99</dd>',
1072-
);
1069+
expect(content).toContain('<dd>Subscribe to access the course content<br>€49.99</dd>');
1070+
expect(content).toContain('<dd>Offered certificate through subscription<br>€59.99</dd>');
10731071
});
10741072

10751073
it('renders price information as Partially free on SyllabusCourseRunCompacted', async () => {
@@ -1090,8 +1088,8 @@ describe('<SyllabusCourseRunsList/>', () => {
10901088
);
10911089

10921090
const content = getHeaderContainer().innerHTML;
1093-
expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1094-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1091+
expect(content).toContain('<dd>Partially free access<br>€0.00</dd>');
1092+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
10951093
});
10961094

10971095
it('renders price information as paid and free on SyllabusCourseRunCompacted', async () => {
@@ -1112,8 +1110,8 @@ describe('<SyllabusCourseRunsList/>', () => {
11121110
);
11131111

11141112
const content = getHeaderContainer().innerHTML;
1115-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1116-
expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1113+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1114+
expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
11171115
});
11181116

11191117
it('does not render price information on SyllabusCourseRunCompacted', async () => {
@@ -1133,8 +1131,8 @@ describe('<SyllabusCourseRunsList/>', () => {
11331131
);
11341132

11351133
const content = getHeaderContainer().innerHTML;
1136-
expect(content).not.toContain('The course content is paid');
1137-
expect(content).not.toContain('The certification process is paid.');
1134+
expect(content).not.toContain('Paid access');
1135+
expect(content).not.toContain('Paid certificate');
11381136
});
11391137

11401138
it('does not render course price information on SyllabusCourseRunCompacted', async () => {
@@ -1155,8 +1153,8 @@ describe('<SyllabusCourseRunsList/>', () => {
11551153
);
11561154

11571155
const content = getHeaderContainer().innerHTML;
1158-
expect(content).not.toContain('The course content is paid.');
1159-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1156+
expect(content).not.toContain('Paid access');
1157+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
11601158
});
11611159

11621160
it('does not render certificate price information on SyllabusCourseRunCompacted', async () => {
@@ -1177,8 +1175,8 @@ describe('<SyllabusCourseRunsList/>', () => {
11771175
);
11781176

11791177
const content = getHeaderContainer().innerHTML;
1180-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1181-
expect(content).not.toContain('The certification process is paid.');
1178+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1179+
expect(content).not.toContain('Paid certificate');
11821180
});
11831181

11841182
it('does not render prices but only offers on SyllabusCourseRunCompacted', async () => {
@@ -1199,8 +1197,8 @@ describe('<SyllabusCourseRunsList/>', () => {
11991197
);
12001198

12011199
const content = getHeaderContainer().innerHTML;
1202-
expect(content).toContain('<dd>The course content is free.<br></dd>');
1203-
expect(content).toContain('<dd>The certification process is free.<br></dd>');
1200+
expect(content).toContain('<dd>Free access<br></dd>');
1201+
expect(content).toContain('<dd>Free certificate<br></dd>');
12041202
});
12051203

12061204
it('renders prices as zero on SyllabusCourseRunCompacted', async () => {
@@ -1221,8 +1219,8 @@ describe('<SyllabusCourseRunsList/>', () => {
12211219
);
12221220

12231221
const content = getHeaderContainer().innerHTML;
1224-
expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1225-
expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1222+
expect(content).toContain('<dd>Free access<br>€0.00</dd>');
1223+
expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
12261224
});
12271225

12281226
it('does not render invalid offers on SyllabusCourseRunCompacted', async () => {
@@ -1266,8 +1264,8 @@ describe('<SyllabusCourseRunsList/>', () => {
12661264
);
12671265

12681266
const content = getHeaderContainer().innerHTML;
1269-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1270-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1267+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1268+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
12711269
});
12721270

12731271
it('renders price information as subscription on SyllabusCourseRun', async () => {
@@ -1288,10 +1286,8 @@ describe('<SyllabusCourseRunsList/>', () => {
12881286
);
12891287

12901288
const content = getHeaderContainer().innerHTML;
1291-
expect(content).toContain('<dd>Subscribe to access the course content.<br>€49.99</dd>');
1292-
expect(content).toContain(
1293-
'<dd>The certification process is offered through subscription.<br>€59.99</dd>',
1294-
);
1289+
expect(content).toContain('<dd>Subscribe to access the course content<br>€49.99</dd>');
1290+
expect(content).toContain('<dd>Offered certificate through subscription<br>€59.99</dd>');
12951291
});
12961292

12971293
it('renders price information as Partially free on SyllabusCourseRun', async () => {
@@ -1312,8 +1308,8 @@ describe('<SyllabusCourseRunsList/>', () => {
13121308
);
13131309

13141310
const content = getHeaderContainer().innerHTML;
1315-
expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1316-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1311+
expect(content).toContain('<dd>Partially free access<br>€0.00</dd>');
1312+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
13171313
});
13181314

13191315
it('renders price information as paid and free on SyllabusCourseRun', async () => {
@@ -1334,8 +1330,8 @@ describe('<SyllabusCourseRunsList/>', () => {
13341330
);
13351331

13361332
const content = getHeaderContainer().innerHTML;
1337-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1338-
expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1333+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1334+
expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
13391335
});
13401336

13411337
it('does not render price information on SyllabusCourseRun', async () => {
@@ -1355,8 +1351,8 @@ describe('<SyllabusCourseRunsList/>', () => {
13551351
);
13561352

13571353
const content = getHeaderContainer().innerHTML;
1358-
expect(content).not.toContain('The course content is paid');
1359-
expect(content).not.toContain('The certification process is paid.');
1354+
expect(content).not.toContain('Paid access');
1355+
expect(content).not.toContain('Paid certificate');
13601356
});
13611357

13621358
it('does not render course price information on SyllabusCourseRun', async () => {
@@ -1377,8 +1373,8 @@ describe('<SyllabusCourseRunsList/>', () => {
13771373
);
13781374

13791375
const content = getHeaderContainer().innerHTML;
1380-
expect(content).not.toContain('The course content is paid.');
1381-
expect(content).toContain('<dd>The certification process is paid.<br>€59.99</dd>');
1376+
expect(content).not.toContain('Paid access');
1377+
expect(content).toContain('<dd>Paid certificate<br>€59.99</dd>');
13821378
});
13831379

13841380
it('does not render certificate price information on SyllabusCourseRun', async () => {
@@ -1399,8 +1395,8 @@ describe('<SyllabusCourseRunsList/>', () => {
13991395
);
14001396

14011397
const content = getHeaderContainer().innerHTML;
1402-
expect(content).toContain('<dd>The course content is paid.<br>€49.99</dd>');
1403-
expect(content).not.toContain('The certification process is paid.');
1398+
expect(content).toContain('<dd>Paid access<br>€49.99</dd>');
1399+
expect(content).not.toContain('Paid certificate');
14041400
});
14051401

14061402
it('does not render prices but only offers on SyllabusCourseRun', async () => {
@@ -1421,8 +1417,8 @@ describe('<SyllabusCourseRunsList/>', () => {
14211417
);
14221418

14231419
const content = getHeaderContainer().innerHTML;
1424-
expect(content).toContain('<dd>The course content is free.<br></dd>');
1425-
expect(content).toContain('<dd>The certification process is free.<br></dd>');
1420+
expect(content).toContain('<dd>Free access<br></dd>');
1421+
expect(content).toContain('<dd>Free certificate<br></dd>');
14261422
});
14271423

14281424
it('renders prices as zero on SyllabusCourseRun', async () => {
@@ -1443,8 +1439,8 @@ describe('<SyllabusCourseRunsList/>', () => {
14431439
);
14441440

14451441
const content = getHeaderContainer().innerHTML;
1446-
expect(content).toContain('<dd>The course content is free.<br>€0.00</dd>');
1447-
expect(content).toContain('<dd>The certification process is free.<br>€0.00</dd>');
1442+
expect(content).toContain('<dd>Free access<br>€0.00</dd>');
1443+
expect(content).toContain('<dd>Free certificate<br>€0.00</dd>');
14481444
});
14491445

14501446
it('does not render invalid offers on SyllabusCourseRun', async () => {

0 commit comments

Comments
 (0)