fix: rename library publish button (#2015)
This commit is contained in:
@@ -85,6 +85,7 @@ type StatusWidgedProps = {
|
||||
publishedBy: string | null;
|
||||
numBlocks?: number;
|
||||
onCommit?: () => void;
|
||||
onCommitLabel?: string;
|
||||
onRevert?: () => void;
|
||||
};
|
||||
|
||||
@@ -114,6 +115,7 @@ const StatusWidget = ({
|
||||
publishedBy,
|
||||
numBlocks,
|
||||
onCommit,
|
||||
onCommitLabel,
|
||||
onRevert,
|
||||
}: StatusWidgedProps) => {
|
||||
const intl = useIntl();
|
||||
@@ -188,7 +190,7 @@ const StatusWidget = ({
|
||||
</span>
|
||||
{onCommit && (
|
||||
<Button disabled={isPublished} onClick={onCommit}>
|
||||
{intl.formatMessage(messages.publishButtonLabel)}
|
||||
{onCommitLabel || intl.formatMessage(messages.publishButtonLabel)}
|
||||
</Button>
|
||||
)}
|
||||
{onRevert && (
|
||||
|
||||
@@ -51,6 +51,7 @@ const LibraryPublishStatus = () => {
|
||||
<StatusWidget
|
||||
{...libraryData}
|
||||
onCommit={!readOnly ? commit : undefined}
|
||||
onCommitLabel={intl.formatMessage(messages.publishLibraryButtonLabel)}
|
||||
onRevert={!readOnly ? openConfirmModal : undefined}
|
||||
/>
|
||||
<DeleteModal
|
||||
|
||||
@@ -76,6 +76,11 @@ const messages = defineMessages({
|
||||
defaultMessage: 'Discard',
|
||||
description: 'Button text for confirmation modal shown before discard library changes',
|
||||
},
|
||||
publishLibraryButtonLabel: {
|
||||
id: 'course-authoring.library-authoring.library.publishLibraryButtonLabel',
|
||||
defaultMessage: 'Publish All',
|
||||
description: 'Button text for publish library button',
|
||||
},
|
||||
});
|
||||
|
||||
export default messages;
|
||||
|
||||
Reference in New Issue
Block a user