Skip to content

Commit

Permalink
fix error of editorconfig_zh_CN.js
Browse files Browse the repository at this point in the history
  • Loading branch information
刘祺 committed Mar 29, 2017
1 parent c14f2c5 commit 0f3f37c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gulp-reporter
[![AppVeyor](https://img.shields.io/appveyor/ci/gucong3000/gulp-reporter.svg?&label=Windows)](https://ci.appveyor.com/project/gucong3000/gulp-reporter)
[![Coverage Status](https://img.shields.io/coveralls/gucong3000/gulp-reporter.svg)](https://coveralls.io/r/gucong3000/gulp-reporter)

Error reporter for:
Error report localization for:
[EditorConfig](https://github.com/jedmao/eclint)
[ESLint](https://github.com/adametry/gulp-eslint)
[JSCS](https://github.com/jscs-dev/gulp-jscs)
Expand Down
2 changes: 1 addition & 1 deletion lib/editorconfig_zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function(error) {
for (const [en, cn] of messages) {
if (en instanceof RegExp) {
if (en.test(error.message)) {
error.message = cn.replace(/\$\d+/, key => en[key]);
error.message = error.message.replace(en, cn);
return error;
}
} else if (error.message === en) {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lodash.get": "^4.4.2",
"os-locale": "^2.0.0"
},
"description": "Error reporter for: EditorConfig/ESLint/JSCS/JSHint/CssLint/PostCSS/TSLint",
"description": "Error report localization for: EditorConfig/ESLint/JSCS/JSHint/CssLint/PostCSS/TSLint",
"devDependencies": {
"cover": "^0.2.9",
"coveralls": "^2.12.0",
Expand Down Expand Up @@ -44,6 +44,8 @@
"keywords": [
"gulp",
"reporter",
"report",
"localization",
"eslint",
"jscs",
"jshint",
Expand All @@ -68,5 +70,5 @@
"pretest": "node-version-gte-4 && eslint lib test/*.test.js || echo \"ESLint not supported\"",
"test": "istanbul cover node_modules/mocha/bin/_mocha test/*.test.js"
},
"version": "1.8.0"
"version": "1.8.1"
}

0 comments on commit 0f3f37c

Please sign in to comment.