Skip to content

Commit

Permalink
fix: improve text for discard form modal
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Feb 15, 2024
1 parent 7e5be87 commit 9269028
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
22 changes: 14 additions & 8 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-01-02T14:28:02.554Z\n"
"PO-Revision-Date: 2024-01-02T14:28:02.554Z\n"
"POT-Creation-Date: 2024-02-15T11:19:20.108Z\n"
"PO-Revision-Date: 2024-02-15T11:19:20.108Z\n"

msgid "Something went wrong"
msgstr "Something went wrong"
Expand Down Expand Up @@ -189,8 +189,8 @@ msgstr "On/off"
msgid "No jobs to display"
msgstr "No jobs to display"

msgid "Not scheduled"
msgstr "Not scheduled"
msgid "Now"
msgstr "Now"

msgid "Hide jobs"
msgstr "Hide jobs"
Expand Down Expand Up @@ -237,11 +237,17 @@ msgstr "Are you sure you want to delete this job?"
msgid "Are you sure you want to delete this queue?"
msgstr "Are you sure you want to delete this queue?"

msgid "Are you sure you want to discard your changes?"
msgstr "Are you sure you want to discard your changes?"
msgid "Discard unsaved changes?"
msgstr "Discard unsaved changes?"

msgid "Discard"
msgstr "Discard"
msgid "This form has unsaved changes. Are you sure that you want to discard them?"
msgstr "This form has unsaved changes. Are you sure that you want to discard them?"

msgid "No, keep changes"
msgstr "No, keep changes"

msgid "Yes, discard changes"
msgstr "Yes, discard changes"

msgid "Error running job"
msgstr "Error running job"
Expand Down
10 changes: 7 additions & 3 deletions src/components/Modal/DiscardFormModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import {
Button,
Modal,
ModalTitle,
ModalContent,
ModalActions,
ButtonStrip,
Expand All @@ -12,8 +13,11 @@ import history from '../../services/history'

const DiscardFormModal = ({ hideModal }) => (
<Modal open small onClose={hideModal}>
<ModalTitle>{i18n.t('Discard unsaved changes?')}</ModalTitle>
<ModalContent>
{i18n.t('Are you sure you want to discard your changes?')}
{i18n.t(
'This form has unsaved changes. Are you sure that you want to discard them?'
)}
</ModalContent>
<ModalActions>
<ButtonStrip end>
Expand All @@ -22,7 +26,7 @@ const DiscardFormModal = ({ hideModal }) => (
secondary
onClick={hideModal}
>
{i18n.t('Cancel')}
{i18n.t('No, keep changes')}
</Button>
<Button
name="discard-form"
Expand All @@ -32,7 +36,7 @@ const DiscardFormModal = ({ hideModal }) => (
history.push('/')
}}
>
{i18n.t('Discard')}
{i18n.t('Yes, discard changes')}
</Button>
</ButtonStrip>
</ModalActions>
Expand Down

0 comments on commit 9269028

Please sign in to comment.