awx/ui_next/src/util/strings.js
// TODO: switch to using Lingui i18n for pluralization
switch to using Lingui i18n for pluralization
switch to using Lingui i18n for pluralization
function pluralize(str) {
  const lastChar = str[str.length - 1];
  if (lastChar === 's') {
    return `${str}es`;
  }
  if (lastChar === 'y') {
    return `${str.substr(0, str.length - 1)}ies`;
  }
  return `${str}s`;
}
function pluralize ( str ) { const lastChar = str [ str . length - 1 ] ; if ( lastChar === 's' ) { return ` ${ str } ` ; } if ( lastChar === 'y' ) { return ` ${ str . substr ( 0 , str . length - 1 ) } ` ; } return ` ${ str } ` ; }
TODO: switch to using Lingui i18n for pluralization
TODO : switch to using Lingui i18n for pluralization