added missing modules for makepot task + added suport for plural forms in html templates + added all major i18n methods in twig
This commit is contained in:
30
tasks/makepot/node_modules/load-grunt-tasks/node_modules/multimatch/index.js
generated
vendored
Normal file
30
tasks/makepot/node_modules/load-grunt-tasks/node_modules/multimatch/index.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
var minimatch = require('minimatch');
|
||||
var union = require('array-union');
|
||||
var diff = require('array-differ');
|
||||
|
||||
function arrayify(arr) {
|
||||
return Array.isArray(arr) ? arr : [arr];
|
||||
}
|
||||
|
||||
module.exports = function (list, patterns, options) {
|
||||
list = arrayify(list);
|
||||
patterns = arrayify(patterns);
|
||||
|
||||
if (list.length === 0 || patterns.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
return patterns.reduce(function (ret, pattern) {
|
||||
var process = union;
|
||||
|
||||
if (pattern[0] === '!') {
|
||||
pattern = pattern.slice(1);
|
||||
process = diff;
|
||||
}
|
||||
|
||||
return process(ret, minimatch.match(list, pattern, options));
|
||||
}, []);
|
||||
};
|
Reference in New Issue
Block a user