Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

WIP: Add translation functions to text strings #489

Merged
merged 36 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
064fa4e
Add translation functions to text strings
carolinan Oct 2, 2024
2319f98
Add translators context to two more "middle dot" separators
carolinan Oct 2, 2024
c531e60
Merge branch 'trunk' into update/translation-functions
carolinan Oct 3, 2024
2d8efd7
Update patterns/page-portfolio-home.php
carolinan Oct 3, 2024
6781adb
Update patterns/overlapped-images.php
carolinan Oct 3, 2024
4bef430
Update patterns/cta-book-links.php
carolinan Oct 3, 2024
0ae5f46
Update the symbols used for the placeholders in printf.
carolinan Oct 3, 2024
dc59eed
Add context to two more headings
carolinan Oct 3, 2024
666efe3
Try to improve the pricing which split over 3 rows in the product pat…
carolinan Oct 3, 2024
49c280c
Improve consistency, add HTML entities.
carolinan Oct 3, 2024
14d48d6
Update the username text string in the Instagram grid pattern
carolinan Oct 3, 2024
26affda
Update patterns/hero-overlapped-book-cover-with-links.php
carolinan Oct 3, 2024
720b127
Update patterns/cta-book-links.php
carolinan Oct 3, 2024
83758cb
Merge branch 'trunk' into update/translation-functions
carolinan Oct 4, 2024
ffea7cf
Nit: translators context consistency
carolinan Oct 4, 2024
dc6e50a
Add translators context to the "Join" buttons
carolinan Oct 4, 2024
0057834
Nit: Add full stop
carolinan Oct 4, 2024
987def4
Portfolio homepage: Fix block validation error
carolinan Oct 4, 2024
c892832
Replace "posts navigation" with "post navigation" to match core.
carolinan Oct 4, 2024
2d97add
Try to use printf for the "Posted by name" and "Published on date" st…
carolinan Oct 4, 2024
94ebbb4
Fix incorrectly spelled textdomain
carolinan Oct 4, 2024
652eb8d
Fix incorrect use of esc_html_x
carolinan Oct 4, 2024
a8c02bb
Merge branch 'trunk' into update/translation-functions
carolinan Oct 4, 2024
ab87aca
Merge branch 'trunk' into update/translation-functions
carolinan Oct 5, 2024
63cca7b
Simplify the "published on" and "posted by" using esc_html_x
carolinan Oct 5, 2024
aed34bf
Clarify that "X" is a social media platform by adding translators con…
carolinan Oct 5, 2024
2febfbb
Reduce the number of translatable strings by re-using the same exampl…
carolinan Oct 5, 2024
6f93c17
Add context for "RSVP"
carolinan Oct 5, 2024
9871df5
Fine tune more contexts, replace the aria-label "Social" with "Social…
carolinan Oct 5, 2024
fe3a441
Combine "Lecture by" and the name of the professor
carolinan Oct 5, 2024
15dce9a
Fix my typo :)
carolinan Oct 5, 2024
9ccf7cc
Update page-cv-bio.php
carolinan Oct 5, 2024
ee1ee47
Add context to "Written by"
carolinan Oct 5, 2024
6dc80ca
Add context to "by"
carolinan Oct 5, 2024
6221d46
Add context for the "Now" link text
carolinan Oct 7, 2024
9bf0f8e
New blog single post: Remove custom separator between categories.
carolinan Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions patterns/banner-about-book.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
<!-- wp:column {"verticalAlignment":"center","width":""} -->
<div class="wp-block-column is-vertically-aligned-center">
<!-- wp:heading {"level":3,"className":"wp-block-heading","fontSize":"xx-large"} -->
<h3 class="wp-block-heading has-xx-large-font-size">About the book</h3>
<h3 class="wp-block-heading has-xx-large-font-size"><?php esc_html_e( 'About the book', 'twentytwentyfive' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"fontSize":"medium"} -->
<p class="has-medium-font-size">This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist. Fleckensteins evocative imagery, Strands groundbreaking modernist approach, and Kōnos meticulous documentation of Japanese life come together in a harmonious blend that celebrates the art of photography. Each image in The Stories Book is accompanied by insightful commentary, providing historical context and revealing the stories behind the photographs. This collection is not only a visual feast but also a tribute to the power of photography to preserve and narrate the multifaceted experiences of humanity.</p>
<p class="has-medium-font-size"><?php echo esc_html_x( 'This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist. Fleckenstein&rsquo;s evocative imagery, Strand&rsquo;s groundbreaking modernist approach, and Kōno&rsquo;s meticulous documentation of Japanese life come together in a harmonious blend that celebrates the art of photography. Each image in &ldquo;The Stories Book&rdquo; is accompanied by insightful commentary, providing historical context and revealing the stories behind the photographs. This collection is not only a visual feast but also a tribute to the power of photography to preserve and narrate the multifaceted experiences of humanity.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center","width":"","layout":{"type":"default"}} -->
<div class="wp-block-column is-vertically-aligned-center">
<!-- wp:image {"aspectRatio":"1","scale":"cover","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/book-image-landing.webp" alt="Image of a book" style="aspect-ratio:1;object-fit:cover"/></figure>
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/book-image-landing.webp" alt="<?php esc_attr_e( 'Image of a book', 'twentytwentyfive' ); ?>" style="aspect-ratio:1;object-fit:cover"/></figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->
Expand Down
4 changes: 2 additions & 2 deletions patterns/banner-cover-big-heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
<div class="wp-block-group alignwide">
<!-- wp:image {"sizeSlug":"full","linkDestination":"none","align":"wide"} -->
<figure class="wp-block-image alignwide size-full">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/coming-soon-bg-image.webp" alt="Photo of a field full of flowers, a blue sky and a tree." />
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/coming-soon-bg-image.webp" alt="<?php esc_attr_e( 'Photo of a field full of flowers, a blue sky and a tree.', 'twentytwentyfive' ); ?>"/>
</figure>
<!-- /wp:image -->

<!-- wp:group {"align":"full","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull">
<!-- wp:paragraph {"align":"left","style":{"typography":{"fontSize":"clamp(1rem, 380px, 24vw)","letterSpacing":"-0.02em","lineHeight":"1","fontWeight":"700"}}} -->
<p class="has-text-align-left" style="font-size:clamp(1rem, 380px, 24vw);font-weight:700;letter-spacing:-0.02em;line-height:1">Stories</p>
<p class="has-text-align-left" style="font-size:clamp(1rem, 380px, 24vw);font-weight:700;letter-spacing:-0.02em;line-height:1"><?php esc_html_e( 'Stories', 'twentytwentyfive' ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
Expand Down
8 changes: 4 additions & 4 deletions patterns/banner-intro-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="wp-block-column" style="flex-basis:56%">
<!-- wp:image {"aspectRatio":"1","scale":"cover","sizeSlug":"full"} -->
<figure class="wp-block-image size-full">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/botany-flowers.webp" alt="<?php echo esc_attr_x( 'Picture of a flower', 'Alt text for intro picture', 'twentytwentyfive' ); ?>" style="aspect-ratio:1;object-fit:cover" />
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/botany-flowers.webp" alt="<?php echo esc_attr_x( 'Picture of a flower', 'Alt text for intro picture.', 'twentytwentyfive' ); ?>" style="aspect-ratio:1;object-fit:cover"/>
</figure>
<!-- /wp:image -->
</div>
Expand All @@ -28,18 +28,18 @@
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"blockGap":"var:preset|spacing|40"}}} -->
<div class="wp-block-column is-vertically-aligned-center">
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php echo esc_html_x( 'New arrivals', 'Heading for banner with flower', 'twentytwentyfive' ); ?></h2>
<h2 class="wp-block-heading"><?php echo esc_html_x( 'New arrivals', 'Heading for banner pattern.', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><?php echo esc_html_x( 'Like flowers that bloom in unexpected places, every story unfolds with beauty and resilience, revealing hidden wonders.', 'Sample description for banner with flower', 'twentytwentyfive' ); ?></p>
<p><?php echo esc_html_x( 'Like flowers that bloom in unexpected places, every story unfolds with beauty and resilience, revealing hidden wonders.', 'Sample description for banner with flower.', 'twentytwentyfive' ); ?></p>
<!-- /wp:paragraph -->

<!-- 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', 'Button text of intro section', 'twentytwentyfive' ); ?></a>
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Learn More', 'Button text of intro section.', 'twentytwentyfive' ); ?></a>
</div>
<!-- /wp:button -->
</div>
Expand Down
6 changes: 3 additions & 3 deletions patterns/banner-intro.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<h2 class="wp-block-heading alignwide has-x-large-font-size">
<?php
printf(
/* translators: %1$s is the brand name, e.g., 'Fleurs'. */
esc_html_x( 'We\'re %1$s, our mission is to deliver exquisite flower arrangements that not only adorn living spaces but also inspire a deeper appreciation for natural beauty.', 'Example pattern text', 'twentytwentyfive' ),
'<strong>' . esc_html_x( 'Fleurs', 'Example brand name in pattern', 'twentytwentyfive' ) . '</strong>'
/* translators: %s is the brand name, e.g., 'Fleurs'. */
esc_html_x( 'We\'re %s, our mission is to deliver exquisite flower arrangements that not only adorn living spaces but also inspire a deeper appreciation for natural beauty.', 'Pattern placeholder text.', 'twentytwentyfive' ),
'<strong>' . esc_html_x( 'Fleurs', 'Example brand name.', 'twentytwentyfive' ) . '</strong>'
);
?>
</h2>
Expand Down
10 changes: 5 additions & 5 deletions patterns/banner-poster.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

?>
<!-- wp:cover {"url":"<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/poster-image-background.webp","alt":"Picture of a historical building in ruins.","dimRatio":30,"overlayColor":"contrast","isUserOverlayColor":true,"minHeight":100,"minHeightUnit":"vh","align":"full","style":{"elements":{"link":{"color":{"text":"var:preset|color|accent-1"}}},"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"textColor":"accent-1","layout":{"type":"constrained"}} -->
<div class="wp-block-cover alignfull has-accent-1-color has-text-color has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50);min-height:100vh"><span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim-30 has-background-dim"></span><img class="wp-block-cover__image-background" alt="Picture of a historical building in ruins." src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/poster-image-background.webp" data-object-fit="cover"/>
<div class="wp-block-cover alignfull has-accent-1-color has-text-color has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50);min-height:100vh"><span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim-30 has-background-dim"></span><img class="wp-block-cover__image-background" alt="<?php esc_attr_e( 'Picture of a historical building in ruins.', 'twentytwentyfive' ); ?>" src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/poster-image-background.webp" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:group {"align":"wide","style":{"dimensions":{"minHeight":"100vh"}},"layout":{"type":"flex","orientation":"vertical","verticalAlignment":"space-between","justifyContent":"stretch"}} -->
<div class="wp-block-group alignwide" style="min-height:100vh">
Expand All @@ -21,15 +21,15 @@
<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%">
<!-- wp:heading {"textAlign":"left","align":"wide","style":{"typography":{"fontSize":"12vw","lineHeight":"0.9","fontStyle":"normal","fontWeight":"300"}}} -->
<h2 class="wp-block-heading alignwide has-text-align-left" style="font-size:12vw;font-style:normal;font-weight:300;line-height:0.9">Stories, historias, iсторії, iστορίες.</h2>
<h2 class="wp-block-heading alignwide has-text-align-left" style="font-size:12vw;font-style:normal;font-weight:300;line-height:0.9"><?php echo esc_html_x( '&ldquo;Stories, historias, iсторії, iστορίες&rdquo;', 'Sample heading in four languages.', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%">
<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">Aug 08—10 2025<br>Fuego Bar, Mexico City</p>
<p class="has-text-align-right"><?php esc_html_e( 'Aug 08—10 2025', 'twentytwentyfive' ); ?><br><?php esc_html_e( 'Fuego Bar, Mexico City', 'twentytwentyfive' ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand All @@ -41,15 +41,15 @@
<!-- wp:column {"verticalAlignment":"bottom","width":"66.66%"} -->
<div class="wp-block-column is-vertically-aligned-bottom" style="flex-basis:66.66%">
<!-- wp:heading {"textAlign":"left","align":"wide","style":{"typography":{"lineHeight":"0.9","fontStyle":"normal","fontWeight":"300"}},"fontSize":"xx-large"} -->
<h2 class="wp-block-heading alignwide has-text-align-left has-xx-large-font-size" style="font-style:normal;font-weight:300;line-height:0.9">Lets hear them.</h2>
<h2 class="wp-block-heading alignwide has-text-align-left has-xx-large-font-size" style="font-style:normal;font-weight:300;line-height:0.9"><?php esc_html_e( 'Let&rsquo;s hear them.', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->
</div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"bottom","width":"33.33%"} -->
<div class="wp-block-column is-vertically-aligned-bottom" style="flex-basis:33.33%">
<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">#stories</p>
<p class="has-text-align-right"><?php esc_html_e( '#stories', 'twentytwentyfive' ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
Expand Down
14 changes: 11 additions & 3 deletions patterns/banner-with-description-and-images-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,28 @@
<!-- /wp:heading -->

<!-- wp:paragraph {"className":"is-style-text-subtitle"} -->
<p class="is-style-text-subtitle"><strong>Fleurs</strong> is a flower delivery and subscription business. Based in the EU, our mission is not only to deliver stunning flower arrangements across but also foster knowledge and enthusiasm on the beautiful gift of nature: flowers.</p>
<p class="is-style-text-subtitle">
<?php
printf(
/* translators: %s is the brand name, e.g., 'Fleurs'. */
esc_html_x( '%s is a flower delivery and subscription business. Based in the EU, our mission is not only to deliver stunning flower arrangements across but also foster knowledge and enthusiasm on the beautiful gift of nature: flowers.', 'twentytwentyfive' ),
'<strong>' . esc_html_x( 'Fleurs', 'Example brand name.', 'twentytwentyfive' ) . '</strong>'
);
?>
</p>
<!-- /wp:paragraph -->

</div>
<!-- /wp:group -->

<!-- wp:image {"aspectRatio":"16/9","scale":"cover","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/grid-flower-1.webp" alt="Photography close up of a red flower." style="aspect-ratio:16/9;object-fit:cover"/></figure>
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/grid-flower-1.webp" alt="<?php esc_attr_e( 'Photography close up of a red flower.', 'twentytwentyfive' ); ?>" style="aspect-ratio:16/9;object-fit:cover"/></figure>
<!-- /wp:image -->
</div>
<!-- /wp:group -->

<!-- wp:image {"aspectRatio":"3/4","scale":"cover","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/grid-flower-2.webp" alt="Black and white photography close up of a flower." style="aspect-ratio:3/4;object-fit:cover"/></figure>
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/grid-flower-2.webp" alt="<?php esc_attr_e( 'Black and white photography close up of a flower.', 'twentytwentyfive' ); ?>" style="aspect-ratio:3/4;object-fit:cover"/></figure>
<!-- /wp:image -->
</div>
<!-- /wp:group -->
Expand Down
Loading
Loading