Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Remove unused components (#717)

Olga Bulatd2618bbcb44f
diff --git a/package.json b/package.json
index 675975ac6..a865fd266 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"lintfix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
"format": "prettier --write .",
"format:test": "prettier --check .",
- "vue-i18n-extract": "vue-i18n-extract report -v './src/**/*.?(js|vue)' -l './src/locales/*.?(json)'",
+ "vue-i18n-check": "vue-i18n-extract report --vueFiles './src/**/*.?(js|vue)' --languageFiles './src/locales/*.?(json)'",
"prepare": "husky install",
"i18n:update-locales": "node src/locales/scripts/get-validated-locales",
"i18n:get-translations": "pnpm i18n:create-locales-list && node src/locales/scripts/get-translations && pnpm i18n:update-locales",
diff --git a/src/components/AppModal.vue b/src/components/AppModal.vue
deleted file mode 100644
index 945a8d075..000000000
--- a/src/components/AppModal.vue
+++ /dev/null
@@ -1,50 +0,0 @@
-<template>
- <!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events -->
- <div
- ref="modal"
- class="overlay app-modal fixed w-full flex justify-center z-50 bg-dark-charcoal bg-opacity-75"
- @click.self="$emit('close')"
- >
- <FocusTrap :active="true">
- <div
- class="rounded mt-10 mb-80 min-h-min bg-white"
- aria-modal="true"
- role="dialog"
- >
- <slot default />
- </div>
- </FocusTrap>
- </div>
-</template>
-
-<script>
-import { FocusTrap } from 'focus-trap-vue'
-
-/**
- * @todo: This entire component should be moved to vue-vocabulary
- */
-export default {
- name: 'AppModal',
- components: {
- FocusTrap,
- },
- props: {
- /** Required for titlebar AND close button to show */
- title: String,
- subTitle: String,
- },
- mounted() {
- document.addEventListener('keyup', this.closeOnEsc)
- },
- destroyed() {
- document.removeEventListener('keyup', this.closeOnEsc)
- },
- methods: {
- closeOnEsc(e) {
- if (e.keyCode === 27) {
- this.$emit('close')
- }
- },
- },
-}
-</script>
diff --git a/src/components/HomeLicenseFilter.vue b/src/components/HomeLicenseFilter.vue
deleted file mode 100644
index 0ff926e5d..000000000
--- a/src/components/HomeLicenseFilter.vue
+++ /dev/null
@@ -1,38 +0,0 @@
-<template>
- <fieldset class="home-license-filter mt-16 flex justify-center">
- <legend class="flex justify-center w-full mb-2">
- {{ $t('hero.license-filter.label') }}
- </legend>
- <VCheckbox
- v-for="[licenseType, isChecked] in Object.entries(filters)"
- :id="licenseType"
- :key="licenseType"
- class="me-6 last:me-0"
- :checked="isChecked"
- name="licenseType"
- @change="onFilterChanged"
- >
- {{ $t(`filters.license-types.${licenseType}`) }}
- </VCheckbox>
- </fieldset>
-</template>
-
-<script>
-import VCheckbox from '~/components/VCheckbox'
-
-export default {
- name: 'HomeLicenseFilter',
- components: { VCheckbox },
- props: {
- filters: {
- type: Object,
- required: true,
- },
- },
- methods: {
- onFilterChanged({ value, checked }) {
- this.$emit('toggle', { code: value, checked })
- },
- },
-}
-</script>
diff --git a/src/components/SearchGridCell.vue b/src/components/SearchGridCell.vue
deleted file mode 100644
index 586dd40c2..000000000
--- a/src/components/SearchGridCell.vue
+++ /dev/null
@@ -1,221 +0,0 @@
-<template>
- <div
- :aria-label="image.title"
- class="search-grid_item-container"
- :style="`width: ${containerAspect * widthBasis}px;
- flex-grow: ${containerAspect * widthBasis}`"
- >
- <figure class="search-grid_item">
- <i :style="`padding-bottom:${iPadding}%`" />
- <NuxtLink
- :to="localePath('/image/' + image.id)"
- class="search-grid_image-ctr"
- :style="`width: ${imageWidth}%; top: ${imageTop}%; left:${imageLeft}%;`"
- @click="onGotoDetailPage($event, image)"
- >
- <img
- ref="img"
- loading="lazy"
- :class="{
- 'search-grid_image': true,
- 'w-full': !shouldContainImage,
- }"
- :alt="image.title"
- :src="getImageUrl(image)"
- @load="getImgDimension"
- @error="onImageLoadError($event, image)"
- />
- </NuxtLink>
- <figcaption class="overlay overlay__top p-2">
- <VLicense
- :license="image.license"
- :bg-filled="true"
- :hide-name="true"
- />
- </figcaption>
- <figcaption class="overlay overlay__bottom py-2 px-4">
- <span class="caption font-semibold">{{ image.title }}</span>
- </figcaption>
- </figure>
- </div>
-</template>
-
-<script>
-import VLicense from '~/components/License/VLicense.vue'
-
-const errorImage = require('~/assets/image_not_available_placeholder.png')
-
-const minAspect = 3 / 4
-const maxAspect = 16 / 9
-const panaromaAspect = 21 / 9
-const minRowWidth = 450
-
-const toAbsolutePath = (url, prefix = 'https://') => {
- if (url.indexOf('http://') >= 0 || url.indexOf('https://') >= 0) {
- return url
- }
- return `${prefix}${url}`
-}
-
-export default {
- name: 'SearchGridCell',
- components: { VLicense },
- props: ['image', 'shouldContainImage'],
- data() {
- return {
- widthBasis: minRowWidth / maxAspect,
- imgHeight: this.image.height || 100,
- imgWidth: this.image.width || 100,
- }
- },
- computed: {
- imageAspect() {
- return this.imgWidth / this.imgHeight
- },
- containerAspect() {
- if (this.imageAspect > maxAspect) return maxAspect
- if (this.imageAspect < minAspect) return minAspect
- return this.imageAspect
- },
- iPadding() {
- if (this.imageAspect < minAspect) return (1 / minAspect) * 100
- if (this.imageAspect > maxAspect) return (1 / maxAspect) * 100
- return (1 / this.imageAspect) * 100
- },
- imageWidth() {
- if (this.imageAspect < maxAspect) return 100
- return (this.imageAspect / maxAspect) * 100
- },
- imageTop() {
- if (this.imageAspect > minAspect) return 0
- return (
- ((minAspect - this.imageAspect) /
- (this.imageAspect * minAspect * minAspect)) *
- -50
- )
- },
- imageLeft() {
- if (this.imageAspect < maxAspect) return 0
- return ((this.imageAspect - maxAspect) / maxAspect) * -50
- },
- },
- methods: {
- getImageUrl(image) {
- if (!image) {
- return ''
- }
- const url = image.thumbnail || image.url
- if (this.imageAspect > panaromaAspect) return toAbsolutePath(url)
- return toAbsolutePath(url)
- },
- getImageForeignUrl(image) {
- return toAbsolutePath(image.foreign_landing_url)
- },
- onGotoDetailPage(event, image) {
- if (!event.metaKey && !event.ctrlKey) {
- event.preventDefault()
- const detailRoute = this.localeRoute({
- name: 'PhotoDetailPage',
- params: { id: image.id, location: window.scrollY },
- })
- this.$router.push(detailRoute)
- }
- },
- onImageLoadError(event, image) {
- const element = event.target
- if (element.src !== image.url) {
- element.src = image.url
- } else {
- element.src = errorImage
- }
- },
- getImgDimension(e) {
- this.imgHeight = e.target.naturalHeight
- this.imgWidth = e.target.naturalWidth
- },
- },
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.search-grid_image-ctr {
- background: #ebece4;
- display: block;
- width: 100%;
-}
-
-.search-grid_item-container {
- margin: 10px;
-}
-
-.search-grid_item {
- position: relative;
- width: 100%;
- overflow: hidden;
-
- i {
- display: block;
- }
-
- a {
- position: absolute;
- vertical-align: bottom;
- img {
- width: 100%;
- }
- }
-
- &:hover .overlay {
- opacity: 1;
- bottom: 0;
- }
-}
-
-.overlay {
- position: absolute;
- opacity: 0;
- transition: all 0.4s ease;
- color: #fff;
- display: block;
- top: -100%;
-
- &__top {
- top: 0;
- width: 100%;
- height: 2rem;
- }
-
- &__bottom {
- background-color: #000;
- bottom: -100%;
- top: auto;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- max-width: 100%;
- }
-
- // Show on touch devices
- @media (hover: none) {
- position: absolute;
- opacity: 1;
- bottom: 0;
- }
-}
-
-.search-grid_item {
- width: 100%;
- position: relative;
- display: block;
- float: left;
- flex: 0 0 auto;
- flex-grow: 1;
- cursor: pointer;
-}
-
-.search-grid_image {
- margin: auto;
- display: block;
-}
-</style>
diff --git a/src/components/SearchGridForm.vue b/src/components/SearchGridForm.vue
deleted file mode 100644
index 3575b018f..000000000
--- a/src/components/SearchGridForm.vue
+++ /dev/null
@@ -1,137 +0,0 @@
-<template>
- <!-- eslint-disable vuejs-accessibility/no-autofocus -->
- <form
- role="search"
- method="post"
- class="search-form p-4 z-30"
- @submit.prevent="onSubmit"
- >
- <div class="search-field field has-addons control search-control">
- <label for="searchInput" class="search-field__label control label">
- <input
- id="searchInput"
- ref="search"
- :aria-label="$t('browse-page.aria.search')"
- required="required"
- autofocus="true"
- class="search-input input"
- type="search"
- :placeholder="searchBoxPlaceholder"
- :value="searchTermsModel"
- @input="onInput"
- @keyup.enter="onSubmit"
- />
- </label>
- <span class="search-icon">
- <svg
- viewBox="0 0 30 30"
- xmlns="http://www.w3.org/2000/svg"
- width="16"
- height="16"
- >
- <path
- d="M29.59 25.94l-5.842-5.842a1.405 1.405 0 00-.996-.41h-.955a12.128 12.128 0 002.578-7.5C24.375 5.455 18.92 0 12.187 0 5.455 0 0 5.455 0 12.188c0 6.732 5.455 12.187 12.188 12.187 2.83 0 5.431-.96 7.5-2.578v.955c0 .375.146.732.41.996l5.841 5.842a1.4 1.4 0 001.987 0l1.658-1.658c.55-.551.55-1.442.006-1.992zm-17.402-6.253a7.496 7.496 0 01-7.5-7.5c0-4.142 3.351-7.5 7.5-7.5 4.142 0 7.5 3.352 7.5 7.5 0 4.143-3.352 7.5-7.5 7.5z"
- fill="currentColor"
- />
- </svg>
- </span>
- <input
- type="submit"
- class="control button is-primary"
- :value="$t('browse-page.search-form.button')"
- @click.prevent="onSubmit"
- />
- </div>
- </form>
- <!-- eslint-enable -->
-</template>
-
-<script>
-import { SET_FILTER_IS_VISIBLE } from '~/constants/mutation-types'
-import { queryStringToSearchType } from '~/utils/search-query-transform'
-import { VIDEO } from '~/constants/media'
-import { SEARCH } from '~/constants/store-modules'
-import { mapMutations, mapState } from 'vuex'
-
-export default {
- name: 'SearchGridForm',
- data: () => ({ searchTermsModel: null }),
- computed: {
- ...mapState(SEARCH, ['query']),
- searchTerms() {
- return this.query.q
- },
- activeTab() {
- return queryStringToSearchType(this.$route.path)
- },
- searchBoxPlaceholder() {
- return this.$t('browse-page.search-form.placeholder', {
- type: this.$t(`browse-page.search-form.${this.activeTab}`),
- })
- },
- },
- watch: {
- searchTerms: function handler() {
- this.setFormInput()
- },
- },
- mounted: function handler() {
- this.setFormInput()
- },
- methods: {
- ...mapMutations(SEARCH, { setFilterIsVisible: SET_FILTER_IS_VISIBLE }),
- onSubmit(e) {
- e.preventDefault()
- if (this.searchTermsModel) {
- this.$emit('onSearchFormSubmit', {
- q: this.searchTermsModel,
- })
- this.$refs.search.blur()
- }
- },
- onInput(e) {
- this.searchTermsModel = e.target.value
- if (this.activeTab === VIDEO) {
- this.$emit('onSearchFormSubmit', {
- q: this.searchTermsModel,
- })
- }
- },
- setFormInput() {
- this.searchTermsModel = this.searchTerms
- },
- },
-}
-</script>
-
-<style lang="scss" scoped>
-.search-icon {
- @apply start-0 text-light-gray w-10 h-10 absolute items-center inline-flex justify-center pointer-events-none;
-}
-.search-input {
- @apply w-full max-w-full h-10 relative appearance-none items-center justify-start ps-10;
- @apply placeholder-dark-charcoal-50 placeholder-opacity-50;
- @apply text-2xl text-start font-semibold placeholder-dark-charcoal-50;
- @apply border border-light-gray hover:border-gray rounded rounded-e-none focus:outline-none focus:border-gray;
- @apply lg:text-lgr lg:h-14;
-}
-.search-form {
- @apply w-full top-0 sticky bg-white flex;
-}
-
-.search-field {
- @apply flex w-full relative text-start clear-both;
- .label {
- @apply mb-0 flex-1;
- }
-
- .button {
- @apply py-2 px-5 h-10 lg:h-14 lg:px-10 rounded rounded-s-none text-2xl lg:text-lgr;
- }
-}
-.search-icon {
- top: calc(50% - 1.25em);
- // On hover, the icon without z-index disappears
- z-index: 5;
-}
-</style>
diff --git a/src/components/SearchTypeTabs.vue b/src/components/SearchTypeTabs.vue
deleted file mode 100644
index 5edbbce29..000000000
--- a/src/components/SearchTypeTabs.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-<template>
- <section class="tabs">
- <div role="tablist">
- <NuxtLink
- v-for="type in contentTypes"
- :id="type"
- :key="type"
- aria-live="polite"
- :to="tabPath(type)"
- :aria-selected="activeTab == type"
- :aria-controls="'tab-' + type"
- role="tab"
- :class="tabClass(type, 'tab')"
- >
- {{ tabTitle(type) }}
- </NuxtLink>
- </div>
- </section>
-</template>
-
-<script>
-import { capitalize } from '~/utils/format-strings'
-import { ALL_MEDIA, AUDIO, IMAGE, VIDEO } from '~/constants/media'
-import { queryStringToSearchType } from '~/utils/search-query-transform'
-
-export default {
- name: 'SearchTypeTabs',
- data() {
- let contentTypes = [ALL_MEDIA, IMAGE, AUDIO, VIDEO]
- return {
- contentTypes,
- }
- },
- computed: {
- activeTab() {
- return queryStringToSearchType(this.$route.path)
- },
- },
- methods: {
- capitalize,
- tabClass(tabSlug, tabClass) {
- return {
- [tabClass]: true,
- 'text-lg': true,
- 'is-active': tabSlug === this.activeTab,
- }
- },
- tabPath(type) {
- const pathType = type === ALL_MEDIA ? '' : type
- return this.localePath({
- path: `/search/${pathType}`,
- query: this.$route.query,
- })
- },
- tabTitle(type) {
- return this.capitalize(this.$t(`search-tab.${type}`))
- },
- },
-}
-</script>
-
-<style lang="scss" scoped>
-.tabs {
- background-color: white;
- padding-left: 1.5rem;
- border-bottom: 1px solid $color-transition-gray;
-}
-
-.tabs [role='tablist'] {
- border-bottom: none;
-}
-
-.tab:not(.is-active):not(:hover) {
- color: #929496;
-}
-</style>
diff --git a/src/components/SearchTypeToggle.vue b/src/components/SearchTypeToggle.vue
deleted file mode 100644
index 168374397..000000000
--- a/src/components/SearchTypeToggle.vue
+++ /dev/null
@@ -1,60 +0,0 @@
-<template>
- <div
- class="flex gap-2"
- role="radiogroup"
- :aria-label="$t('hero.aria.search-type')"
- >
- <button
- class="toggle-button"
- role="radio"
- type="button"
- :aria-checked="value === 'all'"
- @click="$emit('selected', 'image')"
- >
- {{ $t('hero.search-type.all') }}
- </button>
- <button
- class="toggle-button"
- role="radio"
- type="button"
- :aria-checked="value === 'image'"
- @click="$emit('selected', 'image')"
- >
- {{ $t('hero.search-type.image') }}
- </button>
- <button
- class="toggle-button"
- role="radio"
- type="button"
- :aria-checked="value === 'audio'"
- @click="$emit('selected', 'audio')"
- >
- {{ $t('hero.search-type.audio') }}
- </button>
- </div>
-</template>
-
-<script>
-export default {
- model: {
- prop: 'value',
- event: 'selected',
- },
- props: {
- value: {
- type: String,
- default: 'image',
- },
- },
-}
-</script>
-
-<style scoped>
-.toggle-button {
- @apply py-2 px-4 font-semibold border-2 rounded-sm border-gray;
-}
-
-.toggle-button[aria-checked='true'] {
- @apply bg-trans-blue text-white border-trans-blue;
-}
-</style>
diff --git a/src/components/VContentLink/VContentLink.vue b/src/components/VContentLink/VContentLink.vue
index 4835ca4bb..bf1c5988a 100644
--- a/src/components/VContentLink/VContentLink.vue
+++ b/src/components/VContentLink/VContentLink.vue
@@ -5,10 +5,10 @@
<div class="flex flex-col items-start lg:flex-row lg:items-center">
<VIcon :icon-path="iconPath" />
<p class="hidden lg:block font-semibold pt-1 lg:ps-2 lg:text-2xl">
- {{ $t(`search-tab.see-${mediaType}`) }}
+ {{ $t(`search-type.see-${mediaType}`) }}
</p>
<p class="block lg:hidden font-semibold pt-1 lg:ps-2 lg:text-2xl">
- {{ $t(`search-tab.${mediaType}`) }}
+ {{ $t(`search-type.${mediaType}`) }}
</p>
</div>
<span class="text-sr lg:text-base">{{ resultsCountLabel }}</span>
diff --git a/src/components/VSaferBrowsing.vue b/src/components/VSaferBrowsing.vue
deleted file mode 100644
index 105e6a354..000000000
--- a/src/components/VSaferBrowsing.vue
+++ /dev/null
@@ -1,74 +0,0 @@
-<template>
- <div class="relative" @keyup.esc="closeShowForm">
- <button
- type="button"
- class="appearance-none px-0 leading-10 text-xs text-trans-blue font-semibold"
- style="white-space: nowrap"
- @click="toggleShowForm"
- >
- {{ $t('browse-page.safer-browsing.title') }}
- </button>
- <FocusTrap :active="showForm">
- <div v-show="showForm" class="p-4 arrow-popup arrow-popup--anchor-right">
- <button
- class="button close-button is-text tiny float-right block text-light-gray"
- type="button"
- @click="toggleShowForm"
- >
- <i class="icon cross" />
- </button>
- <p class="caption font-semibold pe-6">
- {{ $t('browse-page.safer-browsing.caption') }}
- </p>
-
- <label class="checkbox mt-2" for="mature">
- <input
- id="mature"
- class="filter-checkbox"
- type="checkbox"
- :checked="mature"
- @change="toggleMature"
- @keyup.enter="toggleMature"
- />
- {{ $t('browse-page.safer-browsing.label') }}
- </label>
- </div>
- </FocusTrap>
- </div>
-</template>
-
-<script>
-import { FocusTrap } from 'focus-trap-vue'
-import { TOGGLE_FILTER } from '~/constants/action-types'
-import { mapActions } from 'vuex'
-import { SEARCH } from '~/constants/store-modules'
-
-export default {
- name: 'VSaferBrowsing',
- components: {
- FocusTrap,
- },
- data() {
- return {
- showForm: false,
- }
- },
- computed: {
- mature() {
- return this.$store.state.search.filters.mature
- },
- },
- methods: {
- ...mapActions(SEARCH, { toggleFilter: TOGGLE_FILTER }),
- toggleShowForm() {
- this.showForm = !this.showForm
- },
- closeShowForm() {
- this.showForm = false
- },
- toggleMature() {
- this.toggleFilter({ filterType: 'mature' })
- },
- },
-}
-</script>
diff --git a/src/components/meta/SearchTypeToggle.stories.js b/src/components/meta/SearchTypeToggle.stories.js
deleted file mode 100644
index 8974c309e..000000000
--- a/src/components/meta/SearchTypeToggle.stories.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import SearchTypeToggle from '~/components/SearchTypeToggle'
-
-export default {
- title: 'Components/SearchTypeToggle',
- component: SearchTypeToggle,
-}
-
-export const Default = () => ({
- template: `
- <div>
- <p>Selected search type: {{ searchType }}</p>
- <SearchTypeToggle v-model="searchType" />
- </div>
- `,
- data() {
- return { searchType: 'audio' }
- },
-})
diff --git a/src/locales/en.json b/src/locales/en.json
index 931cfed61..020c02968 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -7,11 +7,9 @@
},
"hero": {
"brand": "Openverse",
- "title": "Search for content to reuse",
"subtitle": "Browse through over 600 million items to reuse",
"search": {
- "placeholder": "Search for content",
- "button": "Search"
+ "placeholder": "Search for content"
},
"disclaimer": {
"content": "All Openverse content is under a {license} or is in the public domain.",
@@ -26,23 +24,14 @@
},
"aria": {
"search": "search",
- "caption": "about cc licenses",
"search-type": "search type"
- },
- "search-type": {
- "audio": "Audio",
- "image": "Images",
- "prompt": "I would like to find:",
- "all": "All"
}
},
"notification": {
"translation": {
"text": "The translation for {locale} locale is incomplete. Help us get to 100 percent by {link}.",
"link": "contributing a translation"
- },
- "dismiss": "Dismiss",
- "okay": "OK"
+ }
},
"header": {
"about-nav-item": "Our Story",
@@ -311,12 +300,6 @@
},
"conclusion": "Have your favourite content while browsing the web"
},
- "collections": {
- "title": "Browse collections",
- "museum": "Museum Collections",
- "other": "Other Collections",
- "collection-size": "Collection size: {count} images"
- },
"error": {
"occurred": "An error occurred",
"image-not-found": "Couldn't find image with id {id}",
@@ -324,14 +307,6 @@
"image": "image",
"audio": "audio"
},
- "search-tab": {
- "all": "All",
- "image": "Images",
- "audio": "Audio",
- "video": "Video",
- "see-image": "See all images",
- "see-audio": "See all audio"
- },
"filters": {
"title": "Filters",
"filter-by": "Filter By",
@@ -463,11 +438,6 @@
"cc0": "This work has been marked as dedicated to the public domain.",
"pdm": "This work is marked as being in the public domain."
},
- "safer-browsing": {
- "title": "Safer Browsing",
- "caption": "By default, search results will not include results that have been reported as mature by users and sources.",
- "label": "Show Mature Content"
- },
"aria": {
"close": "close",
"scroll": "scroll to top",
@@ -710,6 +680,8 @@
"video": "Videos",
"label": "Type of content to search",
"heading": "Content types",
- "status-beta": "Beta"
+ "status-beta": "Beta",
+ "see-image": "See all images",
+ "see-audio": "See all audio"
}
}
diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.pot
index 4c271e171..8fc4fc245 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-01-24T13:49:13+00:00\n"
+"POT-Creation-Date: 2022-01-26T10:18:21+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -49,6 +49,14 @@ msgctxt "search-type.status-beta"
msgid "Beta"
msgstr ""
+msgctxt "search-type.see-image"
+msgid "See all images"
+msgstr ""
+
+msgctxt "search-type.see-audio"
+msgid "See all audio"
+msgstr ""
+
#: src/components/VModal/VMobileModalContent.vue:30
msgctxt "modal.close"
msgid "Close"
@@ -782,7 +790,6 @@ msgctxt "browse-page.aria.scroll"
msgid "scroll to top"
msgstr ""
-#: src/components/SearchGridForm.vue:14
msgctxt "browse-page.aria.search"
msgid "search"
msgstr ""
@@ -810,21 +817,6 @@ msgctxt "browse-page.aria.relevance.no"
msgid "relevant result? answer: no"
msgstr ""
-#: src/components/VSaferBrowsing.vue:9
-msgctxt "browse-page.safer-browsing.title"
-msgid "Safer Browsing"
-msgstr ""
-
-#: src/components/VSaferBrowsing.vue:21
-msgctxt "browse-page.safer-browsing.caption"
-msgid "By default, search results will not include results that have been reported as mature by users and sources."
-msgstr ""
-
-#: src/components/VSaferBrowsing.vue:33
-msgctxt "browse-page.safer-browsing.label"
-msgid "Show Mature Content"
-msgstr ""
-
#: src/components/VFilters/VLicenseExplanationTooltip.vue:8
msgctxt "browse-page.license-description.title"
msgid "License CC"
@@ -855,7 +847,6 @@ msgid "This work is marked as being in the public domain."
msgstr ""
#. Do not translate words between ### ###.
-#: src/components/SearchGridForm.vue:68
msgctxt "browse-page.search-form.placeholder"
msgid "Search all ###type###"
msgstr ""
@@ -882,7 +873,6 @@ msgctxt "browse-page.search-form.collection-placeholder"
msgid "Search this collection"
msgstr ""
-#: src/components/SearchGridForm.vue:41
msgctxt "browse-page.search-form.button"
msgid "Search"
msgstr ""
@@ -1155,30 +1145,6 @@ msgctxt "filters.licenses.by-nc-nd"
msgid "BY-NC-ND"
msgstr ""
-msgctxt "search-tab.all"
-msgid "All"
-msgstr ""
-
-msgctxt "search-tab.image"
-msgid "Images"
-msgstr ""
-
-msgctxt "search-tab.audio"
-msgid "Audio"
-msgstr ""
-
-msgctxt "search-tab.video"
-msgid "Video"
-msgstr ""
-
-msgctxt "search-tab.see-image"
-msgid "See all images"
-msgstr ""
-
-msgctxt "search-tab.see-audio"
-msgid "See all audio"
-msgstr ""
-
msgctxt "error.occurred"
msgid "An error occurred"
msgstr ""
@@ -1203,23 +1169,7 @@ msgctxt "error.audio"
msgid "audio"
msgstr ""
-msgctxt "collections.title"
-msgid "Browse collections"
-msgstr ""
-
-msgctxt "collections.museum"
-msgid "Museum Collections"
-msgstr ""
-
-msgctxt "collections.other"
-msgid "Other Collections"
-msgstr ""
-
-#. Do not translate words between ### ###.
-msgctxt "collections.collection-size"
-msgid "Collection size: ###count### images"
-msgstr ""
-
+#: src/pages/extension.vue:91
msgctxt "extension.title"
msgid "Web extension"
msgstr ""
@@ -2102,14 +2052,6 @@ msgctxt "header.aria.sr-search"
msgid "search button"
msgstr ""
-msgctxt "notification.dismiss"
-msgid "Dismiss"
-msgstr ""
-
-msgctxt "notification.okay"
-msgid "OK"
-msgstr ""
-
#. Do not translate words between ### ###.
#: src/components/TranslationStatusBanner.vue:7
msgctxt "notification.translation.text"
@@ -2121,49 +2063,21 @@ msgctxt "notification.translation.link"
msgid "contributing a translation"
msgstr ""
-#: src/pages/index.vue:11
+#: src/pages/about.vue:103
msgctxt "hero.brand"
msgid "Openverse"
msgstr ""
-msgctxt "hero.title"
-msgid "Search for content to reuse"
-msgstr ""
-
#: src/pages/index.vue:21
msgctxt "hero.subtitle"
msgid "Browse through over 600 million items to reuse"
msgstr ""
-#: src/components/SearchTypeToggle.vue:32
-msgctxt "hero.search-type.audio"
-msgid "Audio"
-msgstr ""
-
-#: src/components/SearchTypeToggle.vue:23
-msgctxt "hero.search-type.image"
-msgid "Images"
-msgstr ""
-
-msgctxt "hero.search-type.prompt"
-msgid "I would like to find:"
-msgstr ""
-
-#: src/components/SearchTypeToggle.vue:14
-msgctxt "hero.search-type.all"
-msgid "All"
-msgstr ""
-
#: src/components/VHeader/VSearchBar/VSearchBar.vue:9
msgctxt "hero.aria.search"
msgid "search"
msgstr ""
-msgctxt "hero.aria.caption"
-msgid "about cc licenses"
-msgstr ""
-
-#: src/components/SearchTypeToggle.vue:5
msgctxt "hero.aria.search-type"
msgid "search type"
msgstr ""
@@ -2177,7 +2091,6 @@ msgctxt "hero.locale.icon"
msgid "locale"
msgstr ""
-#: src/components/HomeLicenseFilter.vue:4
msgctxt "hero.license-filter.label"
msgid "I want something I can"
msgstr ""
@@ -2198,10 +2111,6 @@ msgctxt "hero.search.placeholder"
msgid "Search for content"
msgstr ""
-msgctxt "hero.search.button"
-msgid "Search"
-msgstr ""
-
#: src/layouts/error.vue:18
msgctxt "404.title"
msgid "The content you’re looking for seems to have disappeared."
diff --git a/test/unit/specs/components/home-license-filter.spec.js b/test/unit/specs/components/home-license-filter.spec.js
deleted file mode 100644
index 1884a23b1..000000000
--- a/test/unit/specs/components/home-license-filter.spec.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import Vuex from 'vuex'
-import { render, screen } from '@testing-library/vue'
-import { createLocalVue } from '@vue/test-utils'
-import HomeLicenseFilter from '~/components/HomeLicenseFilter'
-import VCheckbox from '~/components/VCheckbox'
-
-describe('HomeLicenseFilter', () => {
- let options = {}
- let localVue = null
- let propsData = null
-
- beforeEach(() => {
- localVue = createLocalVue()
- localVue.use(Vuex)
- localVue.component('VCheckbox', VCheckbox)
- propsData = {
- filters: { commercial: false, modification: false },
- }
- options = {
- localVue,
- props: propsData,
- }
- })
-
- it('renders checkboxes', async () => {
- await render(HomeLicenseFilter, options)
- const checkboxes = screen.queryAllByRole('checkbox')
- expect(checkboxes.length).toEqual(2)
-
- const commercialCheckbox = screen.queryByLabelText(/commercial/i)
- expect(commercialCheckbox).toBeTruthy()
-
- const modificationCheckbox = screen.queryByLabelText(/modification/i)
- expect(modificationCheckbox).toBeTruthy()
- })
-
- it('toggles checkboxes', async () => {
- render(HomeLicenseFilter, options)
- const commercialCheckbox = screen.queryByLabelText(/commercial/i)
- await commercialCheckbox.click()
- const checked = screen.queryAllByRole('checkbox', { checked: true })
-
- expect(checked.length).toEqual(1)
- })
-})
diff --git a/test/unit/specs/components/search-grid-cell.spec.js b/test/unit/specs/components/search-grid-cell.spec.js
deleted file mode 100644
index 75e56ce38..000000000
--- a/test/unit/specs/components/search-grid-cell.spec.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import SearchGridCell from '~/components/SearchGridCell'
-import render from '../../test-utils/render'
-
-describe('SearchGridCell', () => {
- const props = {
- image: {
- id: 0,
- license: 'by',
- title: 'foo',
- provider: 'flickr',
- url: 'foo.bar',
- thumbnail: 'foo.bar',
- foreign_landing_url: 'foreign_foo.bar',
- },
- }
- const options = {
- propsData: props,
- stubs: ['NuxtLink', 'VLicense'],
- }
-
- it('should render correct contents', () => {
- const wrapper = render(SearchGridCell, options)
- expect(wrapper.find('div').find('figure').element).toBeDefined()
- })
-
- it('getImageUrl returns image url with https://', () => {
- const wrapper = render(SearchGridCell, options)
- expect(wrapper.vm.getImageUrl(props.image)).toBe('https://foo.bar')
- })
-
- it('getImageForeignUrl returns foreign image url with https://', () => {
- const wrapper = render(SearchGridCell, options)
- expect(wrapper.vm.getImageForeignUrl(props.image)).toBe(
- 'https://foreign_foo.bar'
- )
- })
-
- it('links to the details page', async () => {
- const localeRouteMock = jest.fn()
- const wrapper = render(SearchGridCell, {
- propsData: props,
- mocks: { localeRoute: localeRouteMock },
- })
- const link = wrapper.find('.search-grid_image-ctr')
- await link.trigger('click')
- expect(localeRouteMock).toHaveBeenCalledWith({
- name: 'PhotoDetailPage',
- params: { id: 0, location: 0 },
- })
- })
-})
diff --git a/test/unit/specs/components/search-type-toggle.spec.js b/test/unit/specs/components/search-type-toggle.spec.js
deleted file mode 100644
index 979dc3729..000000000
--- a/test/unit/specs/components/search-type-toggle.spec.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import Vue from 'vue'
-import SearchTypeToggle from '~/components/SearchTypeToggle'
-import { render, screen } from '@testing-library/vue'
-import userEvent from '@testing-library/user-event'
-
-const TestWrapper = Vue.component('TestWrapper', {
- components: { SearchTypeToggle },
- data() {
- return { value: undefined }
- },
- template: `<SearchTypeToggle v-model="value" />`,
-})
-
-const getImageRadio = () => screen.getByText('hero.search-type.image')
-const getAudioRadio = () => screen.getByText('hero.search-type.audio')
-
-describe('SearchTypeToggle', () => {
- it('should default to image checked', () => {
- render(TestWrapper)
- const imageRadio = getImageRadio()
- const audioRadio = getAudioRadio()
- expect(imageRadio).toHaveAttribute('aria-checked', 'true')
- expect(audioRadio).not.toHaveAttribute('aria-checked')
- })
-
- it('should select the clicked search type', async () => {
- render(TestWrapper)
- await userEvent.click(getAudioRadio())
- expect(getImageRadio()).not.toHaveAttribute('aria-checked')
- expect(getAudioRadio()).toHaveAttribute('aria-checked', 'true')
- })
-})