tasks/strip_code.js
function () {

            if (arguments.length === 0) {
                grunt.warn(strings[options.locale]['translate.param.missing']);
            }

            var key = arguments[0];

            if (!(key in strings[options.locale])) {
                grunt.warn(strings[options.locale]['string.key.missing'] + ': ' + key);
            }

            var string = strings[options.locale][key];

            for (var i = 1; i < arguments.length; i++) {
                var replacementKey = '%' + i;
                string = string.replace(replacementKey, arguments[i]);
            }

            return string;
        }
function () {

            if (arguments.length === 0) {
                grunt.warn(strings[options.locale]['translate.param.missing']);
            }

            var key = arguments[0];

            if (!(key in strings[options.locale])) {
                grunt.warn(strings[options.locale]['string.key.missing'] + ': ' + key);
            }

            var string = strings[options.locale][key];

            for (var i = 1; i < arguments.length; i++) {
                var replacementKey = '%' + i;
                string = string.replace(replacementKey, arguments[i]);
            }

            return string;
        }
function ( ) { if ( arguments . length === 0 ) { grunt . warn ( strings [ options . locale ] [ 'translate.param.missing' ] ) ; } var key = arguments [ 0 ] ; if ( ! ( key in strings [ options . locale ] ) ) { grunt . warn ( strings [ options . locale ] [ 'string.key.missing' ] + ': ' + key ) ; } var string = strings [ options . locale ] [ key ] ; for ( var i = 1 ; i < arguments . length ; i ++ ) { var replacementKey = '%' + i ; string = string . replace ( replacementKey , arguments [ i ] ) ; } return string ; }
Takes in dynamic parameters and expects first param to be a key for a string,
subsequent params will substitute the variables in the string
in the order they are declared.

For the string: "my.key": "I will do my %1 then my %2"
translate('my.key', 'first replacement', 'second replacement')
the first replacement argument will replace %1, second %2 and so on.

@param key string
Takes in dynamic parameters and expects first param to be a key for a string subsequent params will substitute the variables in the string in the order they are declared .