Skip to content

Commit ecf4aa2

Browse files
committed
docs: Provide CN translation for four docs (#1349)
1 parent 7afcd9f commit ecf4aa2

File tree

8 files changed

+198
-50
lines changed

8 files changed

+198
-50
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
CMake Editor
22
============
33

4-
The CMake Editor Plug-in is integrated with the IDF Plugin for editing CMake files, such as ``CMakeLists.txt``. It provides syntax coloring, CMake command content assistance, and code templates.
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
The CMake Editor Plugin is integrated with the IDF Plugin for editing CMake files, such as ``CMakeLists.txt``. It provides syntax coloring, CMake command auto-completion, and code templates.
57

68
.. image:: ../../../media/cmake_editor_ca.png
79
:alt: CMake Editor with content assist
810

9-
CMake editor preferences can be controlled using **Eclipse > Preferences > CMakeEd**.
11+
CMake editor preferences can be controlled using ``Eclipse`` > ``Preferences`` > ``CMakeEd``.
1012

1113
.. image:: ../../../media/cmake_editor_preferences.png
1214
:alt: CMake editor preferences
Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,71 @@
1-
How to Add a Preview or Custom ESP-IDF Target in the IDE (Manual Configuration)
2-
===============================================================================
1+
Add a Preview or Custom ESP-IDF Target in the IDE
2+
=================================================
33

4-
To add support for any preview or custom ESP-IDF target (such as ESP32-C5 or others not listed by default in the IDE), follow these steps:
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
To add support for any preview or custom ESP-IDF target (such as ESP32-C5 or other targets not listed by default in the IDE), follow these steps:
57

68
Step 1: Configure Toolchain
79
---------------------------
8-
1. Go to Preferences → C/C++ → Core Build Toolchain.
9-
2. Under User Defined Toolchain, click on Add….
10-
3. Select GCC and configure as follows:
11-
- **Compiler:** (Path to the toolchain compiler for your target, e.g. `/Users/testuser/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc`)
12-
- **Operating System:** (e.g. `esp32c5` for ESP32-C5)
13-
- **CPU Arch:** (e.g. `riscv32` for ESP32-C5)
14-
4. Click Finish.
15-
16-
.. image:: ../../../media/toolchain/toolchain_1.png
10+
11+
1. Go to ``Preferences`` > ``C/C++`` > ``Core Build Toolchain``.
12+
2. Under ``User Defined Toolchains``, click ``Add``.
13+
3. Select ``GCC`` and configure as follows:
14+
15+
- **Compiler**: Path to the toolchain compiler for your target, e.g., ``/Users/testuser/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc``
16+
- **Operating System**: e.g., ``esp32c5`` for ESP32-C5
17+
- **CPU Arch**: e.g., ``riscv32`` for ESP32-C5
18+
19+
4. Click ``Finish``.
20+
21+
.. figure:: ../../../media/toolchain/toolchain_1.png
22+
:align: center
1723
:alt: Core Build Toolchains Preferences (Add Custom Target)
1824

19-
*Core Build Toolchains Preferences: Adding a custom/preview target toolchain (example: ESP32-C5)*
25+
Core Build Toolchains Preferences: Adding a custom/preview target toolchain (example: ESP32-C5)
2026

2127
Step 2: Configure CMake Toolchain
2228
---------------------------------
23-
1. Navigate to Preferences → C/C++ → CMake.
24-
2. Click on Add….
25-
3. Browse and select the CMake toolchain file for your target (e.g. `toolchain-esp32c5.cmake`).
29+
30+
1. Navigate to ``Preferences`` > ``C/C++`` > ``CMake``.
31+
2. Click ``Add``.
32+
3. Browse and select the CMake toolchain file for your target (e.g., ``toolchain-esp32c5.cmake``).
2633
4. Choose the corresponding toolchain entry created in Step 1.
27-
5. Click Finish.
34+
5. Click ``Finish``.
2835

29-
.. image:: ../../../media/toolchain/toolchain_2.png
36+
.. figure:: ../../../media/toolchain/toolchain_2.png
37+
:align: center
3038
:alt: CMake Toolchain Preferences (Add Custom Target)
3139

32-
*CMake Toolchain Preferences: Adding a custom/preview target toolchain file (example: ESP32-C5)*
40+
CMake Toolchain Preferences: Adding a custom/preview target toolchain file (example: ESP32-C5)
3341

3442
Step 3: Add Launch Target
3543
-------------------------
36-
1. From the IDE's top toolbar target list, click on New Launch Target.
37-
2. Select ESP Target.
44+
45+
1. From the IDE's top toolbar target list, click ``New Launch Target``.
46+
2. Select ``ESP Target``.
3847
3. Provide the following details:
39-
- **Name:** (e.g. `esp32c5`)
40-
- **IDF Target:** (e.g. `esp32c5`)
41-
4. Click Finish.
4248

43-
.. image:: ../../../media/toolchain/toolchain_3.png
49+
- ``Name``: e.g., esp32c5
50+
- ``IDF Target``: e.g., esp32c5
51+
52+
4. Click ``Finish``.
53+
54+
.. figure:: ../../../media/toolchain/toolchain_3.png
55+
:align: center
4456
:alt: New ESP Target Dialog (Custom Target Example)
4557

46-
*New ESP Target Dialog: Creating a launch target for a custom/preview target (example: ESP32-C5)*
58+
New ESP Target Dialog: Creating a launch target for a custom/preview target (example: ESP32-C5)
4759

4860
Step 4: Build a Project
4961
-----------------------
62+
5063
- Create or open a project.
5164
- Select your custom/preview target from the target list.
5265
- Build the project.
5366

54-
.. image:: ../../../media/toolchain/toolchain_4.png
67+
.. figure:: ../../../media/toolchain/toolchain_4.png
68+
:align: center
5569
:alt: Build Output for Custom Target Project
5670

57-
*Build Output: Successfully building a project for a custom/preview target (example: ESP32-C5)*
71+
Build Output: Successfully building a project for a custom/preview target (example: ESP32-C5)
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
1-
Partition Table Editor UI for ESP-IDF
2-
=====================================
1+
Partition Table Editor
2+
======================
33

4-
The Partition Table Editor command allows you to edit your `partition table <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html>`_ in a more convenient way, where you can see the supported types and subtypes and monitor the correctness of the entered data.
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
The Partition Table Editor command allows you to edit your `partition table <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html>`_ in a more convenient way. It provides a view of the supported types and subtypes and helps you verify the correctness of the entered data.
57

68
Steps
79
-----
810

9-
1. Go to *Project Explorer* and open any IDF Project where you want to create a customized partition table.
10-
2. In *Project Explorer*, right-click on the project and select *ESP-IDF > Partition Table Editor*:
11+
1. Go to ``Project Explorer`` and open any IDF Project where you want to create a customized partition table.
12+
2. In ``Project Explorer``, right-click on the project and select ``ESP-IDF: Partition Table Editor``:
13+
14+
.. image:: https://user-images.githubusercontent.com/24419842/216105408-ca2e73ce-5df3-4bdd-ac61-b7265deb9b44.png
15+
:alt: Partition Table Editor menu option
1116

12-
.. image:: https://user-images.githubusercontent.com/24419842/216105408-ca2e73ce-5df3-4bdd-ac61-b7265deb9b44.png
13-
:alt: Partition Table Editor menu option
17+
When you open the partition table editor for the selected project, you will see the standard editable content. Any errors will be highlighted, and you can hover the mouse over them to see hints about the issues.
1418

15-
When you open the partition table editor for the selected project, you will see the standard editable content. Errors, if any, will be highlighted. You can hover your mouse over them to get hints about the issues:
19+
.. image:: https://user-images.githubusercontent.com/24419842/216106804-703b2eb4-b141-48de-8559-0599f072219f.png
20+
:alt: Error hints in Partition Table Editor
1621

17-
.. image:: https://user-images.githubusercontent.com/24419842/216106804-703b2eb4-b141-48de-8559-0599f072219f.png
18-
:alt: Error hints in Partition Table Editor
22+
3. Click ``Save`` or ``Save and Quit`` to save your changes.
1923

20-
3. Click *Save* or *Save and Quit* to save your changes.
2124

2225
To Use a Customized Partition Table
2326
-----------------------------------
2427

25-
1. Go to *sdkconfig* and set *Custom partition table CSV* as shown below:
28+
Go to ``SDK Configuration`` and set ``Custom partition table CSV`` as shown below:
2629

27-
.. image:: https://user-images.githubusercontent.com/24419842/216104107-2844068b-8412-468b-931f-b4778af4417c.png
28-
:alt: Setting custom partition table in sdkconfig
30+
.. image:: https://user-images.githubusercontent.com/24419842/216104107-2844068b-8412-468b-931f-b4778af4417c.png
31+
:alt: Setting custom partition table in sdkconfig

docs/en/additionalfeatures/switchlanguage.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
Switch Between Languages in Espressif IDE
2-
==========================================
1+
Switch Between Languages in the IDE
2+
===================================
3+
4+
:link_to_translation:`zh_CN:[中文]`
5+
36
Espressif IDE supports English and Chinese languages. You can switch between these languages using the following steps:
47

58
1. Click on the ``Espressif`` menu from the menu bar.
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
.. include:: ../../en/additionalfeatures/cmakeeditor.rst
1+
CMake 编辑器
2+
============
3+
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
CMake 编辑器插件与 IDF 插件集成,可用于编辑 CMake 文件(例如 ``CMakeLists.txt``)。该插件提供语法高亮、CMake 命令自动补全和代码模板等功能。
7+
8+
.. image:: ../../../media/cmake_editor_ca.png
9+
:alt: 带内容提示的 CMake 编辑器
10+
11+
CMake 编辑器的首选项可通过 ``Eclipse`` > ``Preferences`` > ``CMakeEd`` 进行设置。
12+
13+
.. image:: ../../../media/cmake_editor_preferences.png
14+
:alt: CMake 编辑器首选项
Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,71 @@
1-
.. include:: ../../en/additionalfeatures/configuretoolchain.rst
1+
在 IDE 中添加预览版或自定义 ESP-IDF 目标
2+
========================================
3+
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
若想添加预览版或自定义的 ESP-IDF 目标(例如 ESP32-C5 或 IDE 中未默认列出的目标),请按以下步骤操作:
7+
8+
步骤 1:配置工具链
9+
------------------
10+
11+
1. 前往 ``Preferences`` > ``C/C++`` > ``Core Build Toolchain``。
12+
2. 在 ``User Defined Toolchains`` 部分,点击 ``Add``。
13+
3. 选择 ``GCC``,并按如下配置:
14+
15+
- **编译器**:目标所用工具链编译器的路径,例如 ``/Users/testuser/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc``
16+
- **操作系统**:例如 ``esp32c5``,用于 ESP32-C5
17+
- **CPU 架构**:例如 ``riscv32``,用于 ESP32-C5
18+
19+
4. 点击 ``Finish``。
20+
21+
.. figure:: ../../../media/toolchain/toolchain_1.png
22+
:align: center
23+
:alt: 核心构建工具链首选项(添加自定义目标)
24+
25+
核心构建工具链:添加自定义或预览版目标工具链(示例:ESP32-C5)
26+
27+
步骤 2:配置 CMake 工具链
28+
-------------------------
29+
30+
1. 前往 ``Preferences`` > ``C/C++`` > ``CMake``。
31+
2. 点击 ``Add``。
32+
3. 浏览并选择目标的 CMake 工具链文件(例如 ``toolchain-esp32c5.cmake``)。
33+
4. 选择步骤 1 中创建的相应工具链条目。
34+
5. 点击 ``Finish``。
35+
36+
.. figure:: ../../../media/toolchain/toolchain_2.png
37+
:align: center
38+
:alt: CMake 工具链首选项(添加自定义目标)
39+
40+
CMake 工具链首选项:添加自定义或预览版目标工具链文件(示例:ESP32-C5)
41+
42+
步骤 3:添加启动目标
43+
--------------------
44+
45+
1. 在 IDE 顶部工具栏的目标列表中,点击 ``New Launch Target``。
46+
2. 选择 ``ESP Target``。
47+
3. 填写如下信息:
48+
49+
- ``Name``:例如, esp32c5
50+
- ``IDF Target``:例如, esp32c5
51+
52+
4. 点击 ``Finish``。
53+
54+
.. figure:: ../../../media/toolchain/toolchain_3.png
55+
:align: center
56+
:alt: 新建乐鑫目标对话框(自定义目标示例)
57+
58+
新建乐鑫目标对话框:为自定义或预览版目标创建启动目标(示例:ESP32-C5)
59+
60+
步骤 4:构建项目
61+
----------------
62+
63+
- 新建或打开项目。
64+
- 在目标列表中选择自定义或预览版目标。
65+
- 构建项目。
66+
67+
.. figure:: ../../../media/toolchain/toolchain_4.png
68+
:align: center
69+
:alt: 自定义目标项目的构建输出
70+
71+
构建输出:成功为自定义或预览版目标构建项目(示例:ESP32-C5)
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
1-
.. include:: ../../en/additionalfeatures/partitiontableeditor.rst
1+
分区表编辑器
2+
============
3+
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
可以使用分区表编辑器命令更快捷地编辑 `分区表 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/partition-tables.html>`_。你可以在编辑器中查看受支持的类型和子类型,并检查输入数据的正确性。
7+
8+
步骤
9+
----
10+
11+
1. 进入 ``Project Explorer``,打开任意希望创建自定义分区表的 IDF 工程。
12+
2. 在 ``Project Explorer`` 中,右键单击该项目并选择 ``ESP-IDF: Partition Table Editor``:
13+
14+
.. image:: https://user-images.githubusercontent.com/24419842/216105408-ca2e73ce-5df3-4bdd-ac61-b7265deb9b44.png
15+
:alt: 分区表编辑器菜单选项
16+
17+
为所选项目打开分区表编辑器时,能看到标准可编辑的内容。若存在错误,则会高亮显示。你可以将鼠标悬停在错误之上以查看相关提示:
18+
19+
.. image:: https://user-images.githubusercontent.com/24419842/216106804-703b2eb4-b141-48de-8559f072219f.png
20+
:alt: 分区表编辑器中的错误提示
21+
22+
3. 单击 ``Save`` 或 ``Save and Quit`` 以保存更改。
23+
24+
25+
使用自定义分区表
26+
----------------
27+
28+
进入 ``SDK Configuration``,并按下图所示设置 ``Custom partition table CSV``:
29+
30+
.. image:: https://user-images.githubusercontent.com/24419842/216104107-2844068b-8412-468b-931f-b4778af4417c.png
31+
:alt: 在 sdkconfig 中设置自定义分区表
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
.. include:: ../../en/additionalfeatures/switchlanguage.rst
1+
在 IDE 中切换语言
2+
=================
3+
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
乐鑫 IDE 支持英文和中文。可参照以下步骤在两种语言之间进行切换:
7+
8+
1. 在菜单栏中点击 ``Espressif``。
9+
2. 从下拉菜单中选择 ``Change Language``。
10+
3. 在子菜单中选择需要的语言。
11+
4. IDE 将重新启动并切换至所选语言界面。
12+
13+
.. image:: ../../../media/change_language.png
14+
:alt: 切换语言菜单

0 commit comments

Comments
 (0)