Skip to content

Commit d172dff

Browse files
Copilotzccrs
andcommitted
docs: Convert to Chinese-only and use generic year references
Co-authored-by: zccrs <13449038+zccrs@users.noreply.github.com>
1 parent dad2633 commit d172dff

1 file changed

Lines changed: 44 additions & 68 deletions

File tree

.github/copilot-instructions.md

Lines changed: 44 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
<!-- SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
22
SPDX-License-Identifier: GPL-3.0-or-later -->
33

4-
# GitHub Copilot Instructions for linuxdeepin Organization
54
# linuxdeepin 组织的 GitHub Copilot 指导
65

7-
> **Note**: These are organization-wide default instructions that apply to all repositories in the linuxdeepin organization. Individual repositories may supplement these with repository-specific instructions.
8-
>
96
> **注意**: 这些是适用于 linuxdeepin 组织所有仓库的组织级默认指导。各个仓库可以使用特定仓库的指令来补充这些指导。
107
118
---
129

13-
## 1. Bilingual Code Review Comments / 双语代码审查评论
14-
15-
**Requirement**: ALL code review comments MUST be provided in BOTH English and Chinese. Never use English only.
10+
## 1. 双语代码审查评论
1611

1712
**要求**: 所有代码审查评论必须同时提供中英文双语版本。绝不能只使用英文。
1813

19-
### Format Template / 格式模板
14+
### 格式模板
2015

2116
```
2217
[English comment describing the issue or suggestion]
2318
2419
[Chinese comment - 对问题或建议的中文描述]
2520
```
2621

27-
### Example / 示例
22+
### 示例
2823

2924
```
3025
This function should handle null inputs to prevent potential crashes.
@@ -34,97 +29,84 @@ This function should handle null inputs to prevent potential crashes.
3429

3530
---
3631

37-
## 2. SPDX Copyright Header Validation / SPDX 版权头验证
38-
39-
**Requirement**: When reviewing code changes, automatically check SPDX copyright headers for proper date formatting.
32+
## 2. SPDX 版权头验证
4033

4134
**要求**: 在审查代码更改时,自动检查 SPDX 版权头的日期格式是否正确。
4235

43-
### Required Format / 所需格式
36+
### 所需格式
4437

4538
```cpp
4639
// SPDX-FileCopyrightText: YYYY[-YYYY] UnionTech Software Technology Co., Ltd.
4740
// SPDX-License-Identifier: <appropriate-license>
4841
```
4942

50-
For other file types (e.g., CMake, Python, Shell scripts):
5143
对于其他文件类型(如 CMake、Python、Shell 脚本):
5244

5345
```cmake
5446
# SPDX-FileCopyrightText: YYYY[-YYYY] UnionTech Software Technology Co., Ltd.
5547
# SPDX-License-Identifier: <appropriate-license>
5648
```
5749

58-
### Validation Rules / 验证规则
50+
### 验证规则
5951

60-
#### For New Files / 对于新文件
52+
#### 对于新文件
6153

62-
- **MUST** include SPDX header with current year (2026)
63-
- **必须**包含带有当前年份 (2026) 的 SPDX 头
54+
- **必须**包含带有当前年份的 SPDX 头
6455

65-
**Example / 示例:**
56+
**示例:**
6657
```cpp
67-
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
58+
// SPDX-FileCopyrightText: <当前年份> UnionTech Software Technology Co., Ltd.
6859
// SPDX-License-Identifier: GPL-3.0-or-later
6960
```
7061

71-
#### For Modified Files / 对于修改的文件
62+
#### 对于修改的文件
7263

73-
**Case 1**: File created in the same year as modification → Use single year format
7464
**情况 1**: 文件在与修改相同的年份创建 → 使用单年份格式
7565

7666
```cpp
77-
// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
67+
// SPDX-FileCopyrightText: <当前年份> UnionTech Software Technology Co., Ltd.
7868
```
7969

80-
**Case 2**: File created in an earlier year → Use year range format (YYYY-YYYY)
8170
**情况 2**: 文件在更早的年份创建 → 使用年份范围格式 (YYYY-YYYY)
8271

83-
- First YYYY = file creation year / 第一个 YYYY = 文件创建年份
84-
- Second YYYY = last modification year / 第二个 YYYY = 最后修改年份
72+
- 第一个 YYYY = 文件创建年份
73+
- 第二个 YYYY = 最后修改年份
8574

8675
```cpp
87-
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
76+
// SPDX-FileCopyrightText: 2023-<当前年份> UnionTech Software Technology Co., Ltd.
8877
```
8978

90-
**Important**: Only use range format (YYYY-YYYY) when the years differ. If they are the same, use single year format.
91-
9279
**重要**: 只有当年份不同时才使用范围格式 (YYYY-YYYY)。如果年份相同,使用单年份格式。
9380

94-
### What to Check / 检查内容
81+
### 检查内容
9582

96-
Remind developers if / 提醒开发者如果:
83+
提醒开发者如果:
9784

98-
1. ❌ New files are missing SPDX headers
99-
- 新文件缺少 SPDX 头
85+
1. ❌ 新文件缺少 SPDX 头
10086

101-
2. ❌ New files have incorrect year (not 2026)
102-
- 新文件的年份不正确(不是 2026)
87+
2. ❌ 新文件的年份不正确(不是当前年份)
10388

104-
3. ❌ Modified files have not updated the year to current year (2026)
105-
- 修改的文件未将年份更新为当前年份 (2026)
89+
3. ❌ 修改的文件未将年份更新为当前年份
10690

107-
### Review Comment Example / 审查评论示例
91+
### 审查评论示例
10892

10993
```
11094
Please update the SPDX copyright header to include the current year. Since this file
111-
was created in 2023 and is being modified in 2026, it should use the year range format:
112-
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
95+
was created in 2023 and is being modified now, it should use the year range format:
96+
// SPDX-FileCopyrightText: 2023-<当前年份> UnionTech Software Technology Co., Ltd.
11397
114-
请更新 SPDX 版权头以包含当前年份。由于此文件创建于 2023 年并在 2026 年被修
115-
改,应使用年份范围格式:
116-
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
98+
请更新 SPDX 版权头以包含当前年份。由于此文件创建于 2023 年并在当前被修改,
99+
应使用年份范围格式:
100+
// SPDX-FileCopyrightText: 2023-<当前年份> UnionTech Software Technology Co., Ltd.
117101
```
118102

119103
---
120104

121-
## 3. Bilingual Commit Message Format / 双语提交消息格式
122-
123-
**Requirement**: All commit messages generated by Copilot MUST follow the bilingual format below.
105+
## 3. 双语提交消息格式
124106

125107
**要求**: 所有由 Copilot 生成的提交消息都必须遵循以下双语格式。
126108

127-
### Template / 模板
109+
### 模板
128110

129111
```
130112
<type>: <English summary>
@@ -150,22 +132,21 @@ Influence:
150132
3. <测试建议>
151133
```
152134

153-
### Commit Types / 提交类型
135+
### 提交类型
154136

155-
| Type | Description (English) | 描述 (中文) |
156-
|------|----------------------|------------|
157-
| `feat` | New feature | 新功能 |
158-
| `fix` | Bug fix | 问题修复 |
159-
| `docs` | Documentation changes | 文档更改 |
160-
| `style` | Code style/formatting | 代码风格/格式化 |
161-
| `refactor` | Code refactoring | 代码重构 |
162-
| `perf` | Performance improvements | 性能优化 |
163-
| `test` | Test additions/modifications | 测试添加/修改 |
164-
| `chore` | Build/tooling changes | 构建/工具变更 |
137+
| Type | 描述 |
138+
|------|------|
139+
| `feat` | 新功能 |
140+
| `fix` | 问题修复 |
141+
| `docs` | 文档更改 |
142+
| `style` | 代码风格/格式化 |
143+
| `refactor` | 代码重构 |
144+
| `perf` | 性能优化 |
145+
| `test` | 测试添加/修改 |
146+
| `chore` | 构建/工具变更 |
165147

166-
### Complete Example / 完整示例
148+
### 完整示例
167149

168-
Reference from linuxdeepin/treeland repository:
169150
参考来自 linuxdeepin/treeland 仓库:
170151

171152
```
@@ -209,19 +190,14 @@ Influence:
209190

210191
---
211192

212-
## Summary / 总结
193+
## 总结
213194

214-
These instructions ensure that:
215195
这些指导确保:
216196

217-
1. ✅ All code reviews are accessible to both English and Chinese speakers
218-
- 所有代码审查对英语和中文使用者都易于理解
197+
1. ✅ 所有代码审查对英语和中文使用者都易于理解
219198

220-
2. ✅ Copyright headers are properly maintained and up-to-date
221-
- 版权头得到正确维护并保持最新
199+
2. ✅ 版权头得到正确维护并保持最新
222200

223-
3. ✅ Commit messages provide comprehensive context in both languages
224-
- 提交消息以两种语言提供全面的上下文
201+
3. ✅ 提交消息以两种语言提供全面的上下文
225202

226-
By following these guidelines, we maintain consistency and clarity across all linuxdeepin projects.
227203
通过遵循这些指导,我们在所有 linuxdeepin 项目中保持一致性和清晰度。

0 commit comments

Comments
 (0)