code: function substIndexes(str, args, key, prop) {
      var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/;
      var reMatch = reIndex.exec(str);
      if (!reMatch || !reMatch.length)
        return str;
  
      // an index/macro has been found
      // Note: at the moment, only one parameter is supported
      var macroName = reMatch[1];
      var paramName = reMatch[2];
      var param;
      if (args && paramName in args) {
        param = args[paramName];
      } else if (paramName in gL10nData) {
        param = gL10nData[paramName];
      }
  
      // there's no macro parser yet: it has to be defined in gMacros
      if (macroName in gMacros) {
        var macro = gMacros[macroName];
        str = macro(str, param, key, prop);
      }
      return str;
    }
docs: replace {[macros]} with their values