Skip to content

Commit

Permalink
Fix consistancy of context for translators in problematic patterns.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilpichurov committed Nov 23, 2024
1 parent aa2b4fd commit cacbcb9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="wp-block-buttons">
<!-- wp:button -->
<div class="wp-block-button">
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Learn More', 'Button text of intro section.', 'twentytwentyfive' ); ?></a>
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Learn More', 'Main CTA button text.', 'twentytwentyfive' ); ?></a>
</div>
<!-- /wp:button -->
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons">
<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php esc_html_e( 'Learn more', 'twentytwentyfive' ); ?></a></div>
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php esc_html_e( 'Learn more', 'Main CTA button text.', 'twentytwentyfive' ); ?></a></div>

Check failure on line 28 in src/wp-content/themes/twentytwentyfive/patterns/cta-centered-heading.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Too many parameters passed to function "esc_html_e()". Expected: 2 parameters, received: 3
<!-- /wp:button --></div>
<!-- /wp:buttons -->
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<h2 class="wp-block-heading has-xx-large-font-size"><?php esc_html_e( 'What are you looking for?', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'Search form label.', 'twentytwentyfive' ); ?>","showLabel":false,"placeholder":"<?php echo esc_attr_x( 'Type here...', 'Search input field placeholder text.', 'twentytwentyfive' ); ?>","buttonText":"<?php echo esc_attr_x( 'Search', 'Button text. Verb.', 'twentytwentyfive' ); ?>"} /-->
<!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'Search Button text.', 'twentytwentyfive' ); ?>","showLabel":false,"placeholder":"<?php echo esc_attr_x( 'Type here...', 'Search input field placeholder text.', 'twentytwentyfive' ); ?>","buttonText":"<?php echo esc_attr_x( 'Search', 'Button text. Verb.', 'twentytwentyfive' ); ?>"} /-->
</div>
<!-- /wp:group -->
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<!-- wp:buttons -->
<div class="wp-block-buttons">
<!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Learn More', 'Sample hero button', 'twentytwentyfive' ); ?></a></div>
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Learn More', 'Main CTA button text.', 'twentytwentyfive' ); ?></a></div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

?>

<!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'Search form label.', 'twentytwentyfive' ); ?>","showLabel":false,"placeholder":"<?php echo esc_attr_x( 'Type here...', 'Search input field placeholder text.', 'twentytwentyfive' ); ?>","buttonText":"<?php echo esc_attr_x( 'Search', 'Button text. Verb.', 'twentytwentyfive' ); ?>"} /-->
<!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'Search Button text.', 'twentytwentyfive' ); ?>","showLabel":false,"placeholder":"<?php echo esc_attr_x( 'Type here...', 'Search input field placeholder text.', 'twentytwentyfive' ); ?>","buttonText":"<?php echo esc_attr_x( 'Search', 'Button text. Verb.', 'twentytwentyfive' ); ?>"} /-->

0 comments on commit cacbcb9

Please sign in to comment.