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.
@goodrequest/convert-translations-i18next
Advanced tools
This scripts are converting JSON files which is generated by [ i18next ](https://www.npmjs.com/package/i18next) to CSV file and also back from CSV to JSON files.
This scripts are converting JSON files which is generated by i18next to CSV file and also back from CSV to JSON files.
First you need to install the module as dev dependency into you project.
npm install --save-dev @goodrequest/convert-translations-i18next
Example of script to convert from json to csv
npx convert-json-to-csv @goodrequest/convert-translations-i18next
Example of script to convert back from csv to json
npx convert-csv-to-json @goodrequest/convert-translations-i18next
This is what a config file looks like
{
// csv delimiter which is used in CSV file, default value is ';'
"csvDelimiter": ";",
// path for csv file, default value is "/public/translations.csv"
"filePathForGeneratedCSV": "/public/translations.csv",
// the languages which you want to convert, default value is all files which scripts founds
"supportedLanguages":["cz", "sk", "en"],
// the json files which you want to convert, default value is all files which scripts founds
"includeFiles": ["loc", "paths"],
// path for json files which is generated by i18next scanner, default value is "/public/locales"
"pathToDirectoryForLocales": "/public/locales"
}
Default config
{
"csvDelimiter": ";",
"filePathForGeneratedCSV": "/public/translations.csv",
"pathToDirectoryForLocales": "/public/locales"
}
You can also use your own config file. First option is to add config file i18JsonToCsv.config.json
in to root folder.
Second option is to pass path to your config file using process environment CONFIG_PATH
.
npx cross-env CONFIG_PATH=/scripts/configs/myConfig.json convert-csv-to-json GoodRequest/i18nextJsonToCsv
FAQs
This scripts are converting JSON files which is generated by [ i18next ](https://www.npmjs.com/package/i18next) to CSV file and also back from CSV to JSON files.
We found that @goodrequest/convert-translations-i18next demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.