Skip to content

Commit

Permalink
Enforce coding guideline regarding the usage of quotation marks. (#44305
Browse files Browse the repository at this point in the history
)

* Enforce coding guideline regarding the usage of apostrophes and also replace straight quotation marks.

* Fixing regressions.

* Include changes in core-blocks.md.
  • Loading branch information
pagelab authored Sep 21, 2022
1 parent ed8d25e commit aff7fc2
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Embed a simple audio player. ([Source](https://github.com/WordPress/gutenberg/tr

## Avatar

Add a user's avatar. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/avatar))
Add a users avatar. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/avatar))

- **Name:** core/avatar
- **Category:** theme
Expand Down Expand Up @@ -730,7 +730,7 @@ Display a graphic to represent this site. Update the block, and the changes appl

## Site Tagline

Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if it's not displayed in the theme design. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/site-tagline))
Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if its not displayed in the theme design. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/site-tagline))

- **Name:** core/site-tagline
- **Category:** theme
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "core/avatar",
"title": "Avatar",
"category": "theme",
"description": "Add a user's avatar.",
"description": "Add a users avatar.",
"textdomain": "default",
"attributes": {
"userId": {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/block/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default function ReusableBlockEdit( {
</Text>
<Text style={ [ infoTextStyle, infoDescriptionStyle ] }>
{ __(
'Alternatively, you can detach and edit these blocks separately by tapping "Convert to regular blocks".'
'Alternatively, you can detach and edit these blocks separately by tapping Convert to regular blocks.'
) }
</Text>
<TextControl
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const settings = {
/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
// translators: Preserve \n markers for line breaks
content: __(
'// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );'
'// A block is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );'
),
/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
},
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/comments-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function Edit( {
</InspectorControls>
);

const postTitle = isSiteEditor ? __( '"Post Title"' ) : `"${ rawTitle }"`;
const postTitle = isSiteEditor ? __( 'Post Title' ) : `"${ rawTitle }"`;

let placeholder;
if ( showCommentsCount && commentsCount !== undefined ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function CommentsLegacy( {
<div { ...blockProps }>
<Warning actions={ actions }>
{ __(
"Comments block: You're currently using the legacy version of the block. " +
'Comments block: Youre currently using the legacy version of the block. ' +
'The following is just a placeholder - the final styling will likely look different. ' +
'For a better representation and more customization options, ' +
'switch the block to its editable mode.'
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/more/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function MoreEdit( {
</InspectorControls>
<div { ...useBlockProps() }>
<input
aria-label={ __( 'Read more link text' ) }
aria-label={ __( 'Read more link text' ) }
type="text"
value={ customText }
placeholder={ DEFAULT_TEXT }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function PostExcerptEditor( {
<RichText
className="wp-block-post-excerpt__more-link"
tagName="a"
aria-label={ __( '"Read more" link text' ) }
aria-label={ __( 'Read more link text' ) }
placeholder={ __( 'Add "read more" link text' ) }
value={ moreText }
onChange={ ( newMoreText ) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/query-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function QueryTitleEdit( {

<TagName { ...blockProps }>
{ showSearchTerm
? __( 'Search results for: "search term"' )
? __( 'Search results for: search term' )
: __( 'Search results' ) }
</TagName>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function QueryInspectorControls( {
label={ __( 'Post type' ) }
onChange={ onPostTypeChange }
help={ __(
'WordPress contains different types of content and they are divided into collections called "Post types". By default there are a few different ones such as blog posts and pages, but plugins could add more.'
'WordPress contains different types of content and they are divided into collections called Post types. By default there are a few different ones such as blog posts and pages, but plugins could add more.'
) }
/>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function StickyControl( { value, onChange } ) {
value={ value }
onChange={ onChange }
help={ __(
'Blog posts can be "stickied", a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.'
'Blog posts can be stickied, a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.'
) }
/>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/read-more/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function ReadMore( {
</InspectorControls>
<RichText
tagName="a"
aria-label={ __( '"Read more" link text' ) }
aria-label={ __( 'Read more link text' ) }
placeholder={ __( 'Read more' ) }
value={ content }
onChange={ ( newValue ) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/site-tagline/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "core/site-tagline",
"title": "Site Tagline",
"category": "theme",
"description": "Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if it's not displayed in the theme design.",
"description": "Describe in a few words what the site is about. The tagline can be used in search results or when sharing on social networks even if its not displayed in the theme design.",
"keywords": [ "description" ],
"textdomain": "default",
"attributes": {
Expand Down

0 comments on commit aff7fc2

Please sign in to comment.