Use searchFooterText slot in typeahead search component

- Create new 'vector-searchsuggest-containing' translation for WVUI search footer text
- Use 'search-footer-text' slot in WVUI typeahead search
- Remove instances of old 'footerSearchText' prop

Bug: T290392
Depends-on: I8fb7761e60be330e58cd017872318fe3675c0be1
Change-Id: I9c946f85c3e4a603c362c3ea4b8016c585cdd212
This commit is contained in:
bwang 2021-09-30 15:52:16 -05:00
parent 7a57ae93fe
commit b196d68326
4 changed files with 16 additions and 10 deletions

View file

@ -30,6 +30,7 @@
"vector-jumptocontent": "Jump to content", "vector-jumptocontent": "Jump to content",
"vector-more-actions": "More", "vector-more-actions": "More",
"vector-search-loader": "Loading search suggestions", "vector-search-loader": "Loading search suggestions",
"vector-searchsuggest-containing": "Search for pages containing <strong class=\"wvui-typeahead-search__suggestions__footer__text__query\">$1</strong>",
"vector-intro-page": "Help:Introduction", "vector-intro-page": "Help:Introduction",
"vector-anon-user-menu-pages": "Pages for logged out editors", "vector-anon-user-menu-pages": "Pages for logged out editors",
"vector-anon-user-menu-pages-learn": "learn more", "vector-anon-user-menu-pages-learn": "learn more",

View file

@ -39,6 +39,7 @@
"vector-view-viewsource": "Tab label in the Vector skin.\n{{Identical|View source}}", "vector-view-viewsource": "Tab label in the Vector skin.\n{{Identical|View source}}",
"vector-jumptonavigation": "Accessibility link for jumping to the navigation links. Visually hidden by default.\n\nSee also\n* {{msg-mw|Navigation}}", "vector-jumptonavigation": "Accessibility link for jumping to the navigation links. Visually hidden by default.\n\nSee also\n* {{msg-mw|Navigation}}",
"vector-jumptosearch": "Accessibility link for jumping to the site search. Visually hidden by default.\n\nSee also\n* {{msg-mw|Search}}", "vector-jumptosearch": "Accessibility link for jumping to the site search. Visually hidden by default.\n\nSee also\n* {{msg-mw|Search}}",
"vector-searchsuggest-containing": "Label used in the special item of the search suggestions list which gives the user an option to perform a full text search for the term. Used in the WVUI typeahead search component.",
"vector-jumptocontent": "Accessibility link for jumping to the content and skipping the navigation. Visually hidden by default.", "vector-jumptocontent": "Accessibility link for jumping to the content and skipping the navigation. Visually hidden by default.",
"vector-more-actions": "Label in the Vector skin's menu for the less-important or rarer actions which are not shown as tabs (like moving the page, or for sysops deleting or protecting the page), as well as (for users with a narrow viewing window in their browser) the less-important tab actions which the user's browser is unable to fit in. {{Identical|More}}", "vector-more-actions": "Label in the Vector skin's menu for the less-important or rarer actions which are not shown as tabs (like moving the page, or for sysops deleting or protecting the page), as well as (for users with a narrow viewing window in their browser) the less-important tab actions which the user's browser is unable to fit in. {{Identical|More}}",
"vector-search-loader": "Text to display below search input while the search suggestion module is loading", "vector-search-loader": "Text to display below search input while the search suggestion module is loading",

View file

@ -4,7 +4,6 @@
ref="searchForm" ref="searchForm"
:client="getClient" :client="getClient"
:domain="domain" :domain="domain"
:footer-search-text="$i18n( 'searchsuggest-containing' ).text()"
:suggestions-label="$i18n( 'searchresults' ).text()" :suggestions-label="$i18n( 'searchresults' ).text()"
:accesskey="searchAccessKey" :accesskey="searchAccessKey"
:title="searchTitle" :title="searchTitle"
@ -23,14 +22,19 @@
@suggestion-click="instrumentation.onSuggestionClick" @suggestion-click="instrumentation.onSuggestionClick"
@submit="onSubmit" @submit="onSubmit"
> >
<input type="hidden" <template #default>
name="title" <input type="hidden"
:value="searchPageTitle" name="title"
> :value="searchPageTitle"
<input type="hidden" >
name="wprov" <input type="hidden"
:value="wprov" name="wprov"
> :value="wprov"
>
</template>
<template #search-footer-text="{ searchQuery }">
<span v-i18n-html:vector-searchsuggest-containing="[ searchQuery ]"></span>
</template>
</wvui-typeahead-search> </wvui-typeahead-search>
</template> </template>

View file

@ -106,7 +106,7 @@
"messages": [ "messages": [
"searchbutton", "searchbutton",
"searchresults", "searchresults",
"searchsuggest-containing" "vector-searchsuggest-containing"
] ]
}, },
"skins.vector.styles.legacy": { "skins.vector.styles.legacy": {