fix(netlify-cms-core): support translation in error message (#1935)

This commit is contained in:
sysoce 2018-12-12 00:50:23 +09:00 committed by Shawn Erquhart
parent 443f060ef9
commit 0f1ebd1060
2 changed files with 165 additions and 161 deletions

View File

@ -79,7 +79,10 @@ export function loginUser(credentials) {
console.error(error); console.error(error);
dispatch( dispatch(
notifSend({ notifSend({
message: `${error.message}`, message: {
details: error.message,
key: 'ui.toast.onFailToAuth',
},
kind: 'warning', kind: 'warning',
dismissAfter: 8000, dismissAfter: 8000,
}), }),

View File

@ -129,6 +129,7 @@ export function getPhrases() {
onFailToPublishEntry: 'Failed to publish: %{details}', onFailToPublishEntry: 'Failed to publish: %{details}',
entryUpdated: 'Entry status updated', entryUpdated: 'Entry status updated',
onDeleteUnpublishedChanges: 'Unpublished changes deleted', onDeleteUnpublishedChanges: 'Unpublished changes deleted',
onFailToAuth: '%{details}',
}, },
}, },
workflow: { workflow: {