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

jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 45a3f3a9c8c [feature] use mirror url while language was zh_CN (#67)
45a3f3a9c8c is described below

commit 45a3f3a9c8c73e31d6233e33fbd26010fcb80624
Author: Jeffrey <[email protected]>
AuthorDate: Thu Aug 25 19:53:04 2022 +0800

    [feature] use mirror url while language was zh_CN (#67)
---
 .github/workflows/cron-deploy-website.yml |   4 +
 .github/workflows/manual-deploy.yml       |   4 +
 src/constant/download.data.ts             | 366 ++++++++++++++++--------------
 src/pages/download/index.tsx              |  31 ++-
 4 files changed, 217 insertions(+), 188 deletions(-)

diff --git a/.github/workflows/cron-deploy-website.yml 
b/.github/workflows/cron-deploy-website.yml
index c6e56a9b4b1..6797b192715 100644
--- a/.github/workflows/cron-deploy-website.yml
+++ b/.github/workflows/cron-deploy-website.yml
@@ -7,9 +7,13 @@ on:
 jobs:
   build-and-deploy:
     runs-on: ubuntu-latest
+    environment: Production
     steps:
     - name: Checkout
       uses: actions/checkout@master
+      with:
+          persist-credentials: false
+          submodules: recursive
 
     - name: Use Node.js
       uses: actions/setup-node@v1
diff --git a/.github/workflows/manual-deploy.yml 
b/.github/workflows/manual-deploy.yml
index 941ef545a11..9fc8d310fa3 100644
--- a/.github/workflows/manual-deploy.yml
+++ b/.github/workflows/manual-deploy.yml
@@ -11,9 +11,13 @@ on:
 jobs:
   build-and-deploy:
     runs-on: ubuntu-latest
+    environment: Production
     steps:
     - name: Checkout
       uses: actions/checkout@master
+      with:
+          persist-credentials: false
+          submodules: recursive
 
     - name: Use Node.js
       uses: actions/setup-node@v1
diff --git a/src/constant/download.data.ts b/src/constant/download.data.ts
index cf208af09b5..84bdabf17c8 100644
--- a/src/constant/download.data.ts
+++ b/src/constant/download.data.ts
@@ -8,98 +8,196 @@ export interface DownloadLinkProps {
     };
 }
 
-export const DOWNLOAD_LINKS: DownloadLinkProps[] = [
-    {
-        label: 'apache-doris-1.1.1-bin-x64.tar.gz',
-        id: '1.1.1-intel-avx2-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.1-bin-x64-noavx2.tar.gz',
-        id: '1.1.1-intel-noavx2-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.1-bin-arm64.tar.gz',
-        id: '1.1.1-arm-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-x64-jdk8.tar.gz',
-        id: '1.1.0-intel-avx2-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-x64-jdk11.tar.gz',
-        id: '1.1.0-intel-avx2-jdk11',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-x64-noavx2-jdk8.tar.gz',
-        id: '1.1.0-intel-noavx2-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-x64-noavx2-jdk11.tar.gz',
-        id: '1.1.0-intel-noavx2-jdk11',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-arm64-jdk8.tar.gz',
-        id: '1.1.0-arm-jdk8',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz.sha512',
-        },
-    },
-    {
-        label: 'apache-doris-1.1.0-bin-arm64-jdk11.tar.gz',
-        id: '1.1.0-arm-jdk11',
-        links: {
-            source: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz',
-            signature:
-                
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz.asc',
-            sha512: 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz.sha512',
-        },
-    },
-];
+const APACHE_LINK = 
'https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=';
+const CHINA_MIRROR_LINK = 'http://mirror.kaiyuanshe.cn/apache/';
+
+const FLINK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
+const CHINA_FLINK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
+
+const SPARK_CONNECTOR_LINK = 'https://dist.apache.org/repos/dist/release/';
+const CHINA_SPARK_CONNECTOR_MIRROR_LINK = CHINA_MIRROR_LINK;
+
+const ALL_RELEASE_LINK = 'https://archive.apache.org/dist/';
+const CHINA_ALL_RELEASE_MIRROR_LINK = 'http://mirror.kaiyuanshe.cn/apache/';
+
+export function getAllDownloadLinks(locale: string) {
+    const sources = locale.toLocaleUpperCase() === 'EN' ? APACHE_LINK : 
CHINA_MIRROR_LINK;
+    return [
+        {
+            label: 'apache-doris-1.1.1-bin-x64.tar.gz',
+            id: '1.1.1-intel-avx2-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.1-bin-x64-noavx2.tar.gz',
+            id: '1.1.1-intel-noavx2-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-x86-noavx2.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.1-bin-arm64.tar.gz',
+            id: '1.1.1-arm-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.1-rc03/apache-doris-1.1.1-bin-arm.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-x64-jdk8.tar.gz',
+            id: '1.1.0-intel-avx2-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk8.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-x64-jdk11.tar.gz',
+            id: '1.1.0-intel-avx2-jdk11',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-jdk11.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-x64-noavx2-jdk8.tar.gz',
+            id: '1.1.0-intel-noavx2-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk8.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-x64-noavx2-jdk11.tar.gz',
+            id: '1.1.0-intel-noavx2-jdk11',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-x86-noavx2-jdk11.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-arm64-jdk8.tar.gz',
+            id: '1.1.0-arm-jdk8',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk8.tar.gz.sha512`,
+            },
+        },
+        {
+            label: 'apache-doris-1.1.0-bin-arm64-jdk11.tar.gz',
+            id: '1.1.0-arm-jdk11',
+            links: {
+                source: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz`,
+                signature: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz.asc`,
+                sha512: 
`${sources}doris/1.1/1.1.0-rc05/apache-doris-1.1.0-bin-arm-jdk11.tar.gz.sha512`,
+            },
+        },
+    ];
+}
+
+export function getAllFlinkConnectorDownloadLinks(locale: string) {
+    const sources = locale.toLocaleUpperCase() === 'EN' ? FLINK_CONNECTOR_LINK 
: CHINA_FLINK_CONNECTOR_MIRROR_LINK;
+    return [
+        {
+            version: '1.2.0',
+            date: '2022-08-15',
+            flink: '1.15',
+            scala: '2.12, 2.11',
+            doris: '1.0+',
+            download: `${sources}doris/flink-connector/1.2.0/`,
+            github: 'https://github.com/apache/doris-flink-connector',
+        },
+        {
+            version: '1.1.0',
+            date: '2022-07-11',
+            flink: '1.14',
+            scala: '2.12, 2.11',
+            doris: '0.15+',
+            download: `${sources}doris/flink-connector/1.1.0/`,
+            github: 'https://github.com/apache/doris-flink-connector',
+        },
+        {
+            version: '1.0.3',
+            date: '2021-03-18',
+            flink: '1.14, 1.13, 1.12, 1.11',
+            scala: '2.12, 2.11',
+            doris: '0.15+',
+            download: `${sources}doris/flink-connector/1.0.3/`,
+            github: 'https://github.com/apache/doris-flink-connector',
+        },
+    ];
+}
+export function getAllSparkConnectorDownloadLinks(locale: string) {
+    const sources = locale.toLocaleUpperCase() === 'EN' ? SPARK_CONNECTOR_LINK 
: CHINA_SPARK_CONNECTOR_MIRROR_LINK;
+    return [
+        {
+            version: '1.1.0',
+            date: '2022-07-11',
+            spark: '3.2, 3.1, 2.3',
+            scala: '2.12, 2.11',
+            doris: '0.15+',
+            download: `${sources}doris/spark-connector/1.1.0/`,
+            github: 'https://github.com/apache/doris-spark-connector',
+        },
+        {
+            version: '1.0.1',
+            date: '2021-03-18',
+            spark: '3.1, 2.3',
+            scala: '2.12, 2.11',
+            doris: '0.15+',
+            download: `${sources}doris/spark-connector/1.0.1/`,
+            github: 'https://github.com/apache/doris-spark-connector',
+        },
+    ];
+}
+
+export function getAllRelease(locale: string) {
+    const sources = locale.toLocaleUpperCase() === 'EN' ? ALL_RELEASE_LINK : 
CHINA_ALL_RELEASE_MIRROR_LINK;
+    return [
+        {
+            version: '1.1.1 ( latest )',
+            date: '2022-07-29',
+            note: '/docs/releasenotes/release-1.1.1',
+            download: `${sources}doris/1.1/1.1.1-rc03/`,
+        },
+        {
+            version: '1.1.0',
+            date: '2022-07-14',
+            note: '/docs/releasenotes/release-1.1.0',
+            download: `${sources}doris/1.1/1.1.0-rc05/`,
+        },
+        {
+            version: '0.15.0',
+            date: '2021-11-29',
+            note: 'https://github.com/apache/doris/issues/6806',
+            download: `${sources}doris/0.15.0-incubating/`,
+        },
+        {
+            version: '0.14.0',
+            date: '2021-05-26',
+            note: 'https://github.com/apache/doris/issues/5374',
+            download: `${sources}doris/0.14.0-incubating/`,
+        },
+        {
+            version: '0.13.0',
+            date: '2020-10-24',
+            note: 'https://github.com/apache/doris/issues/4370',
+            download: `${sources}doris/0.13.0-incubating/`,
+        },
+    ];
+}
 
 export enum VersionEnum {
     Latest = '1.1.1',
@@ -116,87 +214,3 @@ export enum JDKEnum {
     JDK8 = 'jdk8',
     JDK11 = 'jdk11',
 }
-
-export const ALL_RELEASE = [
-    {
-        version: '1.1.1 ( latest )',
-        date: '2022-07-29',
-        note: '/docs/releasenotes/release-1.1.1',
-        download: 'https://archive.apache.org/dist/doris/1.1/1.1.1-rc03/',
-    },
-    {
-        version: '1.1.0',
-        date: '2022-07-14',
-        note: '/docs/releasenotes/release-1.1.0',
-        download: 'https://archive.apache.org/dist/doris/1.1/1.1.0-rc05/',
-    },
-    {
-        version: '0.15.0',
-        date: '2021-11-29',
-        note: 'https://github.com/apache/doris/issues/6806',
-        download: 'https://archive.apache.org/dist/doris/0.15.0-incubating/',
-    },
-    {
-        version: '0.14.0',
-        date: '2021-05-26',
-        note: 'https://github.com/apache/doris/issues/5374',
-        download: 
'https://archive.apache.org/dist/incubator/doris/0.14.0-incubating/',
-    },
-    {
-        version: '0.13.0',
-        date: '2020-10-24',
-        note: 'https://github.com/apache/doris/issues/4370',
-        download: 
'https://archive.apache.org/dist/incubator/doris/0.13.0-incubating/',
-    },
-];
-
-export const FLINK_CONNECTOR = [
-    {
-        version: '1.2.0',
-        date: '2022-08-15',
-        flink: '1.15',
-        scala: '2.12, 2.11',
-        doris: '1.0+',
-        download: 
'https://dist.apache.org/repos/dist/release/doris/flink-connector/1.2.0/',
-        github: 'https://github.com/apache/doris-flink-connector',
-    },
-    {
-        version: '1.1.0',
-        date: '2022-07-11',
-        flink: '1.14',
-        scala: '2.12, 2.11',
-        doris: '0.15+',
-        download: 
'https://dist.apache.org/repos/dist/release/doris/flink-connector/1.1.0/',
-        github: 'https://github.com/apache/doris-flink-connector',
-    },
-    {
-        version: '1.0.3',
-        date: '2021-03-18',
-        flink: '1.14, 1.13, 1.12, 1.11',
-        scala: '2.12, 2.11',
-        doris: '0.15+',
-        download: 
'https://dist.apache.org/repos/dist/release/doris/flink-connector/1.0.3/',
-        github: 'https://github.com/apache/doris-flink-connector',
-    },
-];
-
-export const SPARK_CONNECTOR = [
-    {
-        version: '1.1.0',
-        date: '2022-07-11',
-        spark: '3.2, 3.1, 2.3',
-        scala: '2.12, 2.11',
-        doris: '0.15+',
-        download: 
'https://dist.apache.org/repos/dist/release/doris/spark-connector/1.1.0/',
-        github: 'https://github.com/apache/doris-spark-connector',
-    },
-    {
-        version: '1.0.1',
-        date: '2021-03-18',
-        spark: '3.1, 2.3',
-        scala: '2.12, 2.11',
-        doris: '0.15+',
-        download: 
'https://dist.apache.org/repos/dist/release/doris/spark-connector/1.0.1/',
-        github: 'https://github.com/apache/doris-spark-connector',
-    },
-];
diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx
index 7ce8392dda0..fa84b03aa45 100644
--- a/src/pages/download/index.tsx
+++ b/src/pages/download/index.tsx
@@ -1,23 +1,23 @@
+import clsx from 'clsx';
+import CodeBlock from '@theme/CodeBlock';
 import Layout from '../../theme/Layout';
+import Link from '@docusaurus/Link';
+import More from '@site/src/components/More';
+import PageColumn from '@site/src/components/PageColumn';
 import React, { useEffect, useState } from 'react';
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
 import Translate, { translate } from '@docusaurus/Translate';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
 import './index.scss';
-import Link from '@docusaurus/Link';
-import PageColumn from '@site/src/components/PageColumn';
-import CodeBlock from '@theme/CodeBlock';
-import clsx from 'clsx';
 import {
     CPUEnum,
     DownloadLinkProps,
-    DOWNLOAD_LINKS,
     JDKEnum,
     VersionEnum,
-    ALL_RELEASE,
-    FLINK_CONNECTOR,
-    SPARK_CONNECTOR,
+    getAllDownloadLinks,
+    getAllFlinkConnectorDownloadLinks,
+    getAllSparkConnectorDownloadLinks,
+    getAllRelease,
 } from '@site/src/constant/download.data';
-import More from '@site/src/components/More';
 
 const BINARY_VERSION = [
     { label: '1.1.1 ( latest )', value: VersionEnum.Latest },
@@ -34,13 +34,20 @@ const JDK = [
 ];
 
 export default function Download(): JSX.Element {
-    const { siteConfig } = useDocusaurusContext();
+    const {
+        siteConfig,
+        i18n: { currentLocale, locales, localeConfigs },
+    } = useDocusaurusContext();
 
     const [version, setVersion] = useState<string>(VersionEnum.Latest);
     const [cpu, setCPU] = useState<string>(CPUEnum.IntelAvx2);
     const [jdk, setJDK] = useState<string>(JDKEnum.JDK8);
     const [current, setCurrent] = useState<DownloadLinkProps>();
 
+    const FLINK_CONNECTOR = getAllFlinkConnectorDownloadLinks(currentLocale);
+    const SPARK_CONNECTOR = getAllSparkConnectorDownloadLinks(currentLocale);
+    const ALL_RELEASE = getAllRelease(currentLocale);
+
     const changeVersion = (val: string) => {
         setVersion(val);
     };
@@ -54,7 +61,7 @@ export default function Download(): JSX.Element {
 
     const getDownloadLinks = () => {
         const text = `${version}-${cpu}-${jdk}`;
-        const linkObj = DOWNLOAD_LINKS.find(item => item.id === text);
+        const linkObj = getAllDownloadLinks(currentLocale).find(item => 
item.id === text);
         setCurrent(linkObj);
     };
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to