diff --git a/packages/netlify-cms-backend-git-gateway/src/AuthenticationPage.js b/packages/netlify-cms-backend-git-gateway/src/AuthenticationPage.js index c5b536d2..c30fbb09 100644 --- a/packages/netlify-cms-backend-git-gateway/src/AuthenticationPage.js +++ b/packages/netlify-cms-backend-git-gateway/src/AuthenticationPage.js @@ -164,6 +164,7 @@ export default class GitGatewayAuthenticationPage extends React.Component { return ( ( )} + t={t} /> ); } else { return ( t('auth.loginWithNetlifyIdentity')} + t={t} /> ); } diff --git a/packages/netlify-cms-core/src/actions/__tests__/editorialWorkflow.spec.js b/packages/netlify-cms-core/src/actions/__tests__/editorialWorkflow.spec.js index 31b30e81..faa9262e 100644 --- a/packages/netlify-cms-core/src/actions/__tests__/editorialWorkflow.spec.js +++ b/packages/netlify-cms-core/src/actions/__tests__/editorialWorkflow.spec.js @@ -98,6 +98,7 @@ describe('editorialWorkflow actions', () => { const backend = { publishUnpublishedEntry: jest.fn().mockResolvedValue(), getEntry: jest.fn().mockResolvedValue(entry), + getMedia: jest.fn().mockResolvedValue([]), }; const store = mockStore({ @@ -117,7 +118,7 @@ describe('editorialWorkflow actions', () => { return store.dispatch(actions.publishUnpublishedEntry('posts', slug)).then(() => { const actions = store.getActions(); - expect(actions).toHaveLength(7); + expect(actions).toHaveLength(8); expect(actions[0]).toEqual({ type: 'UNPUBLISHED_ENTRY_PUBLISH_REQUEST', @@ -147,21 +148,28 @@ describe('editorialWorkflow actions', () => { }, optimist: { type: COMMIT, id: '000000000000000000000' }, }); + expect(actions[4]).toEqual({ + type: 'MEDIA_LOAD_SUCCESS', + payload: { + files: [], + }, + }); + expect(actions[5]).toEqual({ type: 'ENTRY_REQUEST', payload: { slug, collection: 'posts', }, }); - expect(actions[5]).toEqual({ + expect(actions[6]).toEqual({ type: 'ENTRY_SUCCESS', payload: { entry, collection: 'posts', }, }); - expect(actions[6]).toEqual({ + expect(actions[7]).toEqual({ type: 'DRAFT_CREATE_FROM_ENTRY', payload: { entry, diff --git a/packages/netlify-cms-core/src/components/Editor/EditorPreviewPane/EditorPreviewPane.js b/packages/netlify-cms-core/src/components/Editor/EditorPreviewPane/EditorPreviewPane.js index d83f12a2..7ac0c1b8 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorPreviewPane/EditorPreviewPane.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorPreviewPane/EditorPreviewPane.js @@ -183,7 +183,7 @@ export class PreviewPane extends React.Component { }; render() { - const { entry, collection } = this.props; + const { entry, collection, config } = this.props; if (!entry || !entry.get('data')) { return null; @@ -220,7 +220,7 @@ export class PreviewPane extends React.Component { `; return ( - + @@ -239,7 +239,7 @@ PreviewPane.propTypes = { const mapStateToProps = state => { const isLoadingAsset = selectIsLoadingAsset(state.medias); - return { isLoadingAsset }; + return { isLoadingAsset, config: state.config }; }; const mapDispatchToProps = dispatch => {