Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can also run equivalent commands inside `apps/docs` with `pnpm run <script>`

## i18n workflow

This docs app supports multiple locales (`en`, `ko`, `de`, `fr`).
This docs app supports multiple locales (`en`, `ko`, `de`, `fr`, `ru`, `ja`, `es`, `zh-Hans`).

```bash
# extract translation files
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const config: Config = {
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en', 'ko', 'de', 'fr', 'ru', 'ja', 'es'],
locales: ['en', 'ko', 'de', 'fr', 'ru', 'ja', 'es', 'zh-Hans'],
localeConfigs: {
en: {
label: 'English',
Expand Down Expand Up @@ -66,6 +66,10 @@ const config: Config = {
label: 'Español',
direction: 'ltr',
},
'zh-Hans': {
label: '简体中文',
direction: 'ltr',
},
},
},

Expand Down
285 changes: 285 additions & 0 deletions apps/docs/i18n/zh-Hans/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
{
"theme.ErrorPageContent.title": {
"message": "此页面崩溃了。",
"description": "The title of the fallback page when the page crashed"
},
"theme.BackToTopButton.buttonAriaLabel": {
"message": "返回顶部",
"description": "The ARIA label for the back to top button"
},
"theme.tags.tagsPageLink": {
"message": "查看所有标签",
"description": "The label of the link targeting the tag list page"
},
"theme.colorToggle.ariaLabel.mode.system": {
"message": "系统模式",
"description": "The name for the system color mode"
},
"theme.colorToggle.ariaLabel.mode.light": {
"message": "浅色模式",
"description": "The name for the light color mode"
},
"theme.colorToggle.ariaLabel.mode.dark": {
"message": "深色模式",
"description": "The name for the dark color mode"
},
"theme.colorToggle.ariaLabel": {
"message": "切换深色与浅色模式(当前为 {mode})",
"description": "The ARIA label for the color mode toggle"
},
"theme.docs.breadcrumbs.navAriaLabel": {
"message": "面包屑导航",
"description": "The ARIA label for the breadcrumbs"
},
"theme.docs.DocCard.categoryDescription.plurals": {
"message": "1 个项目|{count} 个项目",
"description": "The default description for a category card in the generated index about how many items this category includes"
},
"theme.docs.paginator.navAriaLabel": {
"message": "文档页面",
"description": "The ARIA label for the docs pagination"
},
"theme.docs.paginator.previous": {
"message": "上一页",
"description": "The label used to navigate to the previous doc"
},
"theme.docs.paginator.next": {
"message": "下一页",
"description": "The label used to navigate to the next doc"
},
"theme.docs.versions.unreleasedVersionLabel": {
"message": "这是 {siteTitle} {versionLabel} 版本的未发布文档。",
"description": "The label used to tell the user that he's browsing an unreleased doc version"
},
"theme.docs.versions.unmaintainedVersionLabel": {
"message": "这是 {siteTitle} {versionLabel} 的文档,该版本已不再维护。",
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionSuggestionLabel": {
"message": "如需最新文档,请参阅 {latestVersionLink}({versionLabel})。",
"description": "The label used to tell the user to check the latest version"
},
"theme.docs.versions.latestVersionLinkLabel": {
"message": "最新版本",
"description": "The label used for the latest version suggestion link label"
},
"theme.docs.tagDocListPageTitle.nDocsTagged": {
"message": "1 篇文档带有此标签|{count} 篇文档带有此标签",
"description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.docs.tagDocListPageTitle": {
"message": "{nDocsTagged}:“{tagName}”",
"description": "The title of the page for a docs tag"
},
"theme.common.editThisPage": {
"message": "编辑此页面",
"description": "The link label to edit the current page"
},
"theme.docs.versionBadge.label": {
"message": "版本:{versionLabel}"
},
"theme.common.headingLinkTitle": {
"message": "指向 {heading} 的直接链接",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": " 于 {date}",
"description": "The words used to describe on which date a page has been last updated"
},
"theme.lastUpdated.byUser": {
"message": " 由 {user}",
"description": "The words used to describe by who the page has been last updated"
},
"theme.lastUpdated.lastUpdatedAtBy": {
"message": "最后更新{atDate}{byUser}",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.navbar.mobileVersionsDropdown.label": {
"message": "版本",
"description": "The label for the navbar versions dropdown on mobile view"
},
"theme.NotFound.title": {
"message": "页面未找到",
"description": "The title of the 404 page"
},
"theme.tags.tagsListLabel": {
"message": "标签:",
"description": "The label alongside a tag list"
},
"theme.admonition.caution": {
"message": "注意",
"description": "The default label used for the Caution admonition (:::caution)"
},
"theme.admonition.danger": {
"message": "危险",
"description": "The default label used for the Danger admonition (:::danger)"
},
"theme.admonition.info": {
"message": "信息",
"description": "The default label used for the Info admonition (:::info)"
},
"theme.admonition.note": {
"message": "备注",
"description": "The default label used for the Note admonition (:::note)"
},
"theme.admonition.tip": {
"message": "提示",
"description": "The default label used for the Tip admonition (:::tip)"
},
"theme.admonition.warning": {
"message": "警告",
"description": "The default label used for the Warning admonition (:::warning)"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "关闭",
"description": "The ARIA label for close button of announcement bar"
},
"theme.DocSidebarItem.expandCategoryAriaLabel": {
"message": "展开侧边栏分类“{label}”",
"description": "The ARIA label to expand the sidebar category"
},
"theme.DocSidebarItem.collapseCategoryAriaLabel": {
"message": "折叠侧边栏分类“{label}”",
"description": "The ARIA label to collapse the sidebar category"
},
"theme.NavBar.navAriaLabel": {
"message": "主导航",
"description": "The ARIA label for the main navigation"
},
"theme.NotFound.p1": {
"message": "我们找不到你要查找的内容。",
"description": "The first paragraph of the 404 page"
},
"theme.NotFound.p2": {
"message": "请联系链接到原始 URL 的网站所有者,并告知他们该链接已失效。",
"description": "The 2nd paragraph of the 404 page"
},
"theme.TOCCollapsible.toggleButtonLabel": {
"message": "本页目录",
"description": "The label used by the button on the collapsible TOC component"
},
"theme.navbar.mobileLanguageDropdown.label": {
"message": "语言",
"description": "The label for the mobile language switcher dropdown"
},
"theme.CodeBlock.wordWrapToggle": {
"message": "切换自动换行",
"description": "The title attribute for toggle word wrapping button of code block lines"
},
"theme.CodeBlock.copy": {
"message": "复制",
"description": "The copy button label on code blocks"
},
"theme.CodeBlock.copied": {
"message": "已复制",
"description": "The copied button label on code blocks"
},
"theme.CodeBlock.copyButtonAriaLabel": {
"message": "复制代码到剪贴板",
"description": "The ARIA label for copy code blocks button"
},
"theme.docs.sidebar.navAriaLabel": {
"message": "文档侧边栏",
"description": "The ARIA label for the sidebar navigation"
},
"theme.docs.breadcrumbs.home": {
"message": "首页",
"description": "The ARIA label for the home page in the breadcrumbs"
},
"theme.docs.sidebar.collapseButtonTitle": {
"message": "折叠侧边栏",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.collapseButtonAriaLabel": {
"message": "折叠侧边栏",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.closeSidebarButtonAriaLabel": {
"message": "关闭导航栏",
"description": "The ARIA label for close button of mobile sidebar"
},
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
"message": "← 返回主菜单",
"description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
},
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
"message": "切换导航栏",
"description": "The ARIA label for hamburger menu button of mobile navigation"
},
"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel": {
"message": "展开下拉菜单",
"description": "The ARIA label of the button to expand the mobile dropdown navbar item"
},
"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel": {
"message": "折叠下拉菜单",
"description": "The ARIA label of the button to collapse the mobile dropdown navbar item"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.expandButtonAriaLabel": {
"message": "展开侧边栏",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.contentVisibility.unlistedBanner.title": {
"message": "未列出的页面",
"description": "The unlisted content banner title"
},
"theme.contentVisibility.unlistedBanner.message": {
"message": "此页面未列出。搜索引擎不会索引它,只有拥有直接链接的用户才能访问。",
"description": "The unlisted content banner message"
},
"theme.contentVisibility.draftBanner.title": {
"message": "草稿页面",
"description": "The draft content banner title"
},
"theme.contentVisibility.draftBanner.message": {
"message": "此页面是草稿。它只会在开发环境中可见,并会从生产构建中排除。",
"description": "The draft content banner message"
},
"theme.ErrorPageContent.tryAgain": {
"message": "重试",
"description": "The label of the button to try again rendering when the React error boundary captures an error"
},
"theme.common.skipToMainContent": {
"message": "跳到主要内容",
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
},
"theme.tags.tagsPageTitle": {
"message": "标签",
"description": "The title of the tag list page"
},
"theme.tagline": {
"message": "面向 Express.js 的声明式、基于装饰器的请求数据处理。",
"description": "The tagline of the site"
},
"theme.homepage.getStarted": {
"message": "快速开始",
"description": "The label of the getting started button on the homepage"
},
"theme.homepage.feature.declarative.title": {
"message": "声明式数据绑定",
"description": "Title for the 'Declarative Data Binding' feature on the homepage."
},
"theme.homepage.feature.declarative.description": {
"message": "使用直观的装饰器,将请求数据(body、query、params)轻松绑定到类实例,让路由逻辑保持清晰聚焦。",
"description": "Description of the declarative data binding feature. Emphasizes ease of use and clean code."
},
"theme.homepage.feature.validation.title": {
"message": "可靠的数据验证",
"description": "Title for the 'Robust Data Validation' feature on the homepage."
},
"theme.homepage.feature.validation.description": {
"message": "借助丰富的内置装饰器轻松验证数据,并在处理前确保数据完整性。",
"description": "Description of the data validation feature. Highlights the use of built-in decorators and the benefit of data integrity."
},
"theme.homepage.feature.typeSafe.title": {
"message": "类型安全且可扩展",
"description": "Title for the 'Type-Safe & Extensible' feature on the homepage."
},
"theme.homepage.feature.typeSafe.description": {
"message": "基于 TypeScript 构建,提供完整的类型安全,并允许你通过自定义装饰器和转换器扩展库。",
"description": "Description of the library's type safety and extensibility. Mentions TypeScript and custom decorators/transformers."
}
}
22 changes: 22 additions & 0 deletions apps/docs/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version.label": {
"message": "下一版",
"description": "The label for version current"
},
"sidebar.docs.category.Getting Started": {
"message": "快速开始",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.docs.category.Core Concepts": {
"message": "核心概念",
"description": "The label for category Core Concepts in sidebar docs"
},
"sidebar.docs.category.Advanced Usage": {
"message": "高级用法",
"description": "The label for category Advanced Usage in sidebar docs"
},
"sidebar.docs.category.Examples": {
"message": "示例",
"description": "The label for category Examples in sidebar docs"
}
}
Loading
Loading