File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ type StatusWidgedProps = {
85
85
publishedBy : string | null ;
86
86
numBlocks ?: number ;
87
87
onCommit ?: ( ) => void ;
88
+ onCommitLabel ?: string ;
88
89
onRevert ?: ( ) => void ;
89
90
} ;
90
91
@@ -114,6 +115,7 @@ const StatusWidget = ({
114
115
publishedBy,
115
116
numBlocks,
116
117
onCommit,
118
+ onCommitLabel,
117
119
onRevert,
118
120
} : StatusWidgedProps ) => {
119
121
const intl = useIntl ( ) ;
@@ -188,7 +190,7 @@ const StatusWidget = ({
188
190
</ span >
189
191
{ onCommit && (
190
192
< Button disabled = { isPublished } onClick = { onCommit } >
191
- { intl . formatMessage ( messages . publishButtonLabel ) }
193
+ { onCommitLabel || intl . formatMessage ( messages . publishButtonLabel ) }
192
194
</ Button >
193
195
) }
194
196
{ onRevert && (
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ const LibraryPublishStatus = () => {
51
51
< StatusWidget
52
52
{ ...libraryData }
53
53
onCommit = { ! readOnly ? commit : undefined }
54
+ onCommitLabel = { intl . formatMessage ( messages . publishLibraryButtonLabel ) }
54
55
onRevert = { ! readOnly ? openConfirmModal : undefined }
55
56
/>
56
57
< DeleteModal
Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ const messages = defineMessages({
76
76
defaultMessage : 'Discard' ,
77
77
description : 'Button text for confirmation modal shown before discard library changes' ,
78
78
} ,
79
+ publishLibraryButtonLabel : {
80
+ id : 'course-authoring.library-authoring.library.publishLibraryButtonLabel' ,
81
+ defaultMessage : 'Publish All' ,
82
+ description : 'Button text for publish library button' ,
83
+ } ,
79
84
} ) ;
80
85
81
86
export default messages ;
You can’t perform that action at this time.
0 commit comments