@docusaurus/theme-search-algolia 0.0.0-5170 → 0.0.0-5176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/theme/SearchBar/index.js +5 -10
- package/lib/theme/SearchTranslations/index.d.ts +11 -0
- package/lib/theme/SearchTranslations/index.js +167 -0
- package/package.json +10 -10
- package/src/theme/SearchBar/index.tsx +5 -11
- package/src/theme/SearchTranslations/index.ts +172 -0
- package/src/theme-search-algolia.d.ts +7 -0
|
@@ -15,7 +15,8 @@ import {isRegexpStringMatch} from '@docusaurus/theme-common';
|
|
|
15
15
|
import {useSearchPage} from '@docusaurus/theme-common/internal';
|
|
16
16
|
import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
|
|
17
17
|
import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client';
|
|
18
|
-
import Translate
|
|
18
|
+
import Translate from '@docusaurus/Translate';
|
|
19
|
+
import translations from '@theme/SearchTranslations';
|
|
19
20
|
let DocSearchModal = null;
|
|
20
21
|
function Hit({hit, children}) {
|
|
21
22
|
return <Link to={hit.url}>{children}</Link>;
|
|
@@ -141,11 +142,6 @@ function DocSearch({contextualSearch, externalUrlRegex, ...props}) {
|
|
|
141
142
|
onInput,
|
|
142
143
|
searchButtonRef,
|
|
143
144
|
});
|
|
144
|
-
const translatedSearchLabel = translate({
|
|
145
|
-
id: 'theme.SearchBar.label',
|
|
146
|
-
message: 'Search',
|
|
147
|
-
description: 'The ARIA label and placeholder for search button',
|
|
148
|
-
});
|
|
149
145
|
return (
|
|
150
146
|
<>
|
|
151
147
|
<Head>
|
|
@@ -165,10 +161,7 @@ function DocSearch({contextualSearch, externalUrlRegex, ...props}) {
|
|
|
165
161
|
onMouseOver={importDocSearchModalIfNeeded}
|
|
166
162
|
onClick={onOpen}
|
|
167
163
|
ref={searchButtonRef}
|
|
168
|
-
translations={
|
|
169
|
-
buttonText: translatedSearchLabel,
|
|
170
|
-
buttonAriaLabel: translatedSearchLabel,
|
|
171
|
-
}}
|
|
164
|
+
translations={translations.button}
|
|
172
165
|
/>
|
|
173
166
|
|
|
174
167
|
{isOpen &&
|
|
@@ -188,6 +181,8 @@ function DocSearch({contextualSearch, externalUrlRegex, ...props}) {
|
|
|
188
181
|
})}
|
|
189
182
|
{...props}
|
|
190
183
|
searchParameters={searchParameters}
|
|
184
|
+
placeholder={translations.placeholder}
|
|
185
|
+
translations={translations.modal}
|
|
191
186
|
/>,
|
|
192
187
|
searchContainer.current,
|
|
193
188
|
)}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import type { DocSearchTranslations } from '@docsearch/react';
|
|
8
|
+
declare const translations: DocSearchTranslations & {
|
|
9
|
+
placeholder: string;
|
|
10
|
+
};
|
|
11
|
+
export default translations;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import {translate} from '@docusaurus/Translate';
|
|
8
|
+
const translations = {
|
|
9
|
+
button: {
|
|
10
|
+
buttonText: translate({
|
|
11
|
+
id: 'theme.SearchBar.label',
|
|
12
|
+
message: 'Search',
|
|
13
|
+
description: 'The ARIA label and placeholder for search button',
|
|
14
|
+
}),
|
|
15
|
+
buttonAriaLabel: translate({
|
|
16
|
+
id: 'theme.SearchBar.label',
|
|
17
|
+
message: 'Search',
|
|
18
|
+
description: 'The ARIA label and placeholder for search button',
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
modal: {
|
|
22
|
+
searchBox: {
|
|
23
|
+
resetButtonTitle: translate({
|
|
24
|
+
id: 'theme.SearchModal.searchBox.resetButtonTitle',
|
|
25
|
+
message: 'Clear the query',
|
|
26
|
+
description: 'The label and ARIA label for search box reset button',
|
|
27
|
+
}),
|
|
28
|
+
resetButtonAriaLabel: translate({
|
|
29
|
+
id: 'theme.SearchModal.searchBox.resetButtonTitle',
|
|
30
|
+
message: 'Clear the query',
|
|
31
|
+
description: 'The label and ARIA label for search box reset button',
|
|
32
|
+
}),
|
|
33
|
+
cancelButtonText: translate({
|
|
34
|
+
id: 'theme.SearchModal.searchBox.cancelButtonText',
|
|
35
|
+
message: 'Cancel',
|
|
36
|
+
description: 'The label and ARIA label for search box cancel button',
|
|
37
|
+
}),
|
|
38
|
+
cancelButtonAriaLabel: translate({
|
|
39
|
+
id: 'theme.SearchModal.searchBox.cancelButtonText',
|
|
40
|
+
message: 'Cancel',
|
|
41
|
+
description: 'The label and ARIA label for search box cancel button',
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
startScreen: {
|
|
45
|
+
recentSearchesTitle: translate({
|
|
46
|
+
id: 'theme.SearchModal.startScreen.recentSearchesTitle',
|
|
47
|
+
message: 'Recent',
|
|
48
|
+
description: 'The title for recent searches',
|
|
49
|
+
}),
|
|
50
|
+
noRecentSearchesText: translate({
|
|
51
|
+
id: 'theme.SearchModal.startScreen.noRecentSearchesText',
|
|
52
|
+
message: 'No recent searches',
|
|
53
|
+
description: 'The text when no recent searches',
|
|
54
|
+
}),
|
|
55
|
+
saveRecentSearchButtonTitle: translate({
|
|
56
|
+
id: 'theme.SearchModal.startScreen.saveRecentSearchButtonTitle',
|
|
57
|
+
message: 'Save this search',
|
|
58
|
+
description: 'The label for save recent search button',
|
|
59
|
+
}),
|
|
60
|
+
removeRecentSearchButtonTitle: translate({
|
|
61
|
+
id: 'theme.SearchModal.startScreen.removeRecentSearchButtonTitle',
|
|
62
|
+
message: 'Remove this search from history',
|
|
63
|
+
description: 'The label for remove recent search button',
|
|
64
|
+
}),
|
|
65
|
+
favoriteSearchesTitle: translate({
|
|
66
|
+
id: 'theme.SearchModal.startScreen.favoriteSearchesTitle',
|
|
67
|
+
message: 'Favorite',
|
|
68
|
+
description: 'The title for favorite searches',
|
|
69
|
+
}),
|
|
70
|
+
removeFavoriteSearchButtonTitle: translate({
|
|
71
|
+
id: 'theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle',
|
|
72
|
+
message: 'Remove this search from favorites',
|
|
73
|
+
description: 'The label for remove favorite search button',
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
errorScreen: {
|
|
77
|
+
titleText: translate({
|
|
78
|
+
id: 'theme.SearchModal.errorScreen.titleText',
|
|
79
|
+
message: 'Unable to fetch results',
|
|
80
|
+
description: 'The title for error screen of search modal',
|
|
81
|
+
}),
|
|
82
|
+
helpText: translate({
|
|
83
|
+
id: 'theme.SearchModal.errorScreen.helpText',
|
|
84
|
+
message: 'You might want to check your network connection.',
|
|
85
|
+
description: 'The help text for error screen of search modal',
|
|
86
|
+
}),
|
|
87
|
+
},
|
|
88
|
+
footer: {
|
|
89
|
+
selectText: translate({
|
|
90
|
+
id: 'theme.SearchModal.footer.selectText',
|
|
91
|
+
message: 'to select',
|
|
92
|
+
description: 'The explanatory text of the action for the enter key',
|
|
93
|
+
}),
|
|
94
|
+
selectKeyAriaLabel: translate({
|
|
95
|
+
id: 'theme.SearchModal.footer.selectKeyAriaLabel',
|
|
96
|
+
message: 'Enter key',
|
|
97
|
+
description:
|
|
98
|
+
'The ARIA label for the Enter key button that makes the selection',
|
|
99
|
+
}),
|
|
100
|
+
navigateText: translate({
|
|
101
|
+
id: 'theme.SearchModal.footer.navigateText',
|
|
102
|
+
message: 'to navigate',
|
|
103
|
+
description:
|
|
104
|
+
'The explanatory text of the action for the Arrow up and Arrow down key',
|
|
105
|
+
}),
|
|
106
|
+
navigateUpKeyAriaLabel: translate({
|
|
107
|
+
id: 'theme.SearchModal.footer.navigateUpKeyAriaLabel',
|
|
108
|
+
message: 'Arrow up',
|
|
109
|
+
description:
|
|
110
|
+
'The ARIA label for the Arrow up key button that makes the navigation',
|
|
111
|
+
}),
|
|
112
|
+
navigateDownKeyAriaLabel: translate({
|
|
113
|
+
id: 'theme.SearchModal.footer.navigateDownKeyAriaLabel',
|
|
114
|
+
message: 'Arrow down',
|
|
115
|
+
description:
|
|
116
|
+
'The ARIA label for the Arrow down key button that makes the navigation',
|
|
117
|
+
}),
|
|
118
|
+
closeText: translate({
|
|
119
|
+
id: 'theme.SearchModal.footer.closeText',
|
|
120
|
+
message: 'to close',
|
|
121
|
+
description: 'The explanatory text of the action for Escape key',
|
|
122
|
+
}),
|
|
123
|
+
closeKeyAriaLabel: translate({
|
|
124
|
+
id: 'theme.SearchModal.footer.closeKeyAriaLabel',
|
|
125
|
+
message: 'Escape key',
|
|
126
|
+
description:
|
|
127
|
+
'The ARIA label for the Escape key button that close the modal',
|
|
128
|
+
}),
|
|
129
|
+
searchByText: translate({
|
|
130
|
+
id: 'theme.SearchModal.footer.searchByText',
|
|
131
|
+
message: 'Search by',
|
|
132
|
+
description: 'The text explain that the search is making by Algolia',
|
|
133
|
+
}),
|
|
134
|
+
},
|
|
135
|
+
noResultsScreen: {
|
|
136
|
+
noResultsText: translate({
|
|
137
|
+
id: 'theme.SearchModal.noResultsScreen.noResultsText',
|
|
138
|
+
message: 'No results for',
|
|
139
|
+
description:
|
|
140
|
+
'The text explains that there are no results for the following search',
|
|
141
|
+
}),
|
|
142
|
+
suggestedQueryText: translate({
|
|
143
|
+
id: 'theme.SearchModal.noResultsScreen.suggestedQueryText',
|
|
144
|
+
message: 'Try searching for',
|
|
145
|
+
description:
|
|
146
|
+
'The text for the suggested query when no results are found for the following search',
|
|
147
|
+
}),
|
|
148
|
+
reportMissingResultsText: translate({
|
|
149
|
+
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsText',
|
|
150
|
+
message: 'Believe this query should return results?',
|
|
151
|
+
description:
|
|
152
|
+
'The text for the question where the user thinks there are missing results',
|
|
153
|
+
}),
|
|
154
|
+
reportMissingResultsLinkText: translate({
|
|
155
|
+
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsLinkText',
|
|
156
|
+
message: 'Let us know.',
|
|
157
|
+
description: 'The text for the link to report missing results',
|
|
158
|
+
}),
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
placeholder: translate({
|
|
162
|
+
id: 'theme.SearchModal.placeholder',
|
|
163
|
+
message: 'Search docs',
|
|
164
|
+
description: 'The placeholder of the input of the DocSearch pop-up modal',
|
|
165
|
+
}),
|
|
166
|
+
};
|
|
167
|
+
export default translations;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-search-algolia",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5176",
|
|
4
4
|
"description": "Algolia search component for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"sideEffects": [
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@docsearch/react": "^3.1.1",
|
|
37
|
-
"@docusaurus/core": "0.0.0-
|
|
38
|
-
"@docusaurus/logger": "0.0.0-
|
|
39
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
40
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
41
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
42
|
-
"@docusaurus/utils": "0.0.0-
|
|
43
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
37
|
+
"@docusaurus/core": "0.0.0-5176",
|
|
38
|
+
"@docusaurus/logger": "0.0.0-5176",
|
|
39
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5176",
|
|
40
|
+
"@docusaurus/theme-common": "0.0.0-5176",
|
|
41
|
+
"@docusaurus/theme-translations": "0.0.0-5176",
|
|
42
|
+
"@docusaurus/utils": "0.0.0-5176",
|
|
43
|
+
"@docusaurus/utils-validation": "0.0.0-5176",
|
|
44
44
|
"algoliasearch": "^4.13.1",
|
|
45
45
|
"algoliasearch-helper": "^3.10.0",
|
|
46
46
|
"clsx": "^1.2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"utility-types": "^3.10.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
54
|
+
"@docusaurus/module-type-aliases": "0.0.0-5176"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=16.14"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "a30ced4f32927fda30c93acd57930333d1d42233"
|
|
64
64
|
}
|
|
@@ -16,7 +16,8 @@ import {isRegexpStringMatch} from '@docusaurus/theme-common';
|
|
|
16
16
|
import {useSearchPage} from '@docusaurus/theme-common/internal';
|
|
17
17
|
import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
|
|
18
18
|
import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client';
|
|
19
|
-
import Translate
|
|
19
|
+
import Translate from '@docusaurus/Translate';
|
|
20
|
+
import translations from '@theme/SearchTranslations';
|
|
20
21
|
|
|
21
22
|
import type {
|
|
22
23
|
DocSearchModal as DocSearchModalType,
|
|
@@ -216,12 +217,6 @@ function DocSearch({
|
|
|
216
217
|
searchButtonRef,
|
|
217
218
|
});
|
|
218
219
|
|
|
219
|
-
const translatedSearchLabel = translate({
|
|
220
|
-
id: 'theme.SearchBar.label',
|
|
221
|
-
message: 'Search',
|
|
222
|
-
description: 'The ARIA label and placeholder for search button',
|
|
223
|
-
});
|
|
224
|
-
|
|
225
220
|
return (
|
|
226
221
|
<>
|
|
227
222
|
<Head>
|
|
@@ -241,10 +236,7 @@ function DocSearch({
|
|
|
241
236
|
onMouseOver={importDocSearchModalIfNeeded}
|
|
242
237
|
onClick={onOpen}
|
|
243
238
|
ref={searchButtonRef}
|
|
244
|
-
translations={
|
|
245
|
-
buttonText: translatedSearchLabel,
|
|
246
|
-
buttonAriaLabel: translatedSearchLabel,
|
|
247
|
-
}}
|
|
239
|
+
translations={translations.button}
|
|
248
240
|
/>
|
|
249
241
|
|
|
250
242
|
{isOpen &&
|
|
@@ -264,6 +256,8 @@ function DocSearch({
|
|
|
264
256
|
})}
|
|
265
257
|
{...props}
|
|
266
258
|
searchParameters={searchParameters}
|
|
259
|
+
placeholder={translations.placeholder}
|
|
260
|
+
translations={translations.modal}
|
|
267
261
|
/>,
|
|
268
262
|
searchContainer.current,
|
|
269
263
|
)}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {translate} from '@docusaurus/Translate';
|
|
9
|
+
|
|
10
|
+
import type {DocSearchTranslations} from '@docsearch/react';
|
|
11
|
+
|
|
12
|
+
const translations: DocSearchTranslations & {placeholder: string} = {
|
|
13
|
+
button: {
|
|
14
|
+
buttonText: translate({
|
|
15
|
+
id: 'theme.SearchBar.label',
|
|
16
|
+
message: 'Search',
|
|
17
|
+
description: 'The ARIA label and placeholder for search button',
|
|
18
|
+
}),
|
|
19
|
+
buttonAriaLabel: translate({
|
|
20
|
+
id: 'theme.SearchBar.label',
|
|
21
|
+
message: 'Search',
|
|
22
|
+
description: 'The ARIA label and placeholder for search button',
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
modal: {
|
|
26
|
+
searchBox: {
|
|
27
|
+
resetButtonTitle: translate({
|
|
28
|
+
id: 'theme.SearchModal.searchBox.resetButtonTitle',
|
|
29
|
+
message: 'Clear the query',
|
|
30
|
+
description: 'The label and ARIA label for search box reset button',
|
|
31
|
+
}),
|
|
32
|
+
resetButtonAriaLabel: translate({
|
|
33
|
+
id: 'theme.SearchModal.searchBox.resetButtonTitle',
|
|
34
|
+
message: 'Clear the query',
|
|
35
|
+
description: 'The label and ARIA label for search box reset button',
|
|
36
|
+
}),
|
|
37
|
+
cancelButtonText: translate({
|
|
38
|
+
id: 'theme.SearchModal.searchBox.cancelButtonText',
|
|
39
|
+
message: 'Cancel',
|
|
40
|
+
description: 'The label and ARIA label for search box cancel button',
|
|
41
|
+
}),
|
|
42
|
+
cancelButtonAriaLabel: translate({
|
|
43
|
+
id: 'theme.SearchModal.searchBox.cancelButtonText',
|
|
44
|
+
message: 'Cancel',
|
|
45
|
+
description: 'The label and ARIA label for search box cancel button',
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
startScreen: {
|
|
49
|
+
recentSearchesTitle: translate({
|
|
50
|
+
id: 'theme.SearchModal.startScreen.recentSearchesTitle',
|
|
51
|
+
message: 'Recent',
|
|
52
|
+
description: 'The title for recent searches',
|
|
53
|
+
}),
|
|
54
|
+
noRecentSearchesText: translate({
|
|
55
|
+
id: 'theme.SearchModal.startScreen.noRecentSearchesText',
|
|
56
|
+
message: 'No recent searches',
|
|
57
|
+
description: 'The text when no recent searches',
|
|
58
|
+
}),
|
|
59
|
+
saveRecentSearchButtonTitle: translate({
|
|
60
|
+
id: 'theme.SearchModal.startScreen.saveRecentSearchButtonTitle',
|
|
61
|
+
message: 'Save this search',
|
|
62
|
+
description: 'The label for save recent search button',
|
|
63
|
+
}),
|
|
64
|
+
removeRecentSearchButtonTitle: translate({
|
|
65
|
+
id: 'theme.SearchModal.startScreen.removeRecentSearchButtonTitle',
|
|
66
|
+
message: 'Remove this search from history',
|
|
67
|
+
description: 'The label for remove recent search button',
|
|
68
|
+
}),
|
|
69
|
+
favoriteSearchesTitle: translate({
|
|
70
|
+
id: 'theme.SearchModal.startScreen.favoriteSearchesTitle',
|
|
71
|
+
message: 'Favorite',
|
|
72
|
+
description: 'The title for favorite searches',
|
|
73
|
+
}),
|
|
74
|
+
removeFavoriteSearchButtonTitle: translate({
|
|
75
|
+
id: 'theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle',
|
|
76
|
+
message: 'Remove this search from favorites',
|
|
77
|
+
description: 'The label for remove favorite search button',
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
errorScreen: {
|
|
81
|
+
titleText: translate({
|
|
82
|
+
id: 'theme.SearchModal.errorScreen.titleText',
|
|
83
|
+
message: 'Unable to fetch results',
|
|
84
|
+
description: 'The title for error screen of search modal',
|
|
85
|
+
}),
|
|
86
|
+
helpText: translate({
|
|
87
|
+
id: 'theme.SearchModal.errorScreen.helpText',
|
|
88
|
+
message: 'You might want to check your network connection.',
|
|
89
|
+
description: 'The help text for error screen of search modal',
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
footer: {
|
|
93
|
+
selectText: translate({
|
|
94
|
+
id: 'theme.SearchModal.footer.selectText',
|
|
95
|
+
message: 'to select',
|
|
96
|
+
description: 'The explanatory text of the action for the enter key',
|
|
97
|
+
}),
|
|
98
|
+
selectKeyAriaLabel: translate({
|
|
99
|
+
id: 'theme.SearchModal.footer.selectKeyAriaLabel',
|
|
100
|
+
message: 'Enter key',
|
|
101
|
+
description:
|
|
102
|
+
'The ARIA label for the Enter key button that makes the selection',
|
|
103
|
+
}),
|
|
104
|
+
navigateText: translate({
|
|
105
|
+
id: 'theme.SearchModal.footer.navigateText',
|
|
106
|
+
message: 'to navigate',
|
|
107
|
+
description:
|
|
108
|
+
'The explanatory text of the action for the Arrow up and Arrow down key',
|
|
109
|
+
}),
|
|
110
|
+
navigateUpKeyAriaLabel: translate({
|
|
111
|
+
id: 'theme.SearchModal.footer.navigateUpKeyAriaLabel',
|
|
112
|
+
message: 'Arrow up',
|
|
113
|
+
description:
|
|
114
|
+
'The ARIA label for the Arrow up key button that makes the navigation',
|
|
115
|
+
}),
|
|
116
|
+
navigateDownKeyAriaLabel: translate({
|
|
117
|
+
id: 'theme.SearchModal.footer.navigateDownKeyAriaLabel',
|
|
118
|
+
message: 'Arrow down',
|
|
119
|
+
description:
|
|
120
|
+
'The ARIA label for the Arrow down key button that makes the navigation',
|
|
121
|
+
}),
|
|
122
|
+
closeText: translate({
|
|
123
|
+
id: 'theme.SearchModal.footer.closeText',
|
|
124
|
+
message: 'to close',
|
|
125
|
+
description: 'The explanatory text of the action for Escape key',
|
|
126
|
+
}),
|
|
127
|
+
closeKeyAriaLabel: translate({
|
|
128
|
+
id: 'theme.SearchModal.footer.closeKeyAriaLabel',
|
|
129
|
+
message: 'Escape key',
|
|
130
|
+
description:
|
|
131
|
+
'The ARIA label for the Escape key button that close the modal',
|
|
132
|
+
}),
|
|
133
|
+
searchByText: translate({
|
|
134
|
+
id: 'theme.SearchModal.footer.searchByText',
|
|
135
|
+
message: 'Search by',
|
|
136
|
+
description: 'The text explain that the search is making by Algolia',
|
|
137
|
+
}),
|
|
138
|
+
},
|
|
139
|
+
noResultsScreen: {
|
|
140
|
+
noResultsText: translate({
|
|
141
|
+
id: 'theme.SearchModal.noResultsScreen.noResultsText',
|
|
142
|
+
message: 'No results for',
|
|
143
|
+
description:
|
|
144
|
+
'The text explains that there are no results for the following search',
|
|
145
|
+
}),
|
|
146
|
+
suggestedQueryText: translate({
|
|
147
|
+
id: 'theme.SearchModal.noResultsScreen.suggestedQueryText',
|
|
148
|
+
message: 'Try searching for',
|
|
149
|
+
description:
|
|
150
|
+
'The text for the suggested query when no results are found for the following search',
|
|
151
|
+
}),
|
|
152
|
+
reportMissingResultsText: translate({
|
|
153
|
+
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsText',
|
|
154
|
+
message: 'Believe this query should return results?',
|
|
155
|
+
description:
|
|
156
|
+
'The text for the question where the user thinks there are missing results',
|
|
157
|
+
}),
|
|
158
|
+
reportMissingResultsLinkText: translate({
|
|
159
|
+
id: 'theme.SearchModal.noResultsScreen.reportMissingResultsLinkText',
|
|
160
|
+
message: 'Let us know.',
|
|
161
|
+
description: 'The text for the link to report missing results',
|
|
162
|
+
}),
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
placeholder: translate({
|
|
166
|
+
id: 'theme.SearchModal.placeholder',
|
|
167
|
+
message: 'Search docs',
|
|
168
|
+
description: 'The placeholder of the input of the DocSearch pop-up modal',
|
|
169
|
+
}),
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export default translations;
|
|
@@ -33,3 +33,10 @@ declare module '@theme/SearchPage' {
|
|
|
33
33
|
declare module '@theme/SearchBar' {
|
|
34
34
|
export default function SearchBar(): JSX.Element;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
declare module '@theme/SearchTranslations' {
|
|
38
|
+
import type {DocSearchTranslations} from '@docsearch/react';
|
|
39
|
+
|
|
40
|
+
const translations: DocSearchTranslations & {placeholder: string};
|
|
41
|
+
export default translations;
|
|
42
|
+
}
|