Skip to content

Commit

Permalink
refactor: add cancel translation
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Mar 18, 2021
1 parent cb63ff1 commit 608d3bd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ msgstr ""
msgid "Add field"
msgstr "Add field"

#: components/Sidebar
msgid "Cancel"
msgstr ""

#: components/FormView
msgid "Error"
msgstr "Errore"
Expand Down
4 changes: 4 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ msgstr ""
msgid "Add field"
msgstr "Aggiungi campo"

#: components/Sidebar
msgid "Cancel"
msgstr ""

#: components/FormView
msgid "Error"
msgstr "Errore"
Expand Down
7 changes: 6 additions & 1 deletion locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2021-03-18T10:59:05.964Z\n"
"POT-Creation-Date: 2021-03-18T12:53:43.029Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
Expand All @@ -18,6 +18,11 @@ msgid ""
msgid "Add field"
msgstr ""

#: components/Sidebar
# defaultMessage: Cancel
msgid "Cancel"
msgstr ""

#: components/FormView
# defaultMessage: Error
msgid "Error"
Expand Down
5 changes: 5 additions & 0 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ const messages = defineMessages({
id: 'form_confirmClearData',
defaultMessage: 'Are you sure you want to delete all saved items?',
},
cancel: {
id: 'Cancel',
defaultMessage: 'Cancel',
},
});

const Sidebar = ({
Expand Down Expand Up @@ -302,6 +306,7 @@ const Sidebar = ({
<Confirm
open={confirmOpen}
content={intl.formatMessage(messages.confirmClearData)}
cancelButton={intl.formatMessage(messages.cancel)}
onCancel={() => setConfirmOpen(false)}
onConfirm={() => {
dispatch(clearFormData(properties['@id']));
Expand Down

0 comments on commit 608d3bd

Please sign in to comment.