|
1 | | -# 贡献指南 |
| 1 | +# Contributing |
2 | 2 |
|
3 | | -感谢你改进 MacNotchKiller。这个项目依赖 macOS 私有显示接口,提交问题或代码时,请尽量提供可复现、可验证的信息。 |
| 3 | +Thanks for improving MacNotchKiller. This project depends on private macOS display APIs, so issues and patches should be reproducible and grounded in real behavior. |
4 | 4 |
|
5 | | -## 开发环境 |
| 5 | +[简体中文](CONTRIBUTING.zh-CN.md) |
6 | 6 |
|
7 | | -- macOS 13 或更高版本 |
| 7 | +## Development environment |
| 8 | + |
| 9 | +- macOS 13 or later |
8 | 10 | - Apple Silicon Mac |
9 | | -- Swift 5.10 或更高版本工具链 |
| 11 | +- Swift 5.10 or later |
10 | 12 |
|
11 | 13 | ```bash |
12 | 14 | git clone https://github.com/DTW7607/MacNotchKiller.git |
13 | 15 | cd MacNotchKiller |
14 | 16 | swift build |
15 | 17 | ``` |
16 | 18 |
|
17 | | -## 提交问题 |
| 19 | +## Reporting issues |
18 | 20 |
|
19 | | -请使用仓库的 Bug Report 模板,并至少提供: |
| 21 | +Use the repository's Bug Report template. Include at least: |
20 | 22 |
|
21 | | -- Mac 型号和芯片 |
22 | | -- macOS 完整版本号 |
23 | | -- 目标应用及其版本 |
24 | | -- 是否已授予辅助功能权限 |
25 | | -- 可稳定复现的操作步骤 |
26 | | -- 完整错误文本或终端日志 |
| 23 | +- Mac model and chip |
| 24 | +- Full macOS version |
| 25 | +- Target app and version |
| 26 | +- Whether Accessibility permission has been granted |
| 27 | +- Stable reproduction steps |
| 28 | +- Complete error text or terminal logs |
27 | 29 |
|
28 | | -显示器排列和输入问题请同时说明外接显示器数量及排列方式。 |
| 30 | +For display arrangement or input issues, also include the number of external displays and how they are arranged. |
29 | 31 |
|
30 | | -## 提交代码 |
| 32 | +## Submitting code |
31 | 33 |
|
32 | | -1. 从 `main` 创建短期功能分支。 |
33 | | -2. 保持改动范围集中,不混入构建缓存或本机配置。 |
34 | | -3. 对生命周期、坐标系、Event Tap 和异步回调的改动补充必要注释。 |
35 | | -4. 执行 `swift build` 和 `swift build -c release`。 |
36 | | -5. 在 Pull Request 中说明验证环境、预期行为和已知风险。 |
| 34 | +1. Create a short-lived feature branch from `main`. |
| 35 | +2. Keep the change focused, and do not include build caches or local configuration. |
| 36 | +3. Add comments where lifecycle, coordinate systems, Event Tap behavior, or async callbacks are non-obvious. |
| 37 | +4. Run `swift build` and `swift build -c release`. |
| 38 | +5. In the pull request, describe the validation environment, expected behavior, and known risks. |
37 | 39 |
|
38 | | -建议使用 Conventional Commits: |
| 40 | +Use Conventional Commits when practical: |
39 | 41 |
|
40 | 42 | ```text |
41 | 43 | feat(selection): add interactive window highlighting |
42 | 44 | fix(display): wait for virtual display registration before positioning |
43 | 45 | docs: document permissions and recovery shortcut |
44 | 46 | ``` |
45 | 47 |
|
46 | | -## 工程约束 |
| 48 | +## Engineering constraints |
47 | 49 |
|
48 | | -- 不提交 `.build/` 或其他生成物。 |
49 | | -- 不直接链接私有类符号;私有 API 必须继续通过窄桥接层和运行时检测访问。 |
50 | | -- 不削弱 `Control + Option + Command + Q` 故障退出路径。 |
51 | | -- 不把真实设备上的成功结果等同于其他 macOS 版本兼容。 |
52 | | -- 不添加遥测、网络请求或画面上传行为,除非经过单独讨论并默认关闭。 |
| 50 | +- Do not commit `.build/` or other generated files. |
| 51 | +- Do not directly link private class symbols. Private API access must remain behind the narrow bridge layer and runtime checks. |
| 52 | +- Do not weaken the `Control + Option + Command + Q` recovery path. |
| 53 | +- Do not treat success on one real device as proof of compatibility across macOS versions. |
| 54 | +- Do not add telemetry, network requests, or screen upload behavior unless discussed separately and disabled by default. |
0 commit comments