feat: mark some text labels as translatable (#6482)

* feat: mark some text labels as translatable

* tweak
This commit is contained in:
Joshua Chen 2022-01-27 19:36:37 +08:00 committed by GitHub
parent b8fbf7c530
commit 0e13356e1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 193 additions and 7 deletions

View file

@ -16,7 +16,7 @@ import Head from '@docusaurus/Head';
import {isRegexpStringMatch, useSearchPage} from '@docusaurus/theme-common';
import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client';
import {translate} from '@docusaurus/Translate';
import Translate, {translate} from '@docusaurus/Translate';
import styles from './styles.module.css';
import type {
@ -59,7 +59,11 @@ function ResultsFooter({state, onClose}: ResultsFooterProps) {
return (
<Link to={generateSearchPageLink(state.query)} onClick={onClose}>
See all {state.context.nbHits} results
<Translate
id="theme.SearchBar.seeAll"
values={{count: state.context.nbHits}}>
{'See all {count} results'}
</Translate>
</Link>
);
}