mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +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