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

jeffreyh 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 a379bedaa1e [Feat]:support cn event (#2319)
a379bedaa1e is described below

commit a379bedaa1eb2b25be45abe79424c847560d8e9c
Author: yangon <[email protected]>
AuthorDate: Wed Apr 23 19:21:51 2025 +0800

    [Feat]:support cn event (#2319)
    
    
![image](https://github.com/user-attachments/assets/397e95bc-2f90-4b23-bd15-740572f6862e)
---
 docusaurus.config.js                 |   4 +-
 i18n/zh-CN/code.json                 |  15 ++
 src/pages/events/index.tsx           | 248 +++++++++++++++++++++++++++++---
 src/theme/DocVersionBanner/index.tsx | 266 +++++++++++++++++------------------
 4 files changed, 374 insertions(+), 159 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 9ca7a5d2bdf..1bba05d18b3 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -205,10 +205,10 @@ const config = {
             announcementBar: {
                 id: 'join_us',
                 content: JSON.stringify({
-                    zh: `<a 
href="https://www.selectdb.com/resources/events/doris-webinar-20250401"; 
target="_blank" style="display:flex; width: 100%; align-items: center; 
justify-content: center; margin-left: 4px; text-decoration: none;">
+                    zh: `<a 
href="https://www.selectdb.com/resources/events/doris-webinar-20250410"; 
target="_blank" style="display:flex; width: 100%; align-items: center; 
justify-content: center; margin-left: 4px; text-decoration: none;">
                 <img style="width: 19px; height: 19px; margin-right: 3px;" 
src="/images/nav-star.svg">
                 <span 
style="color:#52CAA3;font-size:0.875rem;font-weight:700;line-height:1rem; 
margin-right:0.675rem; text-decoration: none;">NEW</span>
-               <span>4 月 1 日 Apache Doris x AI 应用实践直播专场来袭!</span> 
+               <span>4 月 10 日 Webinar 第五期:Apache Doris x Iceberg 
湖仓构建直播专场!</span> 
                <p 
style="margin-left:0.675rem;color:#52CAA3;font-size:0.875rem;line-height:1rem;font-weight:700;letter-spacing:0.28px;">观看回放
 -></p> 
                    </a>`,
                     en: null,
diff --git a/i18n/zh-CN/code.json b/i18n/zh-CN/code.json
index c6a79b506b6..c224eceaa73 100644
--- a/i18n/zh-CN/code.json
+++ b/i18n/zh-CN/code.json
@@ -66,5 +66,20 @@
     "archive.latest.version": {
         "message": "最新版本",
         "description": "archive latest version"
+    },
+    "theme.docs.versions.latestVersionSuggestionLabel": {
+        "message": "使用参考请跳转至 {recommondVersionLink} 或 {latestVersionLink} 
正式版本文档进行查阅。"
+    },
+    "theme.docs.versions.latestVersionLinkLabel": {
+        "message": "3.0"
+    },
+    "theme.docs.versions.recommondVersionLinkLabel": {
+        "message": "2.1"
+    },
+    "theme.docs.versions.unreleasedVersionLabel": {
+        "message": "此处为 Apache Doris {unreleased}的版本文档,不建议作为使用参考。"
+    },
+    "theme.docs.versions.unreleasedText": {
+        "message": "尚未发布"
     }
 }
\ No newline at end of file
diff --git a/src/pages/events/index.tsx b/src/pages/events/index.tsx
index 9ca69ab0760..b4693149d66 100644
--- a/src/pages/events/index.tsx
+++ b/src/pages/events/index.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useEffect } from 'react';
 import Layout from '../../theme/Layout';
 import Link from '@docusaurus/Link';
 import clsx from 'clsx';
@@ -36,11 +36,11 @@ const EVENTS_PAGE_DATA = {
         desc: "Stay tuned to community voices. Together, we celebrate 
collaboration, innovation, and the power of shared knowledge. Let's connect, 
learn, and grow!",
         action: {
             label: 'Are we missing any ? Click here to contribute',
-            link: '/',
+            link: 'https://github.com/apache/doris/discussions/50296',
             type: 'primary',
         },
     },
-    eventList: [
+    eventListEn: [
         {
             cardTitle: 'Explore Apache Doris Compute-Storage Decoupled Mode',
             detailTitle: 'Explore Apache Doris Compute-Storage Decoupled Mode',
@@ -84,24 +84,194 @@ const EVENTS_PAGE_DATA = {
             link: 
'https://www.linkedin.com/events/7303775032810356736/comments/',
         },
     ],
+    eventListZh: [
+        {
+            cardTitle: '',
+            cardDate: '',
+            tag: '',
+            detailTitle: '阿里云 SelectDB x Apache Doris |企业行 Meetup',
+            date: '2025-04-19(周六)13:30 - 17:00',
+            address: '阿里巴巴北京朝阳科技园 B 区-地下车库-B1F  B-B4-B03 雪月山庄',
+            description:
+                '4 月 19 日由阿里云联合飞轮科技共同发起的阿里云 SelectDB x Apache Doris 
日志存储与分析解决方案联合 Meetup 将在北京正式开启,邀您共探日志分析新范式!本次活动邀请了来自阿里云、飞轮科技、AI 
独角兽企业的多位技术专家,演讲涵盖阿里云数据库 SelectDB 版及 Apache Doris 在日志场景的技术特性、解决方案及落地实践。',
+            start_date: '2025-04-19T13:30:00.000Z',
+            end_date: '2025-04-19T17:00:00.000Z',
+            img: (
+                <img
+                    alt="阿里云 SelectDB x Apache Doris |企业行 Meetup"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/aliyun_selectdb_doris_meetup_768bc17a70.jpg`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/aliyun-selecdb-cloud-and-doris-meetup-20250419',
+        },
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: 'Doris Webinar 第五期:Apache Doris x Iceberg 湖仓构建',
+            description:
+                '第五期 Webinar 依旧聚焦湖仓分析,届时飞轮科技技术副总裁陈明雨、飞轮科技资深研发吴文池将带来 Apache 
Doris x Iceberg 架构详解与性能展示。在 Live Demo 环节,通过 SelectDB Studio for Apache 
Doris,演示如何连接 Doris、集成 AWS S3 Tables,并进行数据写入和查询等操作,直观感受 Doris 与 Iceberg 
的丝滑操作体验。',
+            date: '2025 年 04 月 10 日 19:30-20:30',
+            start_date: '2025-04-10T19:30:00.000Z',
+            end_date: '2025-04-10T20:30:00.000Z',
+            address: '线上',
+            img: (
+                <img
+                    alt="Doris Webinar 第五期:Apache Doris x Iceberg 湖仓构建"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/banner_86e5fb95ee.jpeg`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/doris-webinar-20250410',
+        },
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: 'Doris Webinar 第四期:Apache Doris × AI',
+            description:
+                '本场 Webinar 将分享多款热门 AI 模型与 Doris 结合场景,包括 DataAgent 
实现智能数据代理、RAG 增强知识检索、ChatBI 打造自然语言交互分析和 MCP 的实现场景,同时解读 Apache Doris MCP Server 
0.1.0 首发版本的详细构建过程。',
+            date: '2025 年 04 月 01 日 19:30-21:00',
+            start_date: '2025-04-01T19:30:00.000Z',
+            end_date: '2025-04-01T21:00:00.000Z',
+            address: '线上',
+            img: (
+                <img
+                    alt="Doris Webinar 第四期:Apache Doris × AI"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/banner_c6210a02e5.jpeg`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/doris-webinar-20250401',
+        },
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: 'Doris Webinar 第二期:构建湖仓一体',
+            description:
+                '3 月 20 日 19:30-20:30,飞轮科技资深解决方案架构师朱伟将继续深入湖仓一体场景,从 Lakehouse 
核心价值、企业级湖仓架构构建、性能优化、功能详解四方面,带来「如何使用 Apache Doris 构建 Lakehouse?」线上直播。',
+            date: '2025 年 03 月 20 日 19:30-20:30',
+            start_date: '2025-03-20T19:30:00.000Z',
+            end_date: '2025-03-20T20:30:00.000Z',
+            address: '线上',
+            img: (
+                <img
+                    alt="Doris Webinar 第二期:构建湖仓一体"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/webinar_2_7513bacc91.jpeg`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/doris-webinar-20250320',
+        },
+
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: '走进网易 | Apache Doris 企业行',
+            description:
+                '作为国内最早将 Apache Doris 深度应用于核心业务场景的互联网企业之一,网易内部多个技术团队已基于 Apache 
Doris 构建实时数据分析引擎,覆盖实时分析、日志替换、存算分离等关键场景,显著提升数据处理效率并降低综合成本。此次 Meetup 
由飞轮科技与网易云音乐技术团队共同发起,联合网易智能邮件、网易数智等核心团队,首次体系化输出网易内部多场景的 Doris 
实战经验,为开发者提供从技术选型到规模化落地的全链路指南。',
+            date: '2025 年 3 月 15 日(周六)13:30 - 17:00',
+            start_date: '2025-03-15T13:30:00.000Z',
+            end_date: '2025-03-15T17:00:00.000Z',
+            address: '杭州市滨江区网商路 399 号网易大厦二期综合楼 4 楼培训厅',
+            img: (
+                <img
+                    alt="走进网易 | Apache Doris 企业行"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    src={`https://cdn.selectdb.com/static/_340b7f3bcb.png`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/doris-meetup-20250315',
+        },
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: 'Doris Webinar 第一期:2025 Roadmap 解读',
+            description:
+                '3 月 13 日 19:30,Apache Doris 核心研发团队将带来 2025 年度 Roadmap 
Overview,阐述实时分析、日志分析、湖仓一体、存算分离等重点场景的核心工作,聚焦技术深耕,并从查询加速、稳定性提升、数据安全保障等方面追寻更落地的场景突破,此外邀请了腾讯云、杭州银行等开发者分享最新社区共建项目,打造更开放、易用的现代化实时数据仓库,开启全球化演进新征程。欢迎预约收看直播。',
+            date: '2025 年 3 月 13 日 19:30-20:30',
+            start_date: '2025-04-10T19:30:00.000Z',
+            end_date: '2025-04-10T20:30:00.000Z',
+            address: '线上',
+            img: (
+                <img
+                    alt="Doris Webinar 第一期:2025 Roadmap 解读"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/banner_8cd1b24a6e.jpeg`}
+                />
+            ),
+            isCover: true,
+            link: 
'https://www.selectdb.com/resources/events/doris-webinar-20250313',
+        },
+        {
+            cardTitle: '',
+            tag: '',
+            cardDate: '',
+            detailTitle: 'Doris Summit Asia 2024 | 与创新者同行',
+            description:
+                '2024 年 12 月 14 日,由飞轮科技主办,阿里云、腾讯云联合主办的 Doris Summit Asia 2024 
将在深圳前海华侨城艾美酒店正式举行。大会设置主论坛以及智慧金融、泛互联网、政企与智造、SelectDB 产品专场 4 
大平行论坛。届时,来自阿里、腾讯、邮储银行、中信证券、中国电信、网易、京东、百度、知乎、福特中国、三星、四川航空、特步、货拉拉等 40+ 
知名企业的技术专家为现场及线上参会者带来精彩分享。',
+            date: '2024 年 12 月 14 日',
+            start_date: '2024-12-14T00:00:00.000Z',
+            end_date: '2024-12-14T00:00:00.000Z',
+            address: '深圳·前海华侨城艾美酒店',
+            img: (
+                <img
+                    alt="Doris Summit Asia 2024 | 与创新者同行"
+                    width={384}
+                    height={164}
+                    className="rounded-t-lg"
+                    
src={`https://cdn.selectdb.com/static/2_1800_766_0c9057ec0d.jpg`}
+                />
+            ),
+            isCover: true,
+            link: 'https://doris-summit.org.cn/',
+        },
+    ],
 };
 
+function formatEventList(eventList: Event[]) {
+    return eventList.map(event => ({
+        ...event,
+        status:
+            new Date() >= new Date(event.end_date)
+                ? EventsStatusEnum.Complete
+                : new Date() >= new Date(event.start_date)
+                ? EventsStatusEnum.Processing
+                : EventsStatusEnum.Pre,
+    }));
+}
+
 const STATUS_COLOR_MAP = {
     [EventsStatusEnum.Pre]: '#00B42A',
     [EventsStatusEnum.Complete]: '#8592A6',
 };
 
 export default function Events() {
-    const { banner, eventList } = EVENTS_PAGE_DATA;
+    const { banner, eventListEn, eventListZh } = EVENTS_PAGE_DATA;
     const [showMore, setShowMore] = useState(false);
-    eventList.forEach((event: Event) => {
-        event.status =
-            new Date() >= new Date(event.end_date)
-                ? EventsStatusEnum.Complete
-                : new Date() >= new Date(event.start_date)
-                ? EventsStatusEnum.Processing
-                : EventsStatusEnum.Pre;
-    });
+    const [eventList, setEventList] = 
useState<Event[]>(formatEventList(eventListEn));
+    const [selectedLanguage, setSelectedLanguage] = useState<'en' | 
'zh'>('en');
 
     const EventCard = ({ data }: { data: Event }) => {
         return (
@@ -124,14 +294,20 @@ export default function Events() {
                     </div>
                 )}
 
-                <div className="border-r rounded-b-lg border-l border-b 
border-[#DFE5F0] p-6">
+                <div
+                    className={`border-r rounded-b-lg  border-l ${
+                        selectedLanguage === 'zh' ? 'lg:h-[18.625rem]' : ''
+                    } border-b border-[#DFE5F0] p-6`}
+                >
                     <div
                         style={{ color: `${STATUS_COLOR_MAP[data.status]}` }}
                         className={`mb-4 text-[0.75rem]/[1.25rem] 
font-semibold`}
                     >
                         {data.status}
                     </div>
-                    <div className="mb-4 text-[1.25rem]/[2rem] font-semibold 
text-[#000]">{data.detailTitle}</div>
+                    <div className="mb-4 text-[1.25rem]/[2rem] h-[3.75rem] 
font-semibold text-[#000]">
+                        {data.detailTitle}
+                    </div>
                     <p className="line-clamp-2 mb-4 text-[#1D1D1D] 
text-[0.875rem]/[1.375rem]">{data.description}</p>
                     <p className="mb-[0.675rem] flex items-center 
text-[#4C576C] text-[0.875rem]/[1.375rem]">
                         <img
@@ -143,8 +319,8 @@ export default function Events() {
                         />
                         {data.date}
                     </p>
-                    <p className="text-[#4C576C] flex items-center  
text-[0.875rem]/[1.375rem]">
-                        <AddressIcon className="inline mr-2" />
+                    <p className="text-[#4C576C] flex  
text-[0.875rem]/[1.375rem]">
+                        <AddressIcon className="inline mr-2 basis-4 shrink-0 
relative top-[3px]" />
                         {data.address}
                     </p>
                 </div>
@@ -152,22 +328,54 @@ export default function Events() {
         );
     };
 
+    useEffect(() => {
+        if (selectedLanguage === 'en') {
+            setEventList(formatEventList(eventListEn));
+        } else {
+            setEventList(formatEventList(eventListZh));
+        }
+    }, [selectedLanguage]);
+
     return (
         <Layout>
             <section>
                 <div className="events-banner-container container">
                     <div className="banner-title mb-4">{banner.title}</div>
                     <div className="banner-desc mb-6">{banner.desc}</div>
-                    {/* <Link
+                    <Link
                         className={clsx('button button--secondary button--lg', 
banner.action.type)}
                         to={banner.action.link}
                     >
                         {banner.action.label}
-                    </Link> */}
+                    </Link>
                 </div>
             </section>
-            <section className="my-[5.5rem]">
-                <div className="max-w-[75rem] mx-auto ">
+            <section className="mb-[5.5rem] mt-[1.25rem]">
+                <div className="max-w-[75rem] text-[1rem]/[180%] mx-auto flex 
justify-start gap-x-[2.5rem] font-medium">
+                    <div className="h-[3.25rem] pb-4">Event Language 
Type:</div>
+                    <div
+                        onClick={() => setSelectedLanguage('en')}
+                        className={`h-[3.25rem] cursor-pointer pb-4 
hover:text-[#1D1D1D] ${
+                            selectedLanguage === 'en'
+                                ? 'text-[#1D1D1D] border-b-[2px]  
border-[#444FD9]'
+                                : 'text-[#4C576C]'
+                        }`}
+                    >
+                        English
+                    </div>
+
+                    <div
+                        onClick={() => setSelectedLanguage('zh')}
+                        className={`h-[3.25rem] cursor-pointer 
hover:text-[#1D1D1D] pb-4 ${
+                            selectedLanguage === 'zh'
+                                ? 'text-[#1D1D1D] border-b-[2px] 
border-[#444FD9]'
+                                : 'text-[#4C576C]'
+                        }`}
+                    >
+                        Chinese
+                    </div>
+                </div>
+                <div className="max-w-[75rem] pt-[5rem] border-t-[0.5px] 
border-[#E3E8F2] mx-auto ">
                     <div
                         className={`flex flex-wrap gap-x-[1.5rem] gap-y-[5rem] 
${
                             !showMore ? 'mb-[2.5rem]' : 'mb-[5rem]'
diff --git a/src/theme/DocVersionBanner/index.tsx 
b/src/theme/DocVersionBanner/index.tsx
index 1db1d8dadc5..d3d824da9f7 100644
--- a/src/theme/DocVersionBanner/index.tsx
+++ b/src/theme/DocVersionBanner/index.tsx
@@ -1,171 +1,163 @@
-import React, {type ComponentType} from 'react';
+import React, { type ComponentType } from 'react';
 import clsx from 'clsx';
 import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
 import Link from '@docusaurus/Link';
 import Translate from '@docusaurus/Translate';
-import {
-  useActivePlugin,
-  useDocVersionSuggestions,
-  type GlobalVersion,
-} from '@docusaurus/plugin-content-docs/client';
-import {ThemeClassNames} from '@docusaurus/theme-common';
-import {
-  useDocsPreferredVersion,
-  useDocsVersion,
-} from '@docusaurus/plugin-content-docs/client';
-import type {Props} from '@theme/DocVersionBanner';
-import type {
-  VersionBanner,
-  PropVersionMetadata,
-} from '@docusaurus/plugin-content-docs';
+import { useActivePlugin, useDocVersionSuggestions, type GlobalVersion } from 
'@docusaurus/plugin-content-docs/client';
+import { ThemeClassNames } from '@docusaurus/theme-common';
+import { useDocsPreferredVersion, useDocsVersion } from 
'@docusaurus/plugin-content-docs/client';
+import type { Props } from '@theme/DocVersionBanner';
+import type { VersionBanner, PropVersionMetadata } from 
'@docusaurus/plugin-content-docs';
 
 type BannerLabelComponentProps = {
-  siteTitle: string;
-  versionMetadata: PropVersionMetadata;
+    siteTitle: string;
+    versionMetadata: PropVersionMetadata;
 };
 
-function UnreleasedVersionLabel({
-  siteTitle,
-  versionMetadata,
-}: BannerLabelComponentProps) {
-  return (
-    <Translate
-      id="theme.docs.versions.unreleasedVersionLabel"
-      description="The label used to tell the user that he's browsing an 
unreleased doc version"
-      values={{
-        siteTitle,
-        versionLabel: <b>{versionMetadata.label}</b>,
-      }}>
-      {
-        'This is unreleased documentation for {siteTitle} {versionLabel} 
version.'
-      }
-    </Translate>
-  );
+function UnreleasedVersionLabel({ siteTitle, versionMetadata }: 
BannerLabelComponentProps) {
+    return (
+        <Translate
+            id="theme.docs.versions.unreleasedVersionLabel"
+            description="The label used to tell the user that he's browsing an 
unreleased doc version"
+            values={{
+                unreleased: (
+                    <b>
+                        <Translate 
id="theme.docs.versions.unreleasedText">unreleased</Translate>
+                    </b>
+                ),
+            }}
+        >
+            {'This documentation is for an {unreleased} version of Apache 
Doris.'}
+        </Translate>
+    );
 }
 
-function UnmaintainedVersionLabel({
-  siteTitle,
-  versionMetadata,
-}: BannerLabelComponentProps) {
-  return (
-    <Translate
-      id="theme.docs.versions.unmaintainedVersionLabel"
-      description="The label used to tell the user that he's browsing an 
unmaintained doc version"
-      values={{
-        siteTitle,
-        versionLabel: <b>{versionMetadata.label}</b>,
-      }}>
-      {
-        'This is documentation for {siteTitle} {versionLabel}, which is no 
longer actively maintained.'
-      }
-    </Translate>
-  );
+function UnmaintainedVersionLabel({ siteTitle, versionMetadata }: 
BannerLabelComponentProps) {
+    return (
+        <Translate
+            id="theme.docs.versions.unmaintainedVersionLabel"
+            description="The label used to tell the user that he's browsing an 
unmaintained doc version"
+            values={{
+                siteTitle,
+                versionLabel: <b>{versionMetadata.label}</b>,
+            }}
+        >
+            {'This is documentation for {siteTitle} {versionLabel}, which is 
no longer actively maintained.'}
+        </Translate>
+    );
 }
 
 const BannerLabelComponents: {
-  [banner in VersionBanner]: ComponentType<BannerLabelComponentProps>;
+    [banner in VersionBanner]: ComponentType<BannerLabelComponentProps>;
 } = {
-  unreleased: UnreleasedVersionLabel,
-  unmaintained: UnmaintainedVersionLabel,
+    unreleased: UnreleasedVersionLabel,
+    unmaintained: UnmaintainedVersionLabel,
 };
 
 function BannerLabel(props: BannerLabelComponentProps) {
-  const BannerLabelComponent =
-    BannerLabelComponents[props.versionMetadata.banner!];
-  return <BannerLabelComponent {...props} />;
+    const BannerLabelComponent = 
BannerLabelComponents[props.versionMetadata.banner!];
+    return <BannerLabelComponent {...props} />;
 }
 
 function LatestVersionSuggestionLabel({
-  versionLabel,
-  to,
-  onClick,
+    versionLabel,
+    to,
+    realLatestVersion,
+    onClick,
 }: {
-  to: string;
-  onClick: () => void;
-  versionLabel: string;
+    to: string;
+    onClick: () => void;
+    realLatestVersion: {
+        label: string;
+        to: string;
+    };
+    versionLabel: string;
 }) {
-  return (
-    <Translate
-      id="theme.docs.versions.latestVersionSuggestionLabel"
-      description="The label used to tell the user to check the latest version"
-      values={{
-        versionLabel,
-        latestVersionLink: (
-          <b>
-            <Link to={to} onClick={onClick}>
-              <Translate
-                id="theme.docs.versions.latestVersionLinkLabel"
-                description="The label used for the latest version suggestion 
link label">
-                latest version
-              </Translate>
-            </Link>
-          </b>
-        ),
-      }}>
-      {
-        'For up-to-date documentation, see the {latestVersionLink} 
({versionLabel}).'
-      }
-    </Translate>
-  );
+    return (
+        <Translate
+            id="theme.docs.versions.latestVersionSuggestionLabel"
+            description="The label used to tell the user to check the latest 
version"
+            values={{
+                latestVersionLink: (
+                    <b>
+                        <Link to={realLatestVersion.to} onClick={onClick}>
+                            <Translate
+                                id="theme.docs.versions.latestVersionLinkLabel"
+                                description="The label used for the latest 
version suggestion link label"
+                            >
+                                Version 3.0
+                            </Translate>
+                        </Link>
+                    </b>
+                ),
+                recommondVersionLink: (
+                    <b>
+                        <Link to={to} onClick={onClick}>
+                            <Translate
+                                
id="theme.docs.versions.recommondVersionLinkLabel"
+                                description="The label used for the 
recommended version suggestion link label"
+                            >
+                                Version 2.1
+                            </Translate>
+                        </Link>
+                    </b>
+                ),
+            }}
+        >
+            {/* 'For up-to-date documentation, see the {latestVersionLink} 
({versionLabel}).' */}
+            {'For usage, please refer to the official documentation of  
{recommondVersionLink} or {latestVersionLink}.'}
+        </Translate>
+    );
 }
 
 function DocVersionBannerEnabled({
-  className,
-  versionMetadata,
+    className,
+    versionMetadata,
 }: Props & {
-  versionMetadata: PropVersionMetadata;
-}): JSX.Element {
-  const {
-    siteConfig: {title: siteTitle},
-  } = useDocusaurusContext();
-  const {pluginId} = useActivePlugin({failfast: true})!;
-
-  const getVersionMainDoc = (version: GlobalVersion) =>
-    version.docs.find((doc) => doc.id === version.mainDocId)!;
+    versionMetadata: PropVersionMetadata;
+}): React.ReactElement {
+    const {
+        siteConfig: { title: siteTitle },
+    } = useDocusaurusContext();
+    const { pluginId } = useActivePlugin({ failfast: true })!;
 
-  const {savePreferredVersionName} = useDocsPreferredVersion(pluginId);
+    const getVersionMainDoc = (version: GlobalVersion) => 
version.docs.find(doc => doc.id === version.mainDocId)!;
 
-  const {latestDocSuggestion, latestVersionSuggestion} =
-    useDocVersionSuggestions(pluginId);
+    const { savePreferredVersionName } = useDocsPreferredVersion(pluginId);
 
-  // Try to link to same doc in latest version (not always possible), falling
-  // back to main doc of latest version
-  const latestVersionSuggestedDoc =
-    latestDocSuggestion ?? getVersionMainDoc(latestVersionSuggestion);
+    const { latestDocSuggestion, latestVersionSuggestion } = 
useDocVersionSuggestions(pluginId);
 
-  return (
-    <div
-      className={clsx(
-        className,
-        ThemeClassNames.docs.docVersionBanner,
-        'alert alert--warning margin-bottom--md',
-      )}
-      role="alert">
-      <div>
-        <BannerLabel siteTitle={siteTitle} versionMetadata={versionMetadata} />
-      </div>
-      <div className="margin-top--md">
-        <LatestVersionSuggestionLabel
-          versionLabel={latestVersionSuggestion.label}
-          to={latestVersionSuggestedDoc.path}
-          onClick={() => 
savePreferredVersionName(latestVersionSuggestion.name)}
-        />
-      </div>
-    </div>
-  );
-}
+    // Try to link to same doc in latest version (not always possible), falling
+    // back to main doc of latest version
+    const latestVersionSuggestedDoc = latestDocSuggestion ?? 
getVersionMainDoc(latestVersionSuggestion);
 
-export default function DocVersionBanner({
-  className,
-}: Props): JSX.Element | null {
-  const versionMetadata = useDocsVersion();
-  if (versionMetadata.banner) {
     return (
-      <DocVersionBannerEnabled
-        className={className}
-        versionMetadata={versionMetadata}
-      />
+        <div
+            className={clsx(className, ThemeClassNames.docs.docVersionBanner, 
'alert alert--warning margin-bottom--md')}
+            role="alert"
+        >
+            <div>
+                <BannerLabel siteTitle={siteTitle} 
versionMetadata={versionMetadata} />
+            </div>
+            <div className="margin-top--md">
+                <LatestVersionSuggestionLabel
+                    versionLabel={latestVersionSuggestion.label}
+                    to={latestVersionSuggestedDoc.path}
+                    realLatestVersion={{
+                        label: '3.0',
+                        to: '/docs/3.0/gettingStarted/what-is-apache-doris',
+                    }}
+                    onClick={() => 
savePreferredVersionName(latestVersionSuggestion.name)}
+                />
+            </div>
+        </div>
     );
-  }
-  return null;
+}
+
+export default function DocVersionBanner({ className }: Props): 
React.ReactElement | null {
+    const versionMetadata = useDocsVersion();
+    if (versionMetadata.banner) {
+        return <DocVersionBannerEnabled className={className} 
versionMetadata={versionMetadata} />;
+    }
+    return null;
 }


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

Reply via email to