From d68feb5d842917c6899dc1e55c28487a944b6086 Mon Sep 17 00:00:00 2001 From: Yash Date: Fri, 31 Jul 2026 11:24:33 -0400 Subject: [PATCH] fix(theme): stop 404 page claiming Chinese docs are unavailable Signed-off-by: Yash --- i18n/zh/code.json | 6 +++++ src/theme/NotFound/Content/index.js | 38 +++++++++++++++++++---------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/i18n/zh/code.json b/i18n/zh/code.json index f55d0febb..a73065a45 100644 --- a/i18n/zh/code.json +++ b/i18n/zh/code.json @@ -5,6 +5,12 @@ "View All": { "message": "查看全部" }, + "Return Home": { + "message": "返回首页" + }, + "View Documentation": { + "message": "查看文档" + }, "Last updated on": { "message": "上次更新于" }, diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 3b2eb5209..89f25c1e7 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,6 +1,7 @@ import React from "react"; import Link from "@docusaurus/Link"; -import styles from "./styles.module.css"; // we will create this next +import Translate from "@docusaurus/Translate"; +import styles from "./styles.module.css"; export default function NotFoundContent({ className }) { return ( @@ -8,9 +9,21 @@ export default function NotFoundContent({ className }) {
-

Page Not Found

+

+ + Page Not Found + +

- The requested resource could not be located on this server. + + We could not find what you were looking for. +

@@ -30,14 +43,13 @@ export default function NotFoundContent({ className }) {

- Chinese documentation is currently unavailable. -

-

- Please refer to our{" "} - - English documentation - {" "} - for comprehensive project information. + + Please contact the owner of the site that linked you to the + original URL and let them know their link is broken. +

@@ -56,7 +68,7 @@ export default function NotFoundContent({ className }) { fill="currentColor" /> - Return Home + Return Home - View Documentation + View Documentation