mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
site: remove search result translation
This commit is contained in:
parent
16d7da31ad
commit
7996494f3a
@ -24,22 +24,6 @@ function initDocSearch(locale) {
|
||||
indexName: 'ant_design',
|
||||
inputSelector: '#search-box input',
|
||||
algoliaOptions: { facetFilters: [`tags:${lang}`] },
|
||||
transformData(hits) {
|
||||
if (lang === 'cn') {
|
||||
const categories = {
|
||||
Components: '组件',
|
||||
Documentation: '文档',
|
||||
};
|
||||
return hits.map((hit) => {
|
||||
const category = categories[hit.hierarchy.lvl0];
|
||||
hit.hierarchy.lvl0 = category;
|
||||
hit._highlightResult.hierarchy.lvl0.value = category; // eslint-disable-line
|
||||
hit._highlightResult.hierarchy_camel[0].lvl0.value = category; // eslint-disable-line
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
return hits;
|
||||
},
|
||||
debug: false, // Set debug to true if you want to inspect the dropdown
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user