
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
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.5Since 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-txcd grunt-txnpm installRun 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
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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.