Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
grunt-djangularjs-translate
Advanced tools
Grunt tasks to automatically extract translations from your djangularjs project
Grunt tasks to automatically extract translations from your djangularjs project
##Status
Stable
npm install grunt-djangularjs-translate
NOTE: This extraction tool is made to work with the djangularjs framework.
The configuration below generates 2 translation files:
public/i18n/en.js
public/i18n/fr.js
file// gruntfile.js
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// ...
translate: {
all: {
src: [
"public/*[!_]*/*.js",
"public/*[!_]*/*[!tests]*/*.js",
"public/*[!_]*/*[!tests]*/*.html"
],
lang: ['en', 'fr'],
dest: 'i18n',
moduleName: 'core'
}
},
// ...
});
}
// public/i18n/en.js
angular
.module('core')
.config(['$translateProvider', function($translateProvider) {
$translateProvider.translations('en', {
key1: 'trans1-en',
// ...
});
}]);
// public/i18n/fr.js
angular
.module('core')
.config(['$translateProvider', function($translateProvider) {
$translateProvider.translations('fr', {
key1: 'trans1-fr',
// ...
});
}]);
List files containing the translations.
Type: Array
Default:
[
"public/*[!_]*/*.js",
"public/*[!_]*/*[!tests]*/*.js",
"public/*[!_]*/*[!tests]*/*.html
]
Define used languages.
Type: Array
Default: ['en']
Name of the translations folder.
Type: String
Default: 'i18n'
Name of the angular module mainModule
.
Type: String
Default: 'core'
You will find the tests files into test
directory.
To run test use grunt test
Inspired from grunt-angular-translate.
The MIT License (MIT)
Copyright (c) 2015-2016 Nicolas Panel
FAQs
Grunt tasks to automatically extract translations from your djangularjs project
The npm package grunt-djangularjs-translate receives a total of 1 weekly downloads. As such, grunt-djangularjs-translate popularity was classified as not popular.
We found that grunt-djangularjs-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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.