Skip to content

Commit 88dfac2

Browse files
committed
Use English
1 parent e31d600 commit 88dfac2

File tree

1 file changed

+32
-37
lines changed

1 file changed

+32
-37
lines changed

tool/rawstr4c/README.md

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22
! SPDX-License-Identifier: GFDL-1.3-or-later
33
! -------------------------------------------------------------
44
! Doc Type : Markdown
5-
! Doc Name : (rawstr4c configuration).md
5+
! Doc Name : (rawstr4c introduction).md
66
! Doc Authors : Aoran Zeng <[email protected]>
77
! Contributors : Nul None <[email protected]>
88
! |
99
! Created On : <2025-07-12>
10-
! Last Modified : <2025-07-16>
10+
! Last Modified : <2025-07-21>
1111
! ---------------------------------------------------------- -->
1212

1313
# rawstr4c
1414

15-
当你需要写一个复杂的C语言字符串的时候,可使用该工具
16-
17-
出于方便,我们仅使用 `just` 来调用
15+
Use this tool when you need to write complex C language strings.
1816

1917
```bash
20-
cd src/recipe
21-
22-
# 尽管我们已经在 recipe 目录中了,但是 just 自己会重新切换到项目根目录,所以我们总是给一个相对根目录的路径
23-
just rawstr4c ./src/recipe/ware
18+
$ rawstr4c --help
2419
```
2520

2621
<br>
@@ -29,20 +24,20 @@ just rawstr4c ./src/recipe/ware
2924

3025
## Convention
3126

32-
一个配置文件,应使用这样的顺序:
27+
A configuration file should use this order:
3328

34-
- section 标题
35-
- 对该变量的说明
36-
- 配置块 configblock
37-
- 配置块 configblock 注释
38-
- 代码块 codeblock (raw string)
39-
- 代码块 codeblock 内容的注释
29+
1. section title
30+
2. description of the variable
31+
3. configuration block (configblock)
32+
4. configuration block (configblock) comments
33+
5. code block (codeblock) (raw string)
34+
6. comments for the content of the code block (codeblock)
4035

4136
<br>
4237

4338

4439

45-
## 配置语法
40+
## Configuration Syntax
4641

4742
```markdown
4843

@@ -54,56 +49,56 @@ just rawstr4c ./src/recipe/ware
5449

5550
```
5651

57-
配置项总是以 `-` 开头,配置项名称后跟一个 `=`,右值必须使用 ``` `` ``` 来包裹
52+
Configuration items always start with `-`, followed by the configuration item name and an `=`, and the right-hand value must be wrapped with ``` `` ```.
5853

59-
注意,如果值并非是由用户随意给出,则应该设置为 mode 类型,使用 `:` 作为前缀
54+
Note: if the value is not arbitrarily given by the user, it should be set as a mode type, using `:` as a prefix.
6055

6156
<br>
6257

6358

6459

65-
## 配置项
60+
## Configuration Items
6661

67-
注意,如非特殊说明,第一项为默认值
62+
Note: unless otherwise specified, the first item is the default value
6863

6964
- output =
7065

71-
- `:terminal` = 在终端输出
72-
- `:macro` = 输出为一个 `.h` 文件,定义为宏
73-
- `:global-variable` = 输出一个 `.h` 文件和对应的 `.c` 文件,定义为全局变量
74-
- `:global-variable-only-header` = 仅输出为一个 `.h` 文件,定义为全局变量
66+
- `:terminal` = output to terminal
67+
- `:macro` = output as a `.h` file, defined as macro
68+
- `:global-variable` = output a `.h` file and corresponding `.c` file, defined as global variable
69+
- `:global-variable-only-header` = output only as a `.h` file, defined as global variable
7570

76-
- ~~output-file~~ = (暂未实现)
71+
- ~~output-file~~ = (not yet implemented)
7772

78-
自定义生成的头文件名,默认值为 `rawstr4c.h`
73+
Custom generated header filename, default value is `rawstr4c.h`
7974

8075
- translate =
8176

82-
- `:escape` = 仅转义
83-
- `:oct` = 八进制
84-
- `:hex` = 十六进制
77+
- `:escape` = escape only
78+
- `:oct` = octal
79+
- `:hex` = hexadecimal
8580

8681
- postfix =
8782

88-
- `:use-language` = 使用 codeblock 的语言
89-
- `your string` = 使用某一自定义字符串为后缀
83+
- `:use-language` = use the language of the codeblock
84+
- `your string` = use a custom string as suffix
9085

9186
- name =
9287

93-
生成的变量名,默认将会包含前缀和后缀。如果没有给该配置项,将会使用该节标题
88+
Generated variable name, will include prefix and suffix by default. If this configuration item is not given, the section title will be used
9489

9590
- name-literally = `false` | `true`
9691

97-
无视其他配置项,直接使用 `name` 作为变量名
92+
Ignore other configuration items and directly use `name` as the variable name
9893

9994
- namespace =
10095

101-
将作为变量名 `name` 之前 `prefix` 之后的前缀,将影响下一层级的 section
96+
Will serve as a prefix after `prefix` and before variable name `name`, affecting the next level section
10297

10398
- keep-prefix = `true` | `false`
10499

105-
变量名是否使用前缀
100+
Whether the variable name uses prefix
106101

107102
- keep-postfix = `true` | `false`
108103

109-
变量名是否使用后缀
104+
Whether the variable name uses postfix

0 commit comments

Comments
 (0)