Skip to content

Commit

Permalink
Merge branch 'main' into vlt-version
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Dec 29, 2024
2 parents 5129347 + 92bfa6f commit 49d7b65
Show file tree
Hide file tree
Showing 19 changed files with 361 additions and 136 deletions.
14 changes: 0 additions & 14 deletions packages/volto-demo-blocks/locales/de/LC_MESSAGES/volto.po

This file was deleted.

63 changes: 63 additions & 0 deletions packages/volto-demo-blocks/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
21 changes: 0 additions & 21 deletions packages/volto-demo-blocks/locales/es/LC_MESSAGES/volto.po

This file was deleted.

19 changes: 0 additions & 19 deletions packages/volto-demo-blocks/locales/pt_BR/LC_MESSAGES/volto.po

This file was deleted.

65 changes: 64 additions & 1 deletion packages/volto-demo-blocks/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: 2024-12-29T16:11:58.924Z\n"
"POT-Creation-Date: 2024-12-29T17:03:51.952Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"Content-Type: text/plain; charset=utf-8\n"
Expand All @@ -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 ""
44 changes: 24 additions & 20 deletions packages/volto-demo-blocks/src/components/Blocks/Block01/Schema.js
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
44 changes: 24 additions & 20 deletions packages/volto-demo-blocks/src/components/Blocks/Block02/Schema.js
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const Edit = (props) => {

<SidebarPortal selected={selected}>
<BlockDataForm
schema={schema()}
title={schema().title}
schema={schema(props)}
title={schema(props).title}
onChangeField={(id, value) => {
onChangeBlock(block, {
...data,
Expand Down
Loading

0 comments on commit 49d7b65

Please sign in to comment.