From 4276b939bf0fc0fcaa330cc3620815f733e5aeb2 Mon Sep 17 00:00:00 2001 From: David Ichim Date: Thu, 26 Sep 2024 16:48:33 +0200 Subject: [PATCH] updated locales to remove Table of Contents from HorizontalMenu and DefaultTocRender ToC templates - Since the fallback would never resolve to true there is no point in referencing them instead we show Table of contents if there are no headings to show --- packages/volto/locales/ca/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/de/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/en/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/es/LC_MESSAGES/volto.po | 5 ++--- packages/volto/locales/eu/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/fi/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/fr/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/hi/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/it/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/ja/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/nl/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/pt/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/pt_BR/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/ro/LC_MESSAGES/volto.po | 3 +-- packages/volto/locales/volto.pot | 5 ++--- packages/volto/locales/zh_CN/LC_MESSAGES/volto.po | 3 +-- packages/volto/src/components/manage/Blocks/ToC/View.jsx | 4 ++-- 17 files changed, 20 insertions(+), 36 deletions(-) diff --git a/packages/volto/locales/ca/LC_MESSAGES/volto.po b/packages/volto/locales/ca/LC_MESSAGES/volto.po index 69687ab2b8..d960b655f6 100644 --- a/packages/volto/locales/ca/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ca/LC_MESSAGES/volto.po @@ -3558,8 +3558,7 @@ msgid "Table" msgstr "Taula" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Taula de continguts" diff --git a/packages/volto/locales/de/LC_MESSAGES/volto.po b/packages/volto/locales/de/LC_MESSAGES/volto.po index d35ff24b4c..acd8b7713e 100644 --- a/packages/volto/locales/de/LC_MESSAGES/volto.po +++ b/packages/volto/locales/de/LC_MESSAGES/volto.po @@ -3557,8 +3557,7 @@ msgid "Table" msgstr "Tabelle" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Inhaltsverzeichnis" diff --git a/packages/volto/locales/en/LC_MESSAGES/volto.po b/packages/volto/locales/en/LC_MESSAGES/volto.po index a5b40a7988..a55ef03b1c 100644 --- a/packages/volto/locales/en/LC_MESSAGES/volto.po +++ b/packages/volto/locales/en/LC_MESSAGES/volto.po @@ -3552,8 +3552,7 @@ msgid "Table" msgstr "" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "" diff --git a/packages/volto/locales/es/LC_MESSAGES/volto.po b/packages/volto/locales/es/LC_MESSAGES/volto.po index 6e284bfd75..4f77c19cc8 100644 --- a/packages/volto/locales/es/LC_MESSAGES/volto.po +++ b/packages/volto/locales/es/LC_MESSAGES/volto.po @@ -3559,10 +3559,9 @@ msgid "Table" msgstr "Tabla" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" -msgstr "Tabla de contenidos" +msgstr "" #. Default: "Tabular view" #: config/Views diff --git a/packages/volto/locales/eu/LC_MESSAGES/volto.po b/packages/volto/locales/eu/LC_MESSAGES/volto.po index b7c57b8ee1..24f96fe106 100644 --- a/packages/volto/locales/eu/LC_MESSAGES/volto.po +++ b/packages/volto/locales/eu/LC_MESSAGES/volto.po @@ -3559,8 +3559,7 @@ msgid "Table" msgstr "Taula" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Edukien taula" diff --git a/packages/volto/locales/fi/LC_MESSAGES/volto.po b/packages/volto/locales/fi/LC_MESSAGES/volto.po index 16a81a822c..daada75ab8 100644 --- a/packages/volto/locales/fi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fi/LC_MESSAGES/volto.po @@ -3557,8 +3557,7 @@ msgid "Table" msgstr "Taulukkoa" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Sisällys" diff --git a/packages/volto/locales/fr/LC_MESSAGES/volto.po b/packages/volto/locales/fr/LC_MESSAGES/volto.po index b405214240..fe9ff3605a 100644 --- a/packages/volto/locales/fr/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fr/LC_MESSAGES/volto.po @@ -3559,8 +3559,7 @@ msgid "Table" msgstr "Table" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Table des matières" diff --git a/packages/volto/locales/hi/LC_MESSAGES/volto.po b/packages/volto/locales/hi/LC_MESSAGES/volto.po index c21aa3608f..382430e1ab 100644 --- a/packages/volto/locales/hi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/hi/LC_MESSAGES/volto.po @@ -3552,8 +3552,7 @@ msgid "Table" msgstr "तालिका" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "सारांश की तालिका" diff --git a/packages/volto/locales/it/LC_MESSAGES/volto.po b/packages/volto/locales/it/LC_MESSAGES/volto.po index fbdee8436e..ccaa39656b 100644 --- a/packages/volto/locales/it/LC_MESSAGES/volto.po +++ b/packages/volto/locales/it/LC_MESSAGES/volto.po @@ -3552,8 +3552,7 @@ msgid "Table" msgstr "Tabella" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Indice dei contenuti" diff --git a/packages/volto/locales/ja/LC_MESSAGES/volto.po b/packages/volto/locales/ja/LC_MESSAGES/volto.po index 60d63a02e7..4f4dbc24c2 100644 --- a/packages/volto/locales/ja/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ja/LC_MESSAGES/volto.po @@ -3557,8 +3557,7 @@ msgid "Table" msgstr "テーブル" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "目次" diff --git a/packages/volto/locales/nl/LC_MESSAGES/volto.po b/packages/volto/locales/nl/LC_MESSAGES/volto.po index c6330673c2..6f70b0ad97 100644 --- a/packages/volto/locales/nl/LC_MESSAGES/volto.po +++ b/packages/volto/locales/nl/LC_MESSAGES/volto.po @@ -3556,8 +3556,7 @@ msgid "Table" msgstr "" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "" diff --git a/packages/volto/locales/pt/LC_MESSAGES/volto.po b/packages/volto/locales/pt/LC_MESSAGES/volto.po index f7350c0098..73d484e5a8 100644 --- a/packages/volto/locales/pt/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt/LC_MESSAGES/volto.po @@ -3557,8 +3557,7 @@ msgid "Table" msgstr "Tabela" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "" diff --git a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po index 36222ddb91..28ce483baf 100644 --- a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po @@ -3558,8 +3558,7 @@ msgid "Table" msgstr "Tabela" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Tabela de conteúdos" diff --git a/packages/volto/locales/ro/LC_MESSAGES/volto.po b/packages/volto/locales/ro/LC_MESSAGES/volto.po index 4ccc25cc34..e4643486b6 100644 --- a/packages/volto/locales/ro/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ro/LC_MESSAGES/volto.po @@ -3552,8 +3552,7 @@ msgid "Table" msgstr "Tabel" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "Cuprins" diff --git a/packages/volto/locales/volto.pot b/packages/volto/locales/volto.pot index 7e870490fc..c16075ebf5 100644 --- a/packages/volto/locales/volto.pot +++ b/packages/volto/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-08-10T17:00:27.117Z\n" +"POT-Creation-Date: 2024-09-26T14:41:55.000Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "Content-Type: text/plain; charset=utf-8\n" @@ -3554,8 +3554,7 @@ msgid "Table" msgstr "" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "" diff --git a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po index cddef470f6..b01fc6b6f7 100644 --- a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po +++ b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po @@ -3558,8 +3558,7 @@ msgid "Table" msgstr "表格" #. Default: "Table of Contents" -#: components/manage/Blocks/ToC/variations/DefaultTocRenderer -#: components/manage/Blocks/ToC/variations/HorizontalMenu +#: components/manage/Blocks/ToC/View msgid "Table of Contents" msgstr "表格内容" diff --git a/packages/volto/src/components/manage/Blocks/ToC/View.jsx b/packages/volto/src/components/manage/Blocks/ToC/View.jsx index 01c7403599..6e752feaf1 100644 --- a/packages/volto/src/components/manage/Blocks/ToC/View.jsx +++ b/packages/volto/src/components/manage/Blocks/ToC/View.jsx @@ -4,10 +4,10 @@ */ import React from 'react'; import PropTypes from 'prop-types'; +import { injectIntl } from 'react-intl'; import cx from 'classnames'; import { Message } from 'semantic-ui-react'; import { messages } from '@plone/volto/components/manage/Blocks/ToC/Schema'; -import { injectIntl } from 'react-intl'; import config from '@plone/volto/registry'; import { withBlockExtensions } from '@plone/volto/helpers'; @@ -171,7 +171,7 @@ const View = (props) => { aria-label={title && !data.hide_title ? title : ''} className={cx('table-of-contents', variation?.id)} > - {props.mode === 'edit' && !data.title && !tocEntries.length && ( + {props.mode === 'edit' && !title && !tocEntries.length && ( {props.intl.formatMessage(messages.toc)} )}