Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gulp-combine-languagefiles
Advanced tools
Gulp plugin to combine several (nested) JSON language files
Gulp plugin to combine several (nested) JSON language files Create easily editable CSV so non-programmers can help with translations
This plugin was originally made to be used with gulp-bobrsass-boilerplate / angularjs, but it should work with other projects too using JSON key-value -pair translations. It expects translations to be named as en.json
, en-EN.json
or similar. Your project tree might look for example like
src/
app/
module1/
languages/
en.json
fi.json
module2/
languages/
en.json
fi.json
Install gulp-combine-languagefiles
as a development dependency:
npm install --save-dev gulp-combine-languagefiles
Add it to your gulpfile.js
:
var combine_languagefiles = require("gulp-combine-languagefiles");
gulp.src("src/app/**/languages/*.json")
.pipe(combine_languagefiles("translations.json"))
.pipe(gulp.dest(""));
You can use gulp-convert to convert result to CSV. Use includeHeader
parameter to prepend header as first row.
var concat_json = require("gulp-concat-languagefiles");
var convert = require("gulp-convert");
gulp.src("src/app/**/languages/*.json")
.pipe(combine_languagefiles("translations.json", { includeHeader: true }))
.pipe(convert({from: 'json', to: 'csv'}))
.pipe(gulp.dest("")); // File will be saved as translations.csv to project root
See /example for a script to parse generated CSV back to original JSON-files, it even supports downloading CSV from Google Drive!
FAQs
Gulp plugin to combine several (nested) JSON language files
The npm package gulp-combine-languagefiles receives a total of 33 weekly downloads. As such, gulp-combine-languagefiles popularity was classified as not popular.
We found that gulp-combine-languagefiles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.