-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blocks: move localizable strings out of the metadata attributes field (…
…#36724) * Blocks: move localizable strings out of the metadata attributes field * Fix Goodreads block tests * Update Subscriptions block test fixtures * Update Mailchimp block test fixtures
- Loading branch information
1 parent
8a5430f
commit 15b62d0
Showing
37 changed files
with
179 additions
and
202 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/fix-blocks-non-localized-strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: other | ||
|
||
Blocks: move localizable strings out of the metadata attributes field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/extensions/blocks/ai-chat/constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export const DEFAULT_ASK_BUTTON_LABEL = __( 'Ask', 'jetpack' ); | ||
export const DEFAULT_PLACEHOLDER = __( 'Ask a question about this site', 'jetpack' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { useBlockProps } from '@wordpress/block-editor'; | ||
import { DEFAULT_ASK_BUTTON_LABEL } from './constants'; | ||
|
||
export default function ( { attributes } ) { | ||
const blockProps = useBlockProps.save( { | ||
'data-ask-button-label': attributes.askButtonLabel, | ||
'data-ask-button-label': attributes.askButtonLabel || DEFAULT_ASK_BUTTON_LABEL, | ||
} ); | ||
return <div { ...blockProps } />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
projects/plugins/jetpack/extensions/blocks/cookie-consent/constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export const DEFAULT_TEXT = __( | ||
'Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: <a href="https://automattic.com/cookies/">Cookie Policy</a>.', | ||
'jetpack' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/extensions/blocks/donations/constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export const DEFAULT_CHOOSE_AMOUNT_TEXT = __( 'Choose an amount', 'jetpack' ); | ||
export const DEFAULT_CUSTOM_AMOUNT_TEXT = __( 'Or enter a custom amount', 'jetpack' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
projects/plugins/jetpack/extensions/blocks/mailchimp/constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export const NOTIFICATION_PROCESSING = 'processing'; | ||
export const NOTIFICATION_SUCCESS = 'success'; | ||
export const NOTIFICATION_ERROR = 'error'; | ||
|
||
export const DEFAULT_EMAIL_PLACEHOLDER = __( 'Enter your email', 'jetpack' ); | ||
export const DEFAULT_CONSENT_TEXT = __( | ||
'By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.', | ||
'jetpack' | ||
); | ||
export const DEFAULT_PROCESSING_LABEL = __( 'Processing…', 'jetpack' ); | ||
export const DEFAULT_SUCCESS_LABEL = __( "Success! You're on the list.", 'jetpack' ); | ||
export const DEFAULT_ERROR_LABEL = __( | ||
"Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.", | ||
'jetpack' | ||
); |
Oops, something went wrong.