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

urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 5482c5c8e230202869b3d4d12c7749f1eb897245
Author: LiLi <[email protected]>
AuthorDate: Tue Feb 22 15:57:02 2022 +0800

    feat: i18n configuration
    
    Signed-off-by: LiLi <[email protected]>
---
 site2/website-next/crowdin.yml          | 73 ++++++++++++++++++++++-----------
 site2/website-next/docusaurus.config.js |  2 +-
 site2/website-next/scripts/.htaccess    |  2 +-
 3 files changed, 52 insertions(+), 25 deletions(-)

diff --git a/site2/website-next/crowdin.yml b/site2/website-next/crowdin.yml
index d4c88b2..3b9657d 100644
--- a/site2/website-next/crowdin.yml
+++ b/site2/website-next/crowdin.yml
@@ -1,24 +1,51 @@
-project_id: NEXT_CROWDIN_DOCUSAURUS_PROJECT_ID
-api_token: NEXT_CROWDIN_DOCUSAURUS_API_TOKEN
+project_id: 500516
+api_token: 
8658d59a902a906ca090a1124a77bfb4af87fb127b9d44518903ec08e730edce20e83becff012f91
 preserve_hierarchy: true
-files: [
-    # JSON
-    {
-      source: "/i18n/en/**/*",
-      translation: "/i18n/%locale%/**/%original_file_name%",
-    },
-    # Docs
-    {
-      source: "/docs/**/*",
-      translation: 
"/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%",
-    },
-    {
-      source: "/versioned_docs/**/*",
-      translation: 
"/i18n/%locale%/docusaurus-plugin-content-docs/**/%original_file_name%",
-    },
-    # Blogs
-    {
-      source: "/blog/**/*",
-      translation: 
"/i18n/%locale%/docusaurus-plugin-content-blog/**/%original_file_name%",
-    },
-  ]
+files:
+  - source: "/i18n/en/**/*"
+    translation: "/i18n/%locale%/**/%original_file_name%"
+    languages_mapping: &anchor
+      locale:
+        "af": "af"
+        "ar": "ar"
+        "bs-BA": "bs-BA"
+        "ca": "ca"
+        "cs": "cs"
+        "da": "da"
+        "de": "de"
+        "el": "el"
+        "es-ES": "es-ES"
+        "fa": "fa-IR"
+        "fi": "fi"
+        "fr": "fr"
+        "he": "he"
+        "hu": "hu"
+        "id": "id-ID"
+        "it": "it"
+        "ja": "ja"
+        "ko": "ko"
+        "mr": "mr-IN"
+        "nl": "nl"
+        "no": "no-NO"
+        "pl": "pl"
+        "pt-BR": "pt-BR"
+        "pt-PT": "pt-PT"
+        "ro": "ro"
+        "ru": "ru"
+        "sk": "sk-SK"
+        "sr": "sr"
+        "sv-SE": "sv-SE"
+        "tr": "tr"
+        "uk": "uk"
+        "vi": "vi"
+        "zh-CN": "zh-CN"
+        "zh-TW": "zh-TW"
+  - source: "/docs/**/*"
+    translation: 
"/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%"
+    languages_mapping: *anchor
+  - source: "/versioned_docs/**/*"
+    translation: 
"/i18n/%locale%/docusaurus-plugin-content-docs/**/%original_file_name%"
+    languages_mapping: *anchor
+  - source: "/blog/**/*"
+    translation: 
"/i18n/%locale%/docusaurus-plugin-content-blog/**/%original_file_name%"
+    languages_mapping: *anchor
diff --git a/site2/website-next/docusaurus.config.js 
b/site2/website-next/docusaurus.config.js
index 6951fa4..f995995 100644
--- a/site2/website-next/docusaurus.config.js
+++ b/site2/website-next/docusaurus.config.js
@@ -105,7 +105,7 @@ module.exports = {
   },
   // i18n: {
   //   defaultLocale: "en",
-  //   locales: ["en", "zh-CN"],
+  //   locales: ["en", "zh-CN", "zh-TW", "ja", "fr"],
   // },
   themeConfig: {
     navbar: {
diff --git a/site2/website-next/scripts/.htaccess 
b/site2/website-next/scripts/.htaccess
index 6a5bd09..a8b4b91 100755
--- a/site2/website-next/scripts/.htaccess
+++ b/site2/website-next/scripts/.htaccess
@@ -1,4 +1,4 @@
 RewriteEngine On
 
 RewriteRule "^docs/en/(.+)$" "docs/$1"
-RewriteRule "^docs/(zh-CN|zh-TW|ja-JP|ko-KR|fr-FR|pt-PT)/(.+)$" "$1/docs/$2"
\ No newline at end of file
+RewriteRule "^docs/(zh-CN|zh-TW|ja|ko|fr)/(.+)$" "$1/docs/$2"
\ No newline at end of file

Reply via email to