B2G/gecko/browser/components/places/src/PlacesUIUtils.jsm
/**
   * Get a localized plural string for the specified key name and numeric value
   * substituting parameters.
   *
   * @param   aKey
   *          String, key for looking up the localized string in the bundle
   * @param   aNumber
   *          Number based on which the final localized form is looked up
   * @param   aParams
   *          Array whose items will substitute #1, #2,... #n parameters
   *          in the string.
   *
   * @see https://developer.mozilla.org/en/Localization_and_Plurals
   * @return The localized plural string.
   */
Get a localized plural string for the specified key name and numeric value
substituting parameters.

@param   aKey
String, key for looking up the localized string in the bundle
@param   aNumber
Number based on which the final localized form is looked up
@param   aParams
Array whose items will substitute #1, #2,... #n parameters
in the string.


Get a localized plural string for the specified key name and numeric value substituting parameters . @param aKey String key for looking up the localized string in the bundle @param aNumber Number based on which the final localized form is looked up @param aParams Array whose items will substitute #1 #2 ... #n parameters in the string .
function PUIU_getPluralString(aKey, aNumber, aParams) {
    let str = PluralForm.get(aNumber, bundle.GetStringFromName(aKey));
    return str.replace(/\#(\d+)/g, function (matchedId, matchedNumber) {
      let param = aParams[parseInt(matchedNumber, 10) - 1];
      return param !== undefined ? param : matchedId;
    });
  }
function PUIU_getPluralString ( aKey , aNumber , aParams ) { let str = PluralForm . get ( aNumber , bundle . GetStringFromName ( aKey ) ) ; return str . replace ( / \#(\d+) / g , function ( matchedId , matchedNumber ) { let param = aParams [ parseInt ( matchedNumber , 10 ) - 1 ] ; return param !== undefined ? param : matchedId ; } ) ; }
Get a localized plural string for the specified key name and numeric value
 substituting parameters.
Get a localized plural string for the specified key name and numeric value substituting parameters .
// Replace #1 with aParams[0], #2 with aParams[1], and so on.