Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Refine configurations for the vue-i18n eslint plugin (#1252)
Krystle Salazar3fab47636b65
diff --git a/.eslintrc.js b/.eslintrc.jsindex 93ad6cadb..d9e7c0ac4 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -161,6 +161,20 @@ module.exports = {},],'import/extensions': ['error', 'always', { js: 'never', ts: 'never' }],+ '@intlify/vue-i18n/no-raw-text': [+ 'error',+ {+ ignoreText: [+ // Brand names that should not be translated+ 'Common Crawl',+ 'Creative Commons',+ 'Europeana',+ 'Flickr',+ 'Openverse',+ 'WordPress',+ ],+ },+ ],},overrides: [{@@ -169,6 +183,12 @@ module.exports = {'tsdoc/syntax': 'warn',},},+ {+ files: ['*.spec.js'],+ rules: {+ '@intlify/vue-i18n/no-raw-text': ['off'],+ },+ },],settings: {'vue-i18n': {diff --git a/package.json b/package.jsonindex 1c23704c0..154a6eb4d 100644--- a/package.json+++ b/package.json@@ -42,7 +42,7 @@"test:storybook:debug": "PWDEBUG=1 pnpm test:storybook:local","test:storybook:gen": "playwright codegen localhost:54000/","types": "vue-tsc --noEmit",- "lint": "prettier --check .; eslint --ext .js,.vue,.ts --ignore-path .gitignore --ignore-path .eslintignore .",+ "lint": "prettier --check .; eslint --ext .js,.vue,.ts --ignore-path .gitignore --ignore-path .eslintignore --max-warnings=0 .","lint:fix": "prettier --write --loglevel=warn .; pnpm lint -- --fix","i18n": "pnpm i18n:create-locales-list && pnpm i18n:get-translations && pnpm i18n:update-locales","i18n:no-get": "pnpm i18n:create-locales-list && pnpm i18n:update-locales",diff --git a/src/components/VFourOhFour.vue b/src/components/VFourOhFour.vueindex 99ed51562..d033dfda2 100644--- a/src/components/VFourOhFour.vue+++ b/src/components/VFourOhFour.vue@@ -1,7 +1,6 @@<template><main class="bg-yellow h-screen relative page-404 overflow-x-hidden"><VLink href="/" class="relative z-10 text-dark-charcoal">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><span class="sr-only">Openverse</span><spanclass="flex flex-row pt-6 lg:pt-8 ms-6 lg:ms-10 h-auto w-30 text-dark-charcoal"@@ -24,13 +23,11 @@<p class="font-semibold"><i18n path="404.main"><template #link>- <!-- eslint-disable @intlify/vue-i18n/no-raw-text --><VLinkclass="underline text-current hover:text-current active:text-current"href="/">Openverse</VLink>- <!-- eslint-enable @intlify/vue-i18n/no-raw-text --></template></i18n></p>diff --git a/src/components/VMetaSearch/VMetaSearchForm.vue b/src/components/VMetaSearch/VMetaSearchForm.vueindex 59a562df5..af5eab255 100644--- a/src/components/VMetaSearch/VMetaSearchForm.vue+++ b/src/components/VMetaSearch/VMetaSearchForm.vue@@ -15,7 +15,6 @@tag="h4"class="b-header mb-2">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #type>{{ type }}diff --git a/src/locales/po-files/openverse.pot b/src/locales/po-files/openverse.potindex e74d9ab3b..f6b2bb819 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-04-06T10:05:03+00:00\n"+"POT-Creation-Date: 2022-04-08T16:46:12+00:00\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"@@ -259,7 +259,7 @@ msgid "Edge"msgstr ""#. Do not translate words between ### ###.-#: src/components/VMetaSearch/VMetaSearchForm.vue:49+#: src/components/VMetaSearch/VMetaSearchForm.vue:48msgctxt "meta-search.caption"msgid "###openverse### does not currently index the sources listed above, but through this interface is offering convenient access to search services provided by other independent organizations. ###openverse### has no control over the results that are returned. Do not assume that the results displayed in this search portal are under a CC license. Always verify that the work is actually under a CC license by following the link. If you are in doubt, you should contact the copyright holder directly, or try to contact the site where you found the content."msgstr ""@@ -270,7 +270,7 @@ msgid "###openverse### does not yet support built-in ###type### search."msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:41+#: src/pages/meta-search.vue:40msgctxt "meta-search.form.supported-title"msgid "Not finding what you're looking for? Try additional ###type### sources."msgstr ""@@ -282,7 +282,7 @@ msgid "No ###type### results for \"###query###\"."msgstr ""#. Do not translate words between ### ###.-#: src/components/VMetaSearch/VMetaSearchForm.vue:33+#: src/components/VMetaSearch/VMetaSearchForm.vue:32msgctxt "meta-search.form.caption"msgid "Click on a source below to directly search other collections of CC-licensed ###type###.###break###Please note that Use filters are not supported for ###filter###."msgstr ""@@ -1439,138 +1439,138 @@ msgctxt "meta-search-page.intro"msgid "###openverse### is built on top of a catalog that indexes CC-licensed and public domain content from selected sources. Learn more about our ###link###."msgstr ""-#: src/pages/meta-search.vue:11+#: src/pages/meta-search.vue:10msgctxt "meta-search-page.link"msgid "sources"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:14+#: src/pages/meta-search.vue:13msgctxt "meta-search-page.license"msgid "The internet is a big place! There are plenty of search portals and collections, hosting CC-licensed and public domain content, which we aren’t able to index or surface results from within the ###openverse### interface. These are important sources of CC-licensed and public domain content, and we want to make sure that you are able to find the best openly licensed materials possible, regardless of where they are located."msgstr ""-#: src/pages/meta-search.vue:16+#: src/pages/meta-search.vue:15msgctxt "meta-search-page.content"msgid "What content types can I search for using the Meta Search feature?"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:19+#: src/pages/meta-search.vue:18msgctxt "meta-search-page.content-types"msgid "Meta Search on ###openverse### currently supports image, audio, and video search on external sites."msgstr ""-#: src/pages/meta-search.vue:50+#: src/pages/meta-search.vue:49msgctxt "meta-search-page.use"msgid " Use "msgstr ""-#: src/pages/meta-search.vue:104+#: src/pages/meta-search.vue:103msgctxt "meta-search-page.why.title"msgid "Why did you build this?"msgstr ""-#: src/pages/meta-search.vue:106+#: src/pages/meta-search.vue:105msgctxt "meta-search-page.why.content"msgid "For many years, CC has offered its users a dedicated search portal for searching platforms that have CC licensing filters built in. These platforms included Europeana, Google Images, Flickr, Jamendo, Open Clip Art Library, SpinXpress, Wikimedia Commons, YouTube, ccMixter, and SoundCloud. The search experience looked like this:"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:108+#: src/pages/meta-search.vue:107msgctxt "meta-search-page.why.new"msgid "For users of the legacy CC Meta Search site, the Meta Search feature on ###openverse### will look familiar. The goal was to ensure that the functionality is not lost, but is updated and embedded within our new search engine for openly licensed content. In addition, the Meta Search feature builds on this functionality, allowing us to quickly add new sources to Meta Search as we discover them, and support new content types in the future, as we expand."msgstr ""-#: src/pages/meta-search.vue:113+#: src/pages/meta-search.vue:112msgctxt "meta-search-page.why.aria-label"msgid "feedback"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:110+#: src/pages/meta-search.vue:109msgctxt "meta-search-page.why.feedback-suggestions"msgid "We hope you enjoy, and if you have suggestions for improvement, leave us ###feedback###."msgstr ""-#: src/pages/meta-search.vue:115+#: src/pages/meta-search.vue:114msgctxt "meta-search-page.why.feedback-link"msgid "feedback"msgstr ""-#: src/pages/meta-search.vue:87+#: src/pages/meta-search.vue:86msgctxt "meta-search-page.new.title"msgid "Can I suggest new sources for Meta Search?"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:89+#: src/pages/meta-search.vue:88msgctxt "meta-search-page.new.content"msgid "Yes, please! Create an ###issue### in our GitHub repository or send us an ###email### and tell us about the new sources you’d like to see included."msgstr ""-#: src/pages/meta-search.vue:94+#: src/pages/meta-search.vue:93msgctxt "meta-search-page.new.issue"msgid "issue"msgstr ""-#: src/pages/meta-search.vue:99+#: src/pages/meta-search.vue:98msgctxt "meta-search-page.new.email"msgid "email"msgstr ""-#: src/pages/meta-search.vue:67+#: src/pages/meta-search.vue:66msgctxt "meta-search-page.audio-video.title"msgid "How does the Meta Search feature work for non-indexed media types?"msgstr ""-#: src/pages/meta-search.vue:81+#: src/pages/meta-search.vue:80msgctxt "meta-search-page.audio-video.demo-label"msgid "Layout of Meta Search for non-indexed media type, like video"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:71+#: src/pages/meta-search.vue:70msgctxt "meta-search-page.audio-video.content"msgid "###openverse### does not yet support built-in search for some media types, such as videos. For these media types, click on the appropriate tab and you’ll see sources where you can find CC-licensed content."msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:74+#: src/pages/meta-search.vue:73msgctxt "meta-search-page.audio-video.filter"msgid "The Filters bar on the left includes the ###use### filter, which may be supported by some meta search sources. Apply these before clicking on the button for the external source you’d like to search."msgstr ""-#: src/pages/meta-search.vue:23+#: src/pages/meta-search.vue:22msgctxt "meta-search-page.images.title"msgid "How does the Meta Search feature work for indexed media types?"msgstr ""-#: src/pages/meta-search.vue:60+#: src/pages/meta-search.vue:59msgctxt "meta-search-page.images.demo-label"msgid "Layout of Meta Search for indexed media type, like images"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:26+#: src/pages/meta-search.vue:25msgctxt "meta-search-page.images.content"msgid "###openverse### supports built-in search for some media types, such as images. When you enter a query on the ###openverse### homepage, a page of results will be displayed. Scrolling to the bottom of the page, you have two choices:"msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:31+#: src/pages/meta-search.vue:30msgctxt "meta-search-page.images.continue"msgid "###load-more###, and continue browsing in ###openverse###."msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:38+#: src/pages/meta-search.vue:37msgctxt "meta-search-page.images.not-finding"msgid "See the section “###not-finding###” below the results."msgstr ""#. Do not translate words between ### ###.-#: src/pages/meta-search.vue:48+#: src/pages/meta-search.vue:47msgctxt "meta-search-page.images.info"msgid "The “###not-finding###” section lists other sources of CC-licensed and public domain content. Your search query will be preloaded, and if supported, you can select a ###use### filter to proactively filter your results. Click on the button for the external source you’d like to search, and your results will open in a new tab."msgstr ""@@ -1581,52 +1581,52 @@ msgid "Sources"msgstr ""#. Do not translate words between ### ###.-#: src/pages/sources.vue:73+#: src/pages/sources.vue:70msgctxt "sources.detail"msgid "Clicking on a ###single-name### allows you to browse and filter items within that source."msgstr ""-#: src/pages/sources.vue:76+#: src/pages/sources.vue:73msgctxt "sources.single-name"msgid "Source"msgstr ""-#: src/pages/sources.vue:57+#: src/pages/sources.vue:54msgctxt "sources.suggestions"msgid "We appreciate suggestions for new sources from our community of users."msgstr ""-#: src/pages/sources.vue:68+#: src/pages/sources.vue:65msgctxt "sources.issue-button"msgid "Suggest a new source"msgstr ""-#: src/pages/sources.vue:82+#: src/pages/sources.vue:79msgctxt "sources.aria.table"msgid "sources table"msgstr ""-#: src/pages/sources.vue:39+#: src/pages/sources.vue:36msgctxt "sources.new-content.next"msgid "How do we decide what sources to add next?"msgstr ""-#: src/pages/sources.vue:42+#: src/pages/sources.vue:39msgctxt "sources.new-content.integrate"msgid "We have a never ending list of possible sources to research prior to integration. We ask ourselves questions like:"msgstr ""-#: src/pages/sources.vue:46+#: src/pages/sources.vue:43msgctxt "sources.new-content.impact"msgid " What is the impact or importance of this source to our users? If it exists within a provider like Wikimedia Commons, is it valuable for our users to be able to filter by this source directly?"msgstr ""-#: src/pages/sources.vue:49+#: src/pages/sources.vue:46msgctxt "sources.new-content.reuse"msgid "Is licensing and attribution information clearly displayed to enable confident reuse?"msgstr ""-#: src/pages/sources.vue:52+#: src/pages/sources.vue:49msgctxt "sources.new-content.total-items"msgid "How many new total items or new types of items can we bring to our users through this integration? Some sources are direct integrations, while others may be a source within a source."msgstr ""@@ -1650,32 +1650,32 @@ msgid "Some providers have multiple different groupings of content within them.msgstr ""#. Do not translate words between ### ###.-#: src/pages/sources.vue:24+#: src/pages/sources.vue:23msgctxt "sources.cc-content.europeana"msgid "###openverse### is especially grateful for the work of ###link###, an organization that works to digitize and make discoverable cultural heritage works across Europe. ###openverse### is able to index hundreds of valuable sources, through a single integration with the ###link-api###."msgstr ""-#: src/pages/sources.vue:33+#: src/pages/sources.vue:30msgctxt "sources.cc-content.europeana-api"msgid "Europeana API"msgstr ""-#: src/pages/sources.vue:20+#: src/pages/sources.vue:19msgctxt "sources.cc-content.smithsonian"msgid "Smithsonian Institute"msgstr ""-#: src/pages/sources.vue:94+#: src/pages/sources.vue:91msgctxt "sources.providers.source"msgid "Source"msgstr ""-#: src/pages/sources.vue:104+#: src/pages/sources.vue:101msgctxt "sources.providers.domain"msgid "Domain"msgstr ""-#: src/pages/sources.vue:114+#: src/pages/sources.vue:111msgctxt "sources.providers.item"msgid "Total items"msgstr ""@@ -1687,52 +1687,52 @@ msgid "About ###openverse###"msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:69+#: src/pages/about.vue:64msgctxt "about.declaration.content"msgid "Please note that ###openverse### does not verify whether the images are properly CC licensed, or whether the attribution and other licensing information we have aggregated is accurate or complete. Please independently verify the licensing status and attribution information before reusing the content. For more details, read the ###terms###."msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:74+#: src/pages/about.vue:68msgctxt "about.declaration.terms"msgid "###openverse### Terms of Use"msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:53+#: src/pages/about.vue:49msgctxt "about.transfer.content"msgid "###openverse### is the successor to CC Search which was launched by Creative Commons in 2019, after its migration to WordPress in 2021. You can read more about this transition in the official announcements from ###creative-commons### and ###wordpress###. We remain committed to our goal of tackling discoverability and accessibility of open access media."msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:19+#: src/pages/about.vue:17msgctxt "about.planning.content"msgid "Currently ###openverse### only searches images, with search for audio and video provided through ###meta###. But we plan to add additional media types such as open texts and audio, with the ultimate goal of providing access to all 1.4 billion CC licensed and public domain works on the web. All of our code is open source (###search###, ###api###, ###catalog###) and we ###community###. You can see what ###working###."msgstr ""-#: src/pages/about.vue:23+#: src/pages/about.vue:20msgctxt "about.planning.meta"msgid "Meta Search"msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:32+#: src/pages/about.vue:29msgctxt "about.planning.api"msgid "###openverse### API"msgstr ""#. Do not translate words between ### ###.-#: src/pages/about.vue:37+#: src/pages/about.vue:34msgctxt "about.planning.catalog"msgid "###openverse### Catalog"msgstr ""-#: src/pages/about.vue:42+#: src/pages/about.vue:39msgctxt "about.planning.community"msgid "welcome community contribution"msgstr ""-#: src/pages/about.vue:47+#: src/pages/about.vue:44msgctxt "about.planning.working"msgid "we’re currently working on"msgstr ""@@ -1859,7 +1859,7 @@ msgctxt "notification.translation.link"msgid "contributing a translation"msgstr ""-#: src/pages/index.vue:34+#: src/pages/index.vue:33msgctxt "hero.subtitle"msgid "Browse through over 600 million items to reuse"msgstr ""@@ -1877,12 +1877,12 @@ msgid "I want something I can"msgstr ""#. Do not translate words between ### ###.-#: src/pages/index.vue:64+#: src/pages/index.vue:63msgctxt "hero.disclaimer.content"msgid "All ###openverse### content is under a ###license### or is in the public domain."msgstr ""-#: src/pages/index.vue:75+#: src/pages/index.vue:73msgctxt "hero.disclaimer.license"msgid "Creative Commons license"msgstr ""@@ -1892,18 +1892,18 @@ msgctxt "hero.search.placeholder"msgid "Search for content"msgstr ""-#: src/components/VFourOhFour.vue:22+#: src/components/VFourOhFour.vue:21msgctxt "404.title"msgid "The content you’re looking for seems to have disappeared."msgstr ""#. Do not translate words between ### ###.-#: src/components/VFourOhFour.vue:25+#: src/components/VFourOhFour.vue:24msgctxt "404.main"msgid "Go to ###link### or search for something similar from the field below."msgstr ""-#: src/components/VFourOhFour.vue:39+#: src/components/VFourOhFour.vue:36msgctxt "404.search-placeholder"msgid "Search for content to reuse"msgstr ""diff --git a/src/pages/about.vue b/src/pages/about.vueindex af860dc98..cd90c0f7e 100644--- a/src/pages/about.vue+++ b/src/pages/about.vue@@ -8,16 +8,13 @@</p><i18n path="about.collection.content" tag="p">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #common-crawl>- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><VLink href="https://commoncrawl.org/">Common Crawl</VLink></template></i18n><i18n path="about.planning.content" tag="p">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #meta><VLink href="/meta-search">{{ $t('about.planning.meta') }}</VLink>@@ -49,7 +46,6 @@</template></i18n>- <!-- eslint-disable @intlify/vue-i18n/no-raw-text --><i18n path="about.transfer.content" tag="p"><template #openverse>Openverse</template><template #creative-commons>@@ -64,10 +60,8 @@></template></i18n>- <!-- eslint-enable @intlify/vue-i18n/no-raw-text --><i18n path="about.declaration.content" tag="p">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #terms><VLink href="https://creativecommons.org/terms/">{{diff --git a/src/pages/index.vue b/src/pages/index.vueindex 41dea59cb..9f9868331 100644--- a/src/pages/index.vue+++ b/src/pages/index.vue@@ -18,7 +18,6 @@class="relative hidden lg:block -left-[6.25rem] rtl:-right-[6.25rem]"><h1>- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><span class="sr-only">Openverse</span><!-- width and height chosen w.r.t. viewBox "0 0 280 42" --><span@@ -66,7 +65,6 @@tag="p"class="hidden lg:block text-sr mt-4">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #license><VLink@@ -121,7 +119,6 @@tag="p"class="lg:hidden text-sr p-6 mt-auto">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #license><VLinkdiff --git a/src/pages/meta-search.vue b/src/pages/meta-search.vueindex 8cd12213a..bf6f018d4 100644--- a/src/pages/meta-search.vue+++ b/src/pages/meta-search.vue@@ -5,7 +5,6 @@</h1><i18n path="meta-search-page.intro" tag="p">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #link><VLink href="/sources">{{ $t('meta-search-page.link') }}</VLink>diff --git a/src/pages/sources.vue b/src/pages/sources.vueindex 74800ed22..0900fd44a 100644--- a/src/pages/sources.vue+++ b/src/pages/sources.vue@@ -12,7 +12,6 @@</p><i18n path="sources.cc-content.provider" tag="p"><template #flickr>- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><VLink href="https://www.flickr.com/">Flickr</VLink></template><template #smithsonian>@@ -22,10 +21,8 @@</template></i18n><i18n path="sources.cc-content.europeana" tag="p">- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><template #openverse>Openverse</template><template #link>- <!-- eslint-disable-next-line @intlify/vue-i18n/no-raw-text --><VLink href="https://www.europeana.eu/en">Europeana</VLink></template><template #link-api>