From f4ad406894bc9f9952c1ebb144962dcf4db04c13 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 09:51:19 +0200 Subject: [PATCH 01/87] use @navroot endpoint to get the Logo component's title and alt --- src/actions/content/content.js | 4 +++- src/actions/index.js | 3 +++ src/actions/navroot/navroot.js | 12 ++++++++++++ src/actions/site/site.js | 12 ++++++++++++ src/components/theme/App/App.jsx | 2 +- src/components/theme/Header/Header.jsx | 2 +- src/components/theme/Logo/Logo.jsx | 24 ++++-------------------- src/constants/ActionTypes.js | 2 ++ 8 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 src/actions/navroot/navroot.js create mode 100644 src/actions/site/site.js diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 68bbf59456..3362892636 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -149,7 +149,9 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual ? { expand: 'translations' } : {}, + settings.isMultilingual + ? { expand: 'translations,navroot' } + : { expand: 'navroot' }, ); let qs = Object.keys(query) diff --git a/src/actions/index.js b/src/actions/index.js index 4430a79665..253e7ca169 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -127,3 +127,6 @@ export { createWorkingCopy, removeWorkingCopy, } from './workingcopy/workingcopy'; + +export { getSite } from './site/site'; +export { getNavroot } from './navroot/navroot'; diff --git a/src/actions/navroot/navroot.js b/src/actions/navroot/navroot.js new file mode 100644 index 0000000000..f98f5ec211 --- /dev/null +++ b/src/actions/navroot/navroot.js @@ -0,0 +1,12 @@ +import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; + +/** + * Set sidebar tab function. + * @function getSite + * @returns {Object} Get the Navroot information + */ +export function getNavroot() { + return { + type: GET_NAVROOT, + }; +} diff --git a/src/actions/site/site.js b/src/actions/site/site.js new file mode 100644 index 0000000000..a135258f85 --- /dev/null +++ b/src/actions/site/site.js @@ -0,0 +1,12 @@ +import { GET_SITE } from '@plone/volto/constants/ActionTypes'; + +/** + * Set sidebar tab function. + * @function getSite + * @returns {Object} Get the Site information + */ +export function getSite() { + return { + type: GET_SITE, + }; +} diff --git a/src/components/theme/App/App.jsx b/src/components/theme/App/App.jsx index 483f6e2c68..db155b2f90 100644 --- a/src/components/theme/App/App.jsx +++ b/src/components/theme/App/App.jsx @@ -144,7 +144,7 @@ class App extends Component { })} /> -
+
- +
diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 5657650eca..c3569f314d 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -3,45 +3,29 @@ * @module components/theme/Logo/Logo */ -import { defineMessages, useIntl } from 'react-intl'; import { Image } from 'semantic-ui-react'; import { useSelector } from 'react-redux'; import config from '@plone/volto/registry'; import { UniversalLink } from '@plone/volto/components'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; -const messages = defineMessages({ - site: { - id: 'Site', - defaultMessage: 'Site', - }, - plonesite: { - id: 'Plone Site', - defaultMessage: 'Plone Site', - }, -}); - /** * Logo component class. * @function Logo * @param {Object} intl Intl object * @returns {string} Markup of the component. */ -const Logo = () => { +const Logo = (props) => { const { settings } = config; + const { navroot } = props; const lang = useSelector((state) => state.intl.locale); - const intl = useIntl(); return ( - {intl.formatMessage(messages.plonesite)} + {navroot?.title} ); }; diff --git a/src/constants/ActionTypes.js b/src/constants/ActionTypes.js index 3f061e80e8..679cb71e1e 100644 --- a/src/constants/ActionTypes.js +++ b/src/constants/ActionTypes.js @@ -94,3 +94,5 @@ export const APPLY_WORKING_COPY = 'APPLY_WORKING_COPY'; export const REMOVE_WORKING_COPY = 'REMOVE_WORKING_COPY'; export const LOCK_CONTENT = 'LOCK_CONTENT'; export const UNLOCK_CONTENT = 'UNLOCK_CONTENT'; +export const GET_SITE = 'GET_SITE'; +export const GET_NAVROOT = 'GET_NAVROOT'; From 075ca24e68b4a8babfeb4872638aea8eae5a1017 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 09:51:50 +0200 Subject: [PATCH 02/87] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f129b61c0..791a7ee311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Breaking ### Feature +- use @navroot endpoint to get Logo title and alt @erral ### Bugfix From 196467fab9ccf6731a4de8a439a3f48ccf43f983 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 10:10:26 +0200 Subject: [PATCH 03/87] add navroot title in the tag with the same Plone logic --- .../theme/ContentMetadataTags/ContentMetadataTags.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 139bc74072..38cab616ad 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -45,10 +45,16 @@ const ContentMetadataTags = (props) => { const contentImageInfo = getContentImageInfo(); + let title_tag_content = seo_title || title; + let nav_root_title = props.content['@components']['navroot']['title']; + title_tag_content = + (nav_root_title === title_tag_content && title_tag_content) || + title_tag_content + ' — ' + nav_root_title; + return ( <> <Helmet> - <title>{seo_title || title} + {title_tag_content} Date: Sun, 31 Jul 2022 17:41:17 +0200 Subject: [PATCH 04/87] use navroot url as the link of the Logo --- src/components/theme/Logo/Logo.jsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index c3569f314d..21fb58b70e 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -4,8 +4,6 @@ */ import { Image } from 'semantic-ui-react'; -import { useSelector } from 'react-redux'; -import config from '@plone/volto/registry'; import { UniversalLink } from '@plone/volto/components'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; @@ -16,15 +14,10 @@ import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; * @returns {string} Markup of the component. */ const Logo = (props) => { - const { settings } = config; const { navroot } = props; - const lang = useSelector((state) => state.intl.locale); return ( - + {navroot?.title} ); From abd132e1e4f83620a6ec72714c267a633ecaf614 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 17:51:19 +0200 Subject: [PATCH 05/87] add url parameter to the getNavroot action --- src/actions/navroot/navroot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actions/navroot/navroot.js b/src/actions/navroot/navroot.js index f98f5ec211..2ff3409dea 100644 --- a/src/actions/navroot/navroot.js +++ b/src/actions/navroot/navroot.js @@ -5,8 +5,10 @@ import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; * @function getSite * @returns {Object} Get the Navroot information */ -export function getNavroot() { +export function getNavroot(url) { return { type: GET_NAVROOT, + op: 'get', + request: `${url}/@navroot`, }; } From 0cf70907b0be2dbd6dc042cab3cada75bcc762f9 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 17:58:30 +0200 Subject: [PATCH 06/87] update Logo tests --- src/components/theme/Logo/Logo.Multilingual.test.jsx | 7 ++++++- src/components/theme/Logo/Logo.test.jsx | 4 +++- .../__snapshots__/Logo.Multilingual.test.jsx.snap | 12 ++++++------ .../theme/Logo/__snapshots__/Logo.test.jsx.snap | 12 ++++++------ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index ba1949b135..9e703059fd 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -24,7 +24,12 @@ describe('Multilingual Logo', () => { const component = renderer.create( - + , ); diff --git a/src/components/theme/Logo/Logo.test.jsx b/src/components/theme/Logo/Logo.test.jsx index 8066e58848..93c549058f 100644 --- a/src/components/theme/Logo/Logo.test.jsx +++ b/src/components/theme/Logo/Logo.test.jsx @@ -19,7 +19,9 @@ describe('Logo', () => { const component = renderer.create( - + , ); diff --git a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap index 2e1522ac75..1540873d13 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap @@ -3,16 +3,16 @@ exports[`Multilingual Logo renders a logo component with multilingual 1`] = ` Plone Site `; diff --git a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap index dccff0889f..827ba4de97 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap @@ -3,16 +3,16 @@ exports[`Logo renders a logo component 1`] = ` Plone Site `; From 8abfa9a13e5e9df2ba2969ffd61d0c70c825361a Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 18:25:35 +0200 Subject: [PATCH 07/87] tests --- .../content/content.multilingual.test.js | 2 +- src/actions/content/content.test.js | 18 ++++++++++++------ src/components/theme/Header/Header.jsx | 1 + src/components/theme/Header/Header.test.jsx | 13 +++++++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/actions/content/content.multilingual.test.js b/src/actions/content/content.multilingual.test.js index 4f40b437b8..06c309ace6 100644 --- a/src/actions/content/content.multilingual.test.js +++ b/src/actions/content/content.multilingual.test.js @@ -12,6 +12,6 @@ describe('getContent', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?expand=translations`); + expect(action.request.path).toEqual(`${url}?expand=translations,navroot`); }); }); diff --git a/src/actions/content/content.test.js b/src/actions/content/content.test.js index d1e876f155..cc009f4563 100644 --- a/src/actions/content/content.test.js +++ b/src/actions/content/content.test.js @@ -157,7 +157,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}`); + expect(action.request.path).toEqual(`${url}?expand=navroot`); }); it('should create an action to get content and full objects', () => { @@ -166,7 +166,9 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?fullobjects=true`); + expect(action.request.path).toEqual( + `${url}?fullobjects=true&expand=navroot`, + ); }); it('should create an action to get content with version', () => { @@ -176,7 +178,9 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}/@history/${version}`); + expect(action.request.path).toEqual( + `${url}/@history/${version}?expand=navroot`, + ); }); it('should create an action to get content with version and fullobjects', () => { @@ -187,7 +191,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); expect(action.request.path).toEqual( - `${url}/@history/${version}?fullobjects=true`, + `${url}/@history/${version}?fullobjects=true&expand=navroot`, ); }); @@ -198,7 +202,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.subrequest).toEqual('my-subrequest'); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}`); + expect(action.request.path).toEqual(`${url}?expand=navroot`); }); it('should create an action to get content with a pagination page', () => { @@ -207,7 +211,9 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?b_start=25&b_size=25`); + expect(action.request.path).toEqual( + `${url}?b_start=25&b_size=25&expand=navroot`, + ); }); }); diff --git a/src/components/theme/Header/Header.jsx b/src/components/theme/Header/Header.jsx index 87b796c09e..65f4c515aa 100644 --- a/src/components/theme/Header/Header.jsx +++ b/src/components/theme/Header/Header.jsx @@ -30,6 +30,7 @@ class Header extends Component { static propTypes = { token: PropTypes.string, pathname: PropTypes.string.isRequired, + content: PropTypes.object.isRequired, }; /** diff --git a/src/components/theme/Header/Header.test.jsx b/src/components/theme/Header/Header.test.jsx index 8002a8cbba..cf6fa00514 100644 --- a/src/components/theme/Header/Header.test.jsx +++ b/src/components/theme/Header/Header.test.jsx @@ -30,10 +30,19 @@ describe('Header', () => { messages: {}, }, }); - const component = renderer.create( -
+
, ); const json = component.toJSON(); From 7490bd8fc3db786236b38d20261554b58255e986 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 18:27:26 +0200 Subject: [PATCH 08/87] add specific url to call the @site action --- src/actions/site/site.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions/site/site.js b/src/actions/site/site.js index a135258f85..1a48c3add5 100644 --- a/src/actions/site/site.js +++ b/src/actions/site/site.js @@ -8,5 +8,7 @@ import { GET_SITE } from '@plone/volto/constants/ActionTypes'; export function getSite() { return { type: GET_SITE, + op: 'get', + request: `/@site`, }; } From fdb0526576e5e7b538753a7286eb997a980385de Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 31 Jul 2022 18:30:23 +0200 Subject: [PATCH 09/87] update i18n files --- locales/ca/LC_MESSAGES/volto.po | 10 ---------- locales/de/LC_MESSAGES/volto.po | 10 ---------- locales/en/LC_MESSAGES/volto.po | 10 ---------- locales/es/LC_MESSAGES/volto.po | 10 ---------- locales/eu/LC_MESSAGES/volto.po | 10 ---------- locales/fr/LC_MESSAGES/volto.po | 10 ---------- locales/it/LC_MESSAGES/volto.po | 10 ---------- locales/ja/LC_MESSAGES/volto.po | 10 ---------- locales/nl/LC_MESSAGES/volto.po | 10 ---------- locales/pt/LC_MESSAGES/volto.po | 10 ---------- locales/pt_BR/LC_MESSAGES/volto.po | 10 ---------- locales/ro/LC_MESSAGES/volto.po | 10 ---------- locales/volto.pot | 12 +----------- 13 files changed, 1 insertion(+), 131 deletions(-) diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index 14a2f3c33d..3d9b872ef5 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -1951,11 +1951,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundació Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Lloc de Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2478,11 +2473,6 @@ msgstr "Redueix la barra d'eines" msgid "Sign in to start session" msgstr "Inicieu la sessió per iniciar la sessió" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Lloc" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 0155cd41a2..aa930bf6b1 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1948,11 +1948,6 @@ msgstr "Bitte upgraden auf plone.restapi >= 8.24.0." msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Website" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2475,11 +2470,6 @@ msgstr "Toolbar verkleinern" msgid "Sign in to start session" msgstr "Loggen Sie sich ein" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Website" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 57fc3dd0f8..74c532a16c 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -1942,11 +1942,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2469,11 +2464,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 41be57cb0e..ec4a2d1f5a 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1952,11 +1952,6 @@ msgstr "Actualice plone.restapi a la versión 8.24.0 o superior." msgid "Plone Foundation" msgstr "Fundación Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sitio Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2479,11 +2474,6 @@ msgstr "Contraer barra de herramientas" msgid "Sign in to start session" msgstr "Acceda para iniciar sesión" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sitio" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index 6af6bf96ce..8bdc33d50a 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -1949,11 +1949,6 @@ msgstr "Eguneratu plone.restapi bertsioa 8.24.0 edo handiago batera" msgid "Plone Foundation" msgstr "Plone Fundazioa" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone Ataria" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2476,11 +2471,6 @@ msgstr "Txikitu tresna-barra" msgid "Sign in to start session" msgstr "Sartu saioa hasteko" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Ataria" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index d18865fcfb..a5e3b32b89 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1959,11 +1959,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fondation Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2486,11 +2481,6 @@ msgstr "Réduire la barre d'outils" msgid "Sign in to start session" msgstr "Connectez-vous pour démarrer la session" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 8c78d3a6c8..8841b9f21b 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1942,11 +1942,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sito Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2469,11 +2464,6 @@ msgstr "Riduci la toolbar" msgid "Sign in to start session" msgstr "Accedi per iniziare la sessione" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sito" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 2fb6f05568..245f3cc80f 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -1950,11 +1950,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Ploneサイト" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2477,11 +2472,6 @@ msgstr "ツールバーを閉じる" msgid "Sign in to start session" msgstr "ログインしてセッションを開始" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "サイト" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index a21efbf37c..b6b9b0836e 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -1961,11 +1961,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone website" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2488,11 +2483,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Website" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index 8c46d94dad..47194465bd 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -1950,11 +1950,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundação Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sítio Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2477,11 +2472,6 @@ msgstr "" msgid "Sign in to start session" msgstr "Inicie a sessão" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sítio" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 3a66893f35..87b9925a01 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -1952,11 +1952,6 @@ msgstr "Por favor, atualize para plone.restapi >= 8.24.0." msgid "Plone Foundation" msgstr "Fundação Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2479,11 +2474,6 @@ msgstr "Recolher barra de ferramentas" msgid "Sign in to start session" msgstr "Faça login para iniciar a sessão" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 764185eced..a3cd4e197a 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -1942,11 +1942,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundația Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2469,11 +2464,6 @@ msgstr "Reduceti bara de instrumente" msgid "Sign in to start session" msgstr "Conectați-vă pentru a începe sesiunea" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/volto.pot b/locales/volto.pot index 8876d30d5e..ed88bde9e0 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2022-07-19T18:15:23.786Z\n" +"POT-Creation-Date: 2022-07-31T16:30:09.895Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1944,11 +1944,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2471,11 +2466,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration From 72829d1cd59e005cf1ce6c20984cb73442efa0b9 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 08:28:56 +0200 Subject: [PATCH 10/87] actions and reducers --- src/reducers/index.js | 4 +++ src/reducers/navroot/navroot.js | 51 +++++++++++++++++++++++++++++++++ src/reducers/site/site.js | 51 +++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 src/reducers/navroot/navroot.js create mode 100644 src/reducers/site/site.js diff --git a/src/reducers/index.js b/src/reducers/index.js index f5c50e4ff2..e8633e1072 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -41,6 +41,8 @@ import lazyLibraries from '@plone/volto/reducers/lazyLibraries/lazyLibraries'; import contextNavigation from '@plone/volto/reducers/contextNavigation/contextNavigation'; import reduxAsyncConnect from './asyncConnect/asyncConnect'; import workingCopy from './workingcopy/workingcopy'; +import site from './site/site'; +import navroot from './navroot/navroot'; /** * Root reducer. @@ -87,6 +89,8 @@ const reducers = { lazyLibraries, contextNavigation, workingCopy, + site, + navroot, }; export default reducers; diff --git a/src/reducers/navroot/navroot.js b/src/reducers/navroot/navroot.js new file mode 100644 index 0000000000..1d87b781b6 --- /dev/null +++ b/src/reducers/navroot/navroot.js @@ -0,0 +1,51 @@ +/** + * Toolbar reducer. + * @module reducers/toolbar/toolbar + */ + +import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; + +const initialState = { + error: null, + loaded: false, + loading: false, + navroot: {}, +}; + +/** + * navroot reducer. + * @function navroot + * @param {Object} state Current state. + * @param {Object} action Action to be handled. + * @returns {Object} New state. + */ +export default function navroot(state = initialState, action = {}) { + switch (action.type) { + case `${GET_NAVROOT}_PENDING`: + return { + ...state, + error: null, + loaded: false, + loading: true, + navroot: {}, + }; + case `${GET_NAVROOT}_SUCCESS`: + return { + ...state, + error: null, + loaded: true, + loading: false, + navroot: action.result, + }; + case `${GET_NAVROOT}_FAIL`: + return { + ...state, + error: action.result.error, + loaded: false, + loading: false, + navroot: {}, + }; + default: + return state; + } +} diff --git a/src/reducers/site/site.js b/src/reducers/site/site.js new file mode 100644 index 0000000000..362d29fff2 --- /dev/null +++ b/src/reducers/site/site.js @@ -0,0 +1,51 @@ +/** + * Toolbar reducer. + * @module reducers/toolbar/toolbar + */ + +import { GET_SITE } from '@plone/volto/constants/ActionTypes'; + +const initialState = { + error: null, + loaded: false, + loading: false, + site: {}, +}; + +/** + * Site reducer. + * @function site + * @param {Object} state Current state. + * @param {Object} action Action to be handled. + * @returns {Object} New state. + */ +export default function site(state = initialState, action = {}) { + switch (action.type) { + case `${GET_SITE}_PENDING`: + return { + ...state, + error: null, + loaded: false, + loading: true, + site: {}, + }; + case `${GET_SITE}_SUCCESS`: + return { + ...state, + error: null, + loaded: true, + loading: false, + site: action.result, + }; + case `${GET_SITE}_FAIL`: + return { + ...state, + error: action.result.error, + loaded: false, + loading: false, + site: {}, + }; + default: + return state; + } +} From a1080d52a1c5a8c001d4e9d0a98952c7aa19ea2a Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 08:29:13 +0200 Subject: [PATCH 11/87] actions and reducers --- src/actions/navroot/navroot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/actions/navroot/navroot.js b/src/actions/navroot/navroot.js index 2ff3409dea..bc988569bc 100644 --- a/src/actions/navroot/navroot.js +++ b/src/actions/navroot/navroot.js @@ -6,9 +6,12 @@ import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; * @returns {Object} Get the Navroot information */ export function getNavroot(url) { + console.log('getNavRoot', url); return { type: GET_NAVROOT, - op: 'get', - request: `${url}/@navroot`, + request: { + op: 'get', + path: `${url}/@navroot`, + }, }; } From c44620c7f72448dc9b745fa81e2da15d8f4102d2 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 08:29:30 +0200 Subject: [PATCH 12/87] restore --- src/components/theme/App/App.jsx | 2 +- src/components/theme/Header/Header.jsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/theme/App/App.jsx b/src/components/theme/App/App.jsx index db155b2f90..483f6e2c68 100644 --- a/src/components/theme/App/App.jsx +++ b/src/components/theme/App/App.jsx @@ -144,7 +144,7 @@ class App extends Component { })} /> -
+
- +
From d78cbcb0c3cf5532c5f03acba302500f950ac5eb Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 08:29:47 +0200 Subject: [PATCH 13/87] do not expand navroot --- src/actions/content/content.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 3362892636..68bbf59456 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -149,9 +149,7 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual - ? { expand: 'translations,navroot' } - : { expand: 'navroot' }, + settings.isMultilingual ? { expand: 'translations' } : {}, ); let qs = Object.keys(query) From e00e22370d581c2d68134c2a6529030c9681e39b Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 10:14:32 +0200 Subject: [PATCH 14/87] logo from Plone --- src/actions/navroot/navroot.js | 1 - src/actions/site/site.js | 6 +++-- src/components/theme/Logo/Logo.jsx | 35 +++++++++++++++++++++++------- src/express-middleware/images.js | 2 +- src/reducers/navroot/navroot.js | 8 +++---- src/reducers/site/site.js | 10 ++++----- 6 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/actions/navroot/navroot.js b/src/actions/navroot/navroot.js index bc988569bc..0b82d70a4f 100644 --- a/src/actions/navroot/navroot.js +++ b/src/actions/navroot/navroot.js @@ -6,7 +6,6 @@ import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; * @returns {Object} Get the Navroot information */ export function getNavroot(url) { - console.log('getNavRoot', url); return { type: GET_NAVROOT, request: { diff --git a/src/actions/site/site.js b/src/actions/site/site.js index 1a48c3add5..a9228b89d1 100644 --- a/src/actions/site/site.js +++ b/src/actions/site/site.js @@ -8,7 +8,9 @@ import { GET_SITE } from '@plone/volto/constants/ActionTypes'; export function getSite() { return { type: GET_SITE, - op: 'get', - request: `/@site`, + request: { + op: 'get', + path: '/@site', + }, }; } diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 21fb58b70e..17eb719e85 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -2,10 +2,13 @@ * Logo component. * @module components/theme/Logo/Logo */ - +import { useEffect } from 'react'; import { Image } from 'semantic-ui-react'; -import { UniversalLink } from '@plone/volto/components'; +import { ConditionalLink } from '@plone/volto/components'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; +import { useSelector, useDispatch } from 'react-redux'; +import { getNavroot, getSite } from '@plone/volto/actions'; +import { flattenToAppURL } from '@plone/volto/helpers'; /** * Logo component class. @@ -13,13 +16,29 @@ import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; * @param {Object} intl Intl object * @returns {string} Markup of the component. */ -const Logo = (props) => { - const { navroot } = props; - +const Logo = () => { + const pathname = useSelector((state) => state.router.location.pathname); + const site = useSelector((state) => state.site.data); + const navroot = useSelector((state) => state.navroot.data); + const dispatch = useDispatch(); + useEffect(() => { + pathname && dispatch(getNavroot(pathname)); + }, [dispatch, pathname]); + useEffect(() => { + dispatch(getSite()); + }, [dispatch]); return ( - - {navroot?.title} - + + {navroot?.title} + ); }; diff --git a/src/express-middleware/images.js b/src/express-middleware/images.js index 229eb79227..f406b0e8b6 100644 --- a/src/express-middleware/images.js +++ b/src/express-middleware/images.js @@ -20,7 +20,7 @@ function imageMiddleware(req, res, next) { export default function () { const middleware = express.Router(); - middleware.all(['**/@@images/*'], imageMiddleware); + middleware.all(['**/@@images/*', '**/@@site-logo/*'], imageMiddleware); middleware.id = 'imageResourcesProcessor'; return middleware; } diff --git a/src/reducers/navroot/navroot.js b/src/reducers/navroot/navroot.js index 1d87b781b6..dd9c9f375f 100644 --- a/src/reducers/navroot/navroot.js +++ b/src/reducers/navroot/navroot.js @@ -27,7 +27,7 @@ export default function navroot(state = initialState, action = {}) { error: null, loaded: false, loading: true, - navroot: {}, + data: {}, }; case `${GET_NAVROOT}_SUCCESS`: return { @@ -35,15 +35,15 @@ export default function navroot(state = initialState, action = {}) { error: null, loaded: true, loading: false, - navroot: action.result, + data: action.result, }; case `${GET_NAVROOT}_FAIL`: return { ...state, - error: action.result.error, + error: action.result, loaded: false, loading: false, - navroot: {}, + data: {}, }; default: return state; diff --git a/src/reducers/site/site.js b/src/reducers/site/site.js index 362d29fff2..6a4c4ed697 100644 --- a/src/reducers/site/site.js +++ b/src/reducers/site/site.js @@ -9,7 +9,7 @@ const initialState = { error: null, loaded: false, loading: false, - site: {}, + data: {}, }; /** @@ -27,7 +27,7 @@ export default function site(state = initialState, action = {}) { error: null, loaded: false, loading: true, - site: {}, + data: {}, }; case `${GET_SITE}_SUCCESS`: return { @@ -35,15 +35,15 @@ export default function site(state = initialState, action = {}) { error: null, loaded: true, loading: false, - site: action.result, + data: action.result, }; case `${GET_SITE}_FAIL`: return { ...state, - error: action.result.error, + error: action.result, loaded: false, loading: false, - site: {}, + data: {}, }; default: return state; From ab626b38c7af7efcdc5338fd35cf049a929cc7d3 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 10:40:09 +0200 Subject: [PATCH 15/87] boolean condition --- src/components/theme/Logo/Logo.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 17eb719e85..c85ac11ddd 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -21,17 +21,20 @@ const Logo = () => { const site = useSelector((state) => state.site.data); const navroot = useSelector((state) => state.navroot.data); const dispatch = useDispatch(); + useEffect(() => { pathname && dispatch(getNavroot(pathname)); }, [dispatch, pathname]); + useEffect(() => { dispatch(getSite()); }, [dispatch]); + return ( Date: Tue, 2 Aug 2022 10:40:28 +0200 Subject: [PATCH 16/87] default --- src/reducers/navroot/navroot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/navroot/navroot.js b/src/reducers/navroot/navroot.js index dd9c9f375f..97d1c383bf 100644 --- a/src/reducers/navroot/navroot.js +++ b/src/reducers/navroot/navroot.js @@ -9,7 +9,7 @@ const initialState = { error: null, loaded: false, loading: false, - navroot: {}, + data: {}, }; /** From 5cae89ef248b5a2328a02349e75e1806aca3bc92 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 10:40:43 +0200 Subject: [PATCH 17/87] search widget URL with navroot --- src/components/theme/Header/Header.jsx | 2 +- .../theme/SearchWidget/SearchWidget.jsx | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/components/theme/Header/Header.jsx b/src/components/theme/Header/Header.jsx index 48979b0a42..3c120b6291 100644 --- a/src/components/theme/Header/Header.jsx +++ b/src/components/theme/Header/Header.jsx @@ -64,7 +64,7 @@ class Header extends Component { )}
- +
diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 59bceeccc5..ca72124576 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -9,9 +9,11 @@ import { Form, Input } from 'semantic-ui-react'; import { compose } from 'redux'; import { PropTypes } from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; +import { connect } from 'react-redux'; import { Icon } from '@plone/volto/components'; import zoomSVG from '@plone/volto/icons/zoom.svg'; +import { getNavroot } from '@plone/volto/actions'; const messages = defineMessages({ search: { @@ -54,6 +56,10 @@ class SearchWidget extends Component { }; } + componentDidMount() { + this.props.getNavroot(this.props.pathname); + } + /** * On change text * @method onChangeText @@ -79,7 +85,9 @@ class SearchWidget extends Component { ? `&path=${encodeURIComponent(this.props.pathname)}` : ''; this.props.history.push( - `/search?SearchableText=${encodeURIComponent(this.state.text)}${path}`, + `${this.props.navroot?.url}/search?SearchableText=${encodeURIComponent( + this.state.text, + )}${path}`, ); event.preventDefault(); } @@ -91,7 +99,10 @@ class SearchWidget extends Component { */ render() { return ( -
+ ({ + navroot: state.navroot, + }), + { getNavroot }, + ), +)(SearchWidget); From 9714c5ebe08783e34af5d97688c34db0bd0fbabc Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 10:46:50 +0200 Subject: [PATCH 18/87] fix tests --- .../content/content.multilingual.test.js | 2 +- src/actions/content/content.test.js | 18 ++++++------------ src/components/theme/Header/Header.test.jsx | 12 +----------- .../theme/Logo/Logo.Multilingual.test.jsx | 7 +------ src/components/theme/Logo/Logo.test.jsx | 4 +--- 5 files changed, 10 insertions(+), 33 deletions(-) diff --git a/src/actions/content/content.multilingual.test.js b/src/actions/content/content.multilingual.test.js index 06c309ace6..4f40b437b8 100644 --- a/src/actions/content/content.multilingual.test.js +++ b/src/actions/content/content.multilingual.test.js @@ -12,6 +12,6 @@ describe('getContent', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?expand=translations,navroot`); + expect(action.request.path).toEqual(`${url}?expand=translations`); }); }); diff --git a/src/actions/content/content.test.js b/src/actions/content/content.test.js index cc009f4563..d1e876f155 100644 --- a/src/actions/content/content.test.js +++ b/src/actions/content/content.test.js @@ -157,7 +157,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?expand=navroot`); + expect(action.request.path).toEqual(`${url}`); }); it('should create an action to get content and full objects', () => { @@ -166,9 +166,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual( - `${url}?fullobjects=true&expand=navroot`, - ); + expect(action.request.path).toEqual(`${url}?fullobjects=true`); }); it('should create an action to get content with version', () => { @@ -178,9 +176,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual( - `${url}/@history/${version}?expand=navroot`, - ); + expect(action.request.path).toEqual(`${url}/@history/${version}`); }); it('should create an action to get content with version and fullobjects', () => { @@ -191,7 +187,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); expect(action.request.path).toEqual( - `${url}/@history/${version}?fullobjects=true&expand=navroot`, + `${url}/@history/${version}?fullobjects=true`, ); }); @@ -202,7 +198,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.subrequest).toEqual('my-subrequest'); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}?expand=navroot`); + expect(action.request.path).toEqual(`${url}`); }); it('should create an action to get content with a pagination page', () => { @@ -211,9 +207,7 @@ describe('Content action', () => { expect(action.type).toEqual(GET_CONTENT); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual( - `${url}?b_start=25&b_size=25&expand=navroot`, - ); + expect(action.request.path).toEqual(`${url}?b_start=25&b_size=25`); }); }); diff --git a/src/components/theme/Header/Header.test.jsx b/src/components/theme/Header/Header.test.jsx index cf6fa00514..97e9140b2a 100644 --- a/src/components/theme/Header/Header.test.jsx +++ b/src/components/theme/Header/Header.test.jsx @@ -32,17 +32,7 @@ describe('Header', () => { }); const component = renderer.create( -
+
, ); const json = component.toJSON(); diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index 9e703059fd..ba1949b135 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -24,12 +24,7 @@ describe('Multilingual Logo', () => { const component = renderer.create( - + , ); diff --git a/src/components/theme/Logo/Logo.test.jsx b/src/components/theme/Logo/Logo.test.jsx index 93c549058f..8066e58848 100644 --- a/src/components/theme/Logo/Logo.test.jsx +++ b/src/components/theme/Logo/Logo.test.jsx @@ -19,9 +19,7 @@ describe('Logo', () => { const component = renderer.create( - + , ); From 8e0d4b19fee454d99b3f4227c3318fb4087ee458 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 2 Aug 2022 10:50:39 +0200 Subject: [PATCH 19/87] fix tests --- .../theme/Logo/Logo.Multilingual.test.jsx | 14 ++++++++++++++ src/components/theme/Logo/Logo.test.jsx | 14 ++++++++++++++ .../__snapshots__/Logo.Multilingual.test.jsx.snap | 6 +++--- .../theme/Logo/__snapshots__/Logo.test.jsx.snap | 12 ++++++------ 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index ba1949b135..95b0ee076c 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -20,6 +20,20 @@ describe('Multilingual Logo', () => { locale: 'en', messages: {}, }, + router: { + location: { + pathname: '/en', + }, + }, + site: { + data: {}, + }, + navroot: { + data: { + url: '/en', + title: 'site title english', + }, + }, }); const component = renderer.create( diff --git a/src/components/theme/Logo/Logo.test.jsx b/src/components/theme/Logo/Logo.test.jsx index 8066e58848..19b179a5b2 100644 --- a/src/components/theme/Logo/Logo.test.jsx +++ b/src/components/theme/Logo/Logo.test.jsx @@ -15,6 +15,20 @@ describe('Logo', () => { locale: 'en', messages: {}, }, + router: { + location: { + pathname: '/', + }, + }, + site: { + data: {}, + }, + navroot: { + data: { + url: '/', + title: 'My site', + }, + }, }); const component = renderer.create( diff --git a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap index 1540873d13..7887ca0b36 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap @@ -3,9 +3,9 @@ exports[`Multilingual Logo renders a logo component with multilingual 1`] = ` site title `; From a18c5b40d3416ba534509c6fd8dd462a3ee13135 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 16:35:59 +0200 Subject: [PATCH 20/87] changes to get the information from the navroot --- src/actions/content/content.js | 4 +++- .../theme/ContentMetadataTags/ContentMetadataTags.jsx | 2 +- src/components/theme/Header/Header.jsx | 3 +-- src/components/theme/Header/Header.test.jsx | 1 + src/components/theme/Logo/Logo.jsx | 10 +++++----- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 145a3a031f..889f1001b4 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -150,7 +150,9 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual ? { expand: 'translations' } : {}, + settings.isMultilingual + ? { expand: 'translations,navroot' } + : { expand: 'navroot' }, ); let qs = Object.keys(query) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 68cc608686..b09b342e11 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -46,7 +46,7 @@ const ContentMetadataTags = (props) => { const contentImageInfo = getContentImageInfo(); let title_tag_content = seo_title || title; - let nav_root_title = props.content['@components']['navroot']['title']; + let nav_root_title = props.content['@components']?.navroot?.navroot?.title; title_tag_content = (nav_root_title === title_tag_content && title_tag_content) || title_tag_content + ' — ' + nav_root_title; diff --git a/src/components/theme/Header/Header.jsx b/src/components/theme/Header/Header.jsx index 4891283095..cbe5a7b309 100644 --- a/src/components/theme/Header/Header.jsx +++ b/src/components/theme/Header/Header.jsx @@ -1,6 +1,5 @@ import { Container, Segment } from 'semantic-ui-react'; import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { useToken } from '@plone/volto/hooks/userSession/useToken'; import { Anontools, @@ -31,7 +30,7 @@ const Header = ({ pathname }) => { )}
- +
diff --git a/src/components/theme/Header/Header.test.jsx b/src/components/theme/Header/Header.test.jsx index 5f20cf8b97..4144f673bc 100644 --- a/src/components/theme/Header/Header.test.jsx +++ b/src/components/theme/Header/Header.test.jsx @@ -30,6 +30,7 @@ describe('Header', () => { messages: {}, }, }); + const component = renderer.create(
diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 1ad703afc5..dae22b9f0e 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -5,10 +5,6 @@ import { useEffect } from 'react'; import { Image } from 'semantic-ui-react'; import { ConditionalLink } from '@plone/volto/components'; -import { useSelector } from 'react-redux'; -import config from '@plone/volto/registry'; -import { UniversalLink } from '@plone/volto/components'; -import { toBackendLang } from '@plone/volto/helpers'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; import { useSelector, useDispatch } from 'react-redux'; import { getNavroot, getSite } from '@plone/volto/actions'; @@ -41,7 +37,11 @@ const Logo = () => { condition={navroot?.url ? true : false} > {navroot?.title} From 1e2aa292cb3101704ec84b0b1d1aa3ddacb55b22 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 16:38:29 +0200 Subject: [PATCH 21/87] lint --- src/actions/index.js | 2 -- src/constants/ActionTypes.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index 6ba3b9bac4..ace4f268e3 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -173,5 +173,3 @@ export { getUserSchema } from './userschema/userschema'; export { getUpgradeInformation, runUpgrade } from './upgrade/upgrade'; export { getSite } from './site/site'; export { getNavroot } from './navroot/navroot'; - - diff --git a/src/constants/ActionTypes.js b/src/constants/ActionTypes.js index bcb2cea3ce..26e347e1e2 100644 --- a/src/constants/ActionTypes.js +++ b/src/constants/ActionTypes.js @@ -138,4 +138,4 @@ export const GET_USERSCHEMA = 'GET_USERSCHEMA'; export const GET_UPGRADE = 'GET_UPGRADE'; export const POST_UPGRADE = 'POST_UPGRADE'; export const GET_SITE = 'GET_SITE'; -export const GET_NAVROOT = 'GET_NAVROOT'; \ No newline at end of file +export const GET_NAVROOT = 'GET_NAVROOT'; From 3b322609dd8906fb591fa906f558aaf650db979a Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 16:38:33 +0200 Subject: [PATCH 22/87] i18n --- locales/fi/LC_MESSAGES/volto.po | 10 ---------- locales/zh_CN/LC_MESSAGES/volto.po | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index 19345cfa05..9e386f0494 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -2521,11 +2521,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone-säätiön" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone-sivusto" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -3183,11 +3178,6 @@ msgstr "Kutista työkalupalkki" msgid "Sign in to start session" msgstr "Kirjaudu sisään" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sivusto" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index e8f5457cdd..0411034d07 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -2516,11 +2516,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone站点" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -3178,11 +3173,6 @@ msgstr "缩小工具栏" msgid "Sign in to start session" msgstr "登录以开始session会话" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "网站" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration From c08a9fc535f6d9cf5be5419aafa1bf893d5e98e2 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 16:59:14 +0200 Subject: [PATCH 23/87] use explicit calls to @navroot and @site --- CHANGELOG.md | 2 -- news/3537.feature | 3 +++ src/actions/content/content.js | 4 +--- .../ContentMetadataTags/ContentMetadataTags.jsx | 12 +++++++++++- src/components/theme/Logo/Logo.jsx | 10 +++++----- 5 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 news/3537.feature diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c39bb0f63..1f67ba4a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,8 +162,6 @@ - Improve i18n script ordering of addons, so that addons can override translations from their dependencies. @davisagli [#4495](https://github.com/plone/volto/issues/4495) ### Feature -- use @navroot endpoint to get Logo title and alt @erral - - Add option to hide empty listing blocks @ksuess [#4393](https://github.com/plone/volto/issues/4393) ### Bugfix diff --git a/news/3537.feature b/news/3537.feature new file mode 100644 index 0000000000..e23d3856e8 --- /dev/null +++ b/news/3537.feature @@ -0,0 +1,3 @@ +- Use the @navroot endpoint to build the title tag @erral +- Use the @navroot endpoint to build the search url @erral +- Use the @site endpoint to get the logo from Plone @erral \ No newline at end of file diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 889f1001b4..145a3a031f 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -150,9 +150,7 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual - ? { expand: 'translations,navroot' } - : { expand: 'navroot' }, + settings.isMultilingual ? { expand: 'translations' } : {}, ); let qs = Object.keys(query) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index b09b342e11..66a72a6cac 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -1,6 +1,9 @@ +import { useEffect } from 'react'; import React from 'react'; import { toPublicURL, Helmet } from '@plone/volto/helpers'; import config from '@plone/volto/registry'; +import { useSelector, useDispatch } from 'react-redux'; +import { getNavroot } from '@plone/volto/actions'; const ContentMetadataTags = (props) => { const { @@ -13,6 +16,13 @@ const ContentMetadataTags = (props) => { title, description, } = props.content; + const pathname = useSelector((state) => state.router.location.pathname); + const navroot = useSelector((state) => state.navroot.data); + const dispatch = useDispatch(); + + useEffect(() => { + pathname && dispatch(getNavroot(pathname)); + }, [dispatch, pathname]); const getContentImageInfo = () => { const { contentMetadataTagsImageField } = config.settings; @@ -46,7 +56,7 @@ const ContentMetadataTags = (props) => { const contentImageInfo = getContentImageInfo(); let title_tag_content = seo_title || title; - let nav_root_title = props.content['@components']?.navroot?.navroot?.title; + let nav_root_title = navroot?.navroot?.title; title_tag_content = (nav_root_title === title_tag_content && title_tag_content) || title_tag_content + ' — ' + nav_root_title; diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index dae22b9f0e..2bb85741aa 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -32,9 +32,9 @@ const Logo = () => { return ( { ? flattenToAppURL(site['plone.site_logo']) : LogoImage } - alt={navroot?.title} - title={navroot?.title} + alt={navroot?.navroot?.title} + title={navroot?.navroot?.title} /> ); From 606b03f0b58793bcd0d99bfe29b62b4d963e7c01 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 17:12:46 +0200 Subject: [PATCH 24/87] Revert "use explicit calls to @navroot and @site" This reverts commit c08a9fc535f6d9cf5be5419aafa1bf893d5e98e2. --- CHANGELOG.md | 2 ++ news/3537.feature | 3 --- src/actions/content/content.js | 4 +++- .../ContentMetadataTags/ContentMetadataTags.jsx | 12 +----------- src/components/theme/Logo/Logo.jsx | 10 +++++----- 5 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 news/3537.feature diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f67ba4a96..6c39bb0f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,6 +162,8 @@ - Improve i18n script ordering of addons, so that addons can override translations from their dependencies. @davisagli [#4495](https://github.com/plone/volto/issues/4495) ### Feature +- use @navroot endpoint to get Logo title and alt @erral + - Add option to hide empty listing blocks @ksuess [#4393](https://github.com/plone/volto/issues/4393) ### Bugfix diff --git a/news/3537.feature b/news/3537.feature deleted file mode 100644 index e23d3856e8..0000000000 --- a/news/3537.feature +++ /dev/null @@ -1,3 +0,0 @@ -- Use the @navroot endpoint to build the title tag @erral -- Use the @navroot endpoint to build the search url @erral -- Use the @site endpoint to get the logo from Plone @erral \ No newline at end of file diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 145a3a031f..889f1001b4 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -150,7 +150,9 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual ? { expand: 'translations' } : {}, + settings.isMultilingual + ? { expand: 'translations,navroot' } + : { expand: 'navroot' }, ); let qs = Object.keys(query) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 66a72a6cac..b09b342e11 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -1,9 +1,6 @@ -import { useEffect } from 'react'; import React from 'react'; import { toPublicURL, Helmet } from '@plone/volto/helpers'; import config from '@plone/volto/registry'; -import { useSelector, useDispatch } from 'react-redux'; -import { getNavroot } from '@plone/volto/actions'; const ContentMetadataTags = (props) => { const { @@ -16,13 +13,6 @@ const ContentMetadataTags = (props) => { title, description, } = props.content; - const pathname = useSelector((state) => state.router.location.pathname); - const navroot = useSelector((state) => state.navroot.data); - const dispatch = useDispatch(); - - useEffect(() => { - pathname && dispatch(getNavroot(pathname)); - }, [dispatch, pathname]); const getContentImageInfo = () => { const { contentMetadataTagsImageField } = config.settings; @@ -56,7 +46,7 @@ const ContentMetadataTags = (props) => { const contentImageInfo = getContentImageInfo(); let title_tag_content = seo_title || title; - let nav_root_title = navroot?.navroot?.title; + let nav_root_title = props.content['@components']?.navroot?.navroot?.title; title_tag_content = (nav_root_title === title_tag_content && title_tag_content) || title_tag_content + ' — ' + nav_root_title; diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 2bb85741aa..dae22b9f0e 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -32,9 +32,9 @@ const Logo = () => { return ( { ? flattenToAppURL(site['plone.site_logo']) : LogoImage } - alt={navroot?.navroot?.title} - title={navroot?.navroot?.title} + alt={navroot?.title} + title={navroot?.title} /> ); From 7f246f56be1e45ad2a1d2919e92d3101de4d7084 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 7 Jun 2023 17:15:12 +0200 Subject: [PATCH 25/87] add changelog --- CHANGELOG.md | 2 -- news/3537.feature | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 news/3537.feature diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c39bb0f63..1f67ba4a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,8 +162,6 @@ - Improve i18n script ordering of addons, so that addons can override translations from their dependencies. @davisagli [#4495](https://github.com/plone/volto/issues/4495) ### Feature -- use @navroot endpoint to get Logo title and alt @erral - - Add option to hide empty listing blocks @ksuess [#4393](https://github.com/plone/volto/issues/4393) ### Bugfix diff --git a/news/3537.feature b/news/3537.feature new file mode 100644 index 0000000000..49646ae6b8 --- /dev/null +++ b/news/3537.feature @@ -0,0 +1,2 @@ +- Use the @navroot endpoint to build the title tag @erral +- Use the @site endpoint to render the site logo @erral \ No newline at end of file From 6b5ae08ce0168516c870b0886e238ef81a77a578 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:35:25 +0200 Subject: [PATCH 26/87] pass content in props to avoid extra queries --- src/components/theme/App/App.jsx | 2 +- src/components/theme/Header/Header.jsx | 4 +-- .../theme/SearchWidget/SearchWidget.jsx | 26 +++++-------------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/components/theme/App/App.jsx b/src/components/theme/App/App.jsx index cec83066a1..18885578a1 100644 --- a/src/components/theme/App/App.jsx +++ b/src/components/theme/App/App.jsx @@ -158,7 +158,7 @@ export class App extends Component { })} /> -
+
{ +const Header = ({ pathname, content }) => { const token = useToken(); return ( @@ -30,7 +30,7 @@ const Header = ({ pathname }) => { )}
- +
diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 802965f7ea..416e67fedd 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -9,11 +9,9 @@ import { Form, Input } from 'semantic-ui-react'; import { compose } from 'redux'; import { PropTypes } from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import { Icon } from '@plone/volto/components'; import zoomSVG from '@plone/volto/icons/zoom.svg'; -import { getNavroot } from '@plone/volto/actions'; const messages = defineMessages({ search: { @@ -56,10 +54,6 @@ class SearchWidget extends Component { }; } - componentDidMount() { - this.props.getNavroot(this.props.pathname); - } - /** * On change text * @method onChangeText @@ -85,9 +79,7 @@ class SearchWidget extends Component { ? `&path=${encodeURIComponent(this.props.pathname)}` : ''; this.props.history.push( - `${this.props.navroot?.url}/search?SearchableText=${encodeURIComponent( - this.state.text, - )}${path}`, + `./search?SearchableText=${encodeURIComponent(this.state.text)}${path}`, ); // reset input value this.setState({ @@ -104,7 +96,10 @@ class SearchWidget extends Component { render() { return ( @@ -127,13 +122,4 @@ class SearchWidget extends Component { } } -export default compose( - withRouter, - injectIntl, - connect( - (state) => ({ - navroot: state.navroot, - }), - { getNavroot }, - ), -)(SearchWidget); +export default compose(withRouter, injectIntl)(SearchWidget); From 52d83c96a19f95f09eb2a8f81b9917c9d07e6132 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:41:59 +0200 Subject: [PATCH 27/87] restore logo changes --- .../theme/Logo/Logo.Multilingual.test.jsx | 14 ----- src/components/theme/Logo/Logo.jsx | 56 +++++++++---------- src/components/theme/Logo/Logo.test.jsx | 14 ----- src/express-middleware/images.js | 1 - 4 files changed, 27 insertions(+), 58 deletions(-) diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index 95b0ee076c..ba1949b135 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -20,20 +20,6 @@ describe('Multilingual Logo', () => { locale: 'en', messages: {}, }, - router: { - location: { - pathname: '/en', - }, - }, - site: { - data: {}, - }, - navroot: { - data: { - url: '/en', - title: 'site title english', - }, - }, }); const component = renderer.create( diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index dae22b9f0e..1127b83918 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -2,13 +2,25 @@ * Logo component. * @module components/theme/Logo/Logo */ -import { useEffect } from 'react'; + +import { defineMessages, useIntl } from 'react-intl'; import { Image } from 'semantic-ui-react'; -import { ConditionalLink } from '@plone/volto/components'; +import { useSelector } from 'react-redux'; +import config from '@plone/volto/registry'; +import { UniversalLink } from '@plone/volto/components'; +import { toBackendLang } from '@plone/volto/helpers'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; -import { useSelector, useDispatch } from 'react-redux'; -import { getNavroot, getSite } from '@plone/volto/actions'; -import { flattenToAppURL } from '@plone/volto/helpers'; + +const messages = defineMessages({ + site: { + id: 'Site', + defaultMessage: 'Site', + }, + plonesite: { + id: 'Plone Site', + defaultMessage: 'Plone Site', + }, +}); /** * Logo component class. @@ -17,35 +29,21 @@ import { flattenToAppURL } from '@plone/volto/helpers'; * @returns {string} Markup of the component. */ const Logo = () => { - const pathname = useSelector((state) => state.router.location.pathname); - const site = useSelector((state) => state.site.data); - const navroot = useSelector((state) => state.navroot.data); - const dispatch = useDispatch(); - - useEffect(() => { - pathname && dispatch(getNavroot(pathname)); - }, [dispatch, pathname]); - - useEffect(() => { - dispatch(getSite()); - }, [dispatch]); + const { settings } = config; + const lang = useSelector((state) => state.intl.locale); + const intl = useIntl(); return ( - {navroot?.title} - + ); }; diff --git a/src/components/theme/Logo/Logo.test.jsx b/src/components/theme/Logo/Logo.test.jsx index 19b179a5b2..8066e58848 100644 --- a/src/components/theme/Logo/Logo.test.jsx +++ b/src/components/theme/Logo/Logo.test.jsx @@ -15,20 +15,6 @@ describe('Logo', () => { locale: 'en', messages: {}, }, - router: { - location: { - pathname: '/', - }, - }, - site: { - data: {}, - }, - navroot: { - data: { - url: '/', - title: 'My site', - }, - }, }); const component = renderer.create( diff --git a/src/express-middleware/images.js b/src/express-middleware/images.js index 01c89f56b9..2a86c203d1 100644 --- a/src/express-middleware/images.js +++ b/src/express-middleware/images.js @@ -22,7 +22,6 @@ export default function () { middleware.all(['**/@@images/*'], imageMiddleware); middleware.all(['/@portrait/*'], imageMiddleware); - middleware.all(['**/@@site-logo/*'], imageMiddleware); middleware.id = 'imageResourcesProcessor'; return middleware; } From 27ee5db4298c61465817188694b6bc32fee723de Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:43:10 +0200 Subject: [PATCH 28/87] restore i18n --- locales/ca/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/de/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/en/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/es/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/eu/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/fi/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/fr/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/it/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/ja/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/nl/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/pt/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/pt_BR/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/ro/LC_MESSAGES/volto.po | 15 +++++++++++++++ locales/volto.pot | 17 ++++++++++++++++- locales/zh_CN/LC_MESSAGES/volto.po | 15 +++++++++++++++ 15 files changed, 226 insertions(+), 1 deletion(-) diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index ac25275573..3166911d8c 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -606,6 +606,7 @@ msgid "Choose Target" msgstr "Trieu Destí" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Trieu un fitxer" @@ -1097,16 +1098,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrossegueu i deixeu anar fitxers des del vostre ordinador a aquesta àrea o feu clic al botó 'Examinar'." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Deixeu anar el fitxer aquí per substituir el fitxer existent" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Deixeu anar el fitxer aquí per pujar un fitxer nou" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Deixeu fitxers aquí..." @@ -2519,6 +2523,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundació Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2745,6 +2754,7 @@ msgid "Repeat on" msgstr "Repetiu" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substitueix el fitxer existent" @@ -3176,6 +3186,11 @@ msgstr "Redueix la barra d'eines" msgid "Sign in to start session" msgstr "Inicieu la sessió per iniciar la sessió" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index a58fa44c08..dd68006c65 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -603,6 +603,7 @@ msgid "Choose Target" msgstr "Ziel auswählen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Datei auswählen" @@ -1094,16 +1095,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Ziehen Sie Dateien von Ihrem Computer auf diesen Bereich oder drücken Sie den “Durchsuchen”-Knopf." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Datei hier ablegen um eine neue Datei hochzuladen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" @@ -2516,6 +2520,11 @@ msgstr "Bitte upgraden Sie zu plone.restapi >= 8.35.3." msgid "Plone Foundation" msgstr "Plone Foundation" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2742,6 +2751,7 @@ msgid "Repeat on" msgstr "Wiederhole am" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Bestehende Datei ersetzen" @@ -3173,6 +3183,11 @@ msgstr "Toolbar verkleinern" msgid "Sign in to start session" msgstr "Loggen Sie sich ein" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 5193c76a51..ba03dd5bf2 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2510,6 +2514,11 @@ msgstr "" msgid "Plone Foundation" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2736,6 +2745,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3167,6 +3177,11 @@ msgstr "" msgid "Sign in to start session" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index d7ec473fcd..0f5695b95e 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -608,6 +608,7 @@ msgid "Choose Target" msgstr "Seleccione destino" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Seleccionar Archivo" @@ -1099,16 +1100,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastre y suelte los archivos desde su computador en esta área o haga clic al botón “Seleccionar”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastre aquí el archivo para reemplazar el actual" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastre aquí el archivo para añadir un nuevo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastrar archivos aquí..." @@ -2521,6 +2525,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundación Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2747,6 +2756,7 @@ msgid "Repeat on" msgstr "Repetir el" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sustituir el archivo actual" @@ -3178,6 +3188,11 @@ msgstr "Contraer barra de herramientas" msgid "Sign in to start session" msgstr "Acceda para iniciar sesión" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index 147af7ecb4..1d2fc5d6bb 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -604,6 +604,7 @@ msgid "Choose Target" msgstr "Aukeratu helburua" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Aukeratu fitxategia" @@ -1095,16 +1096,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastatu fitxategiak hona edo erabili Arakatu botoia." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastatu fitxategia hona orain dagoena ordezkatzeko" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastatu fitxategia hona fitxategi berria kargatzeko" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastatu fitxategiak hona..." @@ -2517,6 +2521,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Fundazioa" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2743,6 +2752,7 @@ msgid "Repeat on" msgstr "Egun honetan errepikatu" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Ordezkatu fitxategia" @@ -3174,6 +3184,11 @@ msgstr "Txikitu tresna-barra" msgid "Sign in to start session" msgstr "Sartu saioa hasteko" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index 9e386f0494..ee667969ee 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -608,6 +608,7 @@ msgid "Choose Target" msgstr "Valitse sisältö" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Valitse tiedosto" @@ -1099,16 +1100,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Raahaa ja pudota tiedostoja tietokoneeltasi tähän tai paina “Selaa”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Pudota tiedosto tähän korvataksesi olemassaolevan tiedoston" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Pudota tiedosto tähän ladataksesi uuden tiedoston" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Pudota tiedosto tänne... " @@ -2521,6 +2525,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone-säätiön" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2747,6 +2756,7 @@ msgid "Repeat on" msgstr "Toista" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Korvaa olemassaoleva tiedosto" @@ -3178,6 +3188,11 @@ msgstr "Kutista työkalupalkki" msgid "Sign in to start session" msgstr "Kirjaudu sisään" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 2f272de10e..48196b04c5 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -614,6 +614,7 @@ msgid "Choose Target" msgstr "Choisir une cible" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Choisissez un fichier" @@ -1105,16 +1106,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Glisser et déposer les fichiers depuis votre ordinateur dans la zone ou cliquer sur le bouton “Explore“" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Déposez le fichier ici pour remplacer le fichier existant" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Déposez le fichier ici pour télécharger un nouveau fichier" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Déposez les fichiers ici ..." @@ -2527,6 +2531,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Fondation Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2753,6 +2762,7 @@ msgid "Repeat on" msgstr "Répétition le" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Remplacer le fichier existant" @@ -3184,6 +3194,11 @@ msgstr "Réduire la barre d'outils" msgid "Sign in to start session" msgstr "Connectez-vous pour démarrer la session" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 58ae296ff0..a96302c404 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "Seleziona la destinazione" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Scegli un file" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trascina in quest'area i file dal tuo computer o clicca su “Sfoglia”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Rilascia un file qui per sostituire quello esistente" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Rilascia un file qui per caricare un nuovo file" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Rilascia file qui..." @@ -2510,6 +2514,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2736,6 +2745,7 @@ msgid "Repeat on" msgstr "Ripeti ogni" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sostituisci file esistente" @@ -3167,6 +3177,11 @@ msgstr "Riduci la toolbar" msgid "Sign in to start session" msgstr "Accedi per iniziare la sessione" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index b99686b251..a8bb1cdbed 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -605,6 +605,7 @@ msgid "Choose Target" msgstr "ターゲットを選択" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "ファイルを選択" @@ -1096,16 +1097,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "ここにファイルをドラッグ、または「参照」ボタンをクリック" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "ファイルをここにドロップして、既存のファイルを置き換え" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "ファイルをここにドロップして、新しいファイルをアップロード" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "ファイルをここにドロップ" @@ -2518,6 +2522,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2744,6 +2753,7 @@ msgid "Repeat on" msgstr "日または曜日" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "ファイルの置き換え" @@ -3175,6 +3185,11 @@ msgstr "ツールバーを閉じる" msgid "Sign in to start session" msgstr "ログインしてセッションを開始" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index 9e73bdfd90..de13159434 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -616,6 +616,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1107,16 +1108,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Drag en drop bestanden van uw computer naar dit gebied of klik op de “Bladeren” knop." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2529,6 +2533,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2755,6 +2764,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3186,6 +3196,11 @@ msgstr "" msgid "Sign in to start session" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index 358f131989..fae3a6ed16 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -605,6 +605,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1096,16 +1097,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e largue ficheiros do seu computador para esta área ou clique no botão “Procurar”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2518,6 +2522,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundação Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2744,6 +2753,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3175,6 +3185,11 @@ msgstr "" msgid "Sign in to start session" msgstr "Inicie a sessão" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index a0003ffea0..632f5c05fc 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -607,6 +607,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Escolha um arquivo" @@ -1098,16 +1099,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e solte arquivos do seu computador para esta área, ou clique no botão ‘Procurar’." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Solte um arquivo aqui para substituir o arquivo existente" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Solte um arquivo aqui para enviar um novo arquivo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Soltar aquivos aqui…" @@ -2520,6 +2524,11 @@ msgstr "Por favor atualize a plone.restapi para versão 8.35.3 ou superior." msgid "Plone Foundation" msgstr "Fundação Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2746,6 +2755,7 @@ msgid "Repeat on" msgstr "Repete em" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substituir arquivo existente" @@ -3177,6 +3187,11 @@ msgstr "Recolher barra de ferramentas" msgid "Sign in to start session" msgstr "Faça login para iniciar a sessão" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 01fc55c2d3..2ceeb7aedd 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "Alegeți ținta" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Alegeți un fișier" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trageți și fixați fișierele de pe computer în această zonă sau faceți clic pe butonul Răsfoiește." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Trageți fișierul aici pentru a înlocui fișierul existent" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Trageți fișierul aici pentru a încărca un fișier nou" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Trageți fișierele aici..." @@ -2510,6 +2514,11 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundația Plone" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2736,6 +2745,7 @@ msgid "Repeat on" msgstr "Repetați pe" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Înlocuiește fișierul existent" @@ -3167,6 +3177,11 @@ msgstr "Reduceti bara de instrumente" msgid "Sign in to start session" msgstr "Conectați-vă pentru a începe sesiunea" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/volto.pot b/locales/volto.pot index 2fb013b53b..c91ee01f0e 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-06-02T14:22:59.421Z\n" +"POT-Creation-Date: 2023-06-09T06:42:57.032Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -599,6 +599,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1090,16 +1091,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2512,6 +2516,11 @@ msgstr "" msgid "Plone Foundation" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2738,6 +2747,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3169,6 +3179,11 @@ msgstr "" msgid "Sign in to start session" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index 0411034d07..e96f04e8fa 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -603,6 +603,7 @@ msgid "Choose Target" msgstr "选择目标" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "选择一个文件" @@ -1094,16 +1095,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "从你的电脑中拖放文件到此区域或单击 “浏览” 按钮" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "在此处放置文件以替换现有文件" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "在此处放置文件来上传新文件" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "在此处放置文件 ..." @@ -2516,6 +2520,11 @@ msgstr "" msgid "Plone Foundation" msgstr "" +#: components/theme/Logo/Logo +# defaultMessage: Plone Site +msgid "Plone Site" +msgstr "" + #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2742,6 +2751,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "替换现有文件" @@ -3173,6 +3183,11 @@ msgstr "缩小工具栏" msgid "Sign in to start session" msgstr "登录以开始session会话" +#: components/theme/Logo/Logo +# defaultMessage: Site +msgid "Site" +msgstr "" + #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration From d410ca60a7ec387524da443cd01fe7f0153bb10a Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:44:54 +0200 Subject: [PATCH 29/87] whitespace --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f67ba4a96..e7c8d246e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -162,6 +162,7 @@ - Improve i18n script ordering of addons, so that addons can override translations from their dependencies. @davisagli [#4495](https://github.com/plone/volto/issues/4495) ### Feature + - Add option to hide empty listing blocks @ksuess [#4393](https://github.com/plone/volto/issues/4393) ### Bugfix From a41d5d45b64a4f8c038a6f3947d4ba309496eec2 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:50:09 +0200 Subject: [PATCH 30/87] restore i18n --- locales/ca/LC_MESSAGES/volto.po | 5 ----- locales/de/LC_MESSAGES/volto.po | 5 ----- locales/en/LC_MESSAGES/volto.po | 5 ----- locales/es/LC_MESSAGES/volto.po | 5 ----- locales/eu/LC_MESSAGES/volto.po | 5 ----- locales/fi/LC_MESSAGES/volto.po | 5 ----- locales/fr/LC_MESSAGES/volto.po | 5 ----- locales/it/LC_MESSAGES/volto.po | 5 ----- locales/ja/LC_MESSAGES/volto.po | 5 ----- locales/nl/LC_MESSAGES/volto.po | 5 ----- locales/pt/LC_MESSAGES/volto.po | 5 ----- locales/pt_BR/LC_MESSAGES/volto.po | 5 ----- locales/ro/LC_MESSAGES/volto.po | 5 ----- locales/volto.pot | 7 +------ locales/zh_CN/LC_MESSAGES/volto.po | 5 ----- 15 files changed, 1 insertion(+), 76 deletions(-) diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index 3166911d8c..5d5c647d2d 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -606,7 +606,6 @@ msgid "Choose Target" msgstr "Trieu Destí" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Trieu un fitxer" @@ -1098,19 +1097,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrossegueu i deixeu anar fitxers des del vostre ordinador a aquesta àrea o feu clic al botó 'Examinar'." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Deixeu anar el fitxer aquí per substituir el fitxer existent" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Deixeu anar el fitxer aquí per pujar un fitxer nou" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Deixeu fitxers aquí..." @@ -2754,7 +2750,6 @@ msgid "Repeat on" msgstr "Repetiu" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substitueix el fitxer existent" diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index dd68006c65..ab6d3f5a45 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -603,7 +603,6 @@ msgid "Choose Target" msgstr "Ziel auswählen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Datei auswählen" @@ -1095,19 +1094,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Ziehen Sie Dateien von Ihrem Computer auf diesen Bereich oder drücken Sie den “Durchsuchen”-Knopf." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Datei hier ablegen um eine neue Datei hochzuladen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" @@ -2751,7 +2747,6 @@ msgid "Repeat on" msgstr "Wiederhole am" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Bestehende Datei ersetzen" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index ba03dd5bf2..c85490b44b 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -597,7 +597,6 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1089,19 +1088,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2745,7 +2741,6 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 0f5695b95e..4d1b8e9386 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -608,7 +608,6 @@ msgid "Choose Target" msgstr "Seleccione destino" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Seleccionar Archivo" @@ -1100,19 +1099,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastre y suelte los archivos desde su computador en esta área o haga clic al botón “Seleccionar”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastre aquí el archivo para reemplazar el actual" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastre aquí el archivo para añadir un nuevo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastrar archivos aquí..." @@ -2756,7 +2752,6 @@ msgid "Repeat on" msgstr "Repetir el" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sustituir el archivo actual" diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index 1d2fc5d6bb..b17c77b776 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -604,7 +604,6 @@ msgid "Choose Target" msgstr "Aukeratu helburua" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Aukeratu fitxategia" @@ -1096,19 +1095,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastatu fitxategiak hona edo erabili Arakatu botoia." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastatu fitxategia hona orain dagoena ordezkatzeko" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastatu fitxategia hona fitxategi berria kargatzeko" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastatu fitxategiak hona..." @@ -2752,7 +2748,6 @@ msgid "Repeat on" msgstr "Egun honetan errepikatu" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Ordezkatu fitxategia" diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index ee667969ee..202a7c2afd 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -608,7 +608,6 @@ msgid "Choose Target" msgstr "Valitse sisältö" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Valitse tiedosto" @@ -1100,19 +1099,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Raahaa ja pudota tiedostoja tietokoneeltasi tähän tai paina “Selaa”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Pudota tiedosto tähän korvataksesi olemassaolevan tiedoston" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Pudota tiedosto tähän ladataksesi uuden tiedoston" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Pudota tiedosto tänne... " @@ -2756,7 +2752,6 @@ msgid "Repeat on" msgstr "Toista" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Korvaa olemassaoleva tiedosto" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 48196b04c5..40eeaa1f79 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -614,7 +614,6 @@ msgid "Choose Target" msgstr "Choisir une cible" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Choisissez un fichier" @@ -1106,19 +1105,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Glisser et déposer les fichiers depuis votre ordinateur dans la zone ou cliquer sur le bouton “Explore“" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Déposez le fichier ici pour remplacer le fichier existant" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Déposez le fichier ici pour télécharger un nouveau fichier" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Déposez les fichiers ici ..." @@ -2762,7 +2758,6 @@ msgid "Repeat on" msgstr "Répétition le" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Remplacer le fichier existant" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index a96302c404..639559ba31 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -597,7 +597,6 @@ msgid "Choose Target" msgstr "Seleziona la destinazione" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Scegli un file" @@ -1089,19 +1088,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trascina in quest'area i file dal tuo computer o clicca su “Sfoglia”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Rilascia un file qui per sostituire quello esistente" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Rilascia un file qui per caricare un nuovo file" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Rilascia file qui..." @@ -2745,7 +2741,6 @@ msgid "Repeat on" msgstr "Ripeti ogni" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sostituisci file esistente" diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index a8bb1cdbed..614ea8767f 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -605,7 +605,6 @@ msgid "Choose Target" msgstr "ターゲットを選択" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "ファイルを選択" @@ -1097,19 +1096,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "ここにファイルをドラッグ、または「参照」ボタンをクリック" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "ファイルをここにドロップして、既存のファイルを置き換え" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "ファイルをここにドロップして、新しいファイルをアップロード" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "ファイルをここにドロップ" @@ -2753,7 +2749,6 @@ msgid "Repeat on" msgstr "日または曜日" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "ファイルの置き換え" diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index de13159434..ac487bae70 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -616,7 +616,6 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1108,19 +1107,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Drag en drop bestanden van uw computer naar dit gebied of klik op de “Bladeren” knop." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2764,7 +2760,6 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index fae3a6ed16..e7f3978250 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -605,7 +605,6 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1097,19 +1096,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e largue ficheiros do seu computador para esta área ou clique no botão “Procurar”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2753,7 +2749,6 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 632f5c05fc..a893eb328a 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -607,7 +607,6 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Escolha um arquivo" @@ -1099,19 +1098,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e solte arquivos do seu computador para esta área, ou clique no botão ‘Procurar’." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Solte um arquivo aqui para substituir o arquivo existente" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Solte um arquivo aqui para enviar um novo arquivo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Soltar aquivos aqui…" @@ -2755,7 +2751,6 @@ msgid "Repeat on" msgstr "Repete em" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substituir arquivo existente" diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 2ceeb7aedd..5fbdcdf086 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -597,7 +597,6 @@ msgid "Choose Target" msgstr "Alegeți ținta" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Alegeți un fișier" @@ -1089,19 +1088,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trageți și fixați fișierele de pe computer în această zonă sau faceți clic pe butonul Răsfoiește." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Trageți fișierul aici pentru a înlocui fișierul existent" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Trageți fișierul aici pentru a încărca un fișier nou" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Trageți fișierele aici..." @@ -2745,7 +2741,6 @@ msgid "Repeat on" msgstr "Repetați pe" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Înlocuiește fișierul existent" diff --git a/locales/volto.pot b/locales/volto.pot index c91ee01f0e..293977f09e 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-06-09T06:42:57.032Z\n" +"POT-Creation-Date: 2023-06-09T06:45:17.199Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -599,7 +599,6 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1091,19 +1090,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2747,7 +2743,6 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index e96f04e8fa..dce1ee7dc0 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -603,7 +603,6 @@ msgid "Choose Target" msgstr "选择目标" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "选择一个文件" @@ -1095,19 +1094,16 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "从你的电脑中拖放文件到此区域或单击 “浏览” 按钮" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "在此处放置文件以替换现有文件" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "在此处放置文件来上传新文件" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "在此处放置文件 ..." @@ -2751,7 +2747,6 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "替换现有文件" From 55fdd6223201a725a40adc57ddc3a021ee2e3b20 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 08:55:20 +0200 Subject: [PATCH 31/87] restore --- locales/ca/LC_MESSAGES/volto.po | 4 ++-- locales/de/LC_MESSAGES/volto.po | 4 ++-- locales/es/LC_MESSAGES/volto.po | 4 ++-- locales/eu/LC_MESSAGES/volto.po | 4 ++-- locales/fi/LC_MESSAGES/volto.po | 8 ++++---- locales/fr/LC_MESSAGES/volto.po | 4 ++-- locales/it/LC_MESSAGES/volto.po | 4 ++-- locales/ja/LC_MESSAGES/volto.po | 4 ++-- locales/nl/LC_MESSAGES/volto.po | 4 ++-- locales/pt/LC_MESSAGES/volto.po | 6 +++--- locales/pt_BR/LC_MESSAGES/volto.po | 4 ++-- locales/ro/LC_MESSAGES/volto.po | 4 ++-- locales/volto.pot | 6 +++--- locales/zh_CN/LC_MESSAGES/volto.po | 4 ++-- 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index 5d5c647d2d..e01b268d76 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -2522,7 +2522,7 @@ msgstr "Fundació Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Lloc de Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3184,7 +3184,7 @@ msgstr "Inicieu la sessió per iniciar la sessió" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Lloc" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index ab6d3f5a45..22c83cb8a6 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2519,7 +2519,7 @@ msgstr "Plone Foundation" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Website" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3181,7 +3181,7 @@ msgstr "Loggen Sie sich ein" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Website" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 4d1b8e9386..696ad123e6 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2524,7 +2524,7 @@ msgstr "Fundación Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Sitio Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3186,7 +3186,7 @@ msgstr "Acceda para iniciar sesión" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Sitio" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index b17c77b776..b19c9ad4de 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -2520,7 +2520,7 @@ msgstr "Plone Fundazioa" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Plone Ataria" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3182,7 +3182,7 @@ msgstr "Sartu saioa hasteko" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Ataria" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index 202a7c2afd..db09bb8f9a 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -1,9 +1,9 @@ -# +# # Translators: # Petri Savolainen , 2020 # Asko Soukka , 2020 # Rikupekka Oksanen , 2022 -# +# msgid "" msgstr "" "Project-Id-Version: Plone\n" @@ -2524,7 +2524,7 @@ msgstr "Plone-säätiön" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Plone-sivusto" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3186,7 +3186,7 @@ msgstr "Kirjaudu sisään" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Sivusto" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 40eeaa1f79..cfcd5a0af4 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2530,7 +2530,7 @@ msgstr "Fondation Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Site Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3192,7 +3192,7 @@ msgstr "Connectez-vous pour démarrer la session" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Site" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 639559ba31..64d87aadc6 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2513,7 +2513,7 @@ msgstr "Plone Foundation" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Sito Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3175,7 +3175,7 @@ msgstr "Accedi per iniziare la sessione" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Sito" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 614ea8767f..9aef53b157 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -2521,7 +2521,7 @@ msgstr "Plone Foundation" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Ploneサイト" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3183,7 +3183,7 @@ msgstr "ログインしてセッションを開始" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "サイト" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index ac487bae70..c563bf05bb 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -2532,7 +2532,7 @@ msgstr "Plone Foundation" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Plone website" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3194,7 +3194,7 @@ msgstr "" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Website" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index e7f3978250..d13105af20 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -1,6 +1,6 @@ # Translators: # Emanuel de Jesus , 2019 -# +# msgid "" msgstr "" "Project-Id-Version: Plone\n" @@ -2521,7 +2521,7 @@ msgstr "Fundação Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Sítio Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3183,7 +3183,7 @@ msgstr "Inicie a sessão" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Sítio" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index a893eb328a..899a0fa7e4 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -2523,7 +2523,7 @@ msgstr "Fundação Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Site Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3185,7 +3185,7 @@ msgstr "Faça login para iniciar a sessão" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Site" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 5fbdcdf086..30009767d5 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -2513,7 +2513,7 @@ msgstr "Fundația Plone" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Site Plone" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3175,7 +3175,7 @@ msgstr "Conectați-vă pentru a începe sesiunea" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "Site" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized diff --git a/locales/volto.pot b/locales/volto.pot index 293977f09e..1a09d382bf 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-06-09T06:45:17.199Z\n" +"POT-Creation-Date: 2023-06-02T14:22:59.421Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -39,7 +39,7 @@ msgid "Action changed" msgstr "" #: components/manage/Controlpanels/Rules/ConfigureRule -# defaultMessage: Action: +# defaultMessage: Action: msgid "Action: " msgstr "" @@ -676,7 +676,7 @@ msgid "Condition changed" msgstr "" #: components/manage/Controlpanels/Rules/ConfigureRule -# defaultMessage: Condition: +# defaultMessage: Condition: msgid "Condition: " msgstr "" diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index dce1ee7dc0..e8f5457cdd 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -2519,7 +2519,7 @@ msgstr "" #: components/theme/Logo/Logo # defaultMessage: Plone Site msgid "Plone Site" -msgstr "" +msgstr "Plone站点" #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM @@ -3181,7 +3181,7 @@ msgstr "登录以开始session会话" #: components/theme/Logo/Logo # defaultMessage: Site msgid "Site" -msgstr "" +msgstr "网站" #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized From 8001c5ffd0e3d80fd4f28199ef7a93c6f7be291b Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 09:03:58 +0200 Subject: [PATCH 32/87] restore --- locales/fi/LC_MESSAGES/volto.po | 4 ++-- locales/pt/LC_MESSAGES/volto.po | 2 +- locales/volto.pot | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index db09bb8f9a..19345cfa05 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -1,9 +1,9 @@ -# +# # Translators: # Petri Savolainen , 2020 # Asko Soukka , 2020 # Rikupekka Oksanen , 2022 -# +# msgid "" msgstr "" "Project-Id-Version: Plone\n" diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index d13105af20..b9f0a4602b 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -1,6 +1,6 @@ # Translators: # Emanuel de Jesus , 2019 -# +# msgid "" msgstr "" "Project-Id-Version: Plone\n" diff --git a/locales/volto.pot b/locales/volto.pot index 1a09d382bf..0524dad36f 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -39,7 +39,7 @@ msgid "Action changed" msgstr "" #: components/manage/Controlpanels/Rules/ConfigureRule -# defaultMessage: Action: +# defaultMessage: Action: msgid "Action: " msgstr "" @@ -676,7 +676,7 @@ msgid "Condition changed" msgstr "" #: components/manage/Controlpanels/Rules/ConfigureRule -# defaultMessage: Condition: +# defaultMessage: Condition: msgid "Condition: " msgstr "" From 7b7eb03df6678137cc0767c020fd2c34cdd411b8 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 09:05:20 +0200 Subject: [PATCH 33/87] =?UTF-8?q?whitespace=C2=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/actions/index.js b/src/actions/index.js index ace4f268e3..555e4b5812 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -168,7 +168,6 @@ export { createWorkingCopy, removeWorkingCopy, } from './workingcopy/workingcopy'; - export { getUserSchema } from './userschema/userschema'; export { getUpgradeInformation, runUpgrade } from './upgrade/upgrade'; export { getSite } from './site/site'; From 5dc2629c1193f281bfd01ccc3b1967e034bffb9e Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 09:06:03 +0200 Subject: [PATCH 34/87] changelog --- news/3537.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/news/3537.feature b/news/3537.feature index 49646ae6b8..1d506703e2 100644 --- a/news/3537.feature +++ b/news/3537.feature @@ -1,2 +1 @@ - Use the @navroot endpoint to build the title tag @erral -- Use the @site endpoint to render the site logo @erral \ No newline at end of file From f49c3a66a9a394c2bf9b64fc352f43d117b4c8a3 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 09:18:27 +0200 Subject: [PATCH 35/87] update test snapshot --- src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap index a990f45fee..dccff0889f 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap @@ -6,13 +6,13 @@ exports[`Logo renders a logo component 1`] = ` href="/" onClick={[Function]} target={null} - title="My site" + title="Site" > My site `; From 1de8d8b32ee8aa843e23b6d4fc0bd47775b940c0 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 9 Jun 2023 09:19:15 +0200 Subject: [PATCH 36/87] update test snapshot --- .../Logo/__snapshots__/Logo.Multilingual.test.jsx.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap index 7887ca0b36..2e1522ac75 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap @@ -6,13 +6,13 @@ exports[`Multilingual Logo renders a logo component with multilingual 1`] = ` href="/en" onClick={[Function]} target={null} - title="site title english" + title="Site" > site title english `; From 99dc8e15975ea90877bcfceec3f6eb04bae08050 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 10 Jun 2023 10:14:27 +0200 Subject: [PATCH 37/87] feat: provide a widget to set the logo in the Site controlpanel and render the logo with information coming from the @site endpoint --- locales/ca/LC_MESSAGES/volto.po | 15 +- locales/de/LC_MESSAGES/volto.po | 15 +- locales/en/LC_MESSAGES/volto.po | 15 +- locales/es/LC_MESSAGES/volto.po | 15 +- locales/eu/LC_MESSAGES/volto.po | 15 +- locales/fi/LC_MESSAGES/volto.po | 15 +- locales/fr/LC_MESSAGES/volto.po | 15 +- locales/it/LC_MESSAGES/volto.po | 15 +- locales/ja/LC_MESSAGES/volto.po | 15 +- locales/nl/LC_MESSAGES/volto.po | 15 +- locales/pt/LC_MESSAGES/volto.po | 15 +- locales/pt_BR/LC_MESSAGES/volto.po | 15 +- locales/ro/LC_MESSAGES/volto.po | 15 +- locales/volto.pot | 17 +- locales/zh_CN/LC_MESSAGES/volto.po | 15 +- .../manage/Widgets/SiteLogoWidget.jsx | 208 ++++++++++++++++++ src/components/theme/Logo/Logo.jsx | 59 ++--- src/config/ControlPanels.js | 1 - src/config/Widgets.jsx | 2 + src/express-middleware/images.js | 1 + 20 files changed, 319 insertions(+), 179 deletions(-) create mode 100644 src/components/manage/Widgets/SiteLogoWidget.jsx diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index e01b268d76..445e425096 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -606,6 +606,7 @@ msgid "Choose Target" msgstr "Trieu Destí" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Trieu un fitxer" @@ -1097,16 +1098,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrossegueu i deixeu anar fitxers des del vostre ordinador a aquesta àrea o feu clic al botó 'Examinar'." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Deixeu anar el fitxer aquí per substituir el fitxer existent" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Deixeu anar el fitxer aquí per pujar un fitxer nou" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Deixeu fitxers aquí..." @@ -2519,11 +2523,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundació Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Lloc de Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2750,6 +2749,7 @@ msgid "Repeat on" msgstr "Repetiu" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substitueix el fitxer existent" @@ -3181,11 +3181,6 @@ msgstr "Redueix la barra d'eines" msgid "Sign in to start session" msgstr "Inicieu la sessió per iniciar la sessió" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Lloc" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 22c83cb8a6..75b0832a5a 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -603,6 +603,7 @@ msgid "Choose Target" msgstr "Ziel auswählen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Datei auswählen" @@ -1094,16 +1095,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Ziehen Sie Dateien von Ihrem Computer auf diesen Bereich oder drücken Sie den “Durchsuchen”-Knopf." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Datei hier ablegen um eine neue Datei hochzuladen" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" @@ -2516,11 +2520,6 @@ msgstr "Bitte upgraden Sie zu plone.restapi >= 8.35.3." msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Website" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2747,6 +2746,7 @@ msgid "Repeat on" msgstr "Wiederhole am" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Bestehende Datei ersetzen" @@ -3178,11 +3178,6 @@ msgstr "Toolbar verkleinern" msgid "Sign in to start session" msgstr "Loggen Sie sich ein" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Website" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index c85490b44b..c89ab8d3b1 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2510,11 +2514,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2741,6 +2740,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3172,11 +3172,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 696ad123e6..1c35ed39b7 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -608,6 +608,7 @@ msgid "Choose Target" msgstr "Seleccione destino" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Seleccionar Archivo" @@ -1099,16 +1100,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastre y suelte los archivos desde su computador en esta área o haga clic al botón “Seleccionar”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastre aquí el archivo para reemplazar el actual" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastre aquí el archivo para añadir un nuevo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastrar archivos aquí..." @@ -2521,11 +2525,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundación Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sitio Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2752,6 +2751,7 @@ msgid "Repeat on" msgstr "Repetir el" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sustituir el archivo actual" @@ -3183,11 +3183,6 @@ msgstr "Contraer barra de herramientas" msgid "Sign in to start session" msgstr "Acceda para iniciar sesión" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sitio" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index b19c9ad4de..a2c25a9597 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -604,6 +604,7 @@ msgid "Choose Target" msgstr "Aukeratu helburua" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Aukeratu fitxategia" @@ -1095,16 +1096,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastatu fitxategiak hona edo erabili Arakatu botoia." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastatu fitxategia hona orain dagoena ordezkatzeko" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastatu fitxategia hona fitxategi berria kargatzeko" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastatu fitxategiak hona..." @@ -2517,11 +2521,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Fundazioa" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone Ataria" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2748,6 +2747,7 @@ msgid "Repeat on" msgstr "Egun honetan errepikatu" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Ordezkatu fitxategia" @@ -3179,11 +3179,6 @@ msgstr "Txikitu tresna-barra" msgid "Sign in to start session" msgstr "Sartu saioa hasteko" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Ataria" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index 19345cfa05..b18df9416d 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -608,6 +608,7 @@ msgid "Choose Target" msgstr "Valitse sisältö" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Valitse tiedosto" @@ -1099,16 +1100,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Raahaa ja pudota tiedostoja tietokoneeltasi tähän tai paina “Selaa”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Pudota tiedosto tähän korvataksesi olemassaolevan tiedoston" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Pudota tiedosto tähän ladataksesi uuden tiedoston" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Pudota tiedosto tänne... " @@ -2521,11 +2525,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone-säätiön" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone-sivusto" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2752,6 +2751,7 @@ msgid "Repeat on" msgstr "Toista" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Korvaa olemassaoleva tiedosto" @@ -3183,11 +3183,6 @@ msgstr "Kutista työkalupalkki" msgid "Sign in to start session" msgstr "Kirjaudu sisään" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sivusto" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index cfcd5a0af4..b4bdab6015 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -614,6 +614,7 @@ msgid "Choose Target" msgstr "Choisir une cible" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Choisissez un fichier" @@ -1105,16 +1106,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Glisser et déposer les fichiers depuis votre ordinateur dans la zone ou cliquer sur le bouton “Explore“" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Déposez le fichier ici pour remplacer le fichier existant" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Déposez le fichier ici pour télécharger un nouveau fichier" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Déposez les fichiers ici ..." @@ -2527,11 +2531,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fondation Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2758,6 +2757,7 @@ msgid "Repeat on" msgstr "Répétition le" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Remplacer le fichier existant" @@ -3189,11 +3189,6 @@ msgstr "Réduire la barre d'outils" msgid "Sign in to start session" msgstr "Connectez-vous pour démarrer la session" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 64d87aadc6..5286717a45 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "Seleziona la destinazione" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Scegli un file" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trascina in quest'area i file dal tuo computer o clicca su “Sfoglia”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Rilascia un file qui per sostituire quello esistente" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Rilascia un file qui per caricare un nuovo file" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Rilascia file qui..." @@ -2510,11 +2514,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sito Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2741,6 +2740,7 @@ msgid "Repeat on" msgstr "Ripeti ogni" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sostituisci file esistente" @@ -3172,11 +3172,6 @@ msgstr "Riduci la toolbar" msgid "Sign in to start session" msgstr "Accedi per iniziare la sessione" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sito" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 9aef53b157..d65c804a8f 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -605,6 +605,7 @@ msgid "Choose Target" msgstr "ターゲットを選択" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "ファイルを選択" @@ -1096,16 +1097,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "ここにファイルをドラッグ、または「参照」ボタンをクリック" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "ファイルをここにドロップして、既存のファイルを置き換え" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "ファイルをここにドロップして、新しいファイルをアップロード" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "ファイルをここにドロップ" @@ -2518,11 +2522,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Ploneサイト" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2749,6 +2748,7 @@ msgid "Repeat on" msgstr "日または曜日" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "ファイルの置き換え" @@ -3180,11 +3180,6 @@ msgstr "ツールバーを閉じる" msgid "Sign in to start session" msgstr "ログインしてセッションを開始" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "サイト" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index c563bf05bb..780cc1ed78 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -616,6 +616,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1107,16 +1108,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Drag en drop bestanden van uw computer naar dit gebied of klik op de “Bladeren” knop." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2529,11 +2533,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Plone Foundation" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone website" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2760,6 +2759,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3191,11 +3191,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Website" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index b9f0a4602b..15bfb4d878 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -605,6 +605,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1096,16 +1097,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e largue ficheiros do seu computador para esta área ou clique no botão “Procurar”." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2518,11 +2522,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundação Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Sítio Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2749,6 +2748,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3180,11 +3180,6 @@ msgstr "" msgid "Sign in to start session" msgstr "Inicie a sessão" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Sítio" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 899a0fa7e4..8fb22984dc 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -607,6 +607,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Escolha um arquivo" @@ -1098,16 +1099,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e solte arquivos do seu computador para esta área, ou clique no botão ‘Procurar’." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Solte um arquivo aqui para substituir o arquivo existente" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Solte um arquivo aqui para enviar um novo arquivo" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Soltar aquivos aqui…" @@ -2520,11 +2524,6 @@ msgstr "Por favor atualize a plone.restapi para versão 8.35.3 ou superior." msgid "Plone Foundation" msgstr "Fundação Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2751,6 +2750,7 @@ msgid "Repeat on" msgstr "Repete em" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substituir arquivo existente" @@ -3182,11 +3182,6 @@ msgstr "Recolher barra de ferramentas" msgid "Sign in to start session" msgstr "Faça login para iniciar a sessão" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 30009767d5..236a05fea7 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -597,6 +597,7 @@ msgid "Choose Target" msgstr "Alegeți ținta" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Alegeți un fișier" @@ -1088,16 +1089,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trageți și fixați fișierele de pe computer în această zonă sau faceți clic pe butonul Răsfoiește." #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Trageți fișierul aici pentru a înlocui fișierul existent" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Trageți fișierul aici pentru a încărca un fișier nou" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Trageți fișierele aici..." @@ -2510,11 +2514,6 @@ msgstr "" msgid "Plone Foundation" msgstr "Fundația Plone" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Site Plone" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2741,6 +2740,7 @@ msgid "Repeat on" msgstr "Repetați pe" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Înlocuiește fișierul existent" @@ -3172,11 +3172,6 @@ msgstr "Reduceti bara de instrumente" msgid "Sign in to start session" msgstr "Conectați-vă pentru a începe sesiunea" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "Site" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/volto.pot b/locales/volto.pot index 0524dad36f..48319aabc8 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-06-02T14:22:59.421Z\n" +"POT-Creation-Date: 2023-06-10T08:04:37.045Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -599,6 +599,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1090,16 +1091,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2512,11 +2516,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2743,6 +2742,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" @@ -3174,11 +3174,6 @@ msgstr "" msgid "Sign in to start session" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index e8f5457cdd..cd604948c4 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -603,6 +603,7 @@ msgid "Choose Target" msgstr "选择目标" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "选择一个文件" @@ -1094,16 +1095,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "从你的电脑中拖放文件到此区域或单击 “浏览” 按钮" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "在此处放置文件以替换现有文件" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "在此处放置文件来上传新文件" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "在此处放置文件 ..." @@ -2516,11 +2520,6 @@ msgstr "" msgid "Plone Foundation" msgstr "" -#: components/theme/Logo/Logo -# defaultMessage: Plone Site -msgid "Plone Site" -msgstr "Plone站点" - #: components/theme/Footer/Footer # defaultMessage: Plone{reg} Open Source CMS/WCM msgid "Plone{reg} Open Source CMS/WCM" @@ -2747,6 +2746,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget +#: components/manage/Widgets/SiteLogoWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "替换现有文件" @@ -3178,11 +3178,6 @@ msgstr "缩小工具栏" msgid "Sign in to start session" msgstr "登录以开始session会话" -#: components/theme/Logo/Logo -# defaultMessage: Site -msgid "Site" -msgstr "网站" - #: components/theme/NotFound/NotFound #: components/theme/Unauthorized/Unauthorized # defaultMessage: Site Administration diff --git a/src/components/manage/Widgets/SiteLogoWidget.jsx b/src/components/manage/Widgets/SiteLogoWidget.jsx new file mode 100644 index 0000000000..e022ad89fd --- /dev/null +++ b/src/components/manage/Widgets/SiteLogoWidget.jsx @@ -0,0 +1,208 @@ +/** + * SiteLogoWidget component. + * @module components/manage/Widgets/SiteLogoWidget + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import { Button, Image, Dimmer } from 'semantic-ui-react'; +import { readAsDataURL } from 'promise-file-reader'; +import { injectIntl } from 'react-intl'; +import deleteSVG from '@plone/volto/icons/delete.svg'; +import { Icon, FormFieldWrapper } from '@plone/volto/components'; +import loadable from '@loadable/component'; +import { defineMessages, useIntl } from 'react-intl'; +import { toPublicURL } from '@plone/volto/helpers'; + +const imageMimetypes = [ + 'image/png', + 'image/jpeg', + 'image/webp', + 'image/jpg', + 'image/gif', + 'image/svg+xml', +]; +const Dropzone = loadable(() => import('react-dropzone')); + +const messages = defineMessages({ + releaseDrag: { + id: 'Drop files here ...', + defaultMessage: 'Drop files here ...', + }, + editFile: { + id: 'Drop file here to replace the existing file', + defaultMessage: 'Drop file here to replace the existing file', + }, + fileDrag: { + id: 'Drop file here to upload a new file', + defaultMessage: 'Drop file here to upload a new file', + }, + replaceFile: { + id: 'Replace existing file', + defaultMessage: 'Replace existing file', + }, + addNewFile: { + id: 'Choose a file', + defaultMessage: 'Choose a file', + }, +}); + +/** + * SiteLogoWidget component class. + * @function SiteLogoWidget + * @returns {string} Markup of the component. + * + * To use it, in schema properties, declare a field like: + * + * ```jsx + * { + * title: "File", + * widget: 'file', + * } + * ``` + * or: + * + * ```jsx + * { + * title: "File", + * type: 'object', + * } + * ``` + * + */ +const SiteLogoWidget = (props) => { + const { id, value, onChange, isDisabled } = props; + const intl = useIntl(); + + const fileName = value?.split(';')[0]; + const imgsrc = fileName + ? `${toPublicURL('/')}@@site-logo/${atob( + fileName.replace('filenameb64:', ''), + )}` + : ''; + + /** + * Drop handler + * @method onDrop + * @param {array} files File objects + * @returns {undefined} + */ + const onDrop = (files) => { + const file = files[0]; + readAsDataURL(file).then((data) => { + const fields = data.match(/^data:(.*);(.*),(.*)$/); + onChange(id, `filenameb64:${btoa(file.name)};datab64:${fields[3]}}`); + }); + + let reader = new FileReader(); + reader.onload = function () { + const fields = reader.result.match(/^data:(.*);(.*),(.*)$/); + if (imageMimetypes.includes(fields[1])) { + let imagePreview = document.getElementById(`field-${id}-image`); + imagePreview.src = reader.result; + } + }; + reader.readAsDataURL(files[0]); + }; + + return ( + + + {({ getRootProps, getInputProps, isDragActive }) => ( +
+ {isDragActive && } + {imgsrc ? ( + + ) : ( +
+ {isDragActive ? ( +

+ {intl.formatMessage(messages.releaseDrag)} +

+ ) : value ? ( +

+ {intl.formatMessage(messages.editFile)} +

+ ) : ( +

+ {intl.formatMessage(messages.fileDrag)} +

+ )} +
+ )} + + + +
+ )} +
+
+ {value && ( + + )} +
+
+ ); +}; + +/** + * Property types. + * @property {Object} propTypes Property types. + * @static + */ +SiteLogoWidget.propTypes = { + id: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + description: PropTypes.string, + required: PropTypes.bool, + error: PropTypes.arrayOf(PropTypes.string), + value: PropTypes.shape({ + '@type': PropTypes.string, + title: PropTypes.string, + }), + onChange: PropTypes.func.isRequired, + wrapped: PropTypes.bool, +}; + +/** + * Default properties. + * @property {Object} defaultProps Default properties. + * @static + */ +SiteLogoWidget.defaultProps = { + description: null, + required: false, + error: [], + value: null, +}; + +export default injectIntl(SiteLogoWidget); diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index 1127b83918..be2ab6a98d 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -2,25 +2,14 @@ * Logo component. * @module components/theme/Logo/Logo */ - -import { defineMessages, useIntl } from 'react-intl'; +import { useEffect } from 'react'; import { Image } from 'semantic-ui-react'; -import { useSelector } from 'react-redux'; -import config from '@plone/volto/registry'; -import { UniversalLink } from '@plone/volto/components'; -import { toBackendLang } from '@plone/volto/helpers'; +import { ConditionalLink } from '@plone/volto/components'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; - -const messages = defineMessages({ - site: { - id: 'Site', - defaultMessage: 'Site', - }, - plonesite: { - id: 'Plone Site', - defaultMessage: 'Plone Site', - }, -}); +import { useSelector, useDispatch } from 'react-redux'; +import { getNavroot, getSite } from '@plone/volto/actions'; +import { flattenToAppURL } from '@plone/volto/helpers'; +import { toPublicURL } from '@plone/volto/helpers'; /** * Logo component class. @@ -29,21 +18,37 @@ const messages = defineMessages({ * @returns {string} Markup of the component. */ const Logo = () => { - const { settings } = config; - const lang = useSelector((state) => state.intl.locale); - const intl = useIntl(); + const pathname = useSelector((state) => state.router.location.pathname); + const site = useSelector((state) => state.site.data); + const navroot = useSelector((state) => state.navroot.data); + const dispatch = useDispatch(); + + useEffect(() => { + pathname && dispatch(getNavroot(pathname)); + }, [dispatch, pathname]); + + useEffect(() => { + dispatch(getSite()); + }, [dispatch]); + // remove trailing slash + const currentURL = toPublicURL(pathname).replace(/\/$/, ''); return ( - {intl.formatMessage(messages.plonesite)} - + ); }; diff --git a/src/config/ControlPanels.js b/src/config/ControlPanels.js index b0bdb7d935..2f6a763986 100644 --- a/src/config/ControlPanels.js +++ b/src/config/ControlPanels.js @@ -75,7 +75,6 @@ export const filterControlPanelsSchema = (controlpanel) => { 'toolbar_position', 'toolbar_logo', 'default_page', - 'site_logo', 'site_favicon', 'site_favicon_mimetype', 'exposeDCMetaTags', diff --git a/src/config/Widgets.jsx b/src/config/Widgets.jsx index c111cf75ae..0ae0ddce8d 100644 --- a/src/config/Widgets.jsx +++ b/src/config/Widgets.jsx @@ -24,6 +24,7 @@ import InternalUrlWidget from '@plone/volto/components/manage/Widgets/InternalUr import EmailWidget from '@plone/volto/components/manage/Widgets/EmailWidget'; import NumberWidget from '@plone/volto/components/manage/Widgets/NumberWidget'; import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget'; +import SiteLogoWidget from '@plone/volto/components/manage/Widgets/SiteLogoWidget'; import ReferenceWidget from '@plone/volto/components/manage/Widgets/ReferenceWidget'; import ObjectBrowserWidget from '@plone/volto/components/manage/Widgets/ObjectBrowserWidget'; @@ -72,6 +73,7 @@ export const widgetMapping = { recurrence: RecurrenceWidget, remoteUrl: UrlWidget, id: IdWidget, + site_logo: SiteLogoWidget, }, widget: { richtext: WysiwygWidget, diff --git a/src/express-middleware/images.js b/src/express-middleware/images.js index 2a86c203d1..515f24cb5c 100644 --- a/src/express-middleware/images.js +++ b/src/express-middleware/images.js @@ -21,6 +21,7 @@ export default function () { const middleware = express.Router(); middleware.all(['**/@@images/*'], imageMiddleware); + middleware.all(['/@@site-logo/*'], imageMiddleware); middleware.all(['/@portrait/*'], imageMiddleware); middleware.id = 'imageResourcesProcessor'; return middleware; From 877ed5339166597aec4c8c2c9ea6bbb4f66d982f Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 10 Jun 2023 10:15:09 +0200 Subject: [PATCH 38/87] changelog --- news/3537.feature | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/news/3537.feature b/news/3537.feature index 1d506703e2..e6fc8f627d 100644 --- a/news/3537.feature +++ b/news/3537.feature @@ -1 +1,5 @@ - Use the @navroot endpoint to build the title tag @erral + +- Use the @site endpoint to render the logo @erral + +- Register a widget to set the logo in the site controlpanel @erral From 28f35548b6befe2806a0eb04b2e0c297d5437467 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 14 Jun 2023 09:04:44 +0200 Subject: [PATCH 39/87] Update src/actions/navroot/navroot.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Katja Süss --- src/actions/navroot/navroot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions/navroot/navroot.js b/src/actions/navroot/navroot.js index 0b82d70a4f..c9d50c2e6d 100644 --- a/src/actions/navroot/navroot.js +++ b/src/actions/navroot/navroot.js @@ -1,9 +1,9 @@ import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; /** - * Set sidebar tab function. - * @function getSite - * @returns {Object} Get the Navroot information + * Get the navigation root information. + * @function getNavroot + * @returns {Object} navroot */ export function getNavroot(url) { return { From f0fab2c9b4e19b29007cd2d9feaa93fdaaf62818 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 14 Jun 2023 09:04:51 +0200 Subject: [PATCH 40/87] Update src/actions/site/site.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Katja Süss --- src/actions/site/site.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/site/site.js b/src/actions/site/site.js index a9228b89d1..eb4d4f6032 100644 --- a/src/actions/site/site.js +++ b/src/actions/site/site.js @@ -1,9 +1,9 @@ import { GET_SITE } from '@plone/volto/constants/ActionTypes'; /** - * Set sidebar tab function. + * Get the Site information. * @function getSite - * @returns {Object} Get the Site information + * @returns {Object} site info */ export function getSite() { return { From 0d6d4ec218567a57d96ebb1ddc704096082a7594 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 14 Jun 2023 09:46:35 +0200 Subject: [PATCH 41/87] allow configuring the site title --- .../ContentMetadataTags.jsx | 26 ++++++++++++++----- src/components/theme/View/View.jsx | 1 + src/config/index.js | 4 +++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index b09b342e11..3a450c3211 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -45,16 +45,28 @@ const ContentMetadataTags = (props) => { const contentImageInfo = getContentImageInfo(); - let title_tag_content = seo_title || title; - let nav_root_title = props.content['@components']?.navroot?.navroot?.title; - title_tag_content = - (nav_root_title === title_tag_content && title_tag_content) || - title_tag_content + ' — ' + nav_root_title; - title_tag_content = title_tag_content.replace(/\u00AD/g, ''); + const getTitle = () => { + const includeSiteTitle = + config?.settings?.siteTitleFormat?.includeSiteTitle || false; + const titleAndSiteTitleSeparator = + config?.settings?.titleAndSiteTitleSeparator || '-'; + + const navRootTitle = props.content['@components']?.navroot?.navroot?.title; + const siteRootTitle = + props.content['@components']?.site?.['plone.site_logo']; + const titlePart = navRootTitle || siteRootTitle; + + if (includeSiteTitle && titlePart && titlePart !== title) { + return seo_title || `${title} ${titleAndSiteTitleSeparator} ${titlePart}`; + } else { + return seo_title || title; + } + }; + return ( <> - {title_tag_content} + {getTitle()?.replace(/\u00AD/g, '')} Date: Wed, 14 Jun 2023 15:06:49 +0200 Subject: [PATCH 42/87] fix attribute name --- .../theme/ContentMetadataTags/ContentMetadataTags.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 3a450c3211..5f4c59b62f 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -53,7 +53,7 @@ const ContentMetadataTags = (props) => { const navRootTitle = props.content['@components']?.navroot?.navroot?.title; const siteRootTitle = - props.content['@components']?.site?.['plone.site_logo']; + props.content['@components']?.site?.['plone.site_title']; const titlePart = navRootTitle || siteRootTitle; if (includeSiteTitle && titlePart && titlePart !== title) { From 6cc6044f7331613af6f5ea8d75f18e2975136018 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Mon, 19 Jun 2023 19:51:06 +0200 Subject: [PATCH 43/87] use hasApiExpander to query site and navroot --- src/actions/content/content.js | 4 +--- .../ContentMetadataTags.jsx | 10 ++++---- src/components/theme/View/View.jsx | 24 +++++++++++++++++-- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/actions/content/content.js b/src/actions/content/content.js index 889f1001b4..145a3a031f 100644 --- a/src/actions/content/content.js +++ b/src/actions/content/content.js @@ -150,9 +150,7 @@ export function getContent( b_size: settings.defaultPageSize, } : {}, - settings.isMultilingual - ? { expand: 'translations,navroot' } - : { expand: 'navroot' }, + settings.isMultilingual ? { expand: 'translations' } : {}, ); let qs = Object.keys(query) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 5f4c59b62f..4bf6ac2931 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -13,6 +13,10 @@ const ContentMetadataTags = (props) => { title, description, } = props.content; + const navroot = props.navroot; + const site = props.site; + console.log('site', site); + console.log('navroot', navroot); const getContentImageInfo = () => { const { contentMetadataTagsImageField } = config.settings; @@ -50,10 +54,8 @@ const ContentMetadataTags = (props) => { config?.settings?.siteTitleFormat?.includeSiteTitle || false; const titleAndSiteTitleSeparator = config?.settings?.titleAndSiteTitleSeparator || '-'; - - const navRootTitle = props.content['@components']?.navroot?.navroot?.title; - const siteRootTitle = - props.content['@components']?.site?.['plone.site_title']; + const navRootTitle = props.navroot?.navroot?.title; + const siteRootTitle = props?.['plone.site_title']; const titlePart = navRootTitle || siteRootTitle; if (includeSiteTitle && titlePart && titlePart !== title) { diff --git a/src/components/theme/View/View.jsx b/src/components/theme/View/View.jsx index 1aa8f4ad57..1ab9b2c986 100644 --- a/src/components/theme/View/View.jsx +++ b/src/components/theme/View/View.jsx @@ -18,7 +18,12 @@ import { Tags, Toolbar, } from '@plone/volto/components'; -import { listActions, getContent } from '@plone/volto/actions'; +import { + listActions, + getContent, + getSite, + getNavroot, +} from '@plone/volto/actions'; import { BodyClass, getBaseUrl, @@ -123,6 +128,13 @@ class View extends Component { if (!hasApiExpander('actions', getBaseUrl(this.props.pathname))) { this.props.listActions(getBaseUrl(this.props.pathname)); } + if (!hasApiExpander('site', getBaseUrl(this.props.pathname))) { + this.props.getSite(getBaseUrl(this.props.pathname)); + } + if (!hasApiExpander('navroot', getBaseUrl(this.props.pathname))) { + this.props.getNavroot(getBaseUrl(this.props.pathname)); + } + this.props.getContent( getBaseUrl(this.props.pathname), this.props.versionId, @@ -234,7 +246,11 @@ class View extends Component { return (
- + {/* Body class if displayName in component is set */} Date: Mon, 19 Jun 2023 19:53:01 +0200 Subject: [PATCH 44/87] validate file size --- src/components/manage/Widgets/SiteLogoWidget.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/manage/Widgets/SiteLogoWidget.jsx b/src/components/manage/Widgets/SiteLogoWidget.jsx index e022ad89fd..ff26bbc40d 100644 --- a/src/components/manage/Widgets/SiteLogoWidget.jsx +++ b/src/components/manage/Widgets/SiteLogoWidget.jsx @@ -12,7 +12,7 @@ import deleteSVG from '@plone/volto/icons/delete.svg'; import { Icon, FormFieldWrapper } from '@plone/volto/components'; import loadable from '@loadable/component'; import { defineMessages, useIntl } from 'react-intl'; -import { toPublicURL } from '@plone/volto/helpers'; +import { toPublicURL, validateFileUploadSize } from '@plone/volto/helpers'; const imageMimetypes = [ 'image/png', @@ -89,6 +89,8 @@ const SiteLogoWidget = (props) => { */ const onDrop = (files) => { const file = files[0]; + if (!validateFileUploadSize(file, intl.formatMessage)) return; + readAsDataURL(file).then((data) => { const fields = data.match(/^data:(.*);(.*),(.*)$/); onChange(id, `filenameb64:${btoa(file.name)};datab64:${fields[3]}}`); From a85f50cd8a681373c49837271ae4c5674e0a4666 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Mon, 19 Jun 2023 19:54:54 +0200 Subject: [PATCH 45/87] remove unneeded code --- .../theme/ContentMetadataTags/ContentMetadataTags.jsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 4bf6ac2931..64791dbc6f 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -13,10 +13,6 @@ const ContentMetadataTags = (props) => { title, description, } = props.content; - const navroot = props.navroot; - const site = props.site; - console.log('site', site); - console.log('navroot', navroot); const getContentImageInfo = () => { const { contentMetadataTagsImageField } = config.settings; From 81285b61be58837dac26e8f5ff496caca786ca4f Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Tue, 20 Jun 2023 10:29:36 +0200 Subject: [PATCH 46/87] Upgrade p.restapi to support @site and @navroot endpoints --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a094073869..bce4da6102 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ MAKEFLAGS+=--no-builtin-rules INSTANCE_PORT=8080 DOCKER_IMAGE=plone/server-dev:6.0.5 DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:6.0.5 -KGS= +KGS=plone.restapi==8.40.0 NODEBIN = ./node_modules/.bin SCRIPTSPACKAGE = ./packages/scripts From 2b3adb1a260dfb700b19bbfae24e5e4c54a85f1d Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 10:01:38 +0200 Subject: [PATCH 47/87] feat: rework the usage of navroot, obeying config.settings.apiExpanders --- .../ContentMetadataTags.jsx | 25 +++++++++-- .../theme/SearchWidget/SearchWidget.jsx | 20 ++++++--- src/components/theme/View/View.jsx | 23 +--------- src/reducers/navroot/navroot.js | 45 +++++++++++++++---- 4 files changed, 74 insertions(+), 39 deletions(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index 64791dbc6f..bf51437b9e 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -1,6 +1,13 @@ -import React from 'react'; -import { toPublicURL, Helmet } from '@plone/volto/helpers'; +import React, { useEffect } from 'react'; +import { + toPublicURL, + Helmet, + hasApiExpander, + getBaseUrl, +} from '@plone/volto/helpers'; +import { getNavroot, getSite } from '@plone/volto/actions'; import config from '@plone/volto/registry'; +import { useDispatch, useSelector } from 'react-redux'; const ContentMetadataTags = (props) => { const { @@ -14,6 +21,16 @@ const ContentMetadataTags = (props) => { description, } = props.content; + const dispatch = useDispatch(); + const pathname = useSelector((state) => state.router.location.pathname); + const navroot = useSelector((state) => state.navroot?.data?.navroot); + const site = useSelector((state) => state.site?.data); + + useEffect(() => { + pathname && dispatch(getNavroot(getBaseUrl(pathname))); + pathname && dispatch(getSite(getBaseUrl(pathname))); + }, [dispatch, pathname]); + const getContentImageInfo = () => { const { contentMetadataTagsImageField } = config.settings; const image = props.content[contentMetadataTagsImageField]; @@ -50,8 +67,8 @@ const ContentMetadataTags = (props) => { config?.settings?.siteTitleFormat?.includeSiteTitle || false; const titleAndSiteTitleSeparator = config?.settings?.titleAndSiteTitleSeparator || '-'; - const navRootTitle = props.navroot?.navroot?.title; - const siteRootTitle = props?.['plone.site_title']; + const navRootTitle = navroot?.title; + const siteRootTitle = site?.['plone.site_title']; const titlePart = navRootTitle || siteRootTitle; if (includeSiteTitle && titlePart && titlePart !== title) { diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 416e67fedd..b163b2fb52 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -6,10 +6,12 @@ import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import { Form, Input } from 'semantic-ui-react'; -import { compose } from 'redux'; +import { bindActionCreators, compose } from 'redux'; +import { connect } from 'react-redux'; import { PropTypes } from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; +import { getNavroot } from '@plone/volto/actions'; import { Icon } from '@plone/volto/components'; import zoomSVG from '@plone/volto/icons/zoom.svg'; @@ -96,10 +98,7 @@ class SearchWidget extends Component { render() { return ( @@ -122,4 +121,13 @@ class SearchWidget extends Component { } } -export default compose(withRouter, injectIntl)(SearchWidget); +export default compose( + withRouter, + injectIntl, + connect( + (state) => ({ + navroot: state.navroot.data, + }), + { getNavroot }, + ), +)(SearchWidget); diff --git a/src/components/theme/View/View.jsx b/src/components/theme/View/View.jsx index 1ab9b2c986..e836e452ab 100644 --- a/src/components/theme/View/View.jsx +++ b/src/components/theme/View/View.jsx @@ -18,12 +18,7 @@ import { Tags, Toolbar, } from '@plone/volto/components'; -import { - listActions, - getContent, - getSite, - getNavroot, -} from '@plone/volto/actions'; +import { listActions, getContent } from '@plone/volto/actions'; import { BodyClass, getBaseUrl, @@ -128,12 +123,6 @@ class View extends Component { if (!hasApiExpander('actions', getBaseUrl(this.props.pathname))) { this.props.listActions(getBaseUrl(this.props.pathname)); } - if (!hasApiExpander('site', getBaseUrl(this.props.pathname))) { - this.props.getSite(getBaseUrl(this.props.pathname)); - } - if (!hasApiExpander('navroot', getBaseUrl(this.props.pathname))) { - this.props.getNavroot(getBaseUrl(this.props.pathname)); - } this.props.getContent( getBaseUrl(this.props.pathname), @@ -246,11 +235,7 @@ class View extends Component { return (
- + {/* Body class if displayName in component is set */} Date: Sat, 1 Jul 2023 10:19:02 +0200 Subject: [PATCH 48/87] remove unused --- src/components/theme/SearchWidget/SearchWidget.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index b163b2fb52..03fbfe0900 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -6,7 +6,7 @@ import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import { Form, Input } from 'semantic-ui-react'; -import { bindActionCreators, compose } from 'redux'; +import { compose } from 'redux'; import { connect } from 'react-redux'; import { PropTypes } from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; From 0a00e881ec30a0fa26ab6914fe0b7d160c70cd81 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 10:44:18 +0200 Subject: [PATCH 49/87] where possible make just one call --- .../theme/ContentMetadataTags/ContentMetadataTags.jsx | 7 ++++--- src/components/theme/SearchWidget/SearchWidget.jsx | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx index bf51437b9e..70aa549b6c 100644 --- a/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +++ b/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx @@ -5,7 +5,7 @@ import { hasApiExpander, getBaseUrl, } from '@plone/volto/helpers'; -import { getNavroot, getSite } from '@plone/volto/actions'; +import { getNavroot } from '@plone/volto/actions'; import config from '@plone/volto/registry'; import { useDispatch, useSelector } from 'react-redux'; @@ -27,8 +27,9 @@ const ContentMetadataTags = (props) => { const site = useSelector((state) => state.site?.data); useEffect(() => { - pathname && dispatch(getNavroot(getBaseUrl(pathname))); - pathname && dispatch(getSite(getBaseUrl(pathname))); + if (pathname && !hasApiExpander('navroot', getBaseUrl(pathname))) { + dispatch(getNavroot(getBaseUrl(pathname))); + } }, [dispatch, pathname]); const getContentImageInfo = () => { diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 03fbfe0900..87413c8d65 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -12,6 +12,7 @@ import { PropTypes } from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import { getNavroot } from '@plone/volto/actions'; +import { hasApiExpander, getBaseUrl } from '@plone/volto/helpers'; import { Icon } from '@plone/volto/components'; import zoomSVG from '@plone/volto/icons/zoom.svg'; @@ -90,6 +91,12 @@ class SearchWidget extends Component { event.preventDefault(); } + UNSAFE_componentWillReceiveProps() { + if (!hasApiExpander('navroot', getBaseUrl(this.props.pathname))) { + this.props.getNavroot(getBaseUrl(this.props.pathname)); + } + } + /** * Render method. * @method render From 3d61c73b7f4511c05eb8ab0ca005762638671d05 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 10:44:41 +0200 Subject: [PATCH 50/87] make one call where possible --- src/components/theme/Logo/Logo.jsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index be2ab6a98d..aa29762582 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -7,9 +7,13 @@ import { Image } from 'semantic-ui-react'; import { ConditionalLink } from '@plone/volto/components'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; import { useSelector, useDispatch } from 'react-redux'; -import { getNavroot, getSite } from '@plone/volto/actions'; -import { flattenToAppURL } from '@plone/volto/helpers'; -import { toPublicURL } from '@plone/volto/helpers'; +import { getNavroot } from '@plone/volto/actions'; +import { + flattenToAppURL, + hasApiExpander, + getBaseUrl, + toPublicURL, +} from '@plone/volto/helpers'; /** * Logo component class. @@ -24,15 +28,14 @@ const Logo = () => { const dispatch = useDispatch(); useEffect(() => { - pathname && dispatch(getNavroot(pathname)); + if (pathname && !hasApiExpander('navroot', getBaseUrl(pathname))) { + dispatch(getNavroot(getBaseUrl(pathname))); + } }, [dispatch, pathname]); - useEffect(() => { - dispatch(getSite()); - }, [dispatch]); - // remove trailing slash const currentURL = toPublicURL(pathname).replace(/\/$/, ''); + return ( Date: Sat, 1 Jul 2023 10:45:28 +0200 Subject: [PATCH 51/87] register an asyncPropExtender to load site settings on SSR --- src/config/index.js | 4 +++- src/helpers/Site/index.js | 21 +++++++++++++++++++++ src/helpers/index.js | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/helpers/Site/index.js diff --git a/src/config/index.js b/src/config/index.js index b84bfbb7ac..1bcc7720ad 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -37,6 +37,8 @@ import applyAddonConfiguration, { addonsInfo } from 'load-volto-addons'; import ConfigRegistry from '@plone/volto/registry'; +import { getSiteAsyncPropExtender } from '@plone/volto/helpers'; + const host = process.env.HOST || 'localhost'; const port = process.env.PORT || '3000'; @@ -125,7 +127,7 @@ let config = { useEmailAsLogin: false, persistentReducers: ['blocksClipboard'], initialReducersBlacklist: [], // reducers in this list won't be hydrated in windows.__data - asyncPropsExtenders: [], // per route asyncConnect customizers + asyncPropsExtenders: [getSiteAsyncPropExtender], // per route asyncConnect customizers contentIcons: contentIcons, loadables, lazyBundles: { diff --git a/src/helpers/Site/index.js b/src/helpers/Site/index.js new file mode 100644 index 0000000000..9cc76ab746 --- /dev/null +++ b/src/helpers/Site/index.js @@ -0,0 +1,21 @@ +import { GET_SITE } from '@plone/volto/constants/ActionTypes'; +import { getSite } from '@plone/volto/actions'; + +const getSiteAsyncPropExtender = { + path: '/', + extend: (dispatchActions) => { + if ( + dispatchActions.filter((asyncAction) => asyncAction.key === GET_SITE) + .length === 0 + ) { + dispatchActions.push({ + key: GET_SITE, + promise: ({ location, store: { dispatch } }) => + __SERVER__ && dispatch(getSite()), + }); + } + return dispatchActions; + }, +}; + +export { getSiteAsyncPropExtender }; diff --git a/src/helpers/index.js b/src/helpers/index.js index 1a05433740..66136ccaa7 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -118,3 +118,4 @@ export { getCurrentStateMapping, getWorkflowOptions, } from './Workflows/Workflows'; +export { getSiteAsyncPropExtender } from './Site'; From 02420ccdb01c5eb40734ed87fa84a8333e5de992 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 10:46:51 +0200 Subject: [PATCH 52/87] tests for actions --- src/actions/navroot/navroot.test.js | 15 +++++++++++++++ src/actions/site/site.test.js | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/actions/navroot/navroot.test.js create mode 100644 src/actions/site/site.test.js diff --git a/src/actions/navroot/navroot.test.js b/src/actions/navroot/navroot.test.js new file mode 100644 index 0000000000..7d9cb606e4 --- /dev/null +++ b/src/actions/navroot/navroot.test.js @@ -0,0 +1,15 @@ +import { getNavroot } from './navroot'; +import { GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; + +describe('Breadcrumbs action', () => { + describe('getBreadcrumbs', () => { + it('should create an action to get the breadcrumbs', () => { + const url = 'http://localhost'; + const action = getNavroot(url); + + expect(action.type).toEqual(GET_NAVROOT); + expect(action.request.op).toEqual('get'); + expect(action.request.path).toEqual(`${url}/@navroot`); + }); + }); +}); diff --git a/src/actions/site/site.test.js b/src/actions/site/site.test.js new file mode 100644 index 0000000000..fdd3b8f9ae --- /dev/null +++ b/src/actions/site/site.test.js @@ -0,0 +1,15 @@ +import { getSite } from './site'; +import { GET_SITE } from '@plone/volto/constants/ActionTypes'; + +describe('Breadcrumbs action', () => { + describe('getBreadcrumbs', () => { + it('should create an action to get the breadcrumbs', () => { + const url = 'http://localhost'; + const action = getSite(url); + + expect(action.type).toEqual(GET_SITE); + expect(action.request.op).toEqual('get'); + expect(action.request.path).toEqual(`${url}/@site`); + }); + }); +}); From 77b07382720ab4e25d5e62cd0bfc824329d89dff Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 10:59:16 +0200 Subject: [PATCH 53/87] tests --- src/reducers/navroot/navroot.test.js | 110 +++++++++++++++++++++++++++ src/reducers/site/site.test.js | 78 +++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 src/reducers/navroot/navroot.test.js create mode 100644 src/reducers/site/site.test.js diff --git a/src/reducers/navroot/navroot.test.js b/src/reducers/navroot/navroot.test.js new file mode 100644 index 0000000000..6fd0236360 --- /dev/null +++ b/src/reducers/navroot/navroot.test.js @@ -0,0 +1,110 @@ +import { GET_CONTENT, GET_NAVROOT } from '@plone/volto/constants/ActionTypes'; +import config from '@plone/volto/registry'; +import navroot from './navroot'; + +const { settings } = config; + +describe('Navroot reducer', () => { + it('should return the initial state', () => { + expect(navroot()).toEqual({ + error: null, + data: {}, + loaded: false, + loading: false, + }); + }); + + it('should handle GET_NAVROOT_PENDING', () => { + expect( + navroot(undefined, { + type: `${GET_NAVROOT}_PENDING`, + }), + ).toEqual({ + error: null, + data: {}, + loaded: false, + loading: true, + }); + }); + + it('should handle GET_NAVROOT_SUCCESS', () => { + expect( + navroot(undefined, { + type: `${GET_NAVROOT}_SUCCESS`, + result: { + title: 'Welcome to Plone!', + description: + 'Congratulations! You have successfully installed Plone.', + '@id': `${settings.apiPath}/front-page`, + }, + }), + ).toEqual({ + error: null, + data: { + '@id': `${settings.apiPath}/front-page`, + title: 'Welcome to Plone!', + description: 'Congratulations! You have successfully installed Plone.', + }, + + loaded: true, + loading: false, + }); + }); + + it('should handle GET_NAVROOT_FAIL', () => { + expect( + navroot(undefined, { + type: `${GET_NAVROOT}_FAIL`, + error: 'failed', + }), + ).toEqual({ + error: undefined, + data: {}, + loaded: false, + loading: false, + }); + }); +}); + +describe('Navroot reducer (NAVROOT)GET_CONTENT', () => { + beforeEach(() => { + config.settings.apiExpanders = [ + { + match: '', + GET_CONTENT: ['navroot'], + }, + ]; + }); + + it('should handle (NAVROOT)GET_CONTENT_SUCCESS', () => { + expect( + navroot(undefined, { + type: `${GET_CONTENT}_SUCCESS`, + result: { + '@components': { + navroot: { + navroot: { + title: 'Welcome to Plone!', + description: + 'Congratulations! You have successfully installed Plone.', + '@id': `${settings.apiPath}/front-page`, + }, + }, + }, + }, + }), + ).toEqual({ + error: null, + data: { + navroot: { + '@id': `${settings.apiPath}/front-page`, + title: 'Welcome to Plone!', + description: + 'Congratulations! You have successfully installed Plone.', + }, + }, + loaded: true, + loading: false, + }); + }); +}); diff --git a/src/reducers/site/site.test.js b/src/reducers/site/site.test.js new file mode 100644 index 0000000000..2c6d109d4b --- /dev/null +++ b/src/reducers/site/site.test.js @@ -0,0 +1,78 @@ +import { GET_CONTENT, GET_SITE } from '@plone/volto/constants/ActionTypes'; +import config from '@plone/volto/registry'; +import site from './site'; + +const { settings } = config; + +describe('Site reducer', () => { + it('should return the initial state', () => { + expect(site()).toEqual({ + error: null, + data: {}, + loaded: false, + loading: false, + }); + }); + + it('should handle GET_SITE_PENDING', () => { + expect( + site(undefined, { + type: `${GET_SITE}_PENDING`, + }), + ).toEqual({ + error: null, + data: {}, + loaded: false, + loading: true, + }); + }); + + it('should handle GET_SITE_SUCCESS', () => { + expect( + site(undefined, { + type: `${GET_SITE}_SUCCESS`, + result: { + title: 'Welcome to Plone!', + description: + 'Congratulations! You have successfully installed Plone.', + '@id': `${settings.apiPath}/front-page`, + }, + }), + ).toEqual({ + error: null, + data: { + '@id': `${settings.apiPath}/front-page`, + title: 'Welcome to Plone!', + description: 'Congratulations! You have successfully installed Plone.', + }, + + loaded: true, + loading: false, + }); + }); + + it('should handle GET_SITE_FAIL', () => { + expect( + site(undefined, { + type: `${GET_SITE}_FAIL`, + error: 'failed', + }), + ).toEqual({ + error: undefined, + data: {}, + loaded: false, + loading: false, + }); + }); +}); + +describe('Navroot reducer (NAVROOT)GET_CONTENT', () => { + beforeEach(() => { + config.settings.apiExpanders = [ + { + match: '', + GET_CONTENT: ['navroot'], + }, + ]; + }); +}); From 6c74367ab365d2c4f0c93c8d41487afab8fc7878 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 11:17:18 +0200 Subject: [PATCH 54/87] fix --- src/express-middleware/images.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/express-middleware/images.js b/src/express-middleware/images.js index 5b1bfed0db..96db0c836a 100644 --- a/src/express-middleware/images.js +++ b/src/express-middleware/images.js @@ -20,9 +20,9 @@ function imageMiddlewareFn(req, res, next) { export default function imagesMiddleware() { const middleware = express.Router(); - middleware.all(['**/@@images/*'], imageMiddleware); - middleware.all(['/@portrait/*'], imageMiddleware); - middleware.all(['/@@site-logo/*'], imageMiddleware); + middleware.all(['**/@@images/*'], imageMiddlewareFn); + middleware.all(['/@portrait/*'], imageMiddlewareFn); + middleware.all(['/@@site-logo/*'], imageMiddlewareFn); middleware.id = 'imageResourcesProcessor'; return middleware; } From 5671dfea4be27f619e28776b04a8b3dbf320412d Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 11:18:30 +0200 Subject: [PATCH 55/87] fixes --- src/reducers/navroot/navroot.js | 5 ++--- src/reducers/site/site.js | 4 ++-- src/reducers/site/site.test.js | 13 +------------ 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/reducers/navroot/navroot.js b/src/reducers/navroot/navroot.js index e0eced7ad9..5da33328b5 100644 --- a/src/reducers/navroot/navroot.js +++ b/src/reducers/navroot/navroot.js @@ -1,8 +1,7 @@ /** - * Toolbar reducer. - * @module reducers/toolbar/toolbar + * Navroot reducer. + * @module reducers/navroot/navroot */ -import { map } from 'lodash'; import { flattenToAppURL, getBaseUrl, diff --git a/src/reducers/site/site.js b/src/reducers/site/site.js index 6a4c4ed697..05c1a1480f 100644 --- a/src/reducers/site/site.js +++ b/src/reducers/site/site.js @@ -1,6 +1,6 @@ /** - * Toolbar reducer. - * @module reducers/toolbar/toolbar + * Site reducer. + * @module reducers/site/site */ import { GET_SITE } from '@plone/volto/constants/ActionTypes'; diff --git a/src/reducers/site/site.test.js b/src/reducers/site/site.test.js index 2c6d109d4b..1ca7b46635 100644 --- a/src/reducers/site/site.test.js +++ b/src/reducers/site/site.test.js @@ -1,4 +1,4 @@ -import { GET_CONTENT, GET_SITE } from '@plone/volto/constants/ActionTypes'; +import { GET_SITE } from '@plone/volto/constants/ActionTypes'; import config from '@plone/volto/registry'; import site from './site'; @@ -65,14 +65,3 @@ describe('Site reducer', () => { }); }); }); - -describe('Navroot reducer (NAVROOT)GET_CONTENT', () => { - beforeEach(() => { - config.settings.apiExpanders = [ - { - match: '', - GET_CONTENT: ['navroot'], - }, - ]; - }); -}); From c5bb6cbcab5c1aa901619ec954464c6ace29cfaf Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sat, 1 Jul 2023 11:47:26 +0200 Subject: [PATCH 56/87] fix test --- src/actions/site/site.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/site/site.test.js b/src/actions/site/site.test.js index fdd3b8f9ae..4c53cc65bc 100644 --- a/src/actions/site/site.test.js +++ b/src/actions/site/site.test.js @@ -1,15 +1,15 @@ import { getSite } from './site'; import { GET_SITE } from '@plone/volto/constants/ActionTypes'; -describe('Breadcrumbs action', () => { - describe('getBreadcrumbs', () => { - it('should create an action to get the breadcrumbs', () => { +describe('Site action', () => { + describe('getSite', () => { + it('should create an action to get the site config', () => { const url = 'http://localhost'; const action = getSite(url); expect(action.type).toEqual(GET_SITE); expect(action.request.op).toEqual('get'); - expect(action.request.path).toEqual(`${url}/@site`); + expect(action.request.path).toEqual(`/@site`); }); }); }); From a1ed66b5f213fe2f3d50ade1621c5d53c45bbfd2 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 09:47:32 +0200 Subject: [PATCH 57/87] update Logo component tests --- .../theme/Logo/Logo.Multilingual.test.jsx | 93 +++++++++++- src/components/theme/Logo/Logo.jsx | 1 - src/components/theme/Logo/Logo.test.jsx | 136 +++++++++++++++++- .../Logo.Multilingual.test.jsx.snap | 44 +++++- .../Logo/__snapshots__/Logo.test.jsx.snap | 41 +++++- 5 files changed, 304 insertions(+), 11 deletions(-) diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index ba1949b135..51b617c640 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -9,17 +9,108 @@ import Logo from './Logo'; beforeAll(() => { config.settings.isMultilingual = true; + config.settings.publicURL = 'http://mysite.com'; }); const mockStore = configureStore(); describe('Multilingual Logo', () => { - it('renders a logo component with multilingual', () => { + it('renders a logo component in a multilingual site root', () => { const store = mockStore({ intl: { locale: 'en', messages: {}, }, + navroot: { + data: { + id: 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + title: 'Plone Site', + }, + }, + }, + router: { + location: { + pathname: '/', + }, + }, + site: { + data: {}, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); + it('renders a logo component in a multilingual site language root', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/en/@navroot', + navroot: { + '@id': 'http://localhost:3000/en', + title: 'English', + }, + }, + }, + router: { + location: { + pathname: '/en', + }, + }, + site: { + data: { + 'plone.site_title': 'Plone Site', + }, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); + it('renders a logo component with a custom logo in a non-root url', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/en/@navroot', + navroot: { + '@id': 'http://localhost:3000/en', + title: 'English', + }, + }, + }, + router: { + location: { + pathname: '/en', + }, + }, + site: { + data: { + 'plone.site_logo': + 'http://localhost:3000/@@site-logo/logo.cab945d8.svg', + }, + }, }); const component = renderer.create( diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index aa29762582..ddb2253d2b 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -35,7 +35,6 @@ const Logo = () => { // remove trailing slash const currentURL = toPublicURL(pathname).replace(/\/$/, ''); - return ( { + config.settings.publicURL = 'http://localhost:3000'; +}); + describe('Logo', () => { - it('renders a logo component', () => { + it('renders a logo component with default config', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + title: 'Plone Site', + }, + }, + }, + router: { + location: { + pathname: '/', + }, + }, + site: { + data: {}, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); + it('renders a logo component with a custom logo', () => { const store = mockStore({ intl: { locale: 'en', messages: {}, }, + navroot: { + data: { + id: 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + title: 'Plone Site', + }, + }, + }, + router: { + location: { + pathname: '/', + }, + }, + site: { + data: { + 'plone.site_logo': + 'http://localhost:3000/@@site-logo/logo.cab945d8.svg', + }, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); + it('renders a logo component with default config in a non-root url', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + title: 'Plone Site', + }, + }, + }, + router: { + location: { + pathname: '/some-page', + }, + }, + site: { + data: { + 'plone.site_logo': + 'http://localhost:3000/@@site-logo/logo.cab945d8.svg', + }, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); + it('renders a logo component with a custom logo in a non-root url', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + title: 'Plone Site', + }, + }, + }, + router: { + location: { + pathname: '/some-page', + }, + }, + site: { + data: { + 'plone.site_logo': + 'http://localhost:3000/@@site-logo/logo.cab945d8.svg', + }, + }, }); const component = renderer.create( diff --git a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap index 2e1522ac75..8ac8293380 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap @@ -1,12 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Multilingual Logo renders a logo component with multilingual 1`] = ` +exports[`Multilingual Logo renders a logo component in a multilingual site language root 1`] = ` + English + +`; + +exports[`Multilingual Logo renders a logo component in a multilingual site root 1`] = ` + Plone Site `; + +exports[`Multilingual Logo renders a logo component with a custom logo in a non-root url 1`] = ` + + English + +`; diff --git a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap index dccff0889f..dfe8409855 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap @@ -1,17 +1,52 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Logo renders a logo component 1`] = ` +exports[`Logo renders a logo component with a custom logo 1`] = ` +Plone Site +`; + +exports[`Logo renders a logo component with a custom logo in a non-root url 1`] = ` + + Plone Site + +`; + +exports[`Logo renders a logo component with default config 1`] = ` +Plone Site +`; + +exports[`Logo renders a logo component with default config in a non-root url 1`] = ` Plone Site From 45f516d321282fdc4856f5797db84a6bdf105c69 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 10:05:36 +0200 Subject: [PATCH 58/87] update tests --- src/components/theme/SearchWidget/SearchWidget.test.jsx | 8 ++++++++ .../SearchWidget/__snapshots__/SearchWidget.test.jsx.snap | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.test.jsx b/src/components/theme/SearchWidget/SearchWidget.test.jsx index 515d9abbdd..34ad75d3da 100644 --- a/src/components/theme/SearchWidget/SearchWidget.test.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.test.jsx @@ -15,6 +15,14 @@ describe('SearchWidget', () => { locale: 'en', messages: {}, }, + navroot: { + data: { + '@id': 'http://localhost:3000/@navroot', + navroot: { + '@id': 'http://localhost:3000', + }, + }, + }, }); const component = renderer.create( diff --git a/src/components/theme/SearchWidget/__snapshots__/SearchWidget.test.jsx.snap b/src/components/theme/SearchWidget/__snapshots__/SearchWidget.test.jsx.snap index 5734af70ab..3861e4b6f7 100644 --- a/src/components/theme/SearchWidget/__snapshots__/SearchWidget.test.jsx.snap +++ b/src/components/theme/SearchWidget/__snapshots__/SearchWidget.test.jsx.snap @@ -2,7 +2,7 @@ exports[`SearchWidget renders a search widget component 1`] = ` From d9388649cf7935c4a004abba4e5ae5a6c6dc7962 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 10:08:35 +0200 Subject: [PATCH 59/87] use componentDidMount --- src/components/theme/SearchWidget/SearchWidget.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 87413c8d65..ab2721f92d 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -91,7 +91,7 @@ class SearchWidget extends Component { event.preventDefault(); } - UNSAFE_componentWillReceiveProps() { + componentDidMount() { if (!hasApiExpander('navroot', getBaseUrl(this.props.pathname))) { this.props.getNavroot(getBaseUrl(this.props.pathname)); } From 1af9aaa46c7359a013fc83e3d67da7fb5983320f Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 10:13:19 +0200 Subject: [PATCH 60/87] rename widget --- ...iteLogoWidget.jsx => RegistryImageWidget.jsx} | 16 ++++++++-------- src/config/Widgets.jsx | 4 ++-- src/config/index.js | 8 +++++++- 3 files changed, 17 insertions(+), 11 deletions(-) rename src/components/manage/Widgets/{SiteLogoWidget.jsx => RegistryImageWidget.jsx} (94%) diff --git a/src/components/manage/Widgets/SiteLogoWidget.jsx b/src/components/manage/Widgets/RegistryImageWidget.jsx similarity index 94% rename from src/components/manage/Widgets/SiteLogoWidget.jsx rename to src/components/manage/Widgets/RegistryImageWidget.jsx index ff26bbc40d..4045d66ab3 100644 --- a/src/components/manage/Widgets/SiteLogoWidget.jsx +++ b/src/components/manage/Widgets/RegistryImageWidget.jsx @@ -1,6 +1,6 @@ /** - * SiteLogoWidget component. - * @module components/manage/Widgets/SiteLogoWidget + * RegistryImageWidget component. + * @module components/manage/Widgets/RegistryImageWidget */ import React from 'react'; @@ -48,8 +48,8 @@ const messages = defineMessages({ }); /** - * SiteLogoWidget component class. - * @function SiteLogoWidget + * RegistryImageWidget component class. + * @function RegistryImageWidget * @returns {string} Markup of the component. * * To use it, in schema properties, declare a field like: @@ -70,7 +70,7 @@ const messages = defineMessages({ * ``` * */ -const SiteLogoWidget = (props) => { +const RegistryImageWidget = (props) => { const { id, value, onChange, isDisabled } = props; const intl = useIntl(); @@ -181,7 +181,7 @@ const SiteLogoWidget = (props) => { * @property {Object} propTypes Property types. * @static */ -SiteLogoWidget.propTypes = { +RegistryImageWidget.propTypes = { id: PropTypes.string.isRequired, title: PropTypes.string.isRequired, description: PropTypes.string, @@ -200,11 +200,11 @@ SiteLogoWidget.propTypes = { * @property {Object} defaultProps Default properties. * @static */ -SiteLogoWidget.defaultProps = { +RegistryImageWidget.defaultProps = { description: null, required: false, error: [], value: null, }; -export default injectIntl(SiteLogoWidget); +export default injectIntl(RegistryImageWidget); diff --git a/src/config/Widgets.jsx b/src/config/Widgets.jsx index 0ae0ddce8d..4fb315c862 100644 --- a/src/config/Widgets.jsx +++ b/src/config/Widgets.jsx @@ -24,7 +24,7 @@ import InternalUrlWidget from '@plone/volto/components/manage/Widgets/InternalUr import EmailWidget from '@plone/volto/components/manage/Widgets/EmailWidget'; import NumberWidget from '@plone/volto/components/manage/Widgets/NumberWidget'; import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget'; -import SiteLogoWidget from '@plone/volto/components/manage/Widgets/SiteLogoWidget'; +import RegistryImageWidget from '@plone/volto/components/manage/Widgets/RegistryImageWidget'; import ReferenceWidget from '@plone/volto/components/manage/Widgets/ReferenceWidget'; import ObjectBrowserWidget from '@plone/volto/components/manage/Widgets/ObjectBrowserWidget'; @@ -73,7 +73,7 @@ export const widgetMapping = { recurrence: RecurrenceWidget, remoteUrl: UrlWidget, id: IdWidget, - site_logo: SiteLogoWidget, + site_logo: RegistryImageWidget, }, widget: { richtext: WysiwygWidget, diff --git a/src/config/index.js b/src/config/index.js index 1bcc7720ad..b9c832e53e 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -82,7 +82,13 @@ let config = { // https://6.docs.plone.org/volto/configuration/settings-reference.html#term-apiExpanders // { // match: '', - // GET_CONTENT: ['breadcrumbs', 'navigation', 'actions', 'types'], + // GET_CONTENT: [ + // 'breadcrumbs', + // 'navigation', + // 'actions', + // 'types', + // 'navroot', + // ], // }, ], // Internal proxy to bypass CORS *while developing*. NOT intended for production use. From 3a6b3fa7cdb7fd4ab4d7c3bb96bb05da9e210781 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 10:40:20 +0200 Subject: [PATCH 61/87] add widget tests --- .../Widgets/RegistryImageWidget.test.jsx | 91 +++++++++++ .../RegistryImageWidget.test.jsx.snap | 141 ++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 src/components/manage/Widgets/RegistryImageWidget.test.jsx create mode 100644 src/components/manage/Widgets/__snapshots__/RegistryImageWidget.test.jsx.snap diff --git a/src/components/manage/Widgets/RegistryImageWidget.test.jsx b/src/components/manage/Widgets/RegistryImageWidget.test.jsx new file mode 100644 index 0000000000..51c9564a70 --- /dev/null +++ b/src/components/manage/Widgets/RegistryImageWidget.test.jsx @@ -0,0 +1,91 @@ +import React from 'react'; +import { Provider } from 'react-intl-redux'; +import { render, waitFor } from '@testing-library/react'; +import configureStore from 'redux-mock-store'; + +import RegistryImageWidget from './RegistryImageWidget'; + +import config from '@plone/volto/registry'; + +jest.spyOn(global.Date, 'now').mockImplementation(() => '0'); + +const mockStore = configureStore(); + +beforeAll(() => { + config.settings.publicURL = 'http://localhost:3000'; +}); + +describe('RegistryImageWidget', () => { + test('renders an empty file widget component', async () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + }); + + const { container } = render( + + {}} + /> + , + ); + + await waitFor(() => {}); + expect(container).toMatchSnapshot(); + }); + test('renders a file widget component with value', async () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + }); + + const { container } = render( + + {}} + value={ + 'filenameb64:bG9nby5jYWI5NDVkOC5zdmc=;datab64:PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE1OC4yNTNweCIgaGVpZ2h0PSI0MC42ODZweCIgdmlld0JveD0iMCAwIDE1OC4yNTMgNDAuNjg2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNTguMjUzIDQwLjY4NiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CiAgICAgICAgICAgICAgICAgICAgPGc+PHBhdGggZmlsbD0iIzAwODZDMyIgZD0iTTY1LjMyNywyMy4yMDhoLTYuNTg5djExLjM4OGgtNC4zOTNWNS42MzhoMTAuOTgxYzUuNjUzLDAsOS4yNzEsMy43NDIsOS4yNzEsOC43ODUgICAgICAgICAgICAgICAgIFM3MC45NzksMjMuMjA4LDY1LjMyNywyMy4yMDh6IE02NS4wODIsOS41ODNoLTYuMzQ1djkuNjM5aDYuMzQ1YzMuMDUsMCw1LjEyNC0xLjc0OSw1LjEyNC00Ljc5OSAgICAgICAgICAgICAgICAgQzcwLjIwNiwxMS4zNzIsNjguMTMyLDkuNTgzLDY1LjA4Miw5LjU4M3oiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNODMuOTY5LDM0LjU5NmMtMy45MDQsMC01LjY1Mi0yLjY0NC01LjY1Mi01LjY5M1Y1LjYzOGg0LjE0OHYyMy4wMjFjMCwxLjU4NywwLjU2NywyLjM5OSwyLjIzNSwyLjM5OWgxLjgzICAgICAgICAgICAgICAgICB2My41MzhIODMuOTY5eiIvPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xMDQuNzYyLDMyLjM5OWMtMS4zNDQsMS4zODQtMy4zNzcsMi40NC02LjE4NCwyLjQ0Yy0yLjgwNSwwLTQuNzk5LTEuMDU4LTYuMTQxLTIuNDQgICAgICAgICAgICAgICAgIGMtMS45NTEtMi4wMzItMi40MzktNC42MzctMi40MzktOC4xMzRjMC0zLjQ1NywwLjQ4OC02LjA2MSwyLjQzOS04LjA5NGMxLjM0Mi0xLjM4MywzLjMzNi0yLjQ0LDYuMTQxLTIuNDQgICAgICAgICAgICAgICAgIGMyLjgwNywwLDQuODQsMS4wNTksNi4xODQsMi40NGMxLjk1MSwyLjAzMywyLjQzOSw0LjYzNywyLjQzOSw4LjA5NEMxMDcuMjAzLDI3Ljc2MywxMDYuNzEzLDMwLjM2NiwxMDQuNzYyLDMyLjM5OXogICAgICAgICAgICAgICAgICBNMTAxLjYyOSwxOC42MTNjLTAuNzczLTAuNzczLTEuODMtMS4xODEtMy4wNTEtMS4xODFjLTEuMjE5LDAtMi4yMzYsMC40MDYtMy4wMSwxLjE4MWMtMS4yNiwxLjI2MS0xLjQyMiwzLjQxNi0xLjQyMiw1LjY1MiAgICAgICAgICAgICAgICAgczAuMTYyLDQuMzkzLDEuNDIyLDUuNjUzYzAuNzczLDAuNzcxLDEuNzkxLDEuMjIsMy4wMSwxLjIyYzEuMjIxLDAsMi4yNzctMC40NDcsMy4wNTEtMS4yMmMxLjI2Mi0xLjI2MiwxLjQyNC0zLjQxNywxLjQyNC01LjY1MyAgICAgICAgICAgICAgICAgUzEwMi44OTEsMTkuODczLDEwMS42MjksMTguNjEzeiIvPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xMjMuNjQzLDM0LjU5NlYyMi4wMjljMC0zLjIxNC0xLjgzLTQuNTk3LTQuMTQ3LTQuNTk3cy00LjI3MSwxLjQyMy00LjI3MSw0LjU5N3YxMi41NjZoLTQuMTQ3di0yMC42MiAgICAgICAgICAgICAgICAgaDQuMDY1djIuMDc0YzEuNDI1LTEuNTQ2LDMuNDE2LTIuMzE4LDUuNDktMi4zMThjMi4xMTUsMCwzLjg2NSwwLjY5MSw1LjA4NCwxLjg3MWMxLjU4NiwxLjU0NSwyLjA3NCwzLjQ5NywyLjA3NCw1LjgxNXYxMy4xNzggICAgICAgICAgICAgICAgIEwxMjMuNjQzLDM0LjU5NkwxMjMuNjQzLDM0LjU5NnoiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNMTM1Ljc3MiwyNS40ODZjMCwzLjUzNywxLjg3MSw1Ljc3NCw1LjI0Niw1Ljc3NGMyLjMxNywwLDMuNTM5LTAuNjQ5LDUuMDA0LTIuMTE1bDIuNjQzLDIuNDgxICAgICAgICAgICAgICAgICBjLTIuMTE1LDIuMTE0LTQuMTA3LDMuMjEzLTcuNzI3LDMuMjEzYy01LjE2NiwwLTkuMjczLTIuNzI1LTkuMjczLTEwLjU3NGMwLTYuNjcxLDMuNDU3LTEwLjUzNCw4Ljc0NC0xMC41MzQgICAgICAgICAgICAgICAgIGM1LjUzMSwwLDguNzQ0LDQuMDY3LDguNzQ0LDkuOTI1djEuODNIMTM1Ljc3MnogTTE0NC40NzUsMTkuNzkxYy0wLjY1LTEuNTQ1LTIuMTEzLTIuNjA0LTQuMDY2LTIuNjA0ICAgICAgICAgICAgICAgICBjLTEuOTUxLDAtMy40NTcsMS4wNTktNC4xMDcsMi42MDRjLTAuNDA2LDAuOTM2LTAuNDg4LDEuNTQ2LTAuNTI5LDIuODA3aDkuMjczQzE0NS4wMDMsMjEuMzM3LDE0NC44ODMsMjAuNzI2LDE0NC40NzUsMTkuNzkxeiIvPjxjaXJjbGUgZmlsbD0iIzAwODZDMyIgY3g9IjE3LjgxNSIgY3k9IjExLjUxNiIgcj0iNC40MDIiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNMzEuMTY3LDIwLjMxMWMwLDIuNDMzLTEuOTY5LDQuNDAxLTQuNDAzLDQuNDAxYy0yLjQyNywwLTQuNDAxLTEuOTctNC40MDEtNC40MDEgICAgICAgICAgICAgICAgIGMwLTIuNDMzLDEuOTc1LTQuNDAxLDQuNDAxLTQuNDAxQzI5LjIsMTUuOTA5LDMxLjE2NywxNy44NzksMzEuMTY3LDIwLjMxMXoiLz48Y2lyY2xlIGZpbGw9IiMwMDg2QzMiIGN4PSIxNy44MDEiIGN5PSIyOS4xMzEiIHI9IjQuNDAyIi8+PGc+PHBhdGggZmlsbD0iIzAwODZDMyIgZD0iTTIwLjQ0MS0wLjA0NUM5LjIwNy0wLjA0NCwwLjEsOS4wNjMsMC4wOTksMjAuMjk4QzAuMSwzMS41MzIsOS4yMDcsNDAuNjM5LDIwLjQ0MSw0MC42NDEgICAgICAgICAgICAgICAgICAgICBjMTEuMjM1LTAuMDAyLDIwLjM0MS05LjEwNywyMC4zNDMtMjAuMzQzQzQwLjc4Myw5LjA2MywzMS42NzctMC4wNDQsMjAuNDQxLTAuMDQ1eiBNMzEuODkxLDMxLjc0NyAgICAgICAgICAgICAgICAgICAgIGMtMi45MzcsMi45MzQtNi45NzIsNC43NDItMTEuNDUsNC43NDNjLTQuNDc4LTAuMDAxLTguNTEzLTEuODExLTExLjQ1LTQuNzQzQzYuMDU4LDI4LjgxLDQuMjUsMjQuNzc1LDQuMjQ5LDIwLjI5OCAgICAgICAgICAgICAgICAgICAgIGMwLjAwMS00LjQ3OCwxLjgwOS04LjUxMyw0Ljc0My0xMS40NWMyLjkzNy0yLjkzNCw2Ljk3Mi00Ljc0MiwxMS40NS00Ljc0M2M0LjQ3OCwwLjAwMSw4LjUxMywxLjgxLDExLjQ1LDQuNzQzICAgICAgICAgICAgICAgICAgICAgYzIuOTM0LDIuOTM4LDQuNzQyLDYuOTczLDQuNzQzLDExLjQ1QzM2LjYzMywyNC43NzUsMzQuODI1LDI4LjgxLDMxLjg5MSwzMS43NDd6Ii8+PC9nPjxnPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xNTMuOTg1LDkuOTVjLTEuMTk1LDAtMi4xNjQsMC45NzEtMi4xNjQsMi4xNjhjMC4wMDIsMS4xOTcsMC45NjksMi4xNjgsMi4xNjQsMi4xNjggICAgICAgICAgICAgICAgICAgICBjMS4xOTksMCwyLjE3Mi0wLjk3MSwyLjE3Mi0yLjE2OFMxNTUuMTg0LDkuOTUsMTUzLjk4NSw5Ljk1eiBNMTUzLjk4NSwxMy45NjhjLTEuMDIxLTAuMDAyLTEuODQ2LTAuODI3LTEuODQ2LTEuODUgICAgICAgICAgICAgICAgICAgICBjMC4wMDItMS4wMjEsMC44MjUtMS44NDksMS44NDYtMS44NTFjMS4wMjMsMC4wMDIsMS44NTIsMC44MjgsMS44NTQsMS44NTFDMTU1LjgzNiwxMy4xNDEsMTU1LjAwOCwxMy45NjYsMTUzLjk4NSwxMy45Njh6Ii8+PC9nPjxnPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xNTQuNTA3LDEzLjQwOWwtMC41NC0xLjA4aC0wLjQ4NnYxLjA4aC0wLjM4OXYtMi41NjRoMC45OTRjMC40ODQsMCwwLjc5NiwwLjMxMywwLjc5NiwwLjc1ICAgICAgICAgICAgICAgICAgICAgYzAsMC4zNjctMC4yMjQsMC42MDItMC41MTMsMC42OGwwLjU5MiwxLjEzNkwxNTQuNTA3LDEzLjQwOUwxNTQuNTA3LDEzLjQwOXogTTE1NC4wNTYsMTEuMTk1aC0wLjU3NXYwLjgwM2gwLjU3NSBjMC4yNjEsMCwwLjQzNy0wLjE0NywwLjQzNy0wLjM5OVMxNTQuMzE3LDExLjE5NSwxNTQuMDU2LDExLjE5NXoiLz48L2c+PC9nPgogICAgICAgICAgICAgICAgICA8L3N2Zz4=}' + } + /> + , + ); + + await waitFor(() => {}); + expect(container).toMatchSnapshot(); + }); + // test('renders a file widget component with value in raw data', async () => { + // const store = mockStore({ + // intl: { + // locale: 'en', + // messages: {}, + // }, + // }); + + // const { container } = render( + // + // {}} + // value={ + // 'filenameb64:bG9nby5jYWI5NDVkOC5zdmc=;datab64:PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE1OC4yNTNweCIgaGVpZ2h0PSI0MC42ODZweCIgdmlld0JveD0iMCAwIDE1OC4yNTMgNDAuNjg2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNTguMjUzIDQwLjY4NiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CiAgICAgICAgICAgICAgICAgICAgPGc+PHBhdGggZmlsbD0iIzAwODZDMyIgZD0iTTY1LjMyNywyMy4yMDhoLTYuNTg5djExLjM4OGgtNC4zOTNWNS42MzhoMTAuOTgxYzUuNjUzLDAsOS4yNzEsMy43NDIsOS4yNzEsOC43ODUgICAgICAgICAgICAgICAgIFM3MC45NzksMjMuMjA4LDY1LjMyNywyMy4yMDh6IE02NS4wODIsOS41ODNoLTYuMzQ1djkuNjM5aDYuMzQ1YzMuMDUsMCw1LjEyNC0xLjc0OSw1LjEyNC00Ljc5OSAgICAgICAgICAgICAgICAgQzcwLjIwNiwxMS4zNzIsNjguMTMyLDkuNTgzLDY1LjA4Miw5LjU4M3oiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNODMuOTY5LDM0LjU5NmMtMy45MDQsMC01LjY1Mi0yLjY0NC01LjY1Mi01LjY5M1Y1LjYzOGg0LjE0OHYyMy4wMjFjMCwxLjU4NywwLjU2NywyLjM5OSwyLjIzNSwyLjM5OWgxLjgzICAgICAgICAgICAgICAgICB2My41MzhIODMuOTY5eiIvPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xMDQuNzYyLDMyLjM5OWMtMS4zNDQsMS4zODQtMy4zNzcsMi40NC02LjE4NCwyLjQ0Yy0yLjgwNSwwLTQuNzk5LTEuMDU4LTYuMTQxLTIuNDQgICAgICAgICAgICAgICAgIGMtMS45NTEtMi4wMzItMi40MzktNC42MzctMi40MzktOC4xMzRjMC0zLjQ1NywwLjQ4OC02LjA2MSwyLjQzOS04LjA5NGMxLjM0Mi0xLjM4MywzLjMzNi0yLjQ0LDYuMTQxLTIuNDQgICAgICAgICAgICAgICAgIGMyLjgwNywwLDQuODQsMS4wNTksNi4xODQsMi40NGMxLjk1MSwyLjAzMywyLjQzOSw0LjYzNywyLjQzOSw4LjA5NEMxMDcuMjAzLDI3Ljc2MywxMDYuNzEzLDMwLjM2NiwxMDQuNzYyLDMyLjM5OXogICAgICAgICAgICAgICAgICBNMTAxLjYyOSwxOC42MTNjLTAuNzczLTAuNzczLTEuODMtMS4xODEtMy4wNTEtMS4xODFjLTEuMjE5LDAtMi4yMzYsMC40MDYtMy4wMSwxLjE4MWMtMS4yNiwxLjI2MS0xLjQyMiwzLjQxNi0xLjQyMiw1LjY1MiAgICAgICAgICAgICAgICAgczAuMTYyLDQuMzkzLDEuNDIyLDUuNjUzYzAuNzczLDAuNzcxLDEuNzkxLDEuMjIsMy4wMSwxLjIyYzEuMjIxLDAsMi4yNzctMC40NDcsMy4wNTEtMS4yMmMxLjI2Mi0xLjI2MiwxLjQyNC0zLjQxNywxLjQyNC01LjY1MyAgICAgICAgICAgICAgICAgUzEwMi44OTEsMTkuODczLDEwMS42MjksMTguNjEzeiIvPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xMjMuNjQzLDM0LjU5NlYyMi4wMjljMC0zLjIxNC0xLjgzLTQuNTk3LTQuMTQ3LTQuNTk3cy00LjI3MSwxLjQyMy00LjI3MSw0LjU5N3YxMi41NjZoLTQuMTQ3di0yMC42MiAgICAgICAgICAgICAgICAgaDQuMDY1djIuMDc0YzEuNDI1LTEuNTQ2LDMuNDE2LTIuMzE4LDUuNDktMi4zMThjMi4xMTUsMCwzLjg2NSwwLjY5MSw1LjA4NCwxLjg3MWMxLjU4NiwxLjU0NSwyLjA3NCwzLjQ5NywyLjA3NCw1LjgxNXYxMy4xNzggICAgICAgICAgICAgICAgIEwxMjMuNjQzLDM0LjU5NkwxMjMuNjQzLDM0LjU5NnoiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNMTM1Ljc3MiwyNS40ODZjMCwzLjUzNywxLjg3MSw1Ljc3NCw1LjI0Niw1Ljc3NGMyLjMxNywwLDMuNTM5LTAuNjQ5LDUuMDA0LTIuMTE1bDIuNjQzLDIuNDgxICAgICAgICAgICAgICAgICBjLTIuMTE1LDIuMTE0LTQuMTA3LDMuMjEzLTcuNzI3LDMuMjEzYy01LjE2NiwwLTkuMjczLTIuNzI1LTkuMjczLTEwLjU3NGMwLTYuNjcxLDMuNDU3LTEwLjUzNCw4Ljc0NC0xMC41MzQgICAgICAgICAgICAgICAgIGM1LjUzMSwwLDguNzQ0LDQuMDY3LDguNzQ0LDkuOTI1djEuODNIMTM1Ljc3MnogTTE0NC40NzUsMTkuNzkxYy0wLjY1LTEuNTQ1LTIuMTEzLTIuNjA0LTQuMDY2LTIuNjA0ICAgICAgICAgICAgICAgICBjLTEuOTUxLDAtMy40NTcsMS4wNTktNC4xMDcsMi42MDRjLTAuNDA2LDAuOTM2LTAuNDg4LDEuNTQ2LTAuNTI5LDIuODA3aDkuMjczQzE0NS4wMDMsMjEuMzM3LDE0NC44ODMsMjAuNzI2LDE0NC40NzUsMTkuNzkxeiIvPjxjaXJjbGUgZmlsbD0iIzAwODZDMyIgY3g9IjE3LjgxNSIgY3k9IjExLjUxNiIgcj0iNC40MDIiLz48cGF0aCBmaWxsPSIjMDA4NkMzIiBkPSJNMzEuMTY3LDIwLjMxMWMwLDIuNDMzLTEuOTY5LDQuNDAxLTQuNDAzLDQuNDAxYy0yLjQyNywwLTQuNDAxLTEuOTctNC40MDEtNC40MDEgICAgICAgICAgICAgICAgIGMwLTIuNDMzLDEuOTc1LTQuNDAxLDQuNDAxLTQuNDAxQzI5LjIsMTUuOTA5LDMxLjE2NywxNy44NzksMzEuMTY3LDIwLjMxMXoiLz48Y2lyY2xlIGZpbGw9IiMwMDg2QzMiIGN4PSIxNy44MDEiIGN5PSIyOS4xMzEiIHI9IjQuNDAyIi8+PGc+PHBhdGggZmlsbD0iIzAwODZDMyIgZD0iTTIwLjQ0MS0wLjA0NUM5LjIwNy0wLjA0NCwwLjEsOS4wNjMsMC4wOTksMjAuMjk4QzAuMSwzMS41MzIsOS4yMDcsNDAuNjM5LDIwLjQ0MSw0MC42NDEgICAgICAgICAgICAgICAgICAgICBjMTEuMjM1LTAuMDAyLDIwLjM0MS05LjEwNywyMC4zNDMtMjAuMzQzQzQwLjc4Myw5LjA2MywzMS42NzctMC4wNDQsMjAuNDQxLTAuMDQ1eiBNMzEuODkxLDMxLjc0NyAgICAgICAgICAgICAgICAgICAgIGMtMi45MzcsMi45MzQtNi45NzIsNC43NDItMTEuNDUsNC43NDNjLTQuNDc4LTAuMDAxLTguNTEzLTEuODExLTExLjQ1LTQuNzQzQzYuMDU4LDI4LjgxLDQuMjUsMjQuNzc1LDQuMjQ5LDIwLjI5OCAgICAgICAgICAgICAgICAgICAgIGMwLjAwMS00LjQ3OCwxLjgwOS04LjUxMyw0Ljc0My0xMS40NWMyLjkzNy0yLjkzNCw2Ljk3Mi00Ljc0MiwxMS40NS00Ljc0M2M0LjQ3OCwwLjAwMSw4LjUxMywxLjgxLDExLjQ1LDQuNzQzICAgICAgICAgICAgICAgICAgICAgYzIuOTM0LDIuOTM4LDQuNzQyLDYuOTczLDQuNzQzLDExLjQ1QzM2LjYzMywyNC43NzUsMzQuODI1LDI4LjgxLDMxLjg5MSwzMS43NDd6Ii8+PC9nPjxnPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xNTMuOTg1LDkuOTVjLTEuMTk1LDAtMi4xNjQsMC45NzEtMi4xNjQsMi4xNjhjMC4wMDIsMS4xOTcsMC45NjksMi4xNjgsMi4xNjQsMi4xNjggICAgICAgICAgICAgICAgICAgICBjMS4xOTksMCwyLjE3Mi0wLjk3MSwyLjE3Mi0yLjE2OFMxNTUuMTg0LDkuOTUsMTUzLjk4NSw5Ljk1eiBNMTUzLjk4NSwxMy45NjhjLTEuMDIxLTAuMDAyLTEuODQ2LTAuODI3LTEuODQ2LTEuODUgICAgICAgICAgICAgICAgICAgICBjMC4wMDItMS4wMjEsMC44MjUtMS44NDksMS44NDYtMS44NTFjMS4wMjMsMC4wMDIsMS44NTIsMC44MjgsMS44NTQsMS44NTFDMTU1LjgzNiwxMy4xNDEsMTU1LjAwOCwxMy45NjYsMTUzLjk4NSwxMy45Njh6Ii8+PC9nPjxnPjxwYXRoIGZpbGw9IiMwMDg2QzMiIGQ9Ik0xNTQuNTA3LDEzLjQwOWwtMC41NC0xLjA4aC0wLjQ4NnYxLjA4aC0wLjM4OXYtMi41NjRoMC45OTRjMC40ODQsMCwwLjc5NiwwLjMxMywwLjc5NiwwLjc1ICAgICAgICAgICAgICAgICAgICAgYzAsMC4zNjctMC4yMjQsMC42MDItMC41MTMsMC42OGwwLjU5MiwxLjEzNkwxNTQuNTA3LDEzLjQwOUwxNTQuNTA3LDEzLjQwOXogTTE1NC4wNTYsMTEuMTk1aC0wLjU3NXYwLjgwM2gwLjU3NSBjMC4yNjEsMCwwLjQzNy0wLjE0NywwLjQzNy0wLjM5OVMxNTQuMzE3LDExLjE5NSwxNTQuMDU2LDExLjE5NXoiLz48L2c+PC9nPgogICAgICAgICAgICAgICAgICA8L3N2Zz4=}' + // } + // /> + // , + // ); + + // await waitFor(() => {}); + // expect(container).toMatchSnapshot(); + // }); +}); diff --git a/src/components/manage/Widgets/__snapshots__/RegistryImageWidget.test.jsx.snap b/src/components/manage/Widgets/__snapshots__/RegistryImageWidget.test.jsx.snap new file mode 100644 index 0000000000..03a62b60b6 --- /dev/null +++ b/src/components/manage/Widgets/__snapshots__/RegistryImageWidget.test.jsx.snap @@ -0,0 +1,141 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`RegistryImageWidget renders a file widget component with value 1`] = ` +
+
+
+
+
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+
+
+
+`; + +exports[`RegistryImageWidget renders an empty file widget component 1`] = ` +
+
+
+
+
+
+ +
+
+
+
+
+

+ Drop file here to upload a new file +

+
+ + +
+
+
+
+
+
+
+`; From 81ed404d60fdbfd7542d37884acaf308b36b407c Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 11:30:39 +0200 Subject: [PATCH 62/87] add KGS to the acceptance server --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bce4da6102..85a448884a 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ start-test-acceptance-frontend-dev: ## Start the Core Acceptance Frontend Fixtur .PHONY: start-test-acceptance-server test-acceptance-server start-test-acceptance-server test-acceptance-server: ## Start Test Acceptance Server Main Fixture (docker container) - docker run -i --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) + docker run -i --rm -p 55001:55001 -e ADDONS='$(KGS)' $(DOCKER_IMAGE_ACCEPTANCE) .PHONY: start-test-acceptance-frontend start-test-acceptance-frontend: ## Start the Core Acceptance Frontend Fixture From b473c6d13f24ad2f52d6b905fc8ebd07cfadb415 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 11:38:32 +0200 Subject: [PATCH 63/87] update locales --- locales/ca/LC_MESSAGES/volto.po | 10 +++++----- locales/de/LC_MESSAGES/volto.po | 10 +++++----- locales/en/LC_MESSAGES/volto.po | 10 +++++----- locales/es/LC_MESSAGES/volto.po | 10 +++++----- locales/eu/LC_MESSAGES/volto.po | 10 +++++----- locales/fi/LC_MESSAGES/volto.po | 10 +++++----- locales/fr/LC_MESSAGES/volto.po | 10 +++++----- locales/it/LC_MESSAGES/volto.po | 10 +++++----- locales/ja/LC_MESSAGES/volto.po | 10 +++++----- locales/nl/LC_MESSAGES/volto.po | 10 +++++----- locales/pt/LC_MESSAGES/volto.po | 10 +++++----- locales/pt_BR/LC_MESSAGES/volto.po | 10 +++++----- locales/ro/LC_MESSAGES/volto.po | 10 +++++----- locales/volto.pot | 12 ++++++------ locales/zh_CN/LC_MESSAGES/volto.po | 10 +++++----- 15 files changed, 76 insertions(+), 76 deletions(-) diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index bc0f17e9a8..ee052a495b 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -616,7 +616,7 @@ msgid "Choose Target" msgstr "Trieu Destí" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Trieu un fitxer" @@ -1113,19 +1113,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrossegueu i deixeu anar fitxers des del vostre ordinador a aquesta àrea o feu clic al botó 'Examinar'." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Deixeu anar el fitxer aquí per substituir el fitxer existent" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Deixeu anar el fitxer aquí per pujar un fitxer nou" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Deixeu fitxers aquí..." @@ -2780,7 +2780,7 @@ msgid "Repeat on" msgstr "Repetiu" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substitueix el fitxer existent" diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 127f2329ff..b1c7d87fb6 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -613,7 +613,7 @@ msgid "Choose Target" msgstr "Ziel auswählen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Datei auswählen" @@ -1110,19 +1110,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Ziehen Sie Dateien von Ihrem Computer auf diesen Bereich oder drücken Sie den “Durchsuchen”-Knopf." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Datei hier ablegen um eine neue Datei hochzuladen" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Datei hier ablegen um die bestehende Datei zu ersetzen" @@ -2777,7 +2777,7 @@ msgid "Repeat on" msgstr "Wiederhole am" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Bestehende Datei ersetzen" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index bdbca306b9..ebd2165648 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -607,7 +607,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1104,19 +1104,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2771,7 +2771,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index df0aa6d3a2..3ed69f93a2 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -618,7 +618,7 @@ msgid "Choose Target" msgstr "Seleccione destino" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Seleccionar Archivo" @@ -1115,19 +1115,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastre y suelte los archivos desde su computador en esta área o haga clic al botón “Seleccionar”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastre aquí el archivo para reemplazar el actual" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastre aquí el archivo para añadir un nuevo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastrar archivos aquí..." @@ -2782,7 +2782,7 @@ msgid "Repeat on" msgstr "Repetir el" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sustituir el archivo actual" diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index abdf78ea46..49263f5557 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -614,7 +614,7 @@ msgid "Choose Target" msgstr "Aukeratu helburua" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Aukeratu fitxategia" @@ -1111,19 +1111,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arrastatu fitxategiak hona edo erabili Arakatu botoia." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Arrastatu fitxategia hona orain dagoena ordezkatzeko" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Arrastatu fitxategia hona fitxategi berria kargatzeko" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Arrastatu fitxategiak hona..." @@ -2778,7 +2778,7 @@ msgid "Repeat on" msgstr "Egun honetan errepikatu" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Ordezkatu fitxategia" diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index c5a6e07e44..8db71d1744 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -618,7 +618,7 @@ msgid "Choose Target" msgstr "Valitse sisältö" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Valitse tiedosto" @@ -1115,19 +1115,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Raahaa ja pudota tiedostoja tietokoneeltasi tähän tai paina “Selaa”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Pudota tiedosto tähän korvataksesi olemassaolevan tiedoston" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Pudota tiedosto tähän ladataksesi uuden tiedoston" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Pudota tiedosto tänne... " @@ -2782,7 +2782,7 @@ msgid "Repeat on" msgstr "Toista" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Korvaa olemassaoleva tiedosto" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 6473b76fba..42fb7d4568 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -624,7 +624,7 @@ msgid "Choose Target" msgstr "Choisir une cible" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Choisissez un fichier" @@ -1121,19 +1121,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Glisser et déposer les fichiers depuis votre ordinateur dans la zone ou cliquer sur le bouton “Explore“" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Déposez le fichier ici pour remplacer le fichier existant" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Déposez le fichier ici pour télécharger un nouveau fichier" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Déposez les fichiers ici ..." @@ -2788,7 +2788,7 @@ msgid "Repeat on" msgstr "Répétition le" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Remplacer le fichier existant" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index cf2f9acb61..a23cd2046b 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -607,7 +607,7 @@ msgid "Choose Target" msgstr "Seleziona la destinazione" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Scegli un file" @@ -1104,19 +1104,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trascina in quest'area i file dal tuo computer o clicca su “Sfoglia”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Rilascia un file qui per sostituire quello esistente" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Rilascia un file qui per caricare un nuovo file" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Rilascia file qui..." @@ -2771,7 +2771,7 @@ msgid "Repeat on" msgstr "Ripeti ogni" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Sostituisci file esistente" diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 0b6274cf9d..3ae48a26a2 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -615,7 +615,7 @@ msgid "Choose Target" msgstr "ターゲットを選択" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "ファイルを選択" @@ -1112,19 +1112,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "ここにファイルをドラッグ、または「参照」ボタンをクリック" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "ファイルをここにドロップして、既存のファイルを置き換え" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "ファイルをここにドロップして、新しいファイルをアップロード" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "ファイルをここにドロップ" @@ -2779,7 +2779,7 @@ msgid "Repeat on" msgstr "日または曜日" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "ファイルの置き換え" diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index 7abffc1182..5feaf46cec 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -626,7 +626,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1123,19 +1123,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Drag en drop bestanden van uw computer naar dit gebied of klik op de “Bladeren” knop." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2790,7 +2790,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index 6a1548aaae..f6691d1f27 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -615,7 +615,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1112,19 +1112,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e largue ficheiros do seu computador para esta área ou clique no botão “Procurar”." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2779,7 +2779,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 57b75a6338..cc21645444 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -617,7 +617,7 @@ msgid "Choose Target" msgstr "Escolha Alvo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Escolha um arquivo" @@ -1114,19 +1114,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Arraste e solte arquivos do seu computador para esta área, ou clique no botão ‘Procurar’." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Solte um arquivo aqui para substituir o arquivo existente" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Solte um arquivo aqui para enviar um novo arquivo" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Soltar aquivos aqui…" @@ -2781,7 +2781,7 @@ msgid "Repeat on" msgstr "Repete em" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Substituir arquivo existente" diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index f6d9885e4e..3dbe79cf25 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -607,7 +607,7 @@ msgid "Choose Target" msgstr "Alegeți ținta" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "Alegeți un fișier" @@ -1104,19 +1104,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "Trageți și fixați fișierele de pe computer în această zonă sau faceți clic pe butonul Răsfoiește." #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "Trageți fișierul aici pentru a înlocui fișierul existent" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "Trageți fișierul aici pentru a încărca un fișier nou" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "Trageți fișierele aici..." @@ -2771,7 +2771,7 @@ msgid "Repeat on" msgstr "Repetați pe" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "Înlocuiește fișierul existent" diff --git a/locales/volto.pot b/locales/volto.pot index 9ebd94d044..94f7ad2449 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-06-26T13:50:20.280Z\n" +"POT-Creation-Date: 2023-07-02T09:38:21.493Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -609,7 +609,7 @@ msgid "Choose Target" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "" @@ -1106,19 +1106,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "" @@ -2773,7 +2773,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "" diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index e1bbaab66a..a205f2926c 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -613,7 +613,7 @@ msgid "Choose Target" msgstr "选择目标" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Choose a file msgid "Choose a file" msgstr "选择一个文件" @@ -1110,19 +1110,19 @@ msgid "Drag and drop files from your computer onto this area or click the “Bro msgstr "从你的电脑中拖放文件到此区域或单击 “浏览” 按钮" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to replace the existing file msgid "Drop file here to replace the existing file" msgstr "在此处放置文件以替换现有文件" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop file here to upload a new file msgid "Drop file here to upload a new file" msgstr "在此处放置文件来上传新文件" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Drop files here ... msgid "Drop files here ..." msgstr "在此处放置文件 ..." @@ -2777,7 +2777,7 @@ msgid "Repeat on" msgstr "" #: components/manage/Widgets/FileWidget -#: components/manage/Widgets/SiteLogoWidget +#: components/manage/Widgets/RegistryImageWidget # defaultMessage: Replace existing file msgid "Replace existing file" msgstr "替换现有文件" From 956850ebfa041a8e0809d10f0fcdbfd09d90ffb0 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 12:02:54 +0200 Subject: [PATCH 64/87] do not pass not-required props --- src/components/theme/App/App.jsx | 2 +- src/components/theme/Header/Header.jsx | 4 ++-- src/components/theme/SearchWidget/SearchWidget.jsx | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/theme/App/App.jsx b/src/components/theme/App/App.jsx index 18885578a1..cec83066a1 100644 --- a/src/components/theme/App/App.jsx +++ b/src/components/theme/App/App.jsx @@ -158,7 +158,7 @@ export class App extends Component { })} /> -
+
{ +const Header = ({ pathname }) => { const token = useToken(); return ( @@ -30,7 +30,7 @@ const Header = ({ pathname, content }) => {
)}
- +
diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index ab2721f92d..a6acc5f58b 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -134,6 +134,7 @@ export default compose( connect( (state) => ({ navroot: state.navroot.data, + pathname: state.router.location.pathname, }), { getNavroot }, ), From f2905df6af4a6c7e7a6d4580746373546b375c16 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Sun, 2 Jul 2023 14:49:51 +0200 Subject: [PATCH 65/87] get pathname from props --- src/components/theme/SearchWidget/SearchWidget.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index a6acc5f58b..c281c9bdb4 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -132,9 +132,9 @@ export default compose( withRouter, injectIntl, connect( - (state) => ({ + (state, props) => ({ navroot: state.navroot.data, - pathname: state.router.location.pathname, + pathname: props.location.pathname, }), { getNavroot }, ), From 6454d2f0816c999df70209b194351aabccb4fd27 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 18 Jul 2023 15:26:15 +0200 Subject: [PATCH 66/87] use DOCKER_IMAGE --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 85a448884a..d19683967a 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ start-test-acceptance-frontend-dev: ## Start the Core Acceptance Frontend Fixtur .PHONY: start-test-acceptance-server test-acceptance-server start-test-acceptance-server test-acceptance-server: ## Start Test Acceptance Server Main Fixture (docker container) - docker run -i --rm -p 55001:55001 -e ADDONS='$(KGS)' $(DOCKER_IMAGE_ACCEPTANCE) + docker run -i --rm -p 55001:55001 -e ADDONS='$(KGS)' $(DOCKER_IMAGE) .PHONY: start-test-acceptance-frontend start-test-acceptance-frontend: ## Start the Core Acceptance Frontend Fixture @@ -274,7 +274,7 @@ start-test-acceptance-frontend-project: ## Start the Project Acceptance Frontend .PHONY: start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox: ## Start CoreSandbox Test Acceptance Server Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE_ACCEPTANCE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE) # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING .PHONY: start-test-acceptance-frontend-coresandbox @@ -301,7 +301,7 @@ full-test-acceptance-coresandbox: ## Runs CoreSandbox Full Acceptance Testing in .PHONY: start-test-acceptance-server-multilingual test-acceptance-server-multilingual start-test-acceptance-server-multilingual test-acceptance-server-multilingual: ## Start Multilingual Acceptance Server Multilingual Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE) .PHONY: start-test-acceptance-frontend-multilingual start-test-acceptance-frontend-multilingual: ## Start the Multilingual Acceptance Frontend Fixture @@ -323,7 +323,7 @@ full-test-acceptance-multilingual: ## Runs Multilingual Full Acceptance Testing .PHONY: start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy : ## Start the WorkingCopy Acceptance Server Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE_ACCEPTANCE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE) # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.app.iterate,plone.volto,plone.volto.cors APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING .PHONY: start-test-acceptance-frontend-workingcopy From 112c2403ba521e4115a9c4832446297bc5431935 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 18 Jul 2023 16:35:11 +0200 Subject: [PATCH 67/87] eslint --- src/components/theme/SearchWidget/SearchWidget.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index f64e8befac..8f477188c4 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { Form, Input } from 'semantic-ui-react'; import { defineMessages, useIntl } from 'react-intl'; -import { useDispatch, useSelector, shallowEqual } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; import { getNavroot } from '@plone/volto/actions'; import { hasApiExpander, getBaseUrl } from '@plone/volto/helpers'; From c09db3a2181a4c901daa0df89a5ae9c3b57c4b87 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 09:22:48 +0200 Subject: [PATCH 68/87] update --- src/components/theme/SearchWidget/SearchWidget.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index 8f477188c4..e2751c2bf9 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { useHistory } from 'react-router-dom'; +import { useHistory, useLocation } from 'react-router-dom'; import { Form, Input } from 'semantic-ui-react'; import { defineMessages, useIntl } from 'react-intl'; import { useDispatch, useSelector } from 'react-redux'; @@ -23,13 +23,15 @@ const messages = defineMessages({ const SearchWidget = (props) => { const intl = useIntl(); const dispatch = useDispatch(); + const location = useLocation(); const [text, setText] = useState(''); const history = useHistory(); const onChangeText = (event, { value }) => { setText(value); }; - const pathname = props.pathname; + + const pathname = location.pathname; const onSubmit = (event) => { const path = pathname?.length > 0 ? `&path=${encodeURIComponent(pathname)}` : ''; @@ -40,8 +42,7 @@ const SearchWidget = (props) => { event.preventDefault(); }; - const navroot = useSelector((state) => state.navroot?.navroot); - + const navroot = useSelector((state) => state.navroot?.data); useEffect(() => { if (!hasApiExpander('navroot', getBaseUrl(pathname))) { dispatch(getNavroot(getBaseUrl(pathname))); @@ -49,7 +50,7 @@ const SearchWidget = (props) => { }, [dispatch, pathname]); return ( - + Date: Wed, 19 Jul 2023 09:26:51 +0200 Subject: [PATCH 69/87] document the setting --- .../configuration/settings-reference.md | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index 3dbc111b0e..dbf3fce1b0 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -1,10 +1,10 @@ --- myst: html_meta: - "description": "This is a summary of all the Volto configuration options and what they control." - "property=og:description": "This is a summary of all the Volto configuration options and what they control." - "property=og:title": "Settings reference guide" - "keywords": "Volto, Plone, frontend, React, configuration, settings, reference" + 'description': 'This is a summary of all the Volto configuration options and what they control.' + 'property=og:description': 'This is a summary of all the Volto configuration options and what they control.' + 'property=og:title': 'Settings reference guide' + 'keywords': 'Volto, Plone, frontend, React, configuration, settings, reference' --- # Settings reference guide @@ -19,7 +19,7 @@ This list is still incomplete, contributions are welcomed! They are exposed in `config.settings`: -```{glossary} +````{glossary} :sorted: navDepth @@ -425,13 +425,28 @@ okRoute ```jsx config.settings.okRoute = '/site-is-ok' ``` -``` + +siteTitleFormat + Volto lets the developer to modify how the site title is built. By default the site title only includes the title of the current page. + + Modifying this configuration setting, the developer can decide to use the title of the navigation root (either the site root or the language root folder) as the second part of the title. + + The developer can also decide which is the separator character between the current page title and the site title. + + ```jsx + siteTitleFormat: { + includeSiteTitle: true, + titleAndSiteTitleSeparator: '-', + } + ``` + +```` ## Views settings They are exposed in `config.views`: -```{glossary} +````{glossary} :sorted: layoutViewsNamesMapping @@ -471,7 +486,7 @@ layoutViewsNamesMapping }, }) ``` -``` +```` ## Server-specific serverConfig From 156ea150e778224f87d07b26c99ebac50b4e6210 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:09:54 +0200 Subject: [PATCH 70/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index dbf3fce1b0..c014b06913 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -427,7 +427,8 @@ okRoute ``` siteTitleFormat - Volto lets the developer to modify how the site title is built. By default the site title only includes the title of the current page. + Volto lets you modify how the site title is built. + By default the site title only includes the title of the current page. Modifying this configuration setting, the developer can decide to use the title of the navigation root (either the site root or the language root folder) as the second part of the title. From b5ae3f2d79e56b80cf34b9974583789588981f13 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:10:06 +0200 Subject: [PATCH 71/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index c014b06913..0e21ef254f 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -430,7 +430,7 @@ siteTitleFormat Volto lets you modify how the site title is built. By default the site title only includes the title of the current page. - Modifying this configuration setting, the developer can decide to use the title of the navigation root (either the site root or the language root folder) as the second part of the title. + By modifying this configuration setting, you can decide whether to use the title of the navigation root (either the site root or the language root folder) as the second part of the title. The developer can also decide which is the separator character between the current page title and the site title. From dbba4525b4d28734e08813867e50bddddb1666be Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:10:26 +0200 Subject: [PATCH 72/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index 0e21ef254f..c247b4c9d4 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -432,7 +432,7 @@ siteTitleFormat By modifying this configuration setting, you can decide whether to use the title of the navigation root (either the site root or the language root folder) as the second part of the title. - The developer can also decide which is the separator character between the current page title and the site title. + You can also decide the separator character between the current page title and the site title. ```jsx siteTitleFormat: { From 7880c490aafe2bdd72e5ad3502ea1782bc5b2969 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:10:42 +0200 Subject: [PATCH 73/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index c247b4c9d4..0729e4ec96 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -441,7 +441,7 @@ siteTitleFormat } ``` -```` +``` ## Views settings From 0cef3ecf7801f4c461948032105d9c77e14b0733 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:11:09 +0200 Subject: [PATCH 74/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index 0729e4ec96..5ef323a936 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -447,7 +447,7 @@ siteTitleFormat They are exposed in `config.views`: -````{glossary} +```{glossary} :sorted: layoutViewsNamesMapping From 8ef15b1d124ca01958210283c8f7b139607db577 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:11:26 +0200 Subject: [PATCH 75/87] Update docs/source/configuration/settings-reference.md Co-authored-by: Steve Piercy --- docs/source/configuration/settings-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index 5ef323a936..093f50344c 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -487,7 +487,7 @@ layoutViewsNamesMapping }, }) ``` -```` +``` ## Server-specific serverConfig From dabaf03a50b105c7210cffad52dc71775b209e40 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:12:39 +0200 Subject: [PATCH 76/87] styling fixes --- docs/source/configuration/settings-reference.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/configuration/settings-reference.md b/docs/source/configuration/settings-reference.md index 093f50344c..63290c20c6 100644 --- a/docs/source/configuration/settings-reference.md +++ b/docs/source/configuration/settings-reference.md @@ -1,10 +1,10 @@ --- myst: html_meta: - 'description': 'This is a summary of all the Volto configuration options and what they control.' - 'property=og:description': 'This is a summary of all the Volto configuration options and what they control.' - 'property=og:title': 'Settings reference guide' - 'keywords': 'Volto, Plone, frontend, React, configuration, settings, reference' + "description": "This is a summary of all the Volto configuration options and what they control." + "property=og:description": "This is a summary of all the Volto configuration options and what they control." + "property=og:title": "Settings reference guide" + "keywords": "Volto, Plone, frontend, React, configuration, settings, reference" --- # Settings reference guide @@ -19,7 +19,7 @@ This list is still incomplete, contributions are welcomed! They are exposed in `config.settings`: -````{glossary} +```{glossary} :sorted: navDepth From c796eb3427e45682a262921689573c6fd1296bc3 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:13:10 +0200 Subject: [PATCH 77/87] Update news/3537.feature Co-authored-by: Steve Piercy --- news/3537.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/3537.feature b/news/3537.feature index e6fc8f627d..e20a4f903d 100644 --- a/news/3537.feature +++ b/news/3537.feature @@ -2,4 +2,4 @@ - Use the @site endpoint to render the logo @erral -- Register a widget to set the logo in the site controlpanel @erral +Register a widget to set the logo in the site control panel. @erral From 188bef755d4ba7232caccc75aae92b3ebb64f4f2 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:15:58 +0200 Subject: [PATCH 78/87] Update news/3537.feature Co-authored-by: Steve Piercy --- news/3537.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/3537.feature b/news/3537.feature index e20a4f903d..b77fbc875e 100644 --- a/news/3537.feature +++ b/news/3537.feature @@ -1,5 +1,5 @@ - Use the @navroot endpoint to build the title tag @erral -- Use the @site endpoint to render the logo @erral +Use the `@site` endpoint to render the logo. @erral Register a widget to set the logo in the site control panel. @erral From 7cbddec35a52b219d7eb6bc03701b1b092830e01 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 19 Jul 2023 12:17:05 +0200 Subject: [PATCH 79/87] Update news/3537.feature Co-authored-by: Steve Piercy --- news/3537.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/3537.feature b/news/3537.feature index b77fbc875e..30adb55219 100644 --- a/news/3537.feature +++ b/news/3537.feature @@ -1,4 +1,4 @@ -- Use the @navroot endpoint to build the title tag @erral +Use the `@navroot` endpoint to build the `title` tag. @erral Use the `@site` endpoint to render the logo. @erral From 9a6d67afdd1d3eff1baf2b9146105ad86aaa443b Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Thu, 20 Jul 2023 16:04:23 +0200 Subject: [PATCH 80/87] include navroot as a default expander --- src/config/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/index.js b/src/config/index.js index 9cf1f149b2..4053b10706 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -235,7 +235,7 @@ config.settings.apiExpanders = [ ...config.settings.apiExpanders, { match: '', - GET_CONTENT: ['breadcrumbs', 'actions', 'types'], + GET_CONTENT: ['breadcrumbs', 'actions', 'types', 'navroot'], }, { match: '', From 526a91f79c75a71c5cbdd96a0a6f91e21a5e71bf Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Mon, 21 Aug 2023 13:48:32 +0200 Subject: [PATCH 81/87] update tests --- src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap index feb3ba3c07..dfe8409855 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.test.jsx.snap @@ -48,7 +48,6 @@ exports[`Logo renders a logo component with default config in a non-root url 1`] className="ui image" src="/@@site-logo/logo.cab945d8.svg" title="Plone Site" - width="158.2" /> `; From 9e9243908a645cfde5bbb7e50e6ac8ec5c073b6e Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Mon, 11 Sep 2023 18:48:40 +0200 Subject: [PATCH 82/87] rollback testing docker image changes --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 80207b076d..ca85430928 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ start-test-acceptance-frontend-dev: ## Start the Core Acceptance Frontend Fixtur .PHONY: start-test-acceptance-server test-acceptance-server start-test-acceptance-server test-acceptance-server: ## Start Test Acceptance Server Main Fixture (docker container) - docker run -i --rm -p 55001:55001 -e ADDONS='$(KGS)' $(DOCKER_IMAGE) + docker run -i --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) .PHONY: start-test-acceptance-frontend start-test-acceptance-frontend: ## Start the Core Acceptance Frontend Fixture @@ -274,7 +274,7 @@ start-test-acceptance-frontend-project: ## Start the Project Acceptance Frontend .PHONY: start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox: ## Start CoreSandbox Test Acceptance Server Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE_ACCEPTANCE) # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING .PHONY: start-test-acceptance-frontend-coresandbox @@ -301,7 +301,7 @@ full-test-acceptance-coresandbox: ## Runs CoreSandbox Full Acceptance Testing in .PHONY: start-test-acceptance-server-multilingual test-acceptance-server-multilingual start-test-acceptance-server-multilingual test-acceptance-server-multilingual: ## Start Multilingual Acceptance Server Multilingual Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) .PHONY: start-test-acceptance-frontend-multilingual start-test-acceptance-frontend-multilingual: ## Start the Multilingual Acceptance Frontend Fixture @@ -323,7 +323,7 @@ full-test-acceptance-multilingual: ## Runs Multilingual Full Acceptance Testing .PHONY: start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy : ## Start the WorkingCopy Acceptance Server Fixture (docker container) - docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE) + docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE_ACCEPTANCE) # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.app.iterate,plone.volto,plone.volto.cors APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING .PHONY: start-test-acceptance-frontend-workingcopy From c4d8ec119d047a044910344dd7e9c82b0a3e25c6 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Tue, 12 Sep 2023 08:42:32 +0200 Subject: [PATCH 83/87] update snapshot --- .../theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap index 45414299e1..8ac8293380 100644 --- a/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap +++ b/src/components/theme/Logo/__snapshots__/Logo.Multilingual.test.jsx.snap @@ -28,10 +28,8 @@ exports[`Multilingual Logo renders a logo component in a multilingual site root Plone Site `; From f23da4ffd0ba2ebd89017f8e3c747936661c1184 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Tue, 12 Sep 2023 09:59:40 +0200 Subject: [PATCH 84/87] Fixed tests, now publicURL is in the fixture. Added one more just to be sure. --- .../theme/Logo/Logo.Multilingual.test.jsx | 41 +++++++++++++- src/components/theme/Logo/Logo.jsx | 1 + .../Logo.Multilingual.test.jsx.snap | 53 ++++++++----------- 3 files changed, 64 insertions(+), 31 deletions(-) diff --git a/src/components/theme/Logo/Logo.Multilingual.test.jsx b/src/components/theme/Logo/Logo.Multilingual.test.jsx index 51b617c640..25258c574b 100644 --- a/src/components/theme/Logo/Logo.Multilingual.test.jsx +++ b/src/components/theme/Logo/Logo.Multilingual.test.jsx @@ -9,7 +9,6 @@ import Logo from './Logo'; beforeAll(() => { config.settings.isMultilingual = true; - config.settings.publicURL = 'http://mysite.com'; }); const mockStore = configureStore(); @@ -49,6 +48,7 @@ describe('Multilingual Logo', () => { const json = component.toJSON(); expect(json).toMatchSnapshot(); }); + it('renders a logo component in a multilingual site language root', () => { const store = mockStore({ intl: { @@ -85,6 +85,7 @@ describe('Multilingual Logo', () => { const json = component.toJSON(); expect(json).toMatchSnapshot(); }); + it('renders a logo component with a custom logo in a non-root url', () => { const store = mockStore({ intl: { @@ -122,4 +123,42 @@ describe('Multilingual Logo', () => { const json = component.toJSON(); expect(json).toMatchSnapshot(); }); + + it('renders a logo component with a custom logo in a non-root url with path', () => { + const store = mockStore({ + intl: { + locale: 'en', + messages: {}, + }, + navroot: { + data: { + id: 'http://localhost:3000/en/@navroot', + navroot: { + '@id': 'http://localhost:3000/en', + title: 'English', + }, + }, + }, + router: { + location: { + pathname: '/en/my/path', + }, + }, + site: { + data: { + 'plone.site_logo': + 'http://localhost:3000/@@site-logo/logo.cab945d8.svg', + }, + }, + }); + const component = renderer.create( + + + + + , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); }); diff --git a/src/components/theme/Logo/Logo.jsx b/src/components/theme/Logo/Logo.jsx index ddb2253d2b..aa29762582 100644 --- a/src/components/theme/Logo/Logo.jsx +++ b/src/components/theme/Logo/Logo.jsx @@ -35,6 +35,7 @@ const Logo = () => { // remove trailing slash const currentURL = toPublicURL(pathname).replace(/\/$/, ''); + return ( - English - +/> `; exports[`Multilingual Logo renders a logo component in a multilingual site root 1`] = ` - - Plone Site - +/> `; exports[`Multilingual Logo renders a logo component with a custom logo in a non-root url 1`] = ` +English +`; + +exports[`Multilingual Logo renders a logo component with a custom logo in a non-root url with path 1`] = ` English From bf67d2ccc60594b0154a88129025e3bccc762315 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 13 Sep 2023 23:18:02 +0200 Subject: [PATCH 85/87] restore pathname --- src/components/theme/SearchWidget/SearchWidget.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index e2751c2bf9..e1a403e9fe 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -23,7 +23,6 @@ const messages = defineMessages({ const SearchWidget = (props) => { const intl = useIntl(); const dispatch = useDispatch(); - const location = useLocation(); const [text, setText] = useState(''); const history = useHistory(); @@ -31,7 +30,7 @@ const SearchWidget = (props) => { setText(value); }; - const pathname = location.pathname; + const pathname = props.pathname; const onSubmit = (event) => { const path = pathname?.length > 0 ? `&path=${encodeURIComponent(pathname)}` : ''; From eee609152f2a489663acf9a0570238023a5a0529 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 13 Sep 2023 23:19:07 +0200 Subject: [PATCH 86/87] remove unused import --- src/components/theme/SearchWidget/SearchWidget.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index e1a403e9fe..ecd35d9721 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { useHistory, useLocation } from 'react-router-dom'; +import { useHistory } from 'react-router-dom'; import { Form, Input } from 'semantic-ui-react'; import { defineMessages, useIntl } from 'react-intl'; import { useDispatch, useSelector } from 'react-redux'; From 14657a94657ab391ec760b06610938a8f56acd91 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Wed, 13 Sep 2023 23:19:41 +0200 Subject: [PATCH 87/87] whitespace --- src/components/theme/SearchWidget/SearchWidget.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/theme/SearchWidget/SearchWidget.jsx b/src/components/theme/SearchWidget/SearchWidget.jsx index ecd35d9721..89db2a9a38 100644 --- a/src/components/theme/SearchWidget/SearchWidget.jsx +++ b/src/components/theme/SearchWidget/SearchWidget.jsx @@ -29,7 +29,6 @@ const SearchWidget = (props) => { const onChangeText = (event, { value }) => { setText(value); }; - const pathname = props.pathname; const onSubmit = (event) => { const path =