From 871c72aae93152f9f473124f0de958c57f8de910 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:10:06 +0400 Subject: [PATCH 01/29] Add icons for deprecated CC licenses --- src/assets/licenses/remix.svg | 5 +++++ src/assets/licenses/sampling-plus.svg | 5 +++++ src/assets/licenses/sampling.svg | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 src/assets/licenses/remix.svg create mode 100644 src/assets/licenses/sampling-plus.svg create mode 100644 src/assets/licenses/sampling.svg diff --git a/src/assets/licenses/remix.svg b/src/assets/licenses/remix.svg new file mode 100644 index 0000000000..21c8d95a6a --- /dev/null +++ b/src/assets/licenses/remix.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/licenses/sampling-plus.svg b/src/assets/licenses/sampling-plus.svg new file mode 100644 index 0000000000..ea3b134b37 --- /dev/null +++ b/src/assets/licenses/sampling-plus.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/licenses/sampling.svg b/src/assets/licenses/sampling.svg new file mode 100644 index 0000000000..bdb78817a4 --- /dev/null +++ b/src/assets/licenses/sampling.svg @@ -0,0 +1,5 @@ + + + + + From eb8ebb8b095b50408ee96626b329fe2826b3a6d6 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:19:00 +0400 Subject: [PATCH 02/29] Replace hardcoded licenses with use of constant --- src/constants/license.js | 2 ++ src/store/search.js | 16 ++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/constants/license.js b/src/constants/license.js index 287229a2d5..09a1a38af8 100644 --- a/src/constants/license.js +++ b/src/constants/license.js @@ -11,6 +11,8 @@ export const NON_CC_LICENSES = ['cc0', 'pdm'] export const DEPRECATED_LICENSES = ['nc-sampling+', 'sampling+'] +export const ACTIVE_LICENSES = [...CC_LICENSES, ...NON_CC_LICENSES] + export const ALL_LICENSES = [ ...CC_LICENSES, ...NON_CC_LICENSES, diff --git a/src/store/search.js b/src/store/search.js index 4541ca6f21..1a53721b95 100644 --- a/src/store/search.js +++ b/src/store/search.js @@ -32,6 +32,7 @@ import { SET_QUERY, SET_SEARCH_TYPE, } from '~/constants/mutation-types' +import { ACTIVE_LICENSES } from '~/constants/license' // The order of the keys here is the same as in the side filter display export const mediaFilterKeys = { @@ -75,16 +76,11 @@ export const mediaSpecificFilters = { /** @type {import('./types').Filters} */ export const filterData = { - licenses: [ - { code: 'cc0', name: 'filters.licenses.cc0', checked: false }, - { code: 'pdm', name: 'filters.licenses.pdm', checked: false }, - { code: 'by', name: 'filters.licenses.by', checked: false }, - { code: 'by-sa', name: 'filters.licenses.by-sa', checked: false }, - { code: 'by-nc', name: 'filters.licenses.by-nc', checked: false }, - { code: 'by-nd', name: 'filters.licenses.by-nd', checked: false }, - { code: 'by-nc-sa', name: 'filters.licenses.by-nc-sa', checked: false }, - { code: 'by-nc-nd', name: 'filters.licenses.by-nc-nd', checked: false }, - ], + licenses: ACTIVE_LICENSES.map((licenseCode) => ({ + code: licenseCode, + name: `filters.licenses.${licenseCode}`, + checked: false, + })), licenseTypes: [ { code: 'commercial', From e8c51b6b99d9573f40e248b6458655f1399e86c4 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:35:41 +0400 Subject: [PATCH 03/29] Add explanation for sampling --- src/locales/en.json | 3 ++- src/locales/po-files/openverse.pot | 41 ++++++++++++++++++------------ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 1efed95aae..152cd974a0 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -430,7 +430,8 @@ "nd": "No derivatives or adaptations permitted.", "sa": "Share adaptations under the same terms.", "cc0": "This work has been marked as dedicated to the public domain.", - "pdm": "This work is marked as being in the public domain." + "pdm": "This work is marked as being in the public domain.", + "sampling+": "Samples, mash-ups, creative transformations permitted." }, "aria": { "close": "close", diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.pot index 7a5823bcf2..972798b952 100644 --- a/src/locales/po-files/openverse.pot +++ b/src/locales/po-files/openverse.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Openverse \n" "Report-Msgid-Bugs-To: https://github.com/wordpress/openverse/issues \n" -"POT-Creation-Date: 2022-02-09T12:36:10+00:00\n" +"POT-Creation-Date: 2022-02-10T13:35:41+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -247,7 +247,7 @@ msgid "Audio seek bar" msgstr "" #. Do not translate words between ### ###. -#: src/components/VAudioTrack/VWaveform.vue:570 +#: src/components/VAudioTrack/VWaveform.vue:572 msgctxt "waveform.current-time" msgid "###time### second" msgid_plural "###time### seconds" @@ -725,7 +725,7 @@ msgctxt "browse-page.aria.remove-filter" msgid "remove filter" msgstr "" -#: src/components/VFilters/VFilterChecklist.vue:26 +#: src/components/VFilters/VFilterChecklist.vue:30 msgctxt "browse-page.aria.license-explanation" msgid "license explanation" msgstr "" @@ -744,7 +744,6 @@ msgctxt "browse-page.aria.relevance.no" msgid "relevant result? answer: no" msgstr "" -#: src/components/VFilters/VLicenseExplanationTooltip.vue:8 msgctxt "browse-page.license-description.title" msgid "License CC" msgstr "" @@ -773,6 +772,10 @@ msgctxt "browse-page.license-description.pdm" msgid "This work is marked as being in the public domain." msgstr "" +msgctxt "browse-page.license-description.sampling+" +msgid "Samples, mash-ups, creative transformations permitted." +msgstr "" + #. Do not translate words between ### ###. msgctxt "browse-page.search-form.placeholder" msgid "Search all ###type###" @@ -862,24 +865,30 @@ msgctxt "filters.aria.remove-filter" msgid "Remove ###label### filter" msgstr "" +msgctxt "filters.license-explanation.license-definition" +msgid "License definition" +msgstr "" + #. Do not translate words between ### ###. -#: src/components/VFilters/VLicenseExplanationTooltip.vue:12 -msgctxt "filters.license-explanation.tool" -msgid "Read more about the tool ###link###." +msgctxt "filters.license-explanation.mark-definition" +msgid "###mark### definition" msgstr "" #. Do not translate words between ### ###. -#: src/components/VFilters/VLicenseExplanationTooltip.vue:24 -msgctxt "filters.license-explanation.license" -msgid "Read more about the license ###link###." +msgctxt "filters.license-explanation.more.license" +msgid "###read-more### about this license." msgstr "" -#: src/components/VFilters/VLicenseExplanationTooltip.vue:20 -msgctxt "filters.license-explanation.link" -msgid "here" +#. Do not translate words between ### ###. +msgctxt "filters.license-explanation.more.mark" +msgid "###read-more### about ###mark###." +msgstr "" + +msgctxt "filters.license-explanation.more.read-more" +msgid "Read more" msgstr "" -#: src/components/VFilters/VFilterChecklist.vue:74 +#: src/components/VFilters/VFilterChecklist.vue:79 msgctxt "filters.searchBy.title" msgid "Search By" msgstr "" @@ -1982,12 +1991,12 @@ msgid "search button" msgstr "" #. Do not translate words between ### ###. -#: src/components/TranslationStatusBanner.vue:7 +#: src/components/VTranslationStatusBanner.vue:7 msgctxt "notification.translation.text" msgid "The translation for ###locale### locale is incomplete. Help us get to 100 percent by ###link###." msgstr "" -#: src/components/TranslationStatusBanner.vue:10 +#: src/components/VTranslationStatusBanner.vue:10 msgctxt "notification.translation.link" msgid "contributing a translation" msgstr "" From 524fe767a08a019f259a115f36037c08d1134071 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:35:58 +0400 Subject: [PATCH 04/29] Update strings to match updated UI --- src/locales/en.json | 10 +++++++--- src/locales/po-files/openverse.pot | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 152cd974a0..38d00554aa 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -387,9 +387,13 @@ "creator": "Creator" }, "license-explanation": { - "tool": "Read more about the tool {link}.", - "license": "Read more about the license {link}.", - "link": "here" + "license-definition": "License definition", + "mark-definition": "{mark} definition", + "more": { + "license": "{read-more} about this license.", + "mark": "{read-more} about {mark}.", + "read-more": "Read more" + } }, "aria": { "remove-filter": "Remove {label} filter" diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.pot index 972798b952..088828a484 100644 --- a/src/locales/po-files/openverse.pot +++ b/src/locales/po-files/openverse.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Openverse \n" "Report-Msgid-Bugs-To: https://github.com/wordpress/openverse/issues \n" -"POT-Creation-Date: 2022-02-10T13:35:41+00:00\n" +"POT-Creation-Date: 2022-02-10T13:35:58+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" From ba944c9fc41119431604f5ab3cd65fb50cc54d02 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:36:26 +0400 Subject: [PATCH 05/29] Refactor and update the license elements component --- src/components/LicenseElements.vue | 55 ----------------------- src/components/VLicenseElements.vue | 67 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 55 deletions(-) delete mode 100644 src/components/LicenseElements.vue create mode 100644 src/components/VLicenseElements.vue diff --git a/src/components/LicenseElements.vue b/src/components/LicenseElements.vue deleted file mode 100644 index 508dfee3d1..0000000000 --- a/src/components/LicenseElements.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/src/components/VLicenseElements.vue b/src/components/VLicenseElements.vue new file mode 100644 index 0000000000..bd8b649962 --- /dev/null +++ b/src/components/VLicenseElements.vue @@ -0,0 +1,67 @@ + + + From 7a24d2afe0be3cab1f66d945fa0b470a1c7e0a7f Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Thu, 10 Feb 2022 17:36:53 +0400 Subject: [PATCH 06/29] Update the usage of the `VLicenseElements` component --- src/components/VMediaInfo/VMediaLicense.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/VMediaInfo/VMediaLicense.vue b/src/components/VMediaInfo/VMediaLicense.vue index b353a593c4..ea3b2ae867 100644 --- a/src/components/VMediaInfo/VMediaLicense.vue +++ b/src/components/VMediaInfo/VMediaLicense.vue @@ -20,7 +20,7 @@ - + From 03ed3bd5eef7eb0584db129a298f96eb315cfad4 Mon Sep 17 00:00:00 2001 From: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com> Date: Tue, 15 Feb 2022 10:13:05 -0500 Subject: [PATCH 23/29] Fix inline popover content taking up space (#870) --- src/components/VPopover/VPopoverContent.vue | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/VPopover/VPopoverContent.vue b/src/components/VPopover/VPopoverContent.vue index 0b2ad9daa6..0a1e49398e 100644 --- a/src/components/VPopover/VPopoverContent.vue +++ b/src/components/VPopover/VPopoverContent.vue @@ -1,15 +1,20 @@ @@ -56,9 +61,3 @@ export default defineComponent({ }, }) - - From b13ea0cbdac957855ffdbedfe03b7d3cfd3db819 Mon Sep 17 00:00:00 2001 From: Dhruv Bhanushali Date: Wed, 16 Feb 2022 15:03:35 +0400 Subject: [PATCH 24/29] Cleanup trigger button --- src/components/VFilters/VFilterChecklist.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/VFilters/VFilterChecklist.vue b/src/components/VFilters/VFilterChecklist.vue index 9259ad7b58..c2cd23a06e 100644 --- a/src/components/VFilters/VFilterChecklist.vue +++ b/src/components/VFilters/VFilterChecklist.vue @@ -24,15 +24,16 @@