-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix component group name translation #2998
Conversation
Deploy preview for ng-zorro-master ready! Built with commit 52bb9dc |
Codecov Report
@@ Coverage Diff @@
## master #2998 +/- ##
=======================================
Coverage 97.35% 97.35%
=======================================
Files 550 550
Lines 11452 11452
Branches 813 813
=======================================
Hits 11149 11149
Misses 190 190
Partials 113 113 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只需要将 components/**/doc/index.zh-CN.md
中的 type
自动改成中文就可以,就像这样:
components/affix/doc/index.zh-CN.md
---
category: Components
subtitle: 固钉
- type: Navigation
+ type: 导航
title: Affix
---
我试过这样改会导致切到英文时还是会显示中文名 |
@@ -24,6 +24,16 @@ module.exports = function generateRoutes(showCaseTargetPath, componentsMap, docs | |||
intro.sort((pre, next) => pre.order - next.order); | |||
fs.writeFileSync(path.join(showCaseTargetPath, `intros.json`), JSON.stringify(intro, null, 2)); | |||
const reverseMap = {}; | |||
const typeMap = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppjjzz 应该从markdown文件中读取数据,不应该写死在打包脚本中
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information