Skip to content

Commit

Permalink
refactor: improved translations
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Mar 16, 2021
1 parent 1e76e9b commit 5351b1f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
16 changes: 8 additions & 8 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ msgstr ""
msgid "Add field"
msgstr "Add field"

#: components/FormView
msgid "Email Success"
msgstr "Email correctly sentEmail correctly sent"

#: components/Form
msgid "Email sent"
msgstr "Your email has been sent successfully"

#: components/FormView
msgid "Error"
msgstr "Errore"
Expand All @@ -31,6 +23,10 @@ msgstr "Errore"
msgid "Form"
msgstr "Form"

#: components/Form
msgid "formSubmitted"
msgstr "Form successfully submitted"

#: components/Sidebar
msgid "form_clear_data"
msgstr "Clear data"
Expand Down Expand Up @@ -152,6 +148,10 @@ msgstr "Send email to recipient"
msgid "form_submit_label"
msgstr "Submit button label"

#: components/FormView
msgid "form_submit_success"
msgstr "Sent!"

#: components/Sidebar
msgid "form_to"
msgstr "Recipients"
16 changes: 8 additions & 8 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ msgstr ""
msgid "Add field"
msgstr "Aggiungi campo"

#: components/FormView
msgid "Email Success"
msgstr "Email inviata correttamente"

#: components/Form
msgid "Email sent"
msgstr "La tua mail è stata inviata correttamente"

#: components/FormView
msgid "Error"
msgstr "Errore"
Expand All @@ -31,6 +23,10 @@ msgstr "Errore"
msgid "Form"
msgstr "Form"

#: components/Form
msgid "formSubmitted"
msgstr "Form invato correttamente"

#: components/Sidebar
msgid "form_clear_data"
msgstr "Pulisci dati"
Expand Down Expand Up @@ -152,6 +148,10 @@ msgstr "Invia email al destinatario"
msgid "form_submit_label"
msgstr "Testo sul bottone di invio"

#: components/FormView
msgid "form_submit_success"
msgstr "Inviato!"

#: components/Sidebar
msgid "form_to"
msgstr "Destinatari"
22 changes: 11 additions & 11 deletions 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-15T11:30:24.054Z\n"
"POT-Creation-Date: 2021-03-16T13:10:21.291Z\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,16 +18,6 @@ msgid ""
msgid "Add field"
msgstr ""

#: components/FormView
# defaultMessage: Email correctly sent
msgid "Email Success"
msgstr ""

#: components/Form
# defaultMessage: Your email has been sent successfully
msgid "Email sent"
msgstr ""

#: components/FormView
# defaultMessage: Error
msgid "Error"
Expand All @@ -38,6 +28,11 @@ msgstr ""
msgid "Form"
msgstr ""

#: components/Form
# defaultMessage: Form successfully submitted
msgid "formSubmitted"
msgstr ""

#: components/Sidebar
# defaultMessage: Clear data
msgid "form_clear_data"
Expand Down Expand Up @@ -189,6 +184,11 @@ msgstr ""
msgid "form_submit_label"
msgstr ""

#: components/FormView
# defaultMessage: Sent!
msgid "form_submit_success"
msgstr ""

#: components/Sidebar
# defaultMessage: Recipients
msgid "form_to"
Expand Down
8 changes: 4 additions & 4 deletions src/components/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { getFieldName } from 'volto-form-block/components/utils';
import FormView from 'volto-form-block/components/FormView';

const messages = defineMessages({
messageSent: {
id: 'Email sent',
defaultMessage: 'Your email has been sent successfully',
formSubmitted: {
id: 'formSubmitted',
defaultMessage: 'Form successfully submitted',
},
});

Expand Down Expand Up @@ -141,7 +141,7 @@ const Form = ({ data, id, path }) => {
if (submitResults?.loaded) {
setFormState({
type: FORM_STATES.success,
result: intl.formatMessage(messages.messageSent),
result: intl.formatMessage(messages.formSubmitted),
});
} else if (submitResults?.error) {
let errorDescription = `${submitResults.error.status} ${
Expand Down
4 changes: 2 additions & 2 deletions src/components/FormView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const messages = defineMessages({
defaultMessage: 'Error',
},
success: {
id: 'Email Success',
defaultMessage: 'Email correctly sent',
id: 'form_submit_success',
defaultMessage: 'Sent!',
},
empty_values: {
id: 'form_empty_values_validation',
Expand Down

0 comments on commit 5351b1f

Please sign in to comment.