Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italian translations #32

Merged
merged 12 commits into from
Oct 6, 2021
4 changes: 4 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ msgstr "Akkordeon"
msgid "Accordion Title size"
msgstr "Akkordeon Schriftgröße Titel"

#: components/manage/Widgets/PanelsWidget
msgid "Add"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
msgid "Allow multiple panels open at a time"
msgstr "Erlaube mehrere Panele zur gleichen Zeit geöffnet zu haben"
Expand Down
69 changes: 69 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
"PO-Revision-Date: 2016-10-22 16:41-0500\n"
"Last-Translator: Italiano <plone-i18n@lists.sf.net>\n"
"Language: it\n"
"Language-Team: Italiano <plone-i18n@lists.sf.net>\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: de\n"
"Language-Name: Italiano\n"
"Preferred-Encodings: utf-8 latin1\n"
"X-Is-Fallback-For: it it-CH it-IT\n"

#: components/manage/Blocks/Accordion/Schema
msgid "Accordion"
msgstr "Accordion"

#: components/manage/Blocks/Accordion/Schema
msgid "Accordion Title size"
msgstr "Dimensione del titolo"

#: components/manage/Widgets/PanelsWidget
msgid "Add"
msgstr "Aggiungi"

#: components/manage/Blocks/Accordion/Schema
msgid "Allow multiple panels open at a time"
msgstr "Consente di avere più pannelli aperti contemporaneamente"

#: components/manage/Blocks/Accordion/Schema
msgid "Collapsed by default"
msgstr "Collassati di default"

#: components/manage/Blocks/Accordion/Schema
msgid "Friendly name"
msgstr "Titolo dell'elemento"

#: components/manage/Blocks/Accordion/Schema
msgid "Non exclusive"
msgstr "Non esclusivo"

#: components/manage/Blocks/Accordion/Schema
msgid "Style"
msgstr "Stile"

#: components/manage/Blocks/Accordion/Schema
msgid "Title"
msgstr "Titolo"

#: components/manage/Blocks/Accordion/Schema
msgid "Title Icon on the right"
msgstr "Mostra l'icona sulla destra"

#: components/manage/Blocks/Accordion/Schema
msgid "Title size"
msgstr "Dimensione del titolo"

#: components/manage/Blocks/Accordion/EditBlockWrapper
msgid "Unknown Block"
msgstr "Blocco sconosciuto"

#: components/manage/Blocks/Accordion/EditBlockWrapper
msgid "delete"
msgstr "Rimuovi"
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-09-16T09:40:55.321Z\n"
"POT-Creation-Date: 2021-10-06T09:57:51.150Z\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 @@ -23,6 +23,11 @@ msgstr ""
msgid "Accordion Title size"
msgstr ""

#: components/manage/Widgets/PanelsWidget
# defaultMessage: Add
msgid "Add"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Allow multiple panels open at a time
msgid "Allow multiple panels open at a time"
Expand Down
11 changes: 10 additions & 1 deletion src/components/manage/Widgets/PanelsWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { v4 as uuid } from 'uuid';
import { omit, without } from 'lodash';
import move from 'lodash-move';
import { useIntl, defineMessages } from 'react-intl';
import { Button } from 'semantic-ui-react';
import { Icon, FormFieldWrapper } from '@plone/volto/components';
import { DragDropList } from '@plone/volto/components';
Expand All @@ -13,6 +14,10 @@ import trashSVG from '@plone/volto/icons/delete.svg';

import './editor.less';

const messages = defineMessages({
add: { id: 'Add', defaultMessage: 'Add' },
});

export function moveItem(formData, source, destination) {
return {
...formData,
Expand All @@ -27,6 +32,7 @@ const empty = () => {
};

const PanelsWidget = (props) => {
const intl = useIntl();
const { fieldSet, value = {}, id, onChange, schema } = props;
const { blocks = {} } = value;
const itemsList = (value.blocks_layout?.items || []).map((id) => [
Expand All @@ -43,7 +49,10 @@ const PanelsWidget = (props) => {
<Button
compact
icon
aria-label={objectSchema.addMessage || `Add ${objectSchema.title}`}
aria-label={
objectSchema.addMessage ||
`${intl.formatMessage(messages.add)} ${objectSchema.title}`
}
onClick={() => {
const [newId, newData] = empty();
onChange(id, {
Expand Down