Skip to content

Commit

Permalink
remove translation checks (#82937)
Browse files Browse the repository at this point in the history
  • Loading branch information
niranjan-uma-shankar authored Oct 24, 2023
1 parent 8fa99e5 commit fd9c9f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
17 changes: 4 additions & 13 deletions client/my-sites/plans-grid/components/comparison-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import {
getPlans,
} from '@automattic/calypso-products';
import { Gridicon, JetpackLogo } from '@automattic/components';
import { useIsEnglishLocale } from '@automattic/i18n-utils';
import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { useMemo } from '@wordpress/element';
import classNames from 'classnames';
import i18n, { useTranslate } from 'i18n-calypso';
import { useTranslate } from 'i18n-calypso';
import { useState, useCallback, useEffect, ChangeEvent, Dispatch, SetStateAction } from 'react';
import { useIsPlanUpgradeCreditVisible } from 'calypso/my-sites/plans-grid/hooks/use-is-plan-upgrade-credit-visible';
import { useManageTooltipToggle } from 'calypso/my-sites/plans-grid/hooks/use-manage-tooltip-toggle';
Expand Down Expand Up @@ -735,10 +734,6 @@ const ComparisonGridFeatureGroupRow: React.FunctionComponent< {
const featureSlug = feature?.getSlug() ?? '';
const footnote = planFeatureFootnotes?.footnotesByFeature?.[ featureSlug ];
const tooltipId = `${ feature?.getSlug() }-comparison-grid`;
const isEnglishLocale = useIsEnglishLocale();
const shouldShowNewJPTooltipCopy =
isEnglishLocale ||
i18n.hasTranslation( 'Security, performance, and growth tools—powered by Jetpack.' );

return (
<Row
Expand Down Expand Up @@ -776,13 +771,9 @@ const ComparisonGridFeatureGroupRow: React.FunctionComponent< {
{ allJetpackFeatures.has( feature.getSlug() ) ? (
<JetpackIconContainer>
<Plans2023Tooltip
text={
shouldShowNewJPTooltipCopy
? translate(
'Security, performance, and growth tools—powered by Jetpack.'
)
: ''
}
text={ translate(
'Security, performance, and growth tools—powered by Jetpack.'
) }
setActiveTooltipId={ setActiveTooltipId }
activeTooltipId={ activeTooltipId }
id={ `jp-${ tooltipId }` }
Expand Down
15 changes: 2 additions & 13 deletions client/my-sites/plans-grid/components/plan-features-container.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { JetpackLogo } from '@automattic/components';
import { useIsEnglishLocale } from '@automattic/i18n-utils';
import i18n, { LocalizeProps } from 'i18n-calypso';
import { LocalizeProps } from 'i18n-calypso';
import { useManageTooltipToggle } from 'calypso/my-sites/plans-grid/hooks/use-manage-tooltip-toggle';
import { DataResponse } from '../types';
import PlanFeatures2023GridFeatures from './features';
Expand Down Expand Up @@ -28,10 +27,6 @@ const PlanFeaturesContainer: React.FC< {
isTableCell,
} ) => {
const [ activeTooltipId, setActiveTooltipId ] = useManageTooltipToggle();
const isEnglishLocale = useIsEnglishLocale();
const shouldShowNewJPTooltipCopy =
isEnglishLocale ||
i18n.hasTranslation( 'Security, performance, and growth tools—powered by Jetpack.' );

return plansWithFeatures.map(
( { planSlug, features: { wpcomFeatures, jetpackFeatures } }, mapIndex ) => {
Expand All @@ -55,13 +50,7 @@ const PlanFeaturesContainer: React.FC< {
{ jetpackFeatures.length !== 0 && (
<div className="plan-features-2023-grid__jp-logo" key="jp-logo">
<Plans2023Tooltip
text={
shouldShowNewJPTooltipCopy
? translate( 'Security, performance, and growth tools—powered by Jetpack.' )
: translate(
'Security, performance and growth tools made by the WordPress experts.'
)
}
text={ translate( 'Security, performance, and growth tools—powered by Jetpack.' ) }
setActiveTooltipId={ setActiveTooltipId }
activeTooltipId={ activeTooltipId }
id={ `${ planSlug }-jp-logo-${ mapIndex }` }
Expand Down

0 comments on commit fd9c9f4

Please sign in to comment.