diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c941c8..7b757ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [5.1.1](https://github.com/eea/volto-call-to-action-block/compare/5.1.0...5.1.1) - 22 July 2024 + ### [5.1.0](https://github.com/eea/volto-call-to-action-block/compare/5.0.0...5.1.0) - 27 June 2024 #### :bug: Bug Fixes +- fix(call-to-action): linking to file downloads by using UniversalLink component #32 from eea/develop [ichim-david - [`f421a83`](https://github.com/eea/volto-call-to-action-block/commit/f421a83e1bccc3b3b634862d2c179131a775aeea)] - fix(call-to-action): linking to file downloads by using UniversalLink component [David Ichim - [`a31f7f1`](https://github.com/eea/volto-call-to-action-block/commit/a31f7f127e213c61ca0fd5129070f9768833a900)] #### :hammer_and_wrench: Others @@ -23,6 +26,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others +- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`c4d46c9`](https://github.com/eea/volto-call-to-action-block/commit/c4d46c90ebb89487fee7d4178344527b192c6542)] ### [4.3.1](https://github.com/eea/volto-call-to-action-block/compare/4.3.0...4.3.1) - 19 February 2024 #### :bug: Bug Fixes @@ -37,6 +41,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others +- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`c6c7eb8`](https://github.com/eea/volto-call-to-action-block/commit/c6c7eb868fca220f35f1a7d9932c18be5353d671)] - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`47dc9e2`](https://github.com/eea/volto-call-to-action-block/commit/47dc9e2d224e1dc3ea873df912108d24b51bccbf)] - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`da3e7c3`](https://github.com/eea/volto-call-to-action-block/commit/da3e7c3cfd3d35e8316f3f9e9707983698b7ecec)] ### [4.3.0](https://github.com/eea/volto-call-to-action-block/compare/4.2.2...4.3.0) - 16 January 2024 @@ -48,15 +53,22 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others - Release 4.3.0 [Alin Voinea - [`b491422`](https://github.com/eea/volto-call-to-action-block/commit/b4914228e57f318fbca137f411dd49f3712df9c8)] +- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`c6057b3`](https://github.com/eea/volto-call-to-action-block/commit/c6057b319380f1ebcb5cc7fbeb529e444fff4705)] +- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`e44ba72`](https://github.com/eea/volto-call-to-action-block/commit/e44ba72a949a5eeb034acf50af9f6fc3c69b355b)] +- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`85a327e`](https://github.com/eea/volto-call-to-action-block/commit/85a327e45eca2ad418cc362842925eda53bb57eb)] +- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`afd3faf`](https://github.com/eea/volto-call-to-action-block/commit/afd3faf1a9e85a7f88dcb14b53c0c8c4bdb87745)] +- test: [JENKINS] Improve cypress time [valentinab25 - [`09e77ac`](https://github.com/eea/volto-call-to-action-block/commit/09e77acaa10dda801c8dbb5d49b087f6aabf0ba3)] ### [4.2.2](https://github.com/eea/volto-call-to-action-block/compare/4.2.1...4.2.2) - 2 November 2023 #### :house: Internal changes +- chore: [JENKINS] Refactor automated testing [valentinab25 - [`478cf6c`](https://github.com/eea/volto-call-to-action-block/commit/478cf6c50122dada7bb1f7859bd8e9795828db49)] - chore: husky, lint-staged use fixed versions [valentinab25 - [`67f68bc`](https://github.com/eea/volto-call-to-action-block/commit/67f68bcc6fde8888cb44b0c483b4c1933d207e54)] - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`e958386`](https://github.com/eea/volto-call-to-action-block/commit/e95838603735d0ebfa7829359d1503a4e06a39ac)] #### :hammer_and_wrench: Others +- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`6a58b9c`](https://github.com/eea/volto-call-to-action-block/commit/6a58b9cde2882d1f0996a5329823bb3a6e03011b)] - Update README.md [ana-oprea - [`f9b73a5`](https://github.com/eea/volto-call-to-action-block/commit/f9b73a50664cf4a4f1292eb2d5a93dd156e70639)] ### [4.2.1](https://github.com/eea/volto-call-to-action-block/compare/4.2.0...4.2.1) - 29 September 2023 @@ -88,6 +100,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`8522a41`](https://github.com/eea/volto-call-to-action-block/commit/8522a4181a5a622c2e30482dee26cd740d6c3d09)] - i18n: Add en [Alin Voinea - [`be35c5d`](https://github.com/eea/volto-call-to-action-block/commit/be35c5dc9ba4f29d5abd6c8eb261371e8daf23bf)] - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`567a4ac`](https://github.com/eea/volto-call-to-action-block/commit/567a4ac159360e799ddc5fdcdbef5ec1e453dbe9)] +- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`647da7b`](https://github.com/eea/volto-call-to-action-block/commit/647da7bcd410cf2731835f4246888ec97a793bb5)] ### [4.1.4](https://github.com/eea/volto-call-to-action-block/compare/4.1.3...4.1.4) - 16 June 2023 ### [4.1.3](https://github.com/eea/volto-call-to-action-block/compare/4.1.2...4.1.3) - 14 June 2023 @@ -96,11 +109,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :house: Internal changes +- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`2e2d8ad`](https://github.com/eea/volto-call-to-action-block/commit/2e2d8ad039cd60ac5391b63d5359b5bf7cb4d4a5)] #### :hammer_and_wrench: Others - test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`e9c4a3f`](https://github.com/eea/volto-call-to-action-block/commit/e9c4a3f6fd4ecad1e1ff2ef28876dcb500ecd4b3)] - test: Fix test config, coverage Refs #253277 [valentinab25 - [`8a67d7f`](https://github.com/eea/volto-call-to-action-block/commit/8a67d7f21794a33976bbf46b84309cca0c9e58fd)] +- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3ae3cb5`](https://github.com/eea/volto-call-to-action-block/commit/3ae3cb51c08b53530cca88921fd8bbc097fa6b70)] ### [4.1.1](https://github.com/eea/volto-call-to-action-block/compare/4.1.0...4.1.1) - 4 April 2023 #### :nail_care: Enhancements @@ -112,6 +127,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others +- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8911bba`](https://github.com/eea/volto-call-to-action-block/commit/8911bbadbe3036432c8d083cc836d3ab7f36c01c)] +- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`d58685c`](https://github.com/eea/volto-call-to-action-block/commit/d58685ca755e59cd77090ddeb446855d56a73876)] ## [4.0.0](https://github.com/eea/volto-call-to-action-block/compare/3.0.1...4.0.0) - 7 February 2023 #### :nail_care: Enhancements @@ -131,7 +148,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others +- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`e46fb39`](https://github.com/eea/volto-call-to-action-block/commit/e46fb392ba15f9280e1a2d91b38e4acaa3105486)] +- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`184e4d5`](https://github.com/eea/volto-call-to-action-block/commit/184e4d527764cbb754398b7c1975268c0eacdc86)] +- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`8ff40cc`](https://github.com/eea/volto-call-to-action-block/commit/8ff40cc8fb5087bd0f56fbc3e38a26f5d61d63fa)] - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`d1ba7b8`](https://github.com/eea/volto-call-to-action-block/commit/d1ba7b844f114305604e7f8c8b3158746dd59a7b)] +- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`4dea109`](https://github.com/eea/volto-call-to-action-block/commit/4dea10962560c760c2c44db27d3446a4268ded57)] +- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`fd6b7f3`](https://github.com/eea/volto-call-to-action-block/commit/fd6b7f31d28e05ed254a32bb213ad662e2635c96)] +- yarn 3 [Alin Voinea - [`8bfd09a`](https://github.com/eea/volto-call-to-action-block/commit/8bfd09a161d1d0b3174585c172a3804e56315dea)] +- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`440cd71`](https://github.com/eea/volto-call-to-action-block/commit/440cd71451fd5d5ef0316b5c74b61e66170444a7)] +- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`e05f0dd`](https://github.com/eea/volto-call-to-action-block/commit/e05f0dd0cf782872b4105f3305c7f40ccb69cbb9)] +- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`6d44be8`](https://github.com/eea/volto-call-to-action-block/commit/6d44be88d8aabd57a8b74a3e16be7032dfda5eee)] +- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`4867cf3`](https://github.com/eea/volto-call-to-action-block/commit/4867cf362a91ea38bded8598d1937d33b35a12ab)] ## [2.0.0](https://github.com/eea/volto-call-to-action-block/compare/1.0.0...2.0.0) - 16 November 2022 #### :nail_care: Enhancements @@ -141,6 +168,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others - test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`39e8df4`](https://github.com/eea/volto-call-to-action-block/commit/39e8df468509414924327917154f035235ec5798)] +- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`0e06348`](https://github.com/eea/volto-call-to-action-block/commit/0e06348412feed9eeea6ae5d06ae59b8c21e4eff)] - test(cypress): Rename [Alin Voinea - [`ef8b823`](https://github.com/eea/volto-call-to-action-block/commit/ef8b82323a0c108e58f73c180f5b4cb23ed04f0e)] ## [1.0.0](https://github.com/eea/volto-call-to-action-block/compare/0.2.4...1.0.0) - 28 October 2022 @@ -154,6 +182,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - test(cypress): Fix typo [Alin Voinea - [`f3cc342`](https://github.com/eea/volto-call-to-action-block/commit/f3cc3424ace81d26b296882b8484d6b6b12b0d28)] - Cleanup [Alin Voinea - [`2e63ef6`](https://github.com/eea/volto-call-to-action-block/commit/2e63ef665d3812d44b6a87bac6c7f657e40e2147)] - Update dependencies [Alin Voinea - [`cfb5062`](https://github.com/eea/volto-call-to-action-block/commit/cfb50627df9a9a15ebe67adc43dac97379c64efb)] +- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`09c7c14`](https://github.com/eea/volto-call-to-action-block/commit/09c7c14265b0e63f054c3373530ba1dfbd39f4f7)] ### [0.2.4](https://github.com/eea/volto-call-to-action-block/compare/0.2.3...0.2.4) - 30 June 2022 ### [0.2.3](https://github.com/eea/volto-call-to-action-block/compare/0.2.2...0.2.3) - 30 June 2022 @@ -161,6 +190,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others - Add tertiary theming option [Alin Voinea - [`c133291`](https://github.com/eea/volto-call-to-action-block/commit/c133291f17c7a8800271bafe96c008dae3b4ee79)] +- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`720a9a6`](https://github.com/eea/volto-call-to-action-block/commit/720a9a62f1505906b5e6e0667272e07598a67972)] ### [0.2.2](https://github.com/eea/volto-call-to-action-block/compare/0.2.1...0.2.2) - 2 June 2022 ### [0.2.1](https://github.com/eea/volto-call-to-action-block/compare/0.2.0...0.2.1) - 2 June 2022 @@ -183,4 +213,5 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others +- yarn bootstrap [Alin Voinea - [`12f3e83`](https://github.com/eea/volto-call-to-action-block/commit/12f3e834d6d3e257cb9e7b6dde80dab783613a01)] - Initial commit [Alin Voinea - [`00f39c8`](https://github.com/eea/volto-call-to-action-block/commit/00f39c8a36327a821cc613a772bf228451a71e67)] diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 54c5546..22eb2ec 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 54c5546..22eb2ec 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 54c5546..22eb2ec 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 54c5546..22eb2ec 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 54c5546..22eb2ec 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 459549d..8393e03 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -11,88 +11,98 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "Aliniere" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "Buton acțiune" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "Apasă aici" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "Pictogramă" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "Pictogramă pe dreapta" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "Inversat" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "Etichetă" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "Legătură" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "Deschide în fereastră nouă" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "Deschide în tab nou" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "Deschide în această fereastră" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "Deschide în cadrul superior" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "Primară" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "Secundară" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "Țintă" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "Terțiară" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "Temă" diff --git a/locales/volto.pot b/locales/volto.pot index 2d807d6..b23a380 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,100 +1,110 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-08-29T17:12:31.348Z\n" +"POT-Creation-Date: 2024-07-13T09:02:58.528Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" "Language-Code: en\n" "Language-Name: English\n" "Preferred-Encodings: utf-8\n" "Domain: volto\n" +#. Default: "Alignment" #: components/Schema -# defaultMessage: Alignment msgid "Alignment" msgstr "" +#. Default: "Call to Action" #: components/Edit #: components/Schema -# defaultMessage: Call to Action msgid "Call to Action" msgstr "" +#. Default: "Click here" #: components/Schema -# defaultMessage: Click here msgid "Click here" msgstr "" +#. Default: "Download file" +#: components/Schema +msgid "Download file" +msgstr "" + +#. Default: "Icon" #: components/Schema -# defaultMessage: Icon msgid "Icon" msgstr "" +#. Default: "Icon on the right" #: components/Schema -# defaultMessage: Icon on the right msgid "Icon on the right" msgstr "" +#. Default: "If enabled, the file linked will be downloaded instead of opened" +#: components/Schema +msgid "If enabled, the file linked will be downloaded instead of opened" +msgstr "" + +#. Default: "Inverted" #: components/Schema -# defaultMessage: Inverted msgid "Inverted" msgstr "" +#. Default: "Label" #: components/Schema -# defaultMessage: Label msgid "Label" msgstr "" +#. Default: "Link" #: components/Schema -# defaultMessage: Link msgid "Link" msgstr "" +#. Default: "Open in new window" #: components/Schema -# defaultMessage: Open in new window msgid "Open in new window" msgstr "" +#. Default: "" #: components/Schema -# defaultMessage: undefined msgid "Open in parent window / frame" msgstr "" +#. Default: "Open in this window / frame" #: components/Schema -# defaultMessage: Open in this window / frame msgid "Open in this window / frame" msgstr "" +#. Default: "Open in top frame (replaces all frames)" #: components/Schema -# defaultMessage: Open in top frame (replaces all frames) msgid "Open in top frame (replaces all frames)" msgstr "" +#. Default: "Primary" #: components/Schema -# defaultMessage: Primary msgid "Primary" msgstr "" +#. Default: "Secondary" #: components/Schema -# defaultMessage: Secondary msgid "Secondary" msgstr "" +#. Default: "Target" #: components/Schema -# defaultMessage: Target msgid "Target" msgstr "" +#. Default: "Tertiary" #: components/Schema -# defaultMessage: Tertiary msgid "Tertiary" msgstr "" +#. Default: "Theme" #: components/Schema -# defaultMessage: Theme msgid "Theme" msgstr "" diff --git a/package.json b/package.json index 9ca8ba3..dca0b21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-call-to-action-block", - "version": "5.1.0", + "version": "5.1.1", "description": "@eeacms/volto-call-to-action-block: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", diff --git a/src/components/Schema.js b/src/components/Schema.js index e93d326..1c7d888 100644 --- a/src/components/Schema.js +++ b/src/components/Schema.js @@ -75,6 +75,15 @@ const messages = defineMessages({ id: 'Open in top frame (replaces all frames)', defaultMessage: 'Open in top frame (replaces all frames)', }, + Download: { + id: 'Download file', + defaultMessage: 'Download file', + }, + DownloadDescription: { + id: 'If enabled, the file linked will be downloaded instead of opened', + defaultMessage: + 'If enabled, the file linked will be downloaded instead of opened', + }, }); export const EditSchema = ({ intl }) => ({ @@ -84,7 +93,7 @@ export const EditSchema = ({ intl }) => ({ { id: 'default', title: 'Default', - fields: ['text', 'href', 'target'], + fields: ['text', 'href', 'download', 'target'], }, ], @@ -97,6 +106,12 @@ export const EditSchema = ({ intl }) => ({ title: intl.formatMessage(messages.Link), widget: 'call_to_action', }, + download: { + title: intl.formatMessage(messages.Download), + description: intl.formatMessage(messages.DownloadDescription), + type: 'boolean', + default: false, + }, target: { title: intl.formatMessage(messages.Target), choices: [ diff --git a/src/components/View.jsx b/src/components/View.jsx index 978fe7e..0d37f9f 100644 --- a/src/components/View.jsx +++ b/src/components/View.jsx @@ -37,10 +37,9 @@ const View = ({ data, isEditMode }) => { }, [isEditMode, data.href]); const url = hasLink && isInternalURL(href) ? flattenToAppURL(href) : href; - const As = hasLink && isInternalURL(url) ? UniversalLink : 'a'; return (
- { : '', data.styles?.theme, )} - href={hasLink ? url : null} - to={hasLink ? url : null} + download={data.download} + href={url} title={hasLink ? data.text : ''} target={data.target} > - +
); }; diff --git a/src/components/Widget.jsx b/src/components/Widget.jsx index 2bc4aa4..fc2a8cc 100644 --- a/src/components/Widget.jsx +++ b/src/components/Widget.jsx @@ -43,10 +43,17 @@ export const CallToActionWidget = (props) => { } = props; const inputId = `field-${id}`; + // Check if value is an array and isn't empty to avoid an error when passing value + // to isInternalURL, we always need a string value + const isArray = Array.isArray(props.value); + const initialValue = isArray + ? props.value.length > 0 + ? props.value[0]?.['@id'] + : '' + : props.value; + const [value, setValue] = useState( - isInternalURL(props.value?.[0]?.['@id'] || props.value) - ? flattenToAppURL(props.value?.[0]?.['@id'] || props.value) - : props.value, + isInternalURL(initialValue) ? flattenToAppURL(initialValue) : initialValue, ); const [isInvalid, setIsInvalid] = useState(false); /**