diff --git a/packages/volto-demo-blocks/locales/de/LC_MESSAGES/volto.po b/packages/volto-demo-blocks/locales/de/LC_MESSAGES/volto.po deleted file mode 100644 index a90a9ce..0000000 --- a/packages/volto-demo-blocks/locales/de/LC_MESSAGES/volto.po +++ /dev/null @@ -1,14 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language: de\n" -"Language-Team: \n" -"Content-Type: \n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - - diff --git a/packages/volto-demo-blocks/locales/en/LC_MESSAGES/volto.po b/packages/volto-demo-blocks/locales/en/LC_MESSAGES/volto.po index 8816430..1a9a52f 100644 --- a/packages/volto-demo-blocks/locales/en/LC_MESSAGES/volto.po +++ b/packages/volto-demo-blocks/locales/en/LC_MESSAGES/volto.po @@ -11,4 +11,67 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "URL" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "URL" +msgstr "URL EN" +#. Default: "Block 01" +#: components/Blocks/Block01/messages +msgid "block01" +msgstr "Block 01 EN" + +#. Default: "Block 02" +#: components/Blocks/Block02/messages +msgid "block02" +msgstr "Block 02 EN" + +#. Default: "Block 03" +#: components/Blocks/Block03/messages +msgid "block03" +msgstr "Block 03 EN" + +#. Default: "Block 04" +#: components/Blocks/Block04/messages +msgid "block04" +msgstr "Block 04 EN" + +#. Default: "Block 05" +#: components/Blocks/Block05/messages +msgid "block05" +msgstr "Block 05 EN" + +#. Default: "Block 06" +#: components/Blocks/Block06/messages +msgid "block06" +msgstr "Block 06 EN" + +#. Default: "Default" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "default" +msgstr "Default EN" + +#. Default: "Title" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "title" +msgstr "Title EN" + +#. Default: "Variation" +#: components/Blocks/Block04/messages +msgid "variation" +msgstr "Variation EN" diff --git a/packages/volto-demo-blocks/locales/es/LC_MESSAGES/volto.po b/packages/volto-demo-blocks/locales/es/LC_MESSAGES/volto.po deleted file mode 100644 index 051dc33..0000000 --- a/packages/volto-demo-blocks/locales/es/LC_MESSAGES/volto.po +++ /dev/null @@ -1,21 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Plone\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-09 11:45-0400\n" -"PO-Revision-Date: 2023-05-10 11:34-0400\n" -"Last-Translator: Leonardo J. Caballero G. \n" -"Language: es\n" -"Language-Team: ES \n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Preferred-Encodings: utf-8\n" -"MIME-Version: 1.0\n" -"Language-Code: es\n" -"Language-Name: Español\n" -"Domain: volto\n" -"X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n" -"X-Generator: Poedit 2.2.1\n" - - diff --git a/packages/volto-demo-blocks/locales/pt_BR/LC_MESSAGES/volto.po b/packages/volto-demo-blocks/locales/pt_BR/LC_MESSAGES/volto.po deleted file mode 100644 index 39bcc4f..0000000 --- a/packages/volto-demo-blocks/locales/pt_BR/LC_MESSAGES/volto.po +++ /dev/null @@ -1,19 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Plone\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-06T16:01:32.969Z\n" -"PO-Revision-Date: \n" -"Last-Translator: Plone i18n \n" -"Language: \n" -"Language-Team: Plone i18n \n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"MIME-Version: 1.0\n" -"Language-Code: pt_BR\n" -"Language-Name: Português do Brasil\n" -"Preferred-Encodings: utf-8\n" -"Domain: volto\n" - - diff --git a/packages/volto-demo-blocks/locales/volto.pot b/packages/volto-demo-blocks/locales/volto.pot index df7ea48..96a6dc1 100644 --- a/packages/volto-demo-blocks/locales/volto.pot +++ b/packages/volto-demo-blocks/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-12-29T16:11:58.924Z\n" +"POT-Creation-Date: 2024-12-29T17:03:51.952Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "Content-Type: text/plain; charset=utf-8\n" @@ -13,4 +13,67 @@ msgstr "" "Preferred-Encodings: utf-8\n" "Domain: volto\n" +#. Default: "URL" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "URL" +msgstr "" + +#. Default: "Block 01" +#: components/Blocks/Block01/messages +msgid "block01" +msgstr "" + +#. Default: "Block 02" +#: components/Blocks/Block02/messages +msgid "block02" +msgstr "" + +#. Default: "Block 03" +#: components/Blocks/Block03/messages +msgid "block03" +msgstr "" + +#. Default: "Block 04" +#: components/Blocks/Block04/messages +msgid "block04" +msgstr "" +#. Default: "Block 05" +#: components/Blocks/Block05/messages +msgid "block05" +msgstr "" + +#. Default: "Block 06" +#: components/Blocks/Block06/messages +msgid "block06" +msgstr "" + +#. Default: "Default" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "default" +msgstr "" + +#. Default: "Title" +#: components/Blocks/Block01/messages +#: components/Blocks/Block02/messages +#: components/Blocks/Block03/messages +#: components/Blocks/Block04/messages +#: components/Blocks/Block05/messages +#: components/Blocks/Block06/messages +msgid "title" +msgstr "" + +#. Default: "Variation" +#: components/Blocks/Block04/messages +msgid "variation" +msgstr "" diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block01/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block01/Schema.js index 12b7158..e00bf86 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block01/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block01/Schema.js @@ -1,24 +1,28 @@ -const Schema = (props) => ({ - title: 'Block 01', - block: 'block01', - fieldsets: [ - { - id: 'default', - title: 'Default', - fields: ['url', 'title'], - }, - ], +import messages from './messages'; - properties: { - url: { - title: 'URL', - widget: 'url', - }, - title: { - title: 'Title', +const Schema = ({ intl }) => { + return { + title: intl.formatMessage(messages.block01), + block: 'block01', + fieldsets: [ + { + id: 'default', + title: intl.formatMessage(messages.default), + fields: ['url', 'title'], + }, + ], + + properties: { + url: { + title: intl.formatMessage(messages.URL), + widget: 'url', + }, + title: { + title: intl.formatMessage(messages.title), + }, }, - }, - required: [], -}); + required: [], + }; +}; export default Schema; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block01/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block01/messages.js new file mode 100644 index 0000000..887f686 --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block01/messages.js @@ -0,0 +1,22 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block01: { + id: 'block01', + defaultMessage: 'Block 01', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, +}); + +export default messages; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block02/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block02/Schema.js index 12ceaa5..6ce6898 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block02/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block02/Schema.js @@ -1,24 +1,28 @@ -const Schema = (props) => ({ - title: 'Block 02', - block: 'block02', - fieldsets: [ - { - id: 'default', - title: 'Default', - fields: ['url', 'title'], - }, - ], +import messages from './messages'; - properties: { - url: { - title: 'URL', - widget: 'url', - }, - title: { - title: 'Title', +const Schema = ({ intl }) => { + return { + title: intl.formatMessage(messages.block02), + block: 'block02', + fieldsets: [ + { + id: 'default', + title: intl.formatMessage(messages.default), + fields: ['url', 'title'], + }, + ], + + properties: { + url: { + title: intl.formatMessage(messages.URL), + widget: 'url', + }, + title: { + title: intl.formatMessage(messages.title), + }, }, - }, - required: [], -}); + required: [], + }; +}; export default Schema; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block02/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block02/messages.js new file mode 100644 index 0000000..1d73b29 --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block02/messages.js @@ -0,0 +1,22 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block02: { + id: 'block02', + defaultMessage: 'Block 02', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, +}); + +export default messages; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block03/Edit.jsx b/packages/volto-demo-blocks/src/components/Blocks/Block03/Edit.jsx index e296ed0..1be8b2f 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block03/Edit.jsx +++ b/packages/volto-demo-blocks/src/components/Blocks/Block03/Edit.jsx @@ -15,8 +15,8 @@ const Edit = (props) => { { onChangeBlock(block, { ...data, diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block03/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block03/Schema.js index 12ceaa5..c364a88 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block03/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block03/Schema.js @@ -1,24 +1,28 @@ -const Schema = (props) => ({ - title: 'Block 02', - block: 'block02', - fieldsets: [ - { - id: 'default', - title: 'Default', - fields: ['url', 'title'], - }, - ], +import messages from './messages'; - properties: { - url: { - title: 'URL', - widget: 'url', - }, - title: { - title: 'Title', +const Schema = ({ intl }) => { + return { + title: intl.formatMessage(messages.block03), + block: 'block03', + fieldsets: [ + { + id: 'default', + title: intl.formatMessage(messages.default), + fields: ['url', 'title'], + }, + ], + + properties: { + url: { + title: intl.formatMessage(messages.URL), + widget: 'url', + }, + title: { + title: intl.formatMessage(messages.title), + }, }, - }, - required: [], -}); + required: [], + }; +}; export default Schema; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block03/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block03/messages.js new file mode 100644 index 0000000..895220a --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block03/messages.js @@ -0,0 +1,22 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block03: { + id: 'block03', + defaultMessage: 'Block 03', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, +}); + +export default messages; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block04/Edit.jsx b/packages/volto-demo-blocks/src/components/Blocks/Block04/Edit.jsx index e296ed0..1be8b2f 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block04/Edit.jsx +++ b/packages/volto-demo-blocks/src/components/Blocks/Block04/Edit.jsx @@ -15,8 +15,8 @@ const Edit = (props) => { { onChangeBlock(block, { ...data, diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block04/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block04/Schema.js index 0d43182..a6a2950 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block04/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block04/Schema.js @@ -1,32 +1,33 @@ import config from '@plone/volto/registry'; +import messages from './messages'; -const Schema = () => { +const Schema = ({ intl }) => { const variationsConfig = config.blocks.blocksConfig['block04'].variations; const variations = Object.keys(variationsConfig).map((variation) => [ variationsConfig[variation].id, variationsConfig[variation].title, ]); return { - title: 'Block 04', + title: intl.formatMessage(messages.block04), block: 'block04', fieldsets: [ { id: 'default', - title: 'Default', + title: intl.formatMessage(messages.default), fields: ['url', 'title', 'variation'], }, ], properties: { url: { - title: 'URL', + title: intl.formatMessage(messages.URL), widget: 'url', }, title: { - title: 'Title', + title: intl.formatMessage(messages.title), }, variation: { - title: 'Variation', + title: intl.formatMessage(messages.variation), type: 'choice', choices: variations, }, diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block04/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block04/messages.js new file mode 100644 index 0000000..2eecb3a --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block04/messages.js @@ -0,0 +1,26 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block04: { + id: 'block04', + defaultMessage: 'Block 04', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, + variation: { + id: 'variation', + defaultMessage: 'Variation', + }, +}); + +export default messages; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block05/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block05/Schema.js index cf1f4c5..5f56864 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block05/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block05/Schema.js @@ -1,22 +1,24 @@ -const Schema = () => { +import messages from './messages'; + +const Schema = ({ intl }) => { return { - title: 'Block 05', + title: intl.formatMessage(messages.block05), block: 'block05', fieldsets: [ { id: 'default', - title: 'Default', + title: intl.formatMessage(messages.default), fields: ['url', 'title'], }, ], properties: { url: { - title: 'URL', + title: intl.formatMessage(messages.URL), widget: 'url', }, title: { - title: 'Title', + title: intl.formatMessage(messages.title), }, }, required: [], diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block05/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block05/messages.js new file mode 100644 index 0000000..877fda7 --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block05/messages.js @@ -0,0 +1,22 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block05: { + id: 'block05', + defaultMessage: 'Block 05', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, +}); + +export default messages; diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block06/Schema.js b/packages/volto-demo-blocks/src/components/Blocks/Block06/Schema.js index cf1f4c5..8905fb7 100644 --- a/packages/volto-demo-blocks/src/components/Blocks/Block06/Schema.js +++ b/packages/volto-demo-blocks/src/components/Blocks/Block06/Schema.js @@ -1,22 +1,24 @@ -const Schema = () => { +import messages from './messages'; + +const Schema = ({ intl }) => { return { - title: 'Block 05', - block: 'block05', + title: intl.formatMessage(messages.block06), + block: 'block06', fieldsets: [ { id: 'default', - title: 'Default', + title: intl.formatMessage(messages.default), fields: ['url', 'title'], }, ], properties: { url: { - title: 'URL', + title: intl.formatMessage(messages.URL), widget: 'url', }, title: { - title: 'Title', + title: intl.formatMessage(messages.title), }, }, required: [], diff --git a/packages/volto-demo-blocks/src/components/Blocks/Block06/messages.js b/packages/volto-demo-blocks/src/components/Blocks/Block06/messages.js new file mode 100644 index 0000000..b8dea1a --- /dev/null +++ b/packages/volto-demo-blocks/src/components/Blocks/Block06/messages.js @@ -0,0 +1,22 @@ +import { defineMessages } from 'react-intl'; + +const messages = defineMessages({ + block06: { + id: 'block06', + defaultMessage: 'Block 06', + }, + default: { + id: 'default', + defaultMessage: 'Default', + }, + URL: { + id: 'URL', + defaultMessage: 'URL', + }, + title: { + id: 'title', + defaultMessage: 'Title', + }, +}); + +export default messages;