From: Oleg Postoev Date: Fri, 23 Dec 2016 15:39:47 +0000 (+0300) Subject: Fix fatal error X-Git-Tag: 2.18.0~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a8c0286933507a05a85d2595d3b31d0934610fa;p=thirdparty%2Fmoment.git Fix fatal error Some changes for better work and nice code style --- diff --git a/scripts/locales.js b/scripts/locales.js index 135b300eb..5dc56a3dd 100755 --- a/scripts/locales.js +++ b/scripts/locales.js @@ -9,9 +9,9 @@ var args = process.argv.slice(2); function help() { console.log(process.argv[1], '[list|mention|find-commenters] ARGS'); console.log(); - console.log(" list show all authors in all locales"); - console.log(" mention show all authors in all locales, ready to copy-paste in github issue"); - console.log(" find-commenters #ID finds all people that participated in a github conversation"); + console.log(' list show all authors in all locales'); + console.log(' mention show all authors in all locales, ready to copy-paste in github issue'); + console.log(' find-commenters #ID finds all people that participated in a github conversation'); } function extract() { @@ -32,7 +32,6 @@ function extract() { content.split('\n').forEach(function (line) { var match = line.match(/^\/\/! author(.*)$/); if (match !== null) { - // console.log(" ", line); localeAuthors.push('---' + match[1]); } }); @@ -54,7 +53,7 @@ function list() { function mention() { var authors = extract(); Object.keys(authors).forEach(function (localeCode) { - console.log('- [ ]', localeCode, authors[localeCode].map(function (author) { return "@" + author; }).join(" ")); + console.log('- [ ]', localeCode, authors[localeCode].map(function (author) { return '@' + author; }).join(' ')); }); } @@ -142,6 +141,6 @@ switch (args[0]) { findCommenters(args[1]); break; default: - console.log("unknown argument", args[0]); + console.log('unknown argument', args[0]); break; }