UNPKG

@automattic/calypso-products

Version:

This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.

17 lines (14 loc) 505 B
import { translate } from 'i18n-calypso'; export function getAkismetPro500ProductDisplayName( productName: string, quantity: number | null ) { if ( quantity && quantity > 1 ) { /* translators: %s is the product name "Akismet Pro", %d is a number of requests/month */ return translate( '%(productName)s (%(requests)d requests/month)', { args: { productName: productName.replace( /\s*\(.*$/, '' ).trim(), requests: 500 * quantity, }, textOnly: true, } ); } return productName; }