From 71b6f773b517e34cb9ef3e6914e68e2ffed3d037 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 02:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E6=96=87=20lint=20=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E8=B4=A1=E7=8C=AE=E8=80=85=E5=AE=A1?= =?UTF-8?q?=E6=9F=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/manual_lint.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/manual_lint.js b/.github/manual_lint.js index 8f57f734..30af1be5 100644 --- a/.github/manual_lint.js +++ b/.github/manual_lint.js @@ -29,30 +29,30 @@ async function main() { errors.push(`文件 ${filePath} 不符合仓库的规范!请不要出现人称代词。`); } if (titles[0].trim() != "# " + filename + "的做法") { - errors.push(`File ${filePath} is invalid! It's title should be: ${"# " + filename + "的做法"}! It was ${titles[0].trim()}!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 它的大标题应该是: ${"# " + filename + "的做法"}! 而它现在是 ${titles[0].trim()}!`); continue; } if (secondTitles.length != 4) { - errors.push(`File ${filePath} is invalid! It doesn't has 4 second titles!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 它并不是四个标题的格式。请参考示例菜模板!`); continue; } if (secondTitles[0].trim() != "## 必备原料和工具") { - errors.push(`File ${filePath} is invalid! The first title is NOT 必备原料和工具! It was ${secondTitles[0]}!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 第一个标题不是 必备原料和工具!`); } if (secondTitles[1].trim() != "## 计算") { - errors.push(`File ${filePath} is invalid! The second title is NOT 计算!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 第二个标题不是 计算!`); } if (secondTitles[2].trim() != "## 操作") { - errors.push(`File ${filePath} is invalid! The thrid title is NOT 操作!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 第三个标题不是 操作`); } if (secondTitles[3].trim() != "## 附加内容") { - errors.push(`File ${filePath} is invalid! The fourth title is NOT 附加内容!`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 第四个标题不是 附加内容`); } var mustHave = '如果您遵循本指南的制作流程而发现有问题或可以改进的流程,请提出 Issue 或 Pull request 。'; var mustHaveIndex = dataLines.indexOf(mustHave); if (mustHaveIndex < 0) { - errors.push(`File ${filePath} is invalid! It doesn't have necessary scentence.`); + errors.push(`文件 ${filePath} 不符合仓库的规范! 它没有包含必需的附加内容!`); } }