WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.34k stars 4.13k forks source link

Consistent terminology: Patterns vs. Block Patterns #49617

Open afercia opened 1 year ago

afercia commented 1 year ago

Description

Looks like there's a bit of inconsistency in the labelling of the 'Patterns'. Sometimes it's 'Pattern', sometimes 'Block Patterns'. It would be good to use a consistent terminology everywhere, for better clarity and consistent user experience.

Note that some of these strings are visually hidden or used for aria-label attributes so you can't actually see them in the UI.

Searching the codebase for all occurrences of pattern in the translatable strings, here's the results:

51 results - 22 files

lib/compat/wordpress-6.1/class-gutenberg-rest-block-patterns-controller-6-1.php:
   69:                  'description' => __( 'The pattern name.', 'gutenberg' ),
   75:                  'description' => __( 'The pattern title, in human readable format.', 'gutenberg' ),
   81:                  'description' => __( 'The pattern detailed description.', 'gutenberg' ),
   87:                  'description' => __( 'The pattern viewport width for inserter preview.', 'gutenberg' ),
   93:                  'description' => __( 'Block types that the pattern is intended to be used with.', 'gutenberg' ),
   99:                  'description' => __( 'An array of post types that the pattern is restricted to be used with.', 'gutenberg' ),
  105:                  'description' => __( 'The pattern category slugs.', 'gutenberg' ),
  111:                  'description' => __( 'The pattern keywords.', 'gutenberg' ),
  117:                  'description' => __( 'The pattern content.', 'gutenberg' ),
  123:                  'description' => __( 'Determines whether the pattern is visible in inserter.', 'gutenberg' ),

lib/compat/wordpress-6.2/block-patterns.php:
   22:          'description' => __( 'Patterns that contain buttons and call to actions.', 'gutenberg' ),
   29:          'description' => __( 'Multi-column patterns with more complex layouts.', 'gutenberg' ),
   36:          'description' => __( 'Patterns containing mostly text.', 'gutenberg' ),
   50:          'description' => __( 'A set of high quality curated patterns.', 'gutenberg' ),
  213:                              __( 'Could not register file "%s" as a block pattern ("Slug" field missing)', 'gutenberg' ),
  226:                              __( 'Could not register file "%1$s" as a block pattern (invalid slug "%2$s")', 'gutenberg' ),
  244:                              __( 'Could not register file "%s" as a block pattern ("Title" field missing)', 'gutenberg' ),

lib/compat/wordpress-6.2/class-gutenberg-rest-block-patterns-controller-6-2.php:
   88:                  'description' => __( 'The pattern name.', 'gutenberg' ),
   94:                  'description' => __( 'The pattern title, in human readable format.', 'gutenberg' ),
  100:                  'description' => __( 'The pattern detailed description.', 'gutenberg' ),
  106:                  'description' => __( 'The pattern viewport width for inserter preview.', 'gutenberg' ),
  112:                  'description' => __( 'Block types that the pattern is intended to be used with.', 'gutenberg' ),
  118:                  'description' => __( 'An array of post types that the pattern is restricted to be used with.', 'gutenberg' ),
  124:                  'description' => __( 'The pattern category slugs.', 'gutenberg' ),
  130:                  'description' => __( 'The pattern keywords.', 'gutenberg' ),
  136:                  'description' => __( 'An array of template types where the pattern fits.', 'gutenberg' ),
  142:                  'description' => __( 'The pattern content.', 'gutenberg' ),
  148:                  'description' => __( 'Determines whether the pattern is visible in inserter.', 'gutenberg' ),

lib/compat/wordpress-6.2/rest-api.php:
  124:              'description' => __( 'The block types which can use this pattern.', 'gutenberg' ),

packages/block-editor/src/components/block-draggable/draggable-chip.js:
  14:   const patternLabel = isPattern && __( 'Pattern' );

packages/block-editor/src/components/block-pattern-setup/index.js:
  63:               aria-label={ __( 'Patterns list' ) }

packages/block-editor/src/components/block-pattern-setup/setup-toolbar.js:
  35:           label={ __( 'Previous pattern' ) }
  41:           label={ __( 'Next pattern' ) }

packages/block-editor/src/components/block-patterns-list/index.js:
  125:  label = __( 'Block Patterns' ),

packages/block-editor/src/components/block-switcher/pattern-transformations-menu.js:
  49:               { __( 'Patterns' ) }
  85:           aria-label={ __( 'Patterns list' ) }

packages/block-editor/src/components/inserter/block-patterns-tab.js:
  215:                  <nav aria-label={ __( 'Block pattern categories' ) }>
  255:                                  { __( 'Explore all patterns' ) }

packages/block-editor/src/components/inserter/index.js:
  49:       label = __( 'Add pattern' );

packages/block-editor/src/components/inserter/menu.js:
  253:                  label={ __( 'Search for blocks and patterns' ) }

packages/block-editor/src/components/inserter/quick-inserter.js:
  111:                  label={ __( 'Search for blocks and patterns' ) }

packages/block-editor/src/components/inserter/search-results.js:
  158:              <VisuallyHidden>{ __( 'Block Patterns' ) }</VisuallyHidden>

packages/block-editor/src/components/inserter/tabs.js:
  17:   title: __( 'Patterns' ),

packages/block-editor/src/components/inserter/block-patterns-explorer/explorer.js:
  40:           title={ __( 'Patterns' ) }

packages/block-editor/src/components/inserter/block-patterns-explorer/sidebar.js:
  42:               label={ __( 'Search for patterns' ) }

packages/block-editor/src/components/inserter/hooks/use-patterns-state.js:
  45:               __( 'Block pattern "%s" inserted.' ),

packages/block-library/src/query/edit/pattern-selection-modal.js:
  63:           title={ __( 'Choose a pattern' ) }
  72:                       label={ __( 'Search for patterns' ) }

packages/block-library/src/template-part/edit/selection-modal.js:
  113:                  <h2>{ __( 'Patterns' ) }</h2>

packages/edit-post/src/components/start-page-options/index.js:
  115:          title={ __( 'Choose a pattern' ) }

packages/edit-site/src/components/start-template-options/index.js:
  120:          title={ __( 'Choose a pattern' ) }

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

masteradhoc commented 1 year ago

@afercia would you go for "Block Patterns"? Seems a bit more used also in the docs i found:

afercia commented 1 year ago

@masteradhoc thanks for the ping. Not sure the terminology used in the UI must necessarily match the one used in the docs in this case. To me, in the UI the shorter, the better. Not a strong preference though.

richtabor commented 1 year ago

I think "Pattern" and "Patterns" is fine.

xerpa43 commented 1 year ago

Hi, I would like to contribute to this, are we talking about changing the description of to Patterns or Pattern instead of Block pattern

afercia commented 1 year ago

@xerpa43 yes, it would be nice to change all the occurrences of 'Block Pattern/s' in the translatable strings to 'Pattern/s'. Would be good to have a look at the occurrences in the documentation as well, and change it where it makes sense.

Please do feel free to go ahead and submit a pull request! 🎉

xerpa43 commented 1 year ago

@afercia Thank you, I'll be working on it

Narcos101 commented 1 year ago

Hey @xerpa43 are you still working on this?

xerpa43 commented 1 year ago

@Narcos101 Have been caught with some other ones, you can work if you want.

Narcos101 commented 1 year ago

Hey @afercia I am taking on this task. To be clear, i have to find and replace block pattern/s to pattern/s in docs,labels,comments and everywhere where i find out in the entire repo. Am I right?

jordesign commented 12 months ago

Hey @Narcos101 - are you still working on this?

richtabor commented 11 months ago

Came here to report as well; saw this today:

Footers