@@ -28,70 +28,6 @@ func (l *langPack) GetRule(types string) string {
2828}
2929
3030var (
31- langEn = & langPack {
32- Hints : map [State ]string {
33- Validated : "Validated: commit message meet the rule." ,
34- Merge : "Merge: merge commit detected,skip check." ,
35- ArgumentMissing : "Error ArgumentMissing: commit message file argument missing." ,
36- FileMissing : "Error FileMissing: file %s not exists." ,
37- ReadError : "Error ReadError: read file %s error." ,
38- EmptyMessage : "Error EmptyMessage: commit message has no content except whitespaces." ,
39- EmptyHeader : "Error EmptyHeader: header (first line) has no content except whitespaces." ,
40- BadHeaderFormat : `Error BadHeaderFormat: header (first line) not following the rule:
41- %s
42- if you can not find any error after check, maybe you use Chinese colon, or lack of whitespace after the colon.` ,
43- WrongType : "Error WrongType: %s, type should be one of the keywords:\n %s" ,
44- ScopeMissing : "Error ScopeMissing: (scope) is required right after type." ,
45- WrongScope : "Error WrongScope: %s, scope should be one of the keywords:\n %s" ,
46- BodyMissing : "Error BodyMissing: body has no content except whitespaces." ,
47- NoBlankLineBeforeBody : "Error NoBlankLineBeforeBody: no empty line between header and body." ,
48- LineOverLong : "Error LineOverLong: the length of line is %d, exceed %d:\n %s" ,
49- UndefindedError : "Error UndefindedError: unexpected error occurs, please raise an issue." ,
50- },
51- Rule : `Commit message rule as follow:
52- <type>(<scope>): <subject>
53- // empty line
54- <body>
55- // empty line
56- <footer>
57-
58- (<scope>), <body> and <footer> are optional by default
59- <type> must be one of %s
60- more specific instructions, please refer to: https://github.com/JayceChant/commit-msg` ,
61- }
62-
63- langZhCn = & langPack {
64- Hints : map [State ]string {
65- Validated : "Validated: 提交信息符合规范。" ,
66- Merge : "Merge: 合并提交,跳过规范检查。" ,
67- ArgumentMissing : "Error ArgumentMissing: 缺少文件参数。" ,
68- FileMissing : "Error FileMissing: 文件 %s 不存在。" ,
69- ReadError : "Error ReadError: 读取 %s 错误。" ,
70- EmptyMessage : "Error EmptyMessage: 提交信息没有内容(不包括空白字符)。" ,
71- EmptyHeader : "Error EmptyHeader: 标题(第一行)没有内容(不包括空白字符)。" ,
72- BadHeaderFormat : `Error BadHeaderFormat: 标题(第一行)不符合规范:
73- %s
74- 如果您无法发现错误,请注意是否使用了中文冒号,或者冒号后面缺少空格。` ,
75- WrongType : "Error WrongType: %s, 类型关键字应为以下选项中的一个:\n %s" ,
76- ScopeMissing : "Error ScopeMissing: 类型后面缺少'(scope)'。" ,
77- WrongScope : "Error WrongScope: %s, 范围关键字应为以下选项中的一个:\n %s" ,
78- BodyMissing : "Error BodyMissing: 消息体没有内容(不包括空白字符)。" ,
79- NoBlankLineBeforeBody : "Error NoBlankLineBeforeBody: 标题和消息体之间缺少空行。" ,
80- LineOverLong : "Error LineOverLong: 该行长度为 %d, 超出了 %d 的限制:\n %s" ,
81- UndefindedError : "Error UndefindedError: 没有预料到的错误,请提交一个错误报告。" ,
82- },
83- Rule : `提交信息规范如下:
84- <type>(<scope>): <subject>
85- // 空行
86- <body>
87- // 空行
88- <footer>
89-
90- (<scope>), <body> 和 <footer> 默认可选,也可以在配置设置必选
91- <type> 必须是关键字 %s 之一
92- 更多信息,请参考项目主页: https://github.com/JayceChant/commit-msg` ,
93- }
94-
9531 langs = map [string ]* langPack {
9632 "en" : langEn ,
9733 "zh" : langZhCn ,
0 commit comments