Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
gulp-azure-translate
Advanced tools
streaming translation tool using azure's congnitive services
Streaming Translation tool using Azure's Cognitive Services
You know the drill...
$ npm i gulp-azure-translate
To use this tool, you'll first need to create an instance of Microsoft Azure's Cognitive Services in your Azure account.
This plugin calls the v3 translate api.
translateAzure(config)
The config is an object consisting of:
apiKey
- required string - the api key from your azure congnitive services instanceregion
- required string - the region from your azure congnitive services instancetoLangs
- required string[] - array of locale codes to translate the source content tofromLang
- optional string - the locale code that will be used as the source language (default: determined)slowMode
- optional boolean - requests all translations in series. (default: false)showErrors
- optional boolean - displays network errors when encountered. (default false)Note: apiKey
and region
are values from the Congnitive Services instance you create in your Azure account. Once created, Check the "Keys and Endpoint" tab to get these values.
A list of supported languages can be found here.
// gulpfile.js
const { task } = require('gulp');
const translateAzure = require('gulp-azure-translate');
task('translate', () => {
return src(['src/en.json'])
.pipe(translateAzure({
apiKey: '00000000-00000000-00000000-00000000-0000000000',
region: 'eastus',
fromLang: 'en',
toLangs: ['es', 'ja']
}))
.pipe(dest(`./src/translations`))
})
// src/en.json
{
"org": "Organization",
"currOrg": "Current Organization",
"account": "Account"
}
// src/translations/es.json
{
"org": "Organización",
"currOrg": "Organización actual",
"account": "Cuenta"
}
// src/translations/ja.json
{
"org": "組織",
"currOrg": "現在の組織",
"account": "アカウント"
}
FAQs
streaming translation tool using azure's congnitive services
We found that gulp-azure-translate 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.