Skip to content

Commit

Permalink
Plan naming: Fix theme tiers badge (#85508)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsas authored and pull[bot] committed Feb 14, 2024
1 parent 70aec95 commit 4261519
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,20 @@ export default function ThemeTierBundledBadge() {
const tooltipContent = (
<>
<ThemeTierTooltipTracker />
<div data-testid="upsell-header" className="theme-tier-badge-tooltip__header">
{
// Translators: %(bundleName)s is the name of the bundle, sometimes represented as a product name. Examples: "WooCommerce" or "Special".
translate( '%(bundleName)s theme', { textOnly: true, args: { bundleName } } )
}
</div>
<div data-testid="upsell-message">
{ createInterpolateElement(
isEnglishLocale ||
i18n.hasTranslation(
'This %(bundleName)s theme is included in the <Link>%(businessPlanName)s plan</Link>.'
'This theme is included in the <Link>%(businessPlanName)s plan</Link>.'
)
? // Translators: %(bundleName)s is the name of the bundle, sometimes represented as a product name. Examples: "WooCommerce" or "Special".
translate(
'This %(bundleName)s theme is included in the <Link>%(businessPlanName)s plan</Link>.',
{
args: { bundleName },
textOnly: true,
? translate( 'This theme is included in the <Link>%(businessPlanName)s plan</Link>.', {
args: {
businessPlanName: getPlan( PLAN_BUSINESS )?.getTitle() ?? '',
}
)
: translate(
},
textOnly: true,
} )
: // Translators: %(bundleName)s is the name of the bundle, sometimes represented as a product name. Examples: "WooCommerce" or "Special".
translate(
'This %(bundleName)s theme is included in the <Link>Business plan</Link>.',
{
args: { bundleName },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ export default function ThemeTierCommunityBadge() {
const tooltipContent = (
<>
<ThemeTierTooltipTracker />
<div data-testid="upsell-header" className="theme-tier-badge-tooltip__header">
{ translate( 'Community theme', {
context: 'This theme is developed and supported by a community',
textOnly: true,
} ) }
</div>
<div data-testid="upsell-message">
{ createInterpolateElement(
isEnglishLocale ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ export default function ThemeTierPartnerBadge() {
const tooltipContent = (
<>
<ThemeTierTooltipTracker />
<div data-testid="upsell-header" className="theme-tier-badge-tooltip__header">
{ translate( 'Partner theme', {
context: 'This theme is developed and supported by a theme partner',
textOnly: true,
} ) }
</div>
<div data-testid="upsell-message">{ getTooltipMessage() }</div>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,10 @@ export default function ThemeTierUpgradeBadge() {
const tooltipContent = (
<>
<ThemeTierTooltipTracker />
<div data-testid="upsell-header" className="theme-tier-badge-tooltip__header">
{
// Translators: %(planName)s is the name of the plan that includes this theme. Examples: "Personal" or "Premium".
translate( '%(planName)s theme', { textOnly: true, args: { planName } } )
}
</div>
<div data-testid="upsell-message">
{ createInterpolateElement(
// Translators: %(planName)s is the name of the plan that includes this theme. Examples: "Personal" or "Premium".
translate( 'This %(planName)s theme is included in the <Link>%(planName)s plan</Link>.', {
translate( 'This theme is included in the <Link>%(planName)s plan</Link>.', {
args: { planName },
textOnly: true,
} ),
Expand Down

0 comments on commit 4261519

Please sign in to comment.