Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Grunt tasks to download translations & upload resources from/to Transifex
Grunt tasks to download translations and upload resources to Transifex
>= 0.10.x
or io.js >=1.8.1
(You might need node-gyp-install for io.js)~0.4.5
Since we depend on node-keytar
, you might need to install a package there to make the installation work. Please refer to their README for instructions.
In your project run: npm install --save grunt-tx
.
Then go to your Gruntfile.js
, include this plugin and add the configuration. Example:
// load the plugin
grunt.loadNpmTasks('grunt-tx');
grunt.initConfig({
/*
Transifex configuration
*/
tx: {
// note: this takes an array, so you can have multiple
// resources per project
//
// if you need more than one project, just add another
// key with the other project slug
'YOUR_PROJECT_SLUG': [
{
// path to the source resource
sourceFile: './po/template.pot',
// target directory & path where we put the downloaded translations to
// _lang_ will be replaced with the language code (`en` for example)
// _type_ will be replaced with the lowercased type of the resource (`po` for example)
targetFilePath: './po/_lang_._type_',
// the i18n_type of your resource at Transifex
// See http://docs.transifex.com/formats
type: 'PO',
// this is completely optional. If not set, we default to download
// every available language for the resource
languages: ['en', 'fr']
}
]
},
});
The plugin exposes two tasks:
grunt tx:download
– downloads all translations for every configured project and their resourcesgrunt tx:upload
– uploads all configured projects' resourcesThe plugin accepts TRANSIFEX_USER
& TRANSIFEX_PASSWORD
as environment variables. If they're not present, it'll prompt the user for their credentials and stores them in their keychain.
Note: if you need to support multiple projects with different credentials, this is totally supported by this plugin. However if you pass in the credentials via ENV, they'll take precedence over everything. This means, if you want to include this plugin into your CI workflow, you'll have to grant access to all projects configured to the user identified by the credentials provided in ENV.
You're interested in helping out this project? You rock! Hope this little guide helps you to get started. If not, just ping us, we're very happy to help!
The module is written in ES2015 with the help of the fantastic babel. The source code can be found in the src directory. It's the only code that you should touch.
If you follow these three steps, you should be ready to go:
git clone http://github.com/eHealthAfrica/grunt-tx
cd grunt-tx
npm install
Run npm run build
. Build output will be in lib
and tasks
directories. During development you can also use npm run watch
, which watches for file changes in src
and automatically builds everything.
npm run lint
lints the code in src
with the help of standard and babel-eslint
npm test
lints the code and runs the test.
grunt-tx
is using the wonderful semantic-release to automate its releases. To make that work, please stick to the Angular commit guidelines
Thank you to:
which are great projects that you should definitely look at if you're looking to integrate Transifex within your workflow. We had different needs and this is how this project came to be.
Also big thanks to Inquirer.js and node-keytar, which enabled this project to prompt the user for their credentials and to save them into the keychain.
Apache 2.0, see LICENSE
© 2015 Robin Mehner for eHealth Systems Africa
FAQs
Grunt tasks to download translations & upload resources from/to Transifex
The npm package grunt-tx receives a total of 15 weekly downloads. As such, grunt-tx popularity was classified as not popular.
We found that grunt-tx 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.