diff --git a/app/soapbox/components/modal_root.js b/app/soapbox/components/modal_root.js
index 1c4c53224..5acedae29 100644
--- a/app/soapbox/components/modal_root.js
+++ b/app/soapbox/components/modal_root.js
@@ -27,6 +27,7 @@ const checkComposeContent = compose => {
const mapStateToProps = state => ({
hasComposeContent: checkComposeContent(state.get('compose')),
+ isEditing: state.compose.get('id') !== null,
});
const mapDispatchToProps = (dispatch) => ({
@@ -53,6 +54,7 @@ class ModalRoot extends React.PureComponent {
onCancelReplyCompose: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
hasComposeContent: PropTypes.bool,
+ isEditing: PropTypes.bool,
type: PropTypes.string,
onCancel: PropTypes.func,
history: PropTypes.object,
@@ -72,13 +74,13 @@ class ModalRoot extends React.PureComponent {
}
handleOnClose = () => {
- const { onOpenModal, onCloseModal, hasComposeContent, intl, type, onCancelReplyCompose } = this.props;
+ const { onOpenModal, onCloseModal, hasComposeContent, isEditing, intl, type, onCancelReplyCompose } = this.props;
if (hasComposeContent && type === 'COMPOSE') {
onOpenModal('CONFIRM', {
icon: require('@tabler/icons/icons/trash.svg'),
- heading: ,
- message: ,
+ heading: isEditing ? : ,
+ message: isEditing ? : ,
confirm: intl.formatMessage(messages.confirm),
onConfirm: () => onCancelReplyCompose(),
onCancel: () => onCloseModal('CONFIRM'),
diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json
index ac557b58d..7740949f5 100644
--- a/app/soapbox/locales/pl.json
+++ b/app/soapbox/locales/pl.json
@@ -325,6 +325,8 @@
"confirmations.block.confirm": "Zablokuj",
"confirmations.block.heading": "Zablokuj @{name}",
"confirmations.block.message": "Czy na pewno chcesz zablokować {name}?",
+ "confirmations.cancel_editing.heading": "Anuluj edycję wpisu",
+ "confirmations.cancel_editing.message": "Czy na pewno chcesz anulować edytowanie wpisu? Niezapisane zmiany zostaną utracone.",
"confirmations.delete.confirm": "Usuń",
"confirmations.delete.heading": "Usuń wpis",
"confirmations.delete.message": "Czy na pewno chcesz usunąć ten wpis?",