richie-education 2.33.1-dev7 → 2.33.1-dev8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,16 @@ import CourseRunEnrollment from '../CourseRunEnrollment';
11
11
  import CourseProductItem from '../CourseProductItem';
12
12
 
13
13
  const messages = defineMessages({
14
+ enrollNow: {
15
+ id: 'components.SyllabusCourseRun.enrollNow',
16
+ description: 'CTA for users to enroll on ongoing of future open course.',
17
+ defaultMessage: 'Enroll now',
18
+ },
19
+ studyNow: {
20
+ id: 'components.SyllabusCourseRun.studyNow',
21
+ description: 'CTA for users to enroll on archived course.',
22
+ defaultMessage: 'Study now',
23
+ },
14
24
  enrollment: {
15
25
  id: 'components.SyllabusCourseRun.enrollment',
16
26
  description: 'Title of the enrollment dates section of an opened course run block',
@@ -94,7 +104,12 @@ const OpenedCourseRun = ({
94
104
  <CourseRunEnrollment courseRun={courseRun} />
95
105
  ) : (
96
106
  <Button className="course-run-enrollment__cta" href={courseRun.resource_link} fullWidth>
97
- {StringHelper.capitalizeFirst(courseRun.state.call_to_action)}
107
+ {courseRun.state.call_to_action === 'enroll now' ? (
108
+ <FormattedMessage {...messages.enrollNow} />
109
+ ) : null}
110
+ {courseRun.state.call_to_action === 'study now' ? (
111
+ <FormattedMessage {...messages.studyNow} />
112
+ ) : null}
98
113
  </Button>
99
114
  )}
100
115
  </>
@@ -11,6 +11,16 @@ import CourseRunEnrollment from '../CourseRunEnrollment';
11
11
  import CourseProductItem from '../CourseProductItem';
12
12
 
13
13
  const messages = defineMessages({
14
+ enrollNow: {
15
+ id: 'components.SyllabusCourseRunCompacted.enrollNow',
16
+ description: 'CTA for users to enroll on ongoing of future open course.',
17
+ defaultMessage: 'Enroll now',
18
+ },
19
+ studyNow: {
20
+ id: 'components.SyllabusCourseRunCompacted.studyNow',
21
+ description: 'CTA for users to enroll on archived course.',
22
+ defaultMessage: 'Study now',
23
+ },
14
24
  course: {
15
25
  id: 'components.SyllabusCourseRunCompacted.course',
16
26
  description: 'Title of the course dates section of an opened course run block',
@@ -78,7 +88,12 @@ const OpenedSelfPacedCourseRun = ({
78
88
  <CourseRunEnrollment courseRun={courseRun} />
79
89
  ) : (
80
90
  <Button className="course-run-enrollment__cta" href={courseRun.resource_link} fullWidth>
81
- {StringHelper.capitalizeFirst(courseRun.state.call_to_action)}
91
+ {courseRun.state.call_to_action === 'enroll now' ? (
92
+ <FormattedMessage {...messages.enrollNow} />
93
+ ) : null}
94
+ {courseRun.state.call_to_action === 'study now' ? (
95
+ <FormattedMessage {...messages.studyNow} />
96
+ ) : null}
82
97
  </Button>
83
98
  )}
84
99
  </>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "2.33.1-dev7",
3
+ "version": "2.33.1-dev8",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {