You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2021/09/23 07:08:36 UTC

[incubator-eventmesh-site] branch master updated: Sync the zh_CN documents from apache/incubator-eventmesh

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh-site.git


The following commit(s) were added to refs/heads/master by this push:
     new aef53cf  Sync the zh_CN documents from apache/incubator-eventmesh
     new 547c8d0  Merge pull request #16 from xiaoyang-sde/master
aef53cf is described below

commit aef53cfcde95fe402ef125c60c7b50f7f76a908e
Author: Xiaoyang Liu <si...@gmail.com>
AuthorDate: Tue Sep 21 17:11:49 2021 -0700

    Sync the zh_CN documents from apache/incubator-eventmesh
    
    Signed-off-by: Xiaoyang Liu <si...@gmail.com>
---
 .gitignore                                         |   1 +
 docusaurus.config.js                               |  18 +-
 i18n/zh/code.json                                  | 218 +++++++++++++++++++++
 .../zh/docusaurus-plugin-content-blog/options.json |  14 ++
 .../current.json                                   |   6 +
 .../current.json                                   |  10 +
 .../zh/docusaurus-plugin-content-docs/current.json |  14 ++
 i18n/zh/docusaurus-theme-classic/footer.json       |  58 ++++++
 i18n/zh/docusaurus-theme-classic/navbar.json       |  26 +++
 scripts/sync-docs.js                               |   6 +-
 10 files changed, 365 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0a3389c..e47c903 100644
--- a/.gitignore
+++ b/.gitignore
@@ -131,3 +131,4 @@ dist
 .env.development.local
 .env.test.local
 .env.production.local
+tmp
diff --git a/docusaurus.config.js b/docusaurus.config.js
index fb988c7..2b7a327 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -77,10 +77,10 @@ module.exports = {
           position: 'left',
           label: 'Community',
         },
-        // {
-        //   type: 'localeDropdown',
-        //   position: 'left',
-        // },
+        {
+          type: 'localeDropdown',
+          position: 'left',
+        },
       ],
     },
     footer: {
@@ -157,7 +157,15 @@ module.exports = {
   },
   i18n: {
     defaultLocale: 'en',
-    locales: ['en', 'zh-hans'],
+    locales: ['en', 'zh'],
+    localeConfigs: {
+      en: {
+        label: 'English',
+      },
+      zh: {
+        label: '简体中文',
+      },
+    },
   },
   presets: [
     [
diff --git a/i18n/zh/code.json b/i18n/zh/code.json
new file mode 100644
index 0000000..d6dd980
--- /dev/null
+++ b/i18n/zh/code.json
@@ -0,0 +1,218 @@
+{
+  "theme.NotFound.title": {
+    "message": "Page Not Found",
+    "description": "The title of the 404 page"
+  },
+  "theme.NotFound.p1": {
+    "message": "We could not find what you were looking for.",
+    "description": "The first paragraph of the 404 page"
+  },
+  "theme.NotFound.p2": {
+    "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
+    "description": "The 2nd paragraph of the 404 page"
+  },
+  "theme.AnnouncementBar.closeButtonAriaLabel": {
+    "message": "Close",
+    "description": "The ARIA label for close button of announcement bar"
+  },
+  "theme.blog.archive.title": {
+    "message": "Archive",
+    "description": "The page & hero title of the blog archive page"
+  },
+  "theme.blog.archive.description": {
+    "message": "Archive",
+    "description": "The page & hero description of the blog archive page"
+  },
+  "theme.blog.paginator.navAriaLabel": {
+    "message": "Blog list page navigation",
+    "description": "The ARIA label for the blog pagination"
+  },
+  "theme.blog.paginator.newerEntries": {
+    "message": "Newer Entries",
+    "description": "The label used to navigate to the newer blog posts page (previous page)"
+  },
+  "theme.blog.paginator.olderEntries": {
+    "message": "Older Entries",
+    "description": "The label used to navigate to the older blog posts page (next page)"
+  },
+  "theme.blog.post.readingTime.plurals": {
+    "message": "One min read|{readingTime} min read",
+    "description": "Pluralized label for \"{readingTime} min read\". 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.blog.post.readMore": {
+    "message": "Read More",
+    "description": "The label used in blog post item excerpts to link to full blog posts"
+  },
+  "theme.blog.post.paginator.navAriaLabel": {
+    "message": "Blog post page navigation",
+    "description": "The ARIA label for the blog posts pagination"
+  },
+  "theme.blog.post.paginator.newerPost": {
+    "message": "Newer Post",
+    "description": "The blog post button label to navigate to the newer/previous post"
+  },
+  "theme.blog.post.paginator.olderPost": {
+    "message": "Older Post",
+    "description": "The blog post button label to navigate to the older/next post"
+  },
+  "theme.blog.sidebar.navAriaLabel": {
+    "message": "Blog recent posts navigation",
+    "description": "The ARIA label for recent posts in the blog sidebar"
+  },
+  "theme.blog.post.plurals": {
+    "message": "One post|{count} posts",
+    "description": "Pluralized label for \"{count} posts\". 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.blog.tagTitle": {
+    "message": "{nPosts} tagged with \"{tagName}\"",
+    "description": "The title of the page for a blog tag"
+  },
+  "theme.tags.tagsPageLink": {
+    "message": "View All Tags",
+    "description": "The label of the link targeting the tag list page"
+  },
+  "theme.CodeBlock.copyButtonAriaLabel": {
+    "message": "Copy code to clipboard",
+    "description": "The ARIA label for copy code blocks button"
+  },
+  "theme.CodeBlock.copied": {
+    "message": "Copied",
+    "description": "The copied button label on code blocks"
+  },
+  "theme.CodeBlock.copy": {
+    "message": "Copy",
+    "description": "The copy button label on code blocks"
+  },
+  "theme.docs.sidebar.expandButtonTitle": {
+    "message": "Expand sidebar",
+    "description": "The ARIA label and title attribute for expand button of doc sidebar"
+  },
+  "theme.docs.sidebar.expandButtonAriaLabel": {
+    "message": "Expand sidebar",
+    "description": "The ARIA label and title attribute for expand button of doc sidebar"
+  },
+  "theme.docs.paginator.navAriaLabel": {
+    "message": "Docs pages navigation",
+    "description": "The ARIA label for the docs pagination"
+  },
+  "theme.docs.paginator.previous": {
+    "message": "Previous",
+    "description": "The label used to navigate to the previous doc"
+  },
+  "theme.docs.paginator.next": {
+    "message": "Next",
+    "description": "The label used to navigate to the next doc"
+  },
+  "theme.docs.sidebar.collapseButtonTitle": {
+    "message": "Collapse sidebar",
+    "description": "The title attribute for collapse button of doc sidebar"
+  },
+  "theme.docs.sidebar.collapseButtonAriaLabel": {
+    "message": "Collapse sidebar",
+    "description": "The title attribute for collapse button of doc sidebar"
+  },
+  "theme.docs.tagDocListPageTitle.nDocsTagged": {
+    "message": "One doc tagged|{count} docs tagged",
+    "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} with \"{tagName}\"",
+    "description": "The title of the page for a docs tag"
+  },
+  "theme.docs.versions.unreleasedVersionLabel": {
+    "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.",
+    "description": "The label used to tell the user that he's browsing an unreleased doc version"
+  },
+  "theme.docs.versions.unmaintainedVersionLabel": {
+    "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.",
+    "description": "The label used to tell the user that he's browsing an unmaintained doc version"
+  },
+  "theme.docs.versions.latestVersionSuggestionLabel": {
+    "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).",
+    "description": "The label used to tell the user to check the latest version"
+  },
+  "theme.docs.versions.latestVersionLinkLabel": {
+    "message": "latest version",
+    "description": "The label used for the latest version suggestion link label"
+  },
+  "theme.common.editThisPage": {
+    "message": "Edit this page",
+    "description": "The link label to edit the current page"
+  },
+  "theme.common.headingLinkTitle": {
+    "message": "Direct link to heading",
+    "description": "Title for link to heading"
+  },
+  "theme.lastUpdated.atDate": {
+    "message": " on {date}",
+    "description": "The words used to describe on which date a page has been last updated"
+  },
+  "theme.lastUpdated.byUser": {
+    "message": " by {user}",
+    "description": "The words used to describe by who the page has been last updated"
+  },
+  "theme.lastUpdated.lastUpdatedAtBy": {
+    "message": "Last updated{atDate}{byUser}",
+    "description": "The sentence used to display when a page has been last updated, and by who"
+  },
+  "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
+    "message": "← Back to main menu",
+    "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.navbar.mobileVersionsDropdown.label": {
+    "message": "Versions",
+    "description": "The label for the navbar versions dropdown on mobile view"
+  },
+  "theme.common.skipToMainContent": {
+    "message": "Skip to main content",
+    "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
+  },
+  "theme.TOCCollapsible.toggleButtonLabel": {
+    "message": "On this page",
+    "description": "The label used by the button on the collapsible TOC component"
+  },
+  "theme.tags.tagsListLabel": {
+    "message": "Tags:",
+    "description": "The label alongside a tag list"
+  },
+  "theme.SearchPage.documentsFound.plurals": {
+    "message": "One document found|{count} documents found",
+    "description": "Pluralized label for \"{count} documents found\". 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.SearchPage.existingResultsTitle": {
+    "message": "Search results for \"{query}\"",
+    "description": "The search page title for non-empty query"
+  },
+  "theme.SearchPage.emptyResultsTitle": {
+    "message": "Search the documentation",
+    "description": "The search page title for empty query"
+  },
+  "theme.SearchPage.inputPlaceholder": {
+    "message": "Type your search here",
+    "description": "The placeholder for search page input"
+  },
+  "theme.SearchPage.inputLabel": {
+    "message": "Search",
+    "description": "The ARIA label for search page input"
+  },
+  "theme.SearchPage.algoliaLabel": {
+    "message": "Search by Algolia",
+    "description": "The ARIA label for Algolia mention"
+  },
+  "theme.SearchPage.noResultsText": {
+    "message": "No results were found",
+    "description": "The paragraph for empty search result"
+  },
+  "theme.SearchPage.fetchingNewResults": {
+    "message": "Fetching new results...",
+    "description": "The paragraph for fetching new search results"
+  },
+  "theme.SearchBar.label": {
+    "message": "Search",
+    "description": "The ARIA label and placeholder for search button"
+  },
+  "theme.tags.tagsPageTitle": {
+    "message": "Tags",
+    "description": "The title of the tag list page"
+  }
+}
\ No newline at end of file
diff --git a/i18n/zh/docusaurus-plugin-content-blog/options.json b/i18n/zh/docusaurus-plugin-content-blog/options.json
new file mode 100644
index 0000000..17db797
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-blog/options.json
@@ -0,0 +1,14 @@
+{
+  "title": {
+    "message": "博客",
+    "description": "The title for the blog used in SEO"
+  },
+  "description": {
+    "message": "博客",
+    "description": "The description for the blog used in SEO"
+  },
+  "sidebar.title": {
+    "message": "最新文章",
+    "description": "The label for the left sidebar"
+  }
+}
diff --git a/i18n/zh/docusaurus-plugin-content-docs-community/current.json b/i18n/zh/docusaurus-plugin-content-docs-community/current.json
new file mode 100644
index 0000000..03f587e
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-docs-community/current.json
@@ -0,0 +1,6 @@
+{
+  "version.label": {
+    "message": "Next",
+    "description": "The label for version current"
+  }
+}
\ No newline at end of file
diff --git a/i18n/zh/docusaurus-plugin-content-docs-events/current.json b/i18n/zh/docusaurus-plugin-content-docs-events/current.json
new file mode 100644
index 0000000..c8af234
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-docs-events/current.json
@@ -0,0 +1,10 @@
+{
+  "version.label": {
+    "message": "Next",
+    "description": "The label for version current"
+  },
+  "sidebar.tutorialSidebar.category.Release Notes": {
+    "message": "更新日志",
+    "description": "The label for category Release Notes in sidebar tutorialSidebar"
+  }
+}
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json
new file mode 100644
index 0000000..5f1249b
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-docs/current.json
@@ -0,0 +1,14 @@
+{
+  "version.label": {
+    "message": "Next",
+    "description": "The label for version current"
+  },
+  "sidebar.tutorialSidebar.category.Features": {
+    "message": "Features",
+    "description": "The label for category Features in sidebar tutorialSidebar"
+  },
+  "sidebar.tutorialSidebar.category.Instructions": {
+    "message": "Instructions",
+    "description": "The label for category Instructions in sidebar tutorialSidebar"
+  }
+}
\ No newline at end of file
diff --git a/i18n/zh/docusaurus-theme-classic/footer.json b/i18n/zh/docusaurus-theme-classic/footer.json
new file mode 100644
index 0000000..16918fa
--- /dev/null
+++ b/i18n/zh/docusaurus-theme-classic/footer.json
@@ -0,0 +1,58 @@
+{
+  "link.title.EventMesh": {
+    "message": "EventMesh",
+    "description": "The title of the footer links column with title=EventMesh in the footer"
+  },
+  "link.title.Community": {
+    "message": "社区",
+    "description": "The title of the footer links column with title=Community in the footer"
+  },
+  "link.title.Apache Software Foundation": {
+    "message": "Apache Software Foundation",
+    "description": "The title of the footer links column with title=Apache Software Foundation in the footer"
+  },
+  "link.item.label.Documentation": {
+    "message": "文档",
+    "description": "The label of footer link with label=Documentation linking to /docs"
+  },
+  "link.item.label.Events": {
+    "message": "动态",
+    "description": "The label of footer link with label=Events linking to /events"
+  },
+  "link.item.label.Releases": {
+    "message": "更新日志",
+    "description": "The label of footer link with label=Releases linking to https://github.com/apache/incubator-eventmesh/releases"
+  },
+  "link.item.label.GitHub": {
+    "message": "GitHub",
+    "description": "The label of footer link with label=GitHub linking to https://github.com/apache/incubator-eventmesh"
+  },
+  "link.item.label.Issue Tracker": {
+    "message": "Issue Tracker",
+    "description": "The label of footer link with label=Issue Tracker linking to https://github.com/apache/incubator-eventmesh/issues"
+  },
+  "link.item.label.Pull Requests": {
+    "message": "Pull Requests",
+    "description": "The label of footer link with label=Pull Requests linking to https://github.com/apache/incubator-eventmesh/pulls"
+  },
+  "link.item.label.Foundation": {
+    "message": "Foundation",
+    "description": "The label of footer link with label=Foundation linking to https://www.apache.org/"
+  },
+  "link.item.label.License": {
+    "message": "License",
+    "description": "The label of footer link with label=License linking to https://www.apache.org/licenses/LICENSE-2.0"
+  },
+  "link.item.label.Sponsorship": {
+    "message": "Sponsorship",
+    "description": "The label of footer link with label=Sponsorship linking to https://www.apache.org/foundation/sponsorship.html"
+  },
+  "link.item.label.Thanks": {
+    "message": "Thanks",
+    "description": "The label of footer link with label=Thanks linking to http://www.apache.org/foundation/thanks.html"
+  },
+  "copyright": {
+    "message": "\n        Copyright © 2021 The Apache Software Foundation.\n        Apache EventMesh, Apache Incubator, EventMesh, Apache, the Apache feather logo,\n        the Apache EventMesh logo and the Apache Incubator project logo\n        are trademarks of The Apache Software Foundation.\n      ",
+    "description": "The footer copyright"
+  }
+}
diff --git a/i18n/zh/docusaurus-theme-classic/navbar.json b/i18n/zh/docusaurus-theme-classic/navbar.json
new file mode 100644
index 0000000..0fd40a6
--- /dev/null
+++ b/i18n/zh/docusaurus-theme-classic/navbar.json
@@ -0,0 +1,26 @@
+{
+  "title": {
+    "message": "Apache EventMesh (Incubating)",
+    "description": "The title in the navbar"
+  },
+  "item.label.Docs": {
+    "message": "文档",
+    "description": "Navbar item with label Docs"
+  },
+  "item.label.Download": {
+    "message": "下载",
+    "description": "Navbar item with label Download"
+  },
+  "item.label.Blog": {
+    "message": "博客",
+    "description": "Navbar item with label Blog"
+  },
+  "item.label.Events": {
+    "message": "动态",
+    "description": "Navbar item with label Events"
+  },
+  "item.label.Community": {
+    "message": "社区",
+    "description": "Navbar item with label Community"
+  }
+}
diff --git a/scripts/sync-docs.js b/scripts/sync-docs.js
index c4702fd..26d2c60 100644
--- a/scripts/sync-docs.js
+++ b/scripts/sync-docs.js
@@ -21,7 +21,10 @@ const copyFolder = (srcDir, tarDir) => {
   }
   files.forEach((file) => {
     const srcPath = path.join(srcDir, file);
-    const tarPath = path.join(tarDir, file);
+
+    let fileName = file.replaceAll('.en-US.md', '.md');
+    fileName = file.replaceAll('.zh-CN.md', '.md');
+    const tarPath = path.join(tarDir, fileName);
 
     const stats = fs.statSync(srcPath);
     if (stats.isDirectory()) {
@@ -50,6 +53,7 @@ const sync = async () => {
   await git.cwd('./tmp/incubator-eventmesh').checkout('develop', ['-f']);
   copyFolder('./tmp/incubator-eventmesh/docs/images/', './static/images/');
   copyFolder('./tmp/incubator-eventmesh/docs/en/', './docs/');
+  copyFolder('./tmp/incubator-eventmesh/docs/cn/', './i18n/zh/docusaurus-plugin-content-docs/current/');
 
   console.log('Removing tmp/incubator-eventmesh');
   fs.rmSync('./tmp', {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org