From 1e91653ddd66ceef82da93185b9ff93fd4209fbf Mon Sep 17 00:00:00 2001 From: Rasmus Bengtsson Date: Wed, 31 Jul 2019 11:31:32 +0200 Subject: [PATCH] Fix after lint --- package-lock.json | 10 +++++----- test/test-helper.js | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5e96da..e0cacd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -137,7 +137,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "requires": { "ansi-wrap": "^0.1.0" @@ -343,7 +343,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -737,7 +737,7 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -1567,7 +1567,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -2238,7 +2238,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, diff --git a/test/test-helper.js b/test/test-helper.js index b24a82e..36a6322 100644 --- a/test/test-helper.js +++ b/test/test-helper.js @@ -17,44 +17,44 @@ const assert = require('assert'); function verifyLanguageBlock (potContents, comment, fileinfo, msgid, plural, context) { const blocks = potContents.split('\n\n'); for (let i = 1; i < blocks.length; i++) { - const blocklines = blocks[ i ].split('\n'); + const blocklines = blocks[i].split('\n'); let fileinfoLine = 0; - if (comment && blocks[ i ].indexOf('#. ' + comment) === -1) { + if (comment && blocks[i].indexOf('#. ' + comment) === -1) { continue; } else if (comment) { fileinfoLine++; } // Check if correct file - if (fileinfo && blocklines[ fileinfoLine ].indexOf(fileinfo) === -1) { + if (fileinfo && blocklines[fileinfoLine].indexOf(fileinfo) === -1) { continue; } // Check if msgid is correct - if (msgid && blocks[ i ].indexOf('msgid "' + msgid + '"\n') === -1) { + if (msgid && blocks[i].indexOf('msgid "' + msgid + '"\n') === -1) { continue; } // Check if plural msgid is correct - if (plural && blocks[ i ].indexOf('msgid_plural "' + plural + '"\n') === -1) { + if (plural && blocks[i].indexOf('msgid_plural "' + plural + '"\n') === -1) { continue; - } else if (!plural && blocks[ i ].indexOf('msgid_plural') !== -1) { + } else if (!plural && blocks[i].indexOf('msgid_plural') !== -1) { continue; } // Check if context is correct - if (context && blocks[ i ].indexOf('msgctxt "' + context + '"\n') === -1) { + if (context && blocks[i].indexOf('msgctxt "' + context + '"\n') === -1) { continue; - } else if (!context && blocks[ i ].indexOf('msgctxt') !== -1) { + } else if (!context && blocks[i].indexOf('msgctxt') !== -1) { continue; } // Check if msgstr is correct when plural - if (plural && blocks[ i ].indexOf('msgstr[0] ""\n') === -1 && blocks[ i ].indexOf('msgstr[1] ""\n') === -1 && blocks[ i ].indexOf('msgstr ""\n') !== -1) { + if (plural && blocks[i].indexOf('msgstr[0] ""\n') === -1 && blocks[i].indexOf('msgstr[1] ""\n') === -1 && blocks[i].indexOf('msgstr ""\n') !== -1) { continue; // Check if msgstr is correct when singular - } else if (!plural && blocks[ i ].indexOf('msgstr[0] ""\n') !== -1 && blocks[ i ].indexOf('msgstr[1] ""\n') !== -1 && blocks[ i ].indexOf('msgstr ""\n') === -1) { + } else if (!plural && blocks[i].indexOf('msgstr[0] ""\n') !== -1 && blocks[i].indexOf('msgstr[1] ""\n') !== -1 && blocks[i].indexOf('msgstr ""\n') === -1) { continue; }