Skip to content

Commit 038b004

Browse files
committed
docs: make README default to English
1 parent b0f71f4 commit 038b004

1 file changed

Lines changed: 118 additions & 95 deletions

File tree

README.md

Lines changed: 118 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,56 @@
1-
# JumpProto
1+
<div align="center">
2+
<h1>JumpProto</h1>
23

3-
在 Go 与 `.proto` 之间极速双向跳转,支持定义级与元素级精确定位。
4-
从“看定义”到“改完即编译”,在一个面板里完成。
4+
<p><strong>Fast Go and .proto navigation for VS Code, with symbol-level jumps and an integrated proto compile workflow.</strong></p>
55

6-
---
6+
<p>
7+
<a href="https://marketplace.visualstudio.com/items?itemName=SivanLiu.jumpproto"><img alt="version" src="https://img.shields.io/visual-studio-marketplace/v/SivanLiu.jumpproto?label=version"></a>
8+
<img alt="platform" src="https://img.shields.io/badge/platform-VS%20Code-007ACC">
9+
<img alt="built with" src="https://img.shields.io/badge/built%20with-TypeScript-3178C6">
10+
<img alt="license" src="https://img.shields.io/badge/license-Apache--2.0-2D7D46">
11+
<img alt="downloads" src="https://img.shields.io/visual-studio-marketplace/d/SivanLiu.jumpproto?label=downloads">
12+
</p>
713

8-
## 中文说明
14+
<p>
15+
English | <a href="#zh-cn">中文</a> | <a href="CHANGELOG.md">Changelog</a>
16+
</p>
17+
</div>
918

10-
### 为什么选 JumpProto
19+
---
1120

12-
- 双向导航:`Go -> .proto``.proto -> Go` 一键互跳
13-
- 精确到元素:支持 `message / enum / service / rpc`,并可定位字段和内部元素
14-
- 操作路径短:`F12``Ctrl/Cmd + Click`、右键菜单、状态栏、侧边栏都可触发
15-
- 兼容现有工程:基于生成文件头部 `// source: path/to/file.proto` 自动回溯源码
16-
- 直接集成编译:支持在侧边栏配置并执行 `make proto` 规则模板
21+
## Why JumpProto
1722

18-
### 典型使用场景
23+
- Bi-directional navigation: `Go -> .proto` and `.proto -> Go`
24+
- Symbol-level precision for `message / enum / service / rpc`, fields, and nested symbols
25+
- Short action paths from `F12`, `Ctrl/Cmd + Click`, context menu, status bar, and sidebar
26+
- Resolves source `.proto` files from generated Go headers like `// source: path/to/file.proto`
27+
- Built-in proto compile workflow from the sidebar using a command template
1928

20-
- 在 Go 与 Proto 之间快速来回追踪定义关系
21-
- 排查字段变更、枚举值和 RPC 接口影响范围
22-
- 多目录 proto 仓库中减少全文搜索与手动切换
29+
## Common Use Cases
2330

24-
### 30 秒上手
31+
- Jump back and forth between generated Go code and source Proto definitions
32+
- Trace field changes, enum values, and RPC interface impact quickly
33+
- Reduce manual search and file switching in multi-directory proto repositories
2534

26-
1. 在 VS Code 安装 `JumpProto`
27-
2. 打开包含 `.pb.go` 的 Go 工程
28-
3. 配置 `protoJump.protoRoots`(推荐)
29-
4. 将光标放在目标符号上并按 `F12`
35+
## Quick Start
3036

31-
### 核心功能入口
37+
1. Install `JumpProto` from the VS Code Marketplace.
38+
2. Open a Go project with generated `.pb.go` files.
39+
3. Configure `protoJump.protoRoots` if your source proto files live outside the current workspace.
40+
4. Put the cursor on a target symbol and press `F12`.
41+
42+
## Main Commands
3243

3344
- `JumpProto: Go to Proto Definition`
3445
- `JumpProto: Go to Go Usage`
3546
- `JumpProto: Compile Current Proto`
36-
- 侧边栏 `?`:打开 Make Proto 规则说明
47+
- Sidebar `?`: open Make Proto rule guide
3748

38-
### 配置项
49+
## Settings
3950

40-
#### `protoJump.protoRoots`
51+
### `protoJump.protoRoots`
4152

42-
`.proto` 源文件根目录列表(可多个)。
53+
List of source `.proto` roots. Multiple directories are supported.
4354

4455
```json
4556
{
@@ -50,31 +61,25 @@
5061
}
5162
```
5263

53-
#### `protoJump.searchInWorkspace`
54-
55-
- 类型:`boolean`
56-
- 默认:`true`
57-
- 说明:当 `protoRoots` 未命中时,是否继续在当前工作区内搜索
64+
### `protoJump.searchInWorkspace`
5865

59-
#### `protoJump.makeProtoCommand`
60-
61-
- 类型:`string`
62-
- 默认:`""`(空)
63-
- 说明:用于“编译当前 Proto”的命令模板,运行时会按当前 `.proto` 上下文替换占位符
66+
- Type: `boolean`
67+
- Default: `true`
68+
- Description: continue searching in the current workspace when `protoRoots` has no match
6469

65-
快速流程:
70+
### `protoJump.makeProtoCommand`
6671

67-
1. 在侧边栏填写规则并保存
68-
2. 点击“测试命令”(dry-run,仅校验模板与 shell 语法)
69-
3. 点击“编译当前 Proto”执行真实命令
72+
- Type: `string`
73+
- Default: `""`
74+
- Description: shell template for `Compile Current Proto`; placeholders are resolved from the active `.proto` context
7075

71-
示例模板:
76+
Example:
7277

7378
```bash
7479
cd {protoSrcRoot} && make special_proto packagename={protoPackage} filename={protoFileNoExt}
7580
```
7681

77-
可用占位符:
82+
Supported placeholders:
7883

7984
- `{workspaceFolder}`
8085
- `{protoSrcRoot}`
@@ -85,66 +90,75 @@ cd {protoSrcRoot} && make special_proto packagename={protoPackage} filename={pro
8590
- `{relativeProtoNoExt}`
8691
- `{protoPackage}`
8792

88-
#### `protoJump.uiLanguage`
93+
### `protoJump.uiLanguage`
8994

90-
- 类型:`"zh" | "en"`
91-
- 默认:`"en"`
92-
- 说明:控制侧边栏与提示消息语言
95+
- Type: `"zh" | "en"`
96+
- Default: `"en"`
97+
- Description: language for sidebar and notifications
9398

94-
### 前置条件
99+
## Requirements
95100

96-
- 项目使用 `protoc-gen-go` 生成 `.pb.go`
97-
- 生成文件头部包含:
101+
- `.pb.go` files are generated by `protoc-gen-go`
102+
- Generated file headers include:
98103

99104
```go
100105
// source: path/to/file.proto
101106
```
102107

103-
### 常见问题
108+
## FAQ
104109

105-
#### 为什么会出现多个定义候选?
110+
### Why do multiple definition candidates appear?
106111

107-
启用 `gopls` 时,VS Code 可能同时给出 `.pb.go` `.proto` 候选。选择 `.proto` 即可。
112+
When `gopls` is enabled, VS Code may show both `.pb.go` and `.proto` definition candidates. Choose the `.proto` candidate.
108113

109-
#### 找不到目标 proto 文件怎么办?
114+
### What if JumpProto cannot find the target proto file?
110115

111-
- 检查 `protoJump.protoRoots` 是否正确
112-
- 检查 `.pb.go` `// source:` 路径是否与仓库结构一致
113-
- 检查 `protoJump.searchInWorkspace` 是否被关闭
116+
- Check that `protoJump.protoRoots` is configured correctly.
117+
- Check that the `// source:` path in `.pb.go` matches your repository structure.
118+
- Check whether `protoJump.searchInWorkspace` has been disabled.
114119

115120
---
116121

117-
## English
122+
<a id="zh-cn"></a>
118123

119-
JumpProto gives you fast, precise, bi-directional navigation between Go and `.proto`, plus an integrated proto compile flow.
124+
## 中文说明
125+
126+
在 Go 与 `.proto` 之间极速双向跳转,支持定义级与元素级精确定位。<br>
127+
从“看定义”到“改完即编译”,在一个面板里完成。
120128

121-
### Why JumpProto
129+
### 为什么选 JumpProto
122130

123-
- Bi-directional jumps: `Go -> .proto` and `.proto -> Go`
124-
- Element-level precision for `message / enum / service / rpc`, fields, and nested symbols
125-
- Multiple entry points: `F12`, `Ctrl/Cmd + Click`, context menu, status bar, sidebar
126-
- Works with generated Go files via `// source: path/to/file.proto`
127-
- Built-in compile workflow from sidebar using a command template
131+
- 双向导航:`Go -> .proto``.proto -> Go` 一键互跳
132+
- 精确到元素:支持 `message / enum / service / rpc`,并可定位字段和内部元素
133+
- 操作路径短:`F12``Ctrl/Cmd + Click`、右键菜单、状态栏、侧边栏都可触发
134+
- 兼容现有工程:基于生成文件头部 `// source: path/to/file.proto` 自动回溯源码
135+
- 直接集成编译:支持在侧边栏配置并执行 `make proto` 规则模板
128136

129-
### Quick Start
137+
### 典型使用场景
130138

131-
1. Install `JumpProto` from VS Code Marketplace
132-
2. Open a Go project with generated `.pb.go` files
133-
3. Configure `protoJump.protoRoots` (recommended)
134-
4. Put cursor on a symbol and press `F12`
139+
- 在 Go 与 Proto 之间快速来回追踪定义关系
140+
- 排查字段变更、枚举值和 RPC 接口影响范围
141+
- 多目录 proto 仓库中减少全文搜索与手动切换
135142

136-
### Main Commands
143+
### 30 秒上手
144+
145+
1. 在 VS Code 安装 `JumpProto`
146+
2. 打开包含 `.pb.go` 的 Go 工程
147+
3. 配置 `protoJump.protoRoots`(推荐)
148+
4. 将光标放在目标符号上并按 `F12`
149+
150+
### 核心功能入口
137151

138152
- `JumpProto: Go to Proto Definition`
139153
- `JumpProto: Go to Go Usage`
140154
- `JumpProto: Compile Current Proto`
141-
- Sidebar `?`: open Make Proto rule guide
155+
- 侧边栏 `?`:打开 Make Proto 规则说明
142156

143-
### Settings
157+
### 配置项
144158

145159
#### `protoJump.protoRoots`
146160

147-
List of source `.proto` roots.
161+
`.proto` 源文件根目录列表(可多个)。
148162

149163
```json
150164
{
@@ -157,23 +171,23 @@ List of source `.proto` roots.
157171

158172
#### `protoJump.searchInWorkspace`
159173

160-
- Type: `boolean`
161-
- Default: `true`
162-
- Description: continue searching in workspace when `protoRoots` has no match
174+
- 类型:`boolean`
175+
- 默认:`true`
176+
- 说明:当 `protoRoots` 未命中时,是否继续在当前工作区内搜索
163177

164178
#### `protoJump.makeProtoCommand`
165179

166-
- Type: `string`
167-
- Default: `""`
168-
- Description: shell template for `Compile Current Proto`; placeholders are resolved from active `.proto` context
180+
- 类型:`string`
181+
- 默认:`""`(空)
182+
- 说明:用于“编译当前 Proto”的命令模板,运行时会按当前 `.proto` 上下文替换占位符
169183

170-
Example:
184+
示例模板:
171185

172186
```bash
173187
cd {protoSrcRoot} && make special_proto packagename={protoPackage} filename={protoFileNoExt}
174188
```
175189

176-
Supported placeholders:
190+
可用占位符:
177191

178192
- `{workspaceFolder}`
179193
- `{protoSrcRoot}`
@@ -186,32 +200,41 @@ Supported placeholders:
186200

187201
#### `protoJump.uiLanguage`
188202

189-
- Type: `"zh" | "en"`
190-
- Default: `"en"`
191-
- Description: language for sidebar and notifications
203+
- 类型:`"zh" | "en"`
204+
- 默认:`"en"`
205+
- 说明:控制侧边栏与提示消息语言
192206

193-
### Requirements
207+
### 前置条件
194208

195-
- `.pb.go` is generated by `protoc-gen-go`
196-
- Generated file header includes:
209+
- 项目使用 `protoc-gen-go` 生成 `.pb.go`
210+
- 生成文件头部包含:
197211

198212
```go
199213
// source: path/to/file.proto
200214
```
201215

202-
---
216+
### 常见问题
217+
218+
#### 为什么会出现多个定义候选?
219+
220+
启用 `gopls` 时,VS Code 可能同时给出 `.pb.go``.proto` 候选。选择 `.proto` 即可。
203221

204-
## 隐私说明 / Privacy
222+
#### 找不到目标 proto 文件怎么办?
223+
224+
- 检查 `protoJump.protoRoots` 是否正确
225+
- 检查 `.pb.go``// source:` 路径是否与仓库结构一致
226+
- 检查 `protoJump.searchInWorkspace` 是否被关闭
227+
228+
---
205229

206-
文档示例统一使用占位路径(如 `/ABSOLUTE/PATH/TO/...``$HOME/...`),避免暴露个人目录信息。
207-
All path examples use placeholders to avoid exposing personal local directory information.
230+
## Privacy
208231

209-
## 开源协议 / License
232+
All path examples use placeholders such as `/ABSOLUTE/PATH/TO/...` and `$HOME/...` to avoid exposing personal local directory information.
210233

211-
JumpProto 以 Apache License 2.0 开源,详见 [LICENSE](LICENSE)。第三方素材声明见 [NOTICE](NOTICE)[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)
234+
## License
212235

213-
JumpProto is licensed under the Apache License 2.0. Third-party asset notices are listed in [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
236+
JumpProto is licensed under the Apache License 2.0. See [LICENSE](LICENSE). Third-party asset notices are listed in [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
214237

215-
## Bug 反馈 / Bug Reports
238+
## Bug Reports
216239

217-
- 提交地址 / Report here: <https://github.com/SivanCola/issues/issues>
240+
- Report here: <https://github.com/SivanCola/issues/issues>

0 commit comments

Comments
 (0)