Add Chinese support #13
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/gitea-docusaurus#13
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "HesterG/gitea-docusaurus:add-chinese-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Main changes and Some notices
Chines Docs should be put into corresponding versions' folders under
i18n/zh-cn/docusaurus-plugin-content-docs
. See translate-markdown-files for reference. And also srs-docs is a project that can be used as a reference. So changed the related paths inloop_docs*
scripts.The markdown files under
docs/<version>
andi18n/zh-cn/docusaurus-plugin-content-docs/<version>
must have the same name to be referred as translated. Files inside docs are corresponding tocurrent
version.For example,
docs/administration/mail-templates.md
andi18n/zh-cn/docusaurus-plugin-content-docs/current/administration/mail-templates.md
. Filename ofmail-templates.md
must be the same (cannot bemail-templates.zh-cn.md
andmail-templates.us-en.md
)So trim the
.en-us.md
and.zh-cn.md
to.md
to ensure the same names insideloop_docs*
scripts.Used
npx docusaurus write-translations --locale zh-cn
to do sidebar, footer, and header translations, so no need to keepsideBarCN
anymore. referenceLocal Tests for
en
andzh-cn
are separeted, run the following on local respectly to test themIf wants to test
en
andzh-cn
both at the same time, run build and serveAdded some indexed page, for example:
WIP: Add Chinese supportto Add Chinese supportthat's pretty hacky