From b8cad3e90e2889cf0315374c3dc256a194bef7e7 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 27 Nov 2024 12:40:23 -0500 Subject: [PATCH] js-packages: Fix textdomains We have a bunch of packages that, for historical reasons, use "jetpack" rather than a unique text domain. Fix them now. --- projects/js-packages/components/.eslintrc.cjs | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../components/action-button/index.jsx | 2 +- .../components/action-popover/index.tsx | 2 +- .../components/admin-page/index.tsx | 2 +- .../automattic-byline-logo/index.tsx | 2 +- .../components/boost-score-bar/index.tsx | 4 +- .../components/boost-score-graph/tooltip.tsx | 32 ++++--- .../boost-score-graph/uplot-line-chart.tsx | 6 +- .../components/components/button/index.tsx | 2 +- .../components/copy-to-clipboard/index.tsx | 4 +- .../components/components/gridicon/index.tsx | 38 ++++---- .../indeterminate-progress-bar/index.tsx | 2 +- .../components/jetpack-footer/index.tsx | 20 ++--- .../components/jetpack-logo/index.tsx | 2 +- .../components/jetpack-protect-logo/index.tsx | 2 +- .../components/jetpack-search-logo/index.tsx | 2 +- .../jetpack-vaultpress-backup-logo/index.tsx | 2 +- .../jetpack-videopress-logo/index.tsx | 4 +- .../components/pricing-card/index.tsx | 4 +- .../components/pricing-table/index.tsx | 12 +-- .../components/product-offer/index.tsx | 6 +- .../product-offer/product-offer-header.tsx | 2 +- .../components/product-price/index.tsx | 4 +- .../components/record-meter-bar/index.tsx | 6 +- .../components/components/status/index.tsx | 10 +-- .../components/terms-of-service/index.tsx | 6 +- .../components/threat-fixer-button/index.tsx | 8 +- .../threat-modal/fixer-state-notice.tsx | 12 +-- .../threat-modal/threat-actions.tsx | 6 +- .../threat-modal/threat-fix-confirmation.tsx | 10 +-- .../threat-modal/threat-fix-details.tsx | 15 ++-- .../components/threat-modal/threat-notice.tsx | 4 +- .../threat-modal/threat-summary.tsx | 2 +- .../threat-modal/threat-technical-details.tsx | 6 +- .../threat-severity-badge/index.tsx | 8 +- .../threats-data-views/constants.ts | 14 +-- .../components/threats-data-views/index.tsx | 40 ++++----- .../threats-status-toggle-group-control.tsx | 4 +- projects/js-packages/connection/.eslintrc.cjs | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../components/connect-button/index.jsx | 2 +- .../components/connect-screen/basic/index.tsx | 5 +- .../connect-screen/basic/visual.tsx | 27 +++--- .../connect-screen/required-plan/index.jsx | 7 +- .../connect-screen/required-plan/visual.jsx | 25 +++--- .../components/connected-plugins/index.jsx | 2 +- .../connection-error-notice/index.jsx | 6 +- .../components/disconnect-dialog/index.jsx | 2 +- .../steps/step-disconnect-confirm.jsx | 10 +-- .../steps/step-disconnect.jsx | 26 ++++-- .../disconnect-dialog/steps/step-survey.jsx | 6 +- .../steps/step-thank-you.jsx | 6 +- .../components/disconnect-survey/index.jsx | 25 ++++-- .../components/in-place-connection/index.jsx | 2 +- .../manage-connection-dialog/index.jsx | 12 +-- projects/js-packages/idc/.eslintrc.cjs | 3 +- .../idc/changelog/fix-js-package-textdomains | 4 + .../idc/components/card-fresh/index.jsx | 10 +-- .../idc/components/card-migrate/index.jsx | 8 +- .../idc/components/idc-screen/screen-main.jsx | 10 +-- .../components/idc-screen/screen-migrated.jsx | 6 +- .../idc-screen/screen-non-admin.jsx | 9 +- .../idc/components/idc-screen/visual.jsx | 2 +- .../idc/components/safe-mode/index.jsx | 14 +-- projects/js-packages/licensing/.eslintrc.cjs | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../activation-screen-controls/index.jsx | 18 ++-- .../use-get-error-content.tsx | 48 ++++++---- .../activation-screen-illustration/index.jsx | 9 +- .../primary-link/index.jsx | 8 +- .../product-details/index.js | 40 ++++----- .../product-link/index.jsx | 10 +-- .../components/activation-screen/index.jsx | 11 ++- .../components/golden-token-modal/index.jsx | 26 +++--- .../js-packages/partner-coupon/.eslintrc.cjs | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../index.jsx | 13 +-- .../index.jsx | 11 ++- .../publicize-components/.eslintrc.js | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../connection-management/connection-info.tsx | 6 +- .../connection-management/connection-name.tsx | 5 +- .../connection-status.tsx | 9 +- .../connection-management/disconnect.tsx | 17 ++-- .../connection-management/index.tsx | 4 +- .../connection-management/mark-as-shared.tsx | 2 +- .../connection-management/reconnect.tsx | 4 +- .../src/components/connection/index.js | 4 +- .../form/broken-connections-notice.tsx | 20 +++-- .../src/components/form/connection-notice.tsx | 10 ++- .../form/enabled-connections-notice.tsx | 2 +- .../form/enhanced-features-nudge.tsx | 2 +- .../form/instagram-no-media-notice.tsx | 8 +- .../form/media-requirements-notice.tsx | 21 +++-- .../src/components/form/settings-button.tsx | 2 +- .../form/unsupported-connections-notice.tsx | 2 +- .../generated-image-preview/index.js | 8 +- .../confirmation-form/index.tsx | 26 +++--- .../manage-connections-modal/index.tsx | 8 +- .../src/components/manual-sharing/index.tsx | 2 +- .../src/components/manual-sharing/info.tsx | 4 +- .../src/components/media-picker/index.js | 8 +- .../src/components/media-section/index.js | 12 +-- .../components/message-box-control/index.js | 11 ++- .../src/components/notice/index.js | 4 +- .../src/components/panel/index.jsx | 6 +- .../post-publish-manual-sharing/index.jsx | 2 +- .../share-status.tsx | 19 ++-- .../src/components/review-prompt/index.jsx | 15 ++-- .../src/components/services/connect-form.tsx | 4 +- .../src/components/services/custom-inputs.tsx | 39 +++++--- .../services/service-connection-info.tsx | 7 +- .../src/components/services/service-item.tsx | 8 +- .../components/services/service-status.tsx | 13 ++- .../components/services/use-request-access.ts | 12 ++- .../services/use-supported-services.tsx | 90 +++++++++++++------ .../share-buttons/available-networks.tsx | 6 +- .../share-buttons/share-buttons.tsx | 4 +- .../src/components/share-post/index.jsx | 10 ++- .../components/share-status/modal-trigger.tsx | 2 +- .../src/components/share-status/modal.tsx | 2 +- .../src/components/share-status/retry.tsx | 10 ++- .../share-status/share-status-action.tsx | 2 +- .../share-status/share-status-label.tsx | 6 +- .../share-status/shares-dataview.tsx | 8 +- .../social-image-generator/panel/index.js | 34 +++++-- .../social-image-generator/panel/modal.js | 24 ++--- .../template-picker/button/index.tsx | 2 +- .../template-picker/modal/index.js | 9 +- .../template-picker/picker/index.js | 7 +- .../components/social-post-modal/modal.tsx | 6 +- .../social-post-modal/post-preview.tsx | 2 +- .../social-post-modal/preview-section.tsx | 4 +- .../social-post-modal/settings-section.tsx | 7 +- .../components/social-previews/instagram.js | 6 +- .../components/social-previews/linkedin.js | 2 +- .../src/components/social-previews/modal.js | 2 +- .../src/components/social-previews/panel.js | 10 ++- .../social-previews/use-available-services.js | 20 ++--- .../social-previews/use-post-data.js | 2 +- .../hooks/use-media-restrictions/constants.ts | 10 +-- .../hooks/use-save-image-to-library/index.ts | 14 ++- .../src/hooks/use-share-post/index.js | 10 +-- .../social-store/actions/connection-data.ts | 30 ++++--- .../src/social-store/resolvers.ts | 2 +- .../shared-extension-utils/.eslintrc.cjs | 3 +- .../changelog/fix-js-package-textdomains | 4 + .../shared-extension-utils/src/plan-utils.js | 4 +- projects/js-packages/storybook/.eslintrc.cjs | 10 --- .../changelog/fix-js-package-textdomains | 5 ++ 151 files changed, 860 insertions(+), 600 deletions(-) create mode 100644 projects/js-packages/components/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/connection/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/idc/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/licensing/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/partner-coupon/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/publicize-components/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/shared-extension-utils/changelog/fix-js-package-textdomains create mode 100644 projects/js-packages/storybook/changelog/fix-js-package-textdomains diff --git a/projects/js-packages/components/.eslintrc.cjs b/projects/js-packages/components/.eslintrc.cjs index 9915662c613ee..17efe12ad9b08 100644 --- a/projects/js-packages/components/.eslintrc.cjs +++ b/projects/js-packages/components/.eslintrc.cjs @@ -5,8 +5,7 @@ module.exports = { '@wordpress/i18n-text-domain': [ 'error', { - // @todo: Change this to something not "jetpack". - allowedTextDomain: 'jetpack', + allowedTextDomain: 'jetpack-components', }, ], }, diff --git a/projects/js-packages/components/changelog/fix-js-package-textdomains b/projects/js-packages/components/changelog/fix-js-package-textdomains new file mode 100644 index 0000000000000..54ff0aca3f685 --- /dev/null +++ b/projects/js-packages/components/changelog/fix-js-package-textdomains @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +Changed text domain from 'jetpack' to 'jetpack-components'. diff --git a/projects/js-packages/components/components/action-button/index.jsx b/projects/js-packages/components/components/action-button/index.jsx index 42d366eaf2fa0..176a94c101df7 100644 --- a/projects/js-packages/components/components/action-button/index.jsx +++ b/projects/js-packages/components/components/action-button/index.jsx @@ -30,7 +30,7 @@ const ActionButton = props => { loadingText, isDisabled, displayError = false, - errorMessage = __( 'An error occurred. Please try again.', 'jetpack' ), + errorMessage = __( 'An error occurred. Please try again.', 'jetpack-components' ), customClass, } = props; diff --git a/projects/js-packages/components/components/action-popover/index.tsx b/projects/js-packages/components/components/action-popover/index.tsx index 3a86fa4db2b79..b9031f3b46583 100644 --- a/projects/js-packages/components/components/action-popover/index.tsx +++ b/projects/js-packages/components/components/action-popover/index.tsx @@ -54,7 +54,7 @@ const ActionPopover = ( { if ( showSteps ) { stepsText = sprintf( /* translators: 1 Current step, 2 Total steps */ - __( '%1$d of %2$d', 'jetpack' ), + __( '%1$d of %2$d', 'jetpack-components' ), step, totalSteps ); diff --git a/projects/js-packages/components/components/admin-page/index.tsx b/projects/js-packages/components/components/admin-page/index.tsx index 8ce477b8d9d21..4e072a791748e 100644 --- a/projects/js-packages/components/components/admin-page/index.tsx +++ b/projects/js-packages/components/components/admin-page/index.tsx @@ -18,7 +18,7 @@ import type React from 'react'; */ const AdminPage: React.FC< AdminPageProps > = ( { children, - moduleName = __( 'Jetpack', 'jetpack' ), + moduleName = __( 'Jetpack', 'jetpack-components' ), moduleNameHref, showHeader = true, showFooter = true, diff --git a/projects/js-packages/components/components/automattic-byline-logo/index.tsx b/projects/js-packages/components/components/automattic-byline-logo/index.tsx index caff7fa9ef853..1b1f7a8b92fe8 100644 --- a/projects/js-packages/components/components/automattic-byline-logo/index.tsx +++ b/projects/js-packages/components/components/automattic-byline-logo/index.tsx @@ -10,7 +10,7 @@ import { AutomatticBylineLogoProps } from './types'; * @return {React.ReactNode} AutomatticBylineLogo component. */ const AutomatticBylineLogo: React.FC< AutomatticBylineLogoProps > = ( { - title = __( 'An Automattic Airline', 'jetpack' ), + title = __( 'An Automattic Airline', 'jetpack-components' ), height = 7, className, ...otherProps diff --git a/projects/js-packages/components/components/boost-score-bar/index.tsx b/projects/js-packages/components/components/boost-score-bar/index.tsx index 8bfffec036a70..6bf0119947226 100644 --- a/projects/js-packages/components/components/boost-score-bar/index.tsx +++ b/projects/js-packages/components/components/boost-score-bar/index.tsx @@ -20,8 +20,8 @@ export const BoostScoreBar: FunctionComponent< BoostScoreBarProps > = ( { } const prevScoreOffset = ( prevScore / score ) * 100; - const desktopIconLabel = __( 'Desktop score', 'jetpack' ); - const mobileIconLabel = __( 'Mobile score', 'jetpack' ); + const desktopIconLabel = __( 'Desktop score', 'jetpack-components' ); + const mobileIconLabel = __( 'Mobile score', 'jetpack-components' ); const getIcon = () => { if ( scoreBarType === 'desktop' ) { diff --git a/projects/js-packages/components/components/boost-score-graph/tooltip.tsx b/projects/js-packages/components/components/boost-score-graph/tooltip.tsx index dad28ece27a57..8acde43d1ee7d 100644 --- a/projects/js-packages/components/components/boost-score-graph/tooltip.tsx +++ b/projects/js-packages/components/components/boost-score-graph/tooltip.tsx @@ -31,69 +31,79 @@ export const Tooltip: FunctionComponent = ( { period }: { period: Period } ) =>
{ date }
-
{ __( 'Overall score', 'jetpack' ) }
+
+ { __( 'Overall score', 'jetpack-components' ) } +
{ scoreLetter }

-
{ __( 'Desktop score', 'jetpack' ) }
+
+ { __( 'Desktop score', 'jetpack-components' ) } +
{ /* translators: %d is the score */ - sprintf( __( '%d / 100', 'jetpack' ), desktop_overall_score ) + sprintf( __( '%d / 100', 'jetpack-components' ), desktop_overall_score ) }
{ typeof desktop_lcp === 'number' && (
- { __( 'Largest Contentful Paint', 'jetpack' ) } + { __( 'Largest Contentful Paint', 'jetpack-components' ) }
{ sprintf( '%0.2fs', desktop_lcp ) }
) } { typeof desktop_tbt === 'number' && (
-
{ __( 'Total Blocking Time', 'jetpack' ) }
+
+ { __( 'Total Blocking Time', 'jetpack-components' ) } +
{ sprintf( '%0.2fs', desktop_tbt ) }
) } { typeof desktop_cls === 'number' && (
- { __( 'Cumulative Layout Shift', 'jetpack' ) } + { __( 'Cumulative Layout Shift', 'jetpack-components' ) }
{ sprintf( '%0.2f', desktop_cls ) }
) }
-
{ __( 'Mobile score', 'jetpack' ) }
+
+ { __( 'Mobile score', 'jetpack-components' ) } +
{ /* translators: %d is the score */ - sprintf( __( '%d / 100', 'jetpack' ), mobile_overall_score ) + sprintf( __( '%d / 100', 'jetpack-components' ), mobile_overall_score ) }
{ typeof mobile_lcp === 'number' && (
- { __( 'Largest Contentful Paint', 'jetpack' ) } + { __( 'Largest Contentful Paint', 'jetpack-components' ) }
{ sprintf( '%0.2fs', mobile_lcp ) }
) } { typeof mobile_tbt === 'number' && (
-
{ __( 'Total Blocking Time', 'jetpack' ) }
+
+ { __( 'Total Blocking Time', 'jetpack-components' ) } +
{ sprintf( '%0.2fs', mobile_tbt ) }
) } { typeof mobile_cls === 'number' && (
- { __( 'Cumulative Layout Shift', 'jetpack' ) } + { __( 'Cumulative Layout Shift', 'jetpack-components' ) }
{ sprintf( '%0.2f', mobile_cls ) }
diff --git a/projects/js-packages/components/components/boost-score-graph/uplot-line-chart.tsx b/projects/js-packages/components/components/boost-score-graph/uplot-line-chart.tsx index 86908cb4137b5..315762d4fb4fa 100644 --- a/projects/js-packages/components/components/boost-score-graph/uplot-line-chart.tsx +++ b/projects/js-packages/components/components/boost-score-graph/uplot-line-chart.tsx @@ -151,7 +151,7 @@ export default function UplotLineChart( { range, periods, annotations = [] }: Up }, series: [ { - label: __( 'Date', 'jetpack' ), + label: __( 'Date', 'jetpack-components' ), value: ( self: uPlot, rawValue: number ) => { // outputs legend content - value available when mouse is hovering the chart if ( ! rawValue ) { @@ -161,8 +161,8 @@ export default function UplotLineChart( { range, periods, annotations = [] }: Up return date.toLocaleDateString( getUserLocale() ); }, }, - createSerieInfo( __( 'Desktop', 'jetpack' ), lastDesktopScore ), - createSerieInfo( __( 'Mobile', 'jetpack' ), lastMobileScore ), + createSerieInfo( __( 'Desktop', 'jetpack-components' ), lastDesktopScore ), + createSerieInfo( __( 'Mobile', 'jetpack-components' ), lastMobileScore ), ], scales: { x: { diff --git a/projects/js-packages/components/components/button/index.tsx b/projects/js-packages/components/components/button/index.tsx index d7f0e608c5a81..8b5b9a7b74db7 100644 --- a/projects/js-packages/components/components/button/index.tsx +++ b/projects/js-packages/components/components/button/index.tsx @@ -55,7 +55,7 @@ const Button = forwardRef< HTMLInputElement, ButtonProps >( ( props, ref ) => { { /* translators: accessibility text */ - __( '(opens in a new tab)', 'jetpack' ) + __( '(opens in a new tab)', 'jetpack-components' ) } diff --git a/projects/js-packages/components/components/copy-to-clipboard/index.tsx b/projects/js-packages/components/components/copy-to-clipboard/index.tsx index 96b7209958551..dcc09baa5fb3c 100644 --- a/projects/js-packages/components/components/copy-to-clipboard/index.tsx +++ b/projects/js-packages/components/components/copy-to-clipboard/index.tsx @@ -47,10 +47,10 @@ export const CopyToClipboard: React.FC< CopyToClipboardProps > = ( { icon = hasCopied ? : ; } - const defaultLabel = __( 'Copy to clipboard', 'jetpack' ); + const defaultLabel = __( 'Copy to clipboard', 'jetpack-components' ); if ( 'icon' !== buttonStyle ) { - label = hasCopied ? __( 'Copied!', 'jetpack' ) : defaultLabel; + label = hasCopied ? __( 'Copied!', 'jetpack-components' ) : defaultLabel; } return ( diff --git a/projects/js-packages/components/components/gridicon/index.tsx b/projects/js-packages/components/components/gridicon/index.tsx index a7ac1de035563..ee5ac19d3f915 100644 --- a/projects/js-packages/components/components/gridicon/index.tsx +++ b/projects/js-packages/components/components/gridicon/index.tsx @@ -48,45 +48,45 @@ class Gridicon extends Component< GridiconProps > { default: return ''; case 'gridicons-audio': - return __( 'Has audio.', 'jetpack' ); + return __( 'Has audio.', 'jetpack-components' ); case 'gridicons-arrow-left': - return __( 'Arrow left', 'jetpack' ); + return __( 'Arrow left', 'jetpack-components' ); case 'gridicons-arrow-right': - return __( 'Arrow right', 'jetpack' ); + return __( 'Arrow right', 'jetpack-components' ); case 'gridicons-calendar': - return __( 'Is an event.', 'jetpack' ); + return __( 'Is an event.', 'jetpack-components' ); case 'gridicons-cart': - return __( 'Is a product.', 'jetpack' ); + return __( 'Is a product.', 'jetpack-components' ); case 'chevron-down': - return __( 'Show filters', 'jetpack' ); + return __( 'Show filters', 'jetpack-components' ); case 'gridicons-comment': - return __( 'Matching comment.', 'jetpack' ); + return __( 'Matching comment.', 'jetpack-components' ); case 'gridicons-cross': - return __( 'Close.', 'jetpack' ); + return __( 'Close.', 'jetpack-components' ); case 'gridicons-filter': - return __( 'Toggle search filters.', 'jetpack' ); + return __( 'Toggle search filters.', 'jetpack-components' ); case 'gridicons-folder': - return __( 'Category', 'jetpack' ); + return __( 'Category', 'jetpack-components' ); case 'gridicons-help-outline': - return __( 'Help', 'jetpack' ); + return __( 'Help', 'jetpack-components' ); case 'gridicons-info': case 'gridicons-info-outline': - return __( 'Information.', 'jetpack' ); + return __( 'Information.', 'jetpack-components' ); case 'gridicons-image-multiple': - return __( 'Has multiple images.', 'jetpack' ); + return __( 'Has multiple images.', 'jetpack-components' ); case 'gridicons-image': - return __( 'Has an image.', 'jetpack' ); + return __( 'Has an image.', 'jetpack-components' ); case 'gridicons-page': - return __( 'Page', 'jetpack' ); + return __( 'Page', 'jetpack-components' ); case 'gridicons-post': - return __( 'Post', 'jetpack' ); + return __( 'Post', 'jetpack-components' ); case 'gridicons-jetpack-search': case 'gridicons-search': - return __( 'Magnifying Glass', 'jetpack' ); + return __( 'Magnifying Glass', 'jetpack-components' ); case 'gridicons-tag': - return __( 'Tag', 'jetpack' ); + return __( 'Tag', 'jetpack-components' ); case 'gridicons-video': - return __( 'Has a video.', 'jetpack' ); + return __( 'Has a video.', 'jetpack-components' ); } } diff --git a/projects/js-packages/components/components/indeterminate-progress-bar/index.tsx b/projects/js-packages/components/components/indeterminate-progress-bar/index.tsx index 2ac01bbba8f3b..c6d666b547902 100644 --- a/projects/js-packages/components/components/indeterminate-progress-bar/index.tsx +++ b/projects/js-packages/components/components/indeterminate-progress-bar/index.tsx @@ -20,7 +20,7 @@ const IndeterminateProgressBar: React.FC< IndeterminateProgressBarProps > = ( { return (
); }; diff --git a/projects/js-packages/components/components/jetpack-footer/index.tsx b/projects/js-packages/components/components/jetpack-footer/index.tsx index fa08c416eefdf..9fe15ada5241c 100644 --- a/projects/js-packages/components/components/jetpack-footer/index.tsx +++ b/projects/js-packages/components/components/jetpack-footer/index.tsx @@ -22,7 +22,7 @@ const ExternalIcon: React.FC = () => ( { /* translators: accessibility text */ - __( '(opens in a new tab)', 'jetpack' ) + __( '(opens in a new tab)', 'jetpack-components' ) } @@ -35,7 +35,7 @@ const ExternalIcon: React.FC = () => ( * @return {React.ReactNode} JetpackFooter component. */ const JetpackFooter: React.FC< JetpackFooterProps > = ( { - moduleName = __( 'Jetpack', 'jetpack' ), + moduleName = __( 'Jetpack', 'jetpack-components' ), className, moduleNameHref = 'https://jetpack.com', menu, @@ -69,8 +69,8 @@ const JetpackFooter: React.FC< JetpackFooterProps > = ( { let items: JetpackFooterMenuItem[] = [ { - label: _x( 'About', 'Link to learn more about Jetpack.', 'jetpack' ), - title: __( 'About Jetpack', 'jetpack' ), + label: _x( 'About', 'Link to learn more about Jetpack.', 'jetpack-components' ), + title: __( 'About Jetpack', 'jetpack-components' ), href: areAdminLinksEnabled ? new URL( 'admin.php?page=jetpack_about', siteAdminUrl ).href : getRedirectUrl( 'jetpack-about' ), @@ -78,8 +78,8 @@ const JetpackFooter: React.FC< JetpackFooterProps > = ( { onClick: onAboutClick, }, { - label: _x( 'Privacy', 'Shorthand for Privacy Policy.', 'jetpack' ), - title: __( "Automattic's Privacy Policy", 'jetpack' ), + label: _x( 'Privacy', 'Shorthand for Privacy Policy.', 'jetpack-components' ), + title: __( "Automattic's Privacy Policy", 'jetpack-components' ), href: areAdminLinksEnabled ? new URL( 'admin.php?page=jetpack#/privacy', siteAdminUrl ).href : getRedirectUrl( 'a8c-privacy' ), @@ -87,8 +87,8 @@ const JetpackFooter: React.FC< JetpackFooterProps > = ( { onClick: onPrivacyClick, }, { - label: _x( 'Terms', 'Shorthand for Terms of Service.', 'jetpack' ), - title: __( 'WordPress.com Terms of Service', 'jetpack' ), + label: _x( 'Terms', 'Shorthand for Terms of Service.', 'jetpack-components' ), + title: __( 'WordPress.com Terms of Service', 'jetpack-components' ), href: getRedirectUrl( 'wpcom-tos' ), target: '_blank', onClick: onTermsClick, @@ -117,7 +117,7 @@ const JetpackFooter: React.FC< JetpackFooterProps > = ( { }, className ) } - aria-label={ __( 'Jetpack', 'jetpack' ) } + aria-label={ __( 'Jetpack', 'jetpack-components' ) } { ...otherProps } >
    @@ -160,7 +160,7 @@ const JetpackFooter: React.FC< JetpackFooterProps > = ( { ? new URL( 'admin.php?page=jetpack_about', siteAdminUrl ).href : getRedirectUrl( 'a8c-about' ) } - aria-label={ __( 'An Automattic Airline', 'jetpack' ) } + aria-label={ __( 'An Automattic Airline', 'jetpack-components' ) } >
diff --git a/projects/js-packages/components/components/product-offer/product-offer-header.tsx b/projects/js-packages/components/components/product-offer/product-offer-header.tsx index 141e315578de2..d4b24ff240245 100644 --- a/projects/js-packages/components/components/product-offer/product-offer-header.tsx +++ b/projects/js-packages/components/components/product-offer/product-offer-header.tsx @@ -12,7 +12,7 @@ import type React from 'react'; * @return {React.ReactNode} ProductOfferHeader react component. */ export const ProductOfferHeader: React.FC< ProductOfferHeaderProps > = ( { - title = __( 'Popular upgrade', 'jetpack' ), + title = __( 'Popular upgrade', 'jetpack-components' ), } ) => { return (
diff --git a/projects/js-packages/components/components/product-price/index.tsx b/projects/js-packages/components/components/product-price/index.tsx index edfbf6a6fa0ff..52c44c509aab3 100644 --- a/projects/js-packages/components/components/product-price/index.tsx +++ b/projects/js-packages/components/components/product-price/index.tsx @@ -25,7 +25,7 @@ const ProductPrice: React.FC< ProductPriceProps > = ( { showNotOffPrice = true, hideDiscountLabel = true, promoLabel = '', - legend = __( '/month, paid yearly', 'jetpack' ), + legend = __( '/month, paid yearly', 'jetpack-components' ), isNotConvenientPrice = false, hidePriceFraction = false, children, @@ -43,7 +43,7 @@ const ProductPrice: React.FC< ProductPriceProps > = ( { const showDiscountLabel = ! hideDiscountLabel && discount && discount > 0; - const discountElt = showDiscountLabel ? discount + __( '% off', 'jetpack' ) : null; + const discountElt = showDiscountLabel ? discount + __( '% off', 'jetpack-components' ) : null; return ( <> diff --git a/projects/js-packages/components/components/record-meter-bar/index.tsx b/projects/js-packages/components/components/record-meter-bar/index.tsx index 8bf072645a6af..48174a326f753 100644 --- a/projects/js-packages/components/components/record-meter-bar/index.tsx +++ b/projects/js-packages/components/components/record-meter-bar/index.tsx @@ -139,11 +139,11 @@ const RecordMeterBar: React.FC< RecordMeterBarProps > = ( {
- + - - + + { itemsToRender.map( ( { label, count } ) => { return ( diff --git a/projects/js-packages/components/components/status/index.tsx b/projects/js-packages/components/components/status/index.tsx index 8b891c2bc608c..868db79a2bdd9 100644 --- a/projects/js-packages/components/components/status/index.tsx +++ b/projects/js-packages/components/components/status/index.tsx @@ -11,11 +11,11 @@ interface StatusProps { const Status = ( { className, label, status = 'inactive' }: StatusProps ): React.JSX.Element => { const defaultLabels: Record< string, string > = { - active: __( 'Active', 'jetpack' ), - error: __( 'Error', 'jetpack' ), - action: __( 'Action needed', 'jetpack' ), - inactive: __( 'Inactive', 'jetpack' ), - initializing: __( 'Setting up', 'jetpack' ), + active: __( 'Active', 'jetpack-components' ), + error: __( 'Error', 'jetpack-components' ), + action: __( 'Action needed', 'jetpack-components' ), + inactive: __( 'Inactive', 'jetpack-components' ), + initializing: __( 'Setting up', 'jetpack-components' ), }; return ( diff --git a/projects/js-packages/components/components/terms-of-service/index.tsx b/projects/js-packages/components/components/terms-of-service/index.tsx index 57a94f9730ce4..fd57992febbbf 100644 --- a/projects/js-packages/components/components/terms-of-service/index.tsx +++ b/projects/js-packages/components/components/terms-of-service/index.tsx @@ -28,7 +28,7 @@ const MultipleButtonsText = ( { multipleButtonsLabels } ) => { /* translators: %1$s is button label 1 and %2$s is button label 2 */ __( 'By clicking %1$s or %2$s, you agree to our Terms of Service and to sync your site‘s data with us.', - 'jetpack' + 'jetpack-components' ), multipleButtonsLabels[ 0 ], multipleButtonsLabels[ 1 ] @@ -44,7 +44,7 @@ const MultipleButtonsText = ( { multipleButtonsLabels } ) => { return createInterpolateElement( __( 'By clicking the buttons above, you agree to our Terms of Service and to sync your site‘s data with us.', - 'jetpack' + 'jetpack-components' ), { tosLink: , @@ -59,7 +59,7 @@ const SingleButtonText = ( { agreeButtonLabel } ) => /* translators: %s is a button label */ __( 'By clicking %s, you agree to our Terms of Service and to sync your site‘s data with us.', - 'jetpack' + 'jetpack-components' ), agreeButtonLabel ), diff --git a/projects/js-packages/components/components/threat-fixer-button/index.tsx b/projects/js-packages/components/components/threat-fixer-button/index.tsx index 24d77053ef4f8..b5c7e1ed710fb 100644 --- a/projects/js-packages/components/components/threat-fixer-button/index.tsx +++ b/projects/js-packages/components/components/threat-fixer-button/index.tsx @@ -39,15 +39,15 @@ export default function ThreatFixerButton( { } if ( fixerState.error ) { - return __( 'An error occurred auto-fixing this threat.', 'jetpack' ); + return __( 'An error occurred auto-fixing this threat.', 'jetpack-components' ); } if ( fixerState.stale ) { - return __( 'The auto-fixer is taking longer than expected.', 'jetpack' ); + return __( 'The auto-fixer is taking longer than expected.', 'jetpack-components' ); } if ( fixerState.inProgress ) { - return __( 'An auto-fixer is in progress.', 'jetpack' ); + return __( 'An auto-fixer is in progress.', 'jetpack-components' ); } return getFixerDescription( threat ); @@ -59,7 +59,7 @@ export default function ThreatFixerButton( { } if ( fixerState.error ) { - return __( 'Error', 'jetpack' ); + return __( 'Error', 'jetpack-components' ); } return getFixerAction( threat ); diff --git a/projects/js-packages/components/components/threat-modal/fixer-state-notice.tsx b/projects/js-packages/components/components/threat-modal/fixer-state-notice.tsx index 4c8a8a5cb53db..8f130fba87421 100644 --- a/projects/js-packages/components/components/threat-modal/fixer-state-notice.tsx +++ b/projects/js-packages/components/components/threat-modal/fixer-state-notice.tsx @@ -23,10 +23,10 @@ const FixerStateNotice = ( { if ( fixerState.error ) { return { status: 'error' as const, - title: __( 'An error occurred auto-fixing this threat', 'jetpack' ), + title: __( 'An error occurred auto-fixing this threat', 'jetpack-components' ), content: __( 'Jetpack encountered a filesystem error while attempting to auto-fix this threat. Please try again later or contact support.', - 'jetpack' + 'jetpack-components' ), }; } @@ -34,10 +34,10 @@ const FixerStateNotice = ( { if ( fixerState.stale ) { return { status: 'error' as const, - title: __( 'The auto-fixer is taking longer than expected', 'jetpack' ), + title: __( 'The auto-fixer is taking longer than expected', 'jetpack-components' ), content: __( 'Jetpack has been attempting to auto-fix this threat for too long, and something may have gone wrong. Please try again later or contact support.', - 'jetpack' + 'jetpack-components' ), }; } @@ -45,8 +45,8 @@ const FixerStateNotice = ( { if ( fixerState.inProgress ) { return { status: 'success' as const, - title: __( 'An auto-fixer is in progress', 'jetpack' ), - content: __( 'Please wait while Jetpack auto-fixes the threat.', 'jetpack' ), + title: __( 'An auto-fixer is in progress', 'jetpack-components' ), + content: __( 'Please wait while Jetpack auto-fixes the threat.', 'jetpack-components' ), }; } diff --git a/projects/js-packages/components/components/threat-modal/threat-actions.tsx b/projects/js-packages/components/components/threat-modal/threat-actions.tsx index 08ab0d641a22b..9d1fa56f8e293 100644 --- a/projects/js-packages/components/components/threat-modal/threat-actions.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-actions.tsx @@ -59,7 +59,7 @@ const ThreatActions = (): JSX.Element => { variant="secondary" onClick={ onUnignoreClick } > - { __( 'Un-ignore threat', 'jetpack' ) } + { __( 'Un-ignore threat', 'jetpack-components' ) } ) } { threat.status === 'current' && ( @@ -70,7 +70,7 @@ const ThreatActions = (): JSX.Element => { onClick={ onIgnoreClick } disabled={ disabled || ( fixerState.inProgress && ! fixerState.stale ) } > - { __( 'Ignore threat', 'jetpack' ) } + { __( 'Ignore threat', 'jetpack-components' ) } { threat.fixable && ( ) } diff --git a/projects/js-packages/components/components/threat-modal/threat-fix-confirmation.tsx b/projects/js-packages/components/components/threat-modal/threat-fix-confirmation.tsx index 97d3e4a3c968a..935e0a13d428c 100644 --- a/projects/js-packages/components/components/threat-modal/threat-fix-confirmation.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-fix-confirmation.tsx @@ -24,25 +24,25 @@ const ThreatFixConfirmation = () => { title={ 'Additional connections needed' } content={ __( 'A user connection and server credentials provide Jetpack the access necessary to ignore and auto-fix threats on your site.', - 'jetpack' + 'jetpack-components' ) } /> ) } { ! siteCredentialsNeeded && userConnectionNeeded && ( ) } { siteCredentialsNeeded && ! userConnectionNeeded && ( ) } diff --git a/projects/js-packages/components/components/threat-modal/threat-fix-details.tsx b/projects/js-packages/components/components/threat-modal/threat-fix-details.tsx index 618ca87506309..20eefc796416a 100644 --- a/projects/js-packages/components/components/threat-modal/threat-fix-details.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-fix-details.tsx @@ -16,12 +16,12 @@ const ThreatFixDetails = (): JSX.Element => { const title = useMemo( () => { if ( threat.status === 'fixed' ) { - return __( 'How did Jetpack fix it?', 'jetpack' ); + return __( 'How did Jetpack fix it?', 'jetpack-components' ); } if ( threat.status === 'current' && threat.fixable ) { - return __( 'How can Jetpack auto-fix this threat?', 'jetpack' ); + return __( 'How can Jetpack auto-fix this threat?', 'jetpack-components' ); } - return __( 'How to fix it?', 'jetpack' ); + return __( 'How to fix it?', 'jetpack-components' ); }, [ threat ] ); const fix = useMemo( () => { @@ -30,7 +30,7 @@ const ThreatFixDetails = (): JSX.Element => { if ( ! threat.fixable && threat.fixedIn ) { return sprintf( /* translators: Translates to Updates to version. %1$s: Name. %2$s: Fixed version */ - __( 'Update %1$s to version %2$s.', 'jetpack' ), + __( 'Update %1$s to version %2$s.', 'jetpack-components' ), threat.extension.name, threat.fixedIn ); @@ -50,8 +50,11 @@ const ThreatFixDetails = (): JSX.Element => { { fix } { handleUpgradeClick && ( ) } diff --git a/projects/js-packages/components/components/threat-modal/threat-notice.tsx b/projects/js-packages/components/components/threat-modal/threat-notice.tsx index a0451e89f56b2..e3a79e641b824 100644 --- a/projects/js-packages/components/components/threat-modal/threat-notice.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-notice.tsx @@ -60,7 +60,7 @@ const ThreatNotice = ( { isLoading={ userIsConnecting } onClick={ handleConnectUser } > - { __( 'Connect your user account', 'jetpack' ) } + { __( 'Connect your user account', 'jetpack-components' ) } ) } { siteCredentialsNeeded && ( @@ -71,7 +71,7 @@ const ThreatNotice = ( { href={ credentialsRedirectUrl } isLoading={ credentialsIsFetching } > - { __( 'Enter server credentials', 'jetpack' ) } + { __( 'Enter server credentials', 'jetpack-components' ) } ) } diff --git a/projects/js-packages/components/components/threat-modal/threat-summary.tsx b/projects/js-packages/components/components/threat-modal/threat-summary.tsx index bb5615d5298b0..e0ab1b6319218 100644 --- a/projects/js-packages/components/components/threat-modal/threat-summary.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-summary.tsx @@ -19,7 +19,7 @@ const ThreatSummary = (): JSX.Element => { { !! threat.source && (
) } diff --git a/projects/js-packages/components/components/threat-modal/threat-technical-details.tsx b/projects/js-packages/components/components/threat-modal/threat-technical-details.tsx index f7b14581f786f..9f80098dbbfe2 100644 --- a/projects/js-packages/components/components/threat-modal/threat-technical-details.tsx +++ b/projects/js-packages/components/components/threat-modal/threat-technical-details.tsx @@ -38,8 +38,8 @@ const ThreatTechnicalDetails = (): JSX.Element => {
{ open - ? __( 'Hide the technical details', 'jetpack' ) - : __( 'Show the technical details', 'jetpack' ) } + ? __( 'Hide the technical details', 'jetpack-components' ) + : __( 'Show the technical details', 'jetpack-components' ) }
@@ -52,7 +52,7 @@ const ThreatTechnicalDetails = (): JSX.Element => { > { threat.filename && ( <> - { __( 'Threat found in file:', 'jetpack' ) } + { __( 'Threat found in file:', 'jetpack-components' ) }
{ threat.filename }
) } diff --git a/projects/js-packages/components/components/threat-severity-badge/index.tsx b/projects/js-packages/components/components/threat-severity-badge/index.tsx index 6b076786a2959..8aecc3ce49242 100644 --- a/projects/js-packages/components/components/threat-severity-badge/index.tsx +++ b/projects/js-packages/components/components/threat-severity-badge/index.tsx @@ -5,7 +5,7 @@ const ThreatSeverityBadge = ( { severity } ) => { if ( severity >= 5 ) { return ( - { _x( 'Critical', 'Severity label for issues rated 5 or higher.', 'jetpack' ) } + { _x( 'Critical', 'Severity label for issues rated 5 or higher.', 'jetpack-components' ) } ); } @@ -13,12 +13,14 @@ const ThreatSeverityBadge = ( { severity } ) => { if ( severity >= 3 && severity < 5 ) { return ( - { _x( 'High', 'Severity label for issues rated between 3 and 5.', 'jetpack' ) } + { _x( 'High', 'Severity label for issues rated between 3 and 5.', 'jetpack-components' ) } ); } - return { _x( 'Low', 'Severity label for issues rated below 3.', 'jetpack' ) }; + return ( + { _x( 'Low', 'Severity label for issues rated below 3.', 'jetpack-components' ) } + ); }; export default ThreatSeverityBadge; diff --git a/projects/js-packages/components/components/threats-data-views/constants.ts b/projects/js-packages/components/components/threats-data-views/constants.ts index 76e94756ab804..01b689d1ce141 100644 --- a/projects/js-packages/components/components/threats-data-views/constants.ts +++ b/projects/js-packages/components/components/threats-data-views/constants.ts @@ -9,16 +9,16 @@ import { export const THREAT_STATUSES: { value: string; label: string; variant?: 'success' | 'warning' }[] = [ - { value: 'current', label: __( 'Active', 'jetpack' ), variant: 'warning' }, - { value: 'fixed', label: __( 'Fixed', 'jetpack' ), variant: 'success' }, - { value: 'ignored', label: __( 'Ignored', 'jetpack' ) }, + { value: 'current', label: __( 'Active', 'jetpack-components' ), variant: 'warning' }, + { value: 'fixed', label: __( 'Fixed', 'jetpack-components' ), variant: 'success' }, + { value: 'ignored', label: __( 'Ignored', 'jetpack-components' ) }, ]; export const THREAT_TYPES = [ - { value: 'plugin', label: __( 'Plugin', 'jetpack' ) }, - { value: 'theme', label: __( 'Theme', 'jetpack' ) }, - { value: 'core', label: __( 'WordPress', 'jetpack' ) }, - { value: 'file', label: __( 'File', 'jetpack' ) }, + { value: 'plugin', label: __( 'Plugin', 'jetpack-components' ) }, + { value: 'theme', label: __( 'Theme', 'jetpack-components' ) }, + { value: 'core', label: __( 'WordPress', 'jetpack-components' ) }, + { value: 'file', label: __( 'File', 'jetpack-components' ) }, ]; export const THREAT_ICONS = { diff --git a/projects/js-packages/components/components/threats-data-views/index.tsx b/projects/js-packages/components/components/threats-data-views/index.tsx index aec1f1c3086a6..7ccfd59bec0c3 100644 --- a/projects/js-packages/components/components/threats-data-views/index.tsx +++ b/projects/js-packages/components/components/threats-data-views/index.tsx @@ -112,7 +112,7 @@ export default function ThreatsDataViews( { combinedFields: [ { id: THREAT_FIELD_THREAT, - label: __( 'Threat', 'jetpack' ), + label: __( 'Threat', 'jetpack-components' ), children: [ THREAT_FIELD_TITLE, THREAT_FIELD_DESCRIPTION ], direction: 'vertical', }, @@ -222,7 +222,7 @@ export default function ThreatsDataViews( { const result: Field< Threat >[] = [ { id: THREAT_FIELD_TITLE, - label: __( 'Title', 'jetpack' ), + label: __( 'Title', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: false, render: ( { item }: { item: Threat } ) => ( @@ -231,7 +231,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_DESCRIPTION, - label: __( 'Description', 'jetpack' ), + label: __( 'Description', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: false, render: ( { item }: { item: Threat } ) => ( @@ -240,7 +240,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_ICON, - label: __( 'Icon', 'jetpack' ), + label: __( 'Icon', 'jetpack-components' ), enableHiding: false, getValue( { item }: { item: Threat } ) { return getThreatType( item ); @@ -255,7 +255,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_STATUS, - label: __( 'Status', 'jetpack' ), + label: __( 'Status', 'jetpack-components' ), elements: THREAT_STATUSES, getValue( { item }: { item: Threat } ) { if ( ! item.status ) { @@ -272,12 +272,12 @@ export default function ThreatsDataViews( { return { status.label }; } } - return { __( 'Active', 'jetpack' ) }; + return { __( 'Active', 'jetpack-components' ) }; }, }, { id: THREAT_FIELD_TYPE, - label: __( 'Type', 'jetpack' ), + label: __( 'Type', 'jetpack-components' ), elements: THREAT_TYPES, getValue( { item }: { item: Threat } ) { return getThreatType( item ) ?? ''; @@ -285,7 +285,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_EXTENSION, - label: __( 'Extension', 'jetpack' ), + label: __( 'Extension', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: true, getValue( { item }: { item: Threat } ) { @@ -297,7 +297,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_PLUGIN, - label: __( 'Plugin', 'jetpack' ), + label: __( 'Plugin', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: false, elements: plugins, @@ -307,7 +307,7 @@ export default function ThreatsDataViews( { }, { id: THREAT_FIELD_THEME, - label: __( 'Theme', 'jetpack' ), + label: __( 'Theme', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: false, elements: themes, @@ -319,7 +319,7 @@ export default function ThreatsDataViews( { ? [ { id: THREAT_FIELD_SEVERITY, - label: __( 'Severity', 'jetpack' ), + label: __( 'Severity', 'jetpack-components' ), type: 'integer' as FieldType, getValue( { item }: { item: Threat } ) { return item.severity ?? 0; @@ -334,7 +334,7 @@ export default function ThreatsDataViews( { ? [ { id: THREAT_FIELD_SIGNATURE, - label: __( 'Signature', 'jetpack' ), + label: __( 'Signature', 'jetpack-components' ), elements: signatures, enableGlobalSearch: true, getValue( { item }: { item: Threat } ) { @@ -347,7 +347,7 @@ export default function ThreatsDataViews( { ? [ { id: THREAT_FIELD_FIRST_DETECTED, - label: __( 'First Detected', 'jetpack' ), + label: __( 'First Detected', 'jetpack-components' ), type: 'datetime' as FieldType, getValue( { item }: { item: Threat } ) { return item.firstDetected ? new Date( item.firstDetected ) : null; @@ -366,7 +366,7 @@ export default function ThreatsDataViews( { ? [ { id: THREAT_FIELD_FIXED_ON, - label: __( 'Fixed On', 'jetpack' ), + label: __( 'Fixed On', 'jetpack-components' ), type: 'datetime' as FieldType, getValue( { item }: { item: Threat } ) { return item.fixedOn ? new Date( item.fixedOn ) : null; @@ -385,16 +385,16 @@ export default function ThreatsDataViews( { ? [ { id: THREAT_FIELD_AUTO_FIX, - label: __( 'Auto-fix', 'jetpack' ), + label: __( 'Auto-fix', 'jetpack-components' ), enableHiding: false, elements: [ { value: 'yes', - label: __( 'Yes', 'jetpack' ), + label: __( 'Yes', 'jetpack-components' ), }, { value: 'no', - label: __( 'No', 'jetpack' ), + label: __( 'No', 'jetpack-components' ), }, ], getValue( { item }: { item: Threat } ) { @@ -426,7 +426,7 @@ export default function ThreatsDataViews( { if ( dataFields.includes( 'fixable' ) ) { result.push( { id: THREAT_ACTION_FIX, - label: __( 'Auto-fix', 'jetpack' ), + label: __( 'Auto-fix', 'jetpack-components' ), isPrimary: true, supportsBulk: true, callback: onFixThreats, @@ -445,7 +445,7 @@ export default function ThreatsDataViews( { if ( dataFields.includes( 'status' ) ) { result.push( { id: THREAT_ACTION_IGNORE, - label: __( 'Ignore', 'jetpack' ), + label: __( 'Ignore', 'jetpack-components' ), isPrimary: true, isDestructive: true, callback: onIgnoreThreats, @@ -464,7 +464,7 @@ export default function ThreatsDataViews( { if ( dataFields.includes( 'status' ) ) { result.push( { id: THREAT_ACTION_UNIGNORE, - label: __( 'Unignore', 'jetpack' ), + label: __( 'Unignore', 'jetpack-components' ), isPrimary: true, isDestructive: true, callback: onUnignoreThreats, diff --git a/projects/js-packages/components/components/threats-data-views/threats-status-toggle-group-control.tsx b/projects/js-packages/components/components/threats-data-views/threats-status-toggle-group-control.tsx index d9282cc07839a..83ab7b011b8d8 100644 --- a/projects/js-packages/components/components/threats-data-views/threats-status-toggle-group-control.tsx +++ b/projects/js-packages/components/components/threats-data-views/threats-status-toggle-group-control.tsx @@ -133,7 +133,7 @@ export default function ThreatsStatusToggleGroupControl( { { sprintf( /* translators: %d: number of active threats */ __( 'Active threats (%d)', - 'jetpack' + 'jetpack-components' ), activeThreatsCount ) } @@ -146,7 +146,7 @@ export default function ThreatsStatusToggleGroupControl( { { sprintf( /* translators: %d: number of historic threats */ - __( 'History (%d)', 'jetpack' ), + __( 'History (%d)', 'jetpack-components' ), historicThreatsCount ) } diff --git a/projects/js-packages/connection/.eslintrc.cjs b/projects/js-packages/connection/.eslintrc.cjs index 9915662c613ee..7b3c1104bb1d1 100644 --- a/projects/js-packages/connection/.eslintrc.cjs +++ b/projects/js-packages/connection/.eslintrc.cjs @@ -5,8 +5,7 @@ module.exports = { '@wordpress/i18n-text-domain': [ 'error', { - // @todo: Change this to something not "jetpack". - allowedTextDomain: 'jetpack', + allowedTextDomain: 'jetpack-connection-js', }, ], }, diff --git a/projects/js-packages/connection/changelog/fix-js-package-textdomains b/projects/js-packages/connection/changelog/fix-js-package-textdomains new file mode 100644 index 0000000000000..9a7e35148cb11 --- /dev/null +++ b/projects/js-packages/connection/changelog/fix-js-package-textdomains @@ -0,0 +1,4 @@ +Significance: major +Type: changed + +Changed text domain from 'jetpack' to 'jetpack-connection-js'. diff --git a/projects/js-packages/connection/components/connect-button/index.jsx b/projects/js-packages/connection/components/connect-button/index.jsx index 0529e4ae1e189..d1ab7155e5f66 100644 --- a/projects/js-packages/connection/components/connect-button/index.jsx +++ b/projects/js-packages/connection/components/connect-button/index.jsx @@ -14,7 +14,7 @@ const ConnectButton = props => { const { apiRoot, apiNonce, - connectLabel = __( 'Connect', 'jetpack' ), + connectLabel = __( 'Connect', 'jetpack-connection-js' ), registrationNonce, redirectUri = null, from, diff --git a/projects/js-packages/connection/components/connect-screen/basic/index.tsx b/projects/js-packages/connection/components/connect-screen/basic/index.tsx index 48ebfbe4ead66..4a5735159976c 100644 --- a/projects/js-packages/connection/components/connect-screen/basic/index.tsx +++ b/projects/js-packages/connection/components/connect-screen/basic/index.tsx @@ -83,11 +83,12 @@ const ConnectScreen: React.FC< Props > = ( { return ( { case 'siteurl_private_ip': return __( 'Your site host is on a private network. Jetpack can only connect to public sites.', - 'jetpack' + 'jetpack-connection-js' ); case 'connection_disabled': - return __( 'This site has been suspended.', 'jetpack' ); + return __( 'This site has been suspended.', 'jetpack-connection-js' ); } if ( isOfflineMode ) { - return createInterpolateElement( __( 'Unavailable in Offline Mode', 'jetpack' ), { - a: ( - - ), - } ); + return createInterpolateElement( + __( 'Unavailable in Offline Mode', 'jetpack-connection-js' ), + { + a: ( + + ), + } + ); } }; @@ -109,7 +112,7 @@ const ConnectScreenVisual: React.FC< Props > = ( { isDisabled={ isOfflineMode } /> - { buttonIsLoading ? loadingLabel || __( 'Loading', 'jetpack' ) : '' } + { buttonIsLoading ? loadingLabel || __( 'Loading', 'jetpack-connection-js' ) : '' } { footer &&
{ footer }
} diff --git a/projects/js-packages/connection/components/connect-screen/required-plan/index.jsx b/projects/js-packages/connection/components/connect-screen/required-plan/index.jsx index f6a20a8cb7baa..1d9614f33b8e3 100644 --- a/projects/js-packages/connection/components/connect-screen/required-plan/index.jsx +++ b/projects/js-packages/connection/components/connect-screen/required-plan/index.jsx @@ -13,9 +13,12 @@ import ConnectScreenRequiredPlanVisual from './visual'; */ const ConnectScreenRequiredPlan = props => { const { - title = __( 'Over 5 million WordPress sites are faster and more secure', 'jetpack' ), + title = __( + 'Over 5 million WordPress sites are faster and more secure', + 'jetpack-connection-js' + ), autoTrigger = false, - buttonLabel = __( 'Set up Jetpack', 'jetpack' ), + buttonLabel = __( 'Set up Jetpack', 'jetpack-connection-js' ), apiRoot, apiNonce, registrationNonce, diff --git a/projects/js-packages/connection/components/connect-screen/required-plan/visual.jsx b/projects/js-packages/connection/components/connect-screen/required-plan/visual.jsx index 5d300d879612d..99c117cba4acc 100644 --- a/projects/js-packages/connection/components/connect-screen/required-plan/visual.jsx +++ b/projects/js-packages/connection/components/connect-screen/required-plan/visual.jsx @@ -43,11 +43,11 @@ const ConnectScreenRequiredPlanVisual = props => { debug( 'props are %o', props ); const withSubscription = createInterpolateElement( - __( 'Already have a subscription? ', 'jetpack' ), + __( 'Already have a subscription? ', 'jetpack-connection-js' ), { connectButton: ( @@ -56,15 +56,18 @@ const ConnectScreenRequiredPlanVisual = props => { ); const errorMessage = isOfflineMode - ? createInterpolateElement( __( 'Unavailable in
Offline Mode', 'jetpack' ), { - a: ( - - ), - } ) + ? createInterpolateElement( + __( 'Unavailable in Offline Mode', 'jetpack-connection-js' ), + { + a: ( + + ), + } + ) : undefined; return ( diff --git a/projects/js-packages/connection/components/connected-plugins/index.jsx b/projects/js-packages/connection/components/connected-plugins/index.jsx index cee45bf838644..84aac163bb80a 100644 --- a/projects/js-packages/connection/components/connected-plugins/index.jsx +++ b/projects/js-packages/connection/components/connected-plugins/index.jsx @@ -40,7 +40,7 @@ const ConnectedPlugins = props => {

{ __( 'Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.', - 'jetpack' + 'jetpack-connection-js' ) }

diff --git a/projects/js-packages/connection/components/connection-error-notice/index.jsx b/projects/js-packages/connection/components/connection-error-notice/index.jsx index 5ad05369eb6cf..bf9dfb07f319b 100644 --- a/projects/js-packages/connection/components/connection-error-notice/index.jsx +++ b/projects/js-packages/connection/components/connection-error-notice/index.jsx @@ -50,7 +50,7 @@ const ConnectionErrorNotice = props => {
- { __( 'Reconnecting Jetpack', 'jetpack' ) } + { __( 'Reconnecting Jetpack', 'jetpack-connection-js' ) }
); @@ -66,7 +66,7 @@ const ConnectionErrorNotice = props => { { icon } { sprintf( /* translators: placeholder is the error. */ - __( 'There was an error reconnecting Jetpack. Error: %s', 'jetpack' ), + __( 'There was an error reconnecting Jetpack. Error: %s', 'jetpack-connection-js' ), restoreConnectionError ) } @@ -88,7 +88,7 @@ const ConnectionErrorNotice = props => { className={ styles.button } href="#" > - { __( 'Restore Connection', 'jetpack' ) } + { __( 'Restore Connection', 'jetpack-connection-js' ) }
) } diff --git a/projects/js-packages/connection/components/disconnect-dialog/index.jsx b/projects/js-packages/connection/components/disconnect-dialog/index.jsx index 80f7656ef4f38..c8c82e6219737 100644 --- a/projects/js-packages/connection/components/disconnect-dialog/index.jsx +++ b/projects/js-packages/connection/components/disconnect-dialog/index.jsx @@ -29,7 +29,7 @@ const DisconnectDialog = props => { apiRoot, apiNonce, connectedPlugins, - title = __( 'Are you sure you want to disconnect?', 'jetpack' ), + title = __( 'Are you sure you want to disconnect?', 'jetpack-connection-js' ), pluginScreenDisconnectCallback, onDisconnected, onError, diff --git a/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect-confirm.jsx b/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect-confirm.jsx index 6acda014f9fb1..16b05d15fc34f 100644 --- a/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect-confirm.jsx +++ b/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect-confirm.jsx @@ -23,7 +23,7 @@ const StepDisconnectConfirm = props => {

{ createInterpolateElement( - __( 'Jetpack has been
successfully disconnected.', 'jetpack' ), + __( 'Jetpack has been
successfully disconnected.', 'jetpack-connection-js' ), { br:
, } @@ -35,7 +35,7 @@ const StepDisconnectConfirm = props => {

{ __( 'We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).', - 'jetpack' + 'jetpack-connection-js' ) }

@@ -44,7 +44,7 @@ const StepDisconnectConfirm = props => { onClick={ onProvideFeedback } className="jp-connection__disconnect-dialog__btn-back-to-wp" > - { __( 'Help us improve', 'jetpack' ) } + { __( 'Help us improve', 'jetpack-connection-js' ) }

{ href="#" onClick={ onExit } > - { __( 'No thank you', 'jetpack' ) } + { __( 'No thank you', 'jetpack-connection-js' ) } ) } @@ -65,7 +65,7 @@ const StepDisconnectConfirm = props => { onClick={ onExit } className="jp-connection__disconnect-dialog__btn-back-to-wp" > - { __( 'Back to my website', 'jetpack' ) } + { __( 'Back to my website', 'jetpack-connection-js' ) }

diff --git a/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx b/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx index 03f91f659a808..0cdc9abb67255 100644 --- a/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx +++ b/projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx @@ -69,12 +69,12 @@ const StepDisconnect = props => { * @return {React.Component} - Button used for disconnect. */ const renderDisconnectButton = () => { - let buttonText = __( 'Disconnect', 'jetpack' ); + let buttonText = __( 'Disconnect', 'jetpack-connection-js' ); // When showing on the plugins page, this button should deactivate the plugin as well. if ( isDisconnecting ) { - buttonText = __( 'Disconnecting…', 'jetpack' ); + buttonText = __( 'Disconnecting…', 'jetpack-connection-js' ); } else if ( context === 'plugins' ) { - buttonText = __( 'Deactivate', 'jetpack' ); + buttonText = __( 'Deactivate', 'jetpack-connection-js' ); } return ( @@ -104,9 +104,15 @@ const StepDisconnect = props => { return (

- { __( 'Jetpack is currently powering multiple products on your site.', 'jetpack' ) } + { __( + 'Jetpack is currently powering multiple products on your site.', + 'jetpack-connection-js' + ) }
- { __( 'Once you disconnect Jetpack, these will no longer work.', 'jetpack' ) } + { __( + 'Once you disconnect Jetpack, these will no longer work.', + 'jetpack-connection-js' + ) }

); @@ -134,7 +140,7 @@ const StepDisconnect = props => { { createInterpolateElement( __( 'Need help? Learn more about the Jetpack connection or contact Jetpack support.', - 'jetpack' + 'jetpack-connection-js' ), { strong: , @@ -166,8 +172,12 @@ const StepDisconnect = props => { className="jp-connection__disconnect-dialog__btn-dismiss" > { context === 'plugins' - ? __( 'Cancel', 'jetpack' ) - : __( 'Stay connected', 'jetpack', /* dummy arg to avoid bad minification */ 0 ) } + ? __( 'Cancel', 'jetpack-connection-js' ) + : __( + 'Stay connected', + 'jetpack-connection-js', + /* dummy arg to avoid bad minification */ 0 + ) } { renderDisconnectButton() }

diff --git a/projects/js-packages/connection/components/disconnect-dialog/steps/step-survey.jsx b/projects/js-packages/connection/components/disconnect-dialog/steps/step-survey.jsx index 61a7f26342c3e..2d71885e00b44 100644 --- a/projects/js-packages/connection/components/disconnect-dialog/steps/step-survey.jsx +++ b/projects/js-packages/connection/components/disconnect-dialog/steps/step-survey.jsx @@ -17,9 +17,9 @@ const StepSurvey = props => { return (
-

{ __( 'Before you go, help us improve Jetpack', 'jetpack' ) }

+

{ __( 'Before you go, help us improve Jetpack', 'jetpack-connection-js' ) }

- { __( 'Let us know what didn‘t work for you', 'jetpack' ) } + { __( 'Let us know what didn‘t work for you', 'jetpack-connection-js' ) }

{ href="#" onClick={ onExit } > - { __( 'Skip for now', 'jetpack' ) } + { __( 'Skip for now', 'jetpack-connection-js' ) }
); diff --git a/projects/js-packages/connection/components/disconnect-dialog/steps/step-thank-you.jsx b/projects/js-packages/connection/components/disconnect-dialog/steps/step-thank-you.jsx index 33a90c58067e3..4f661d266b81c 100644 --- a/projects/js-packages/connection/components/disconnect-dialog/steps/step-thank-you.jsx +++ b/projects/js-packages/connection/components/disconnect-dialog/steps/step-thank-you.jsx @@ -20,12 +20,12 @@ const StepThankYou = props => {
-

{ __( 'Thank you!', 'jetpack' ) }

+

{ __( 'Thank you!', 'jetpack-connection-js' ) }

{ createInterpolateElement( __( 'Your answer has been submitted.
Thanks for your input on how we can improve Jetpack.', - 'jetpack' + 'jetpack-connection-js' ), { br:
, @@ -37,7 +37,7 @@ const StepThankYou = props => { onClick={ onExit } className="jp-connection__disconnect-dialog__btn-back-to-wp" > - { __( 'Back to my website', 'jetpack' ) } + { __( 'Back to my website', 'jetpack-connection-js' ) }

diff --git a/projects/js-packages/connection/components/disconnect-survey/index.jsx b/projects/js-packages/connection/components/disconnect-survey/index.jsx index 61f37210d4f06..ee75ad1376359 100644 --- a/projects/js-packages/connection/components/disconnect-survey/index.jsx +++ b/projects/js-packages/connection/components/disconnect-survey/index.jsx @@ -18,23 +18,26 @@ const DisconnectSurvey = props => { const options = [ { id: 'troubleshooting', - answerText: __( "Troubleshooting - I'll be reconnecting afterwards.", 'jetpack' ), + answerText: __( + "Troubleshooting - I'll be reconnecting afterwards.", + 'jetpack-connection-js' + ), }, { id: 'not-working', - answerText: __( "I can't get it to work.", 'jetpack' ), + answerText: __( "I can't get it to work.", 'jetpack-connection-js' ), }, { id: 'slowed-down-site', - answerText: __( 'It slowed down my site.', 'jetpack' ), + answerText: __( 'It slowed down my site.', 'jetpack-connection-js' ), }, { id: 'buggy', - answerText: __( "It's buggy.", 'jetpack' ), + answerText: __( "It's buggy.", 'jetpack-connection-js' ), }, { id: 'what-does-it-do', - answerText: __( "I don't know what it does.", 'jetpack' ), + answerText: __( "I don't know what it does.", 'jetpack-connection-js' ), }, ]; @@ -136,9 +139,9 @@ const DisconnectSurvey = props => { className={ 'card jp-connect__disconnect-survey-card ' + selectedClass( customOption.id ) } >

- { __( 'Other:', 'jetpack' ) }{ ' ' } + { __( 'Other:', 'jetpack-connection-js' ) }{ ' ' } { className="jp-connection__disconnect-dialog__btn-back-to-wp" > { isSubmittingFeedback - ? __( 'Submitting…', 'jetpack' ) - : __( 'Submit Feedback', 'jetpack', /* dummy arg to avoid bad minification */ 0 ) } + ? __( 'Submitting…', 'jetpack-connection-js' ) + : __( + 'Submit Feedback', + 'jetpack-connection-js', + /* dummy arg to avoid bad minification */ 0 + ) }

diff --git a/projects/js-packages/connection/components/in-place-connection/index.jsx b/projects/js-packages/connection/components/in-place-connection/index.jsx index b57ae6cfa778c..060c7aaf2c6e9 100644 --- a/projects/js-packages/connection/components/in-place-connection/index.jsx +++ b/projects/js-packages/connection/components/in-place-connection/index.jsx @@ -103,7 +103,7 @@ const InPlaceConnection = props => {

{ title }

{ isLoading ? ( -

{ __( 'Loading…', 'jetpack' ) }

+

{ __( 'Loading…', 'jetpack-connection-js' ) }

) : (
{ tableCaption || __( 'Summary of the records', 'jetpack' ) }{ tableCaption || __( 'Summary of the records', 'jetpack-components' ) }
{ recordTypeLabel || __( 'Record type', 'jetpack' ) }{ recordCountLabel || __( 'Record count', 'jetpack' ) }{ recordTypeLabel || __( 'Record type', 'jetpack-components' ) }{ recordCountLabel || __( 'Record count', 'jetpack-components' ) }