Skip to content

Commit 75678b7

Browse files
docs: Remove Chinese translation
1 parent bffda02 commit 75678b7

File tree

12 files changed

+34
-1283
lines changed

12 files changed

+34
-1283
lines changed

docs/build_docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
2-
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
2+
# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
33
#
4-
build-docs --project-path .. -t esp32s2 esp32s3 esp32p4 esp32h4
4+
build-docs --project-path .. --language en --target esp32s2 esp32s3 esp32p4 esp32h4

docs/conf_common.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
1-
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

55
"""
66
Common configuration for ESP-USB documentation
77
"""
88

9+
import esp_docs.conf_docs as esp_conf_docs
910
from esp_docs.conf_docs import * # noqa: F403,F401
1011

1112

1213
extensions += [ # Needed as a trigger for running doxygen
1314
'esp_docs.esp_extensions.dummy_build_system',
1415
'esp_docs.esp_extensions.run_doxygen',
16+
'sphinx_reredirects'
1517
]
1618
# Languages supported
17-
languages = ['en', 'zh_CN']
19+
languages = ['en']
1820

1921
# Project targets (used as URL slugs)
2022
idf_targets = ['esp32s2', 'esp32s3', 'esp32p4', 'esp32h4']
2123

24+
# Default redirects map; will be updated in setup once config values are available.
25+
redirects = {}
26+
27+
def _build_redirects(release_url, idf_target=None):
28+
result = {}
29+
targets = [idf_target] if idf_target else idf_targets
30+
for target in targets:
31+
result[f'../../../zh_CN/{target}/html/index.html'] = f'../../../en/{release_url}/{target}/index.html'
32+
result[f'../../../zh_CN/{target}/html/introduction.html'] = f'../../../en/{release_url}/{target}/introduction.html'
33+
result[f'../../../zh_CN/{target}/html/usb_device.html'] = f'../../../en/{release_url}/{target}/usb_device.html'
34+
result[f'../../../zh_CN/{target}/html/usb_host.html'] = f'../../../en/{release_url}/{target}/usb_host.html'
35+
return result
36+
37+
38+
def _configure_redirects(app, config):
39+
release_url = config.release
40+
idf_target_val = config.idf_target
41+
config.redirects = _build_redirects(release_url, idf_target=idf_target_val)
42+
43+
44+
def setup(app):
45+
app.connect('config-inited', _configure_redirects)
46+
return esp_conf_docs.setup(app)
47+
2248
# GitHub repository information
2349
github_repo = 'espressif/esp-usb'
2450
project_homepage = 'https://github.com/espressif/esp-usb'

docs/en/usb_device.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
USB Device Stack
22
=================
33

4-
:link_to_translation:`zh_CN:[中文]`
5-
64
{IDF_TARGET_USB_DP_GPIO_NUM:default="20", esp32h4="22"}
75
{IDF_TARGET_USB_DM_GPIO_NUM:default="19", esp32h4="21"}
86
{IDF_TARGET_USB_EP_NUM: default="6", esp32p4="15"}

docs/en/usb_host.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
USB Host
22
========
33

4-
:link_to_translation:`zh_CN:[中文]`
5-
64
{IDF_TARGET_OTG_NUM_HOST_CHAN: default="8", esp32p4="16"}
75

86
The document provides information regarding the USB Host Library. This document is split into the following sections:

docs/en/usb_host/usb_host_notes_enum.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. Translation not required: According to the USB developers, all of the ``usb_host_notes_*`` files are just internal notes for ESP-IDF developers, not for our end users. So we don't need to translate them at all.
2-
31
USB Host Enumeration Driver (Enum)
42
==================================
53

docs/en/usb_host/usb_host_notes_usbh.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. Translation not required: According to the USB developers, all of the ``usb_host_notes_*`` files are just internal notes for ESP-IDF developers, not for our end users. So we don't need to translate them at all.
2-
31
USB Host Driver (USBH)
42
======================
53

docs/requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
esp-docs>=2.0.0
2-
sphinx>=5.0.0
1+
esp-docs~=2.1.5
2+
sphinx~=7.1.2
3+
docutils<0.21
34
breathe>=4.35.0
5+
sphinx-reredirects

docs/zh_CN/conf.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/zh_CN/index.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/zh_CN/introduction.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)