Skip to content

Commit

Permalink
fix: title re-added inside listing blocks sidebar (#149)
Browse files Browse the repository at this point in the history
* fix: title re-added inside listing blocks

* feat: i18n
  • Loading branch information
Wagner3UB authored May 2, 2023
1 parent 88b5128 commit cab4c55
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ msgid "Title placeholder"
msgstr ""

#: components/ItaliaTheme/Blocks/Calendar/ListingSidebar
#: config/Blocks/ListingOptions/defaultOptions
# defaultMessage: Titolo
msgid "Titolo"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ msgid "Title placeholder"
msgstr "Title..."

#: components/ItaliaTheme/Blocks/Calendar/ListingSidebar
#: config/Blocks/ListingOptions/defaultOptions
# defaultMessage: Titolo
msgid "Titolo"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ msgid "Title placeholder"
msgstr ""

#: components/ItaliaTheme/Blocks/Calendar/ListingSidebar
#: config/Blocks/ListingOptions/defaultOptions
# defaultMessage: Titolo
msgid "Titolo"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ msgid "Title placeholder"
msgstr "Titolo..."

#: components/ItaliaTheme/Blocks/Calendar/ListingSidebar
#: config/Blocks/ListingOptions/defaultOptions
# defaultMessage: Titolo
msgid "Titolo"
msgstr "Titolo"
Expand Down
3 changes: 2 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: 2023-04-28T08:29:06.188Z\n"
"POT-Creation-Date: 2023-05-02T13:13:30.519Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -577,6 +577,7 @@ msgid "Title placeholder"
msgstr ""

#: components/ItaliaTheme/Blocks/Calendar/ListingSidebar
#: config/Blocks/ListingOptions/defaultOptions
# defaultMessage: Titolo
msgid "Titolo"
msgstr ""
Expand Down
20 changes: 13 additions & 7 deletions src/config/Blocks/ListingOptions/defaultOptions.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineMessages } from 'react-intl';
import { addSchemaField } from '@italia/config/Blocks/ListingOptions';

import config from '@plone/volto/registry';

const messages = defineMessages({
title: {
id: 'Titolo',
defaultMessage: 'Titolo',
},
center_cards: {
id: 'Center block cards',
defaultMessage: 'Centrare i card',
Expand All @@ -18,11 +20,15 @@ const messages = defineMessages({

const addDefaultAdditionalOptions = (schema, formData, intl, position = 0) => {
let pos = position;
let listing_items_colors = [
{ name: 'red', label: 'Red' },
{ name: 'light-blue', label: 'Light blue' },
{ name: 'sidebar-background', label: 'Grey' },
];
addSchemaField(
schema,
'title',
intl.formatMessage(messages.title),
null,
null,
pos,
);
pos++;
if (
formData.variation === 'simpleCard' ||
formData.variation === 'completeBlockLinksTemplate' ||
Expand Down

0 comments on commit cab4c55

Please sign in to comment.