Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twenty Twenty-Five: Update text strings #8314

Closed

Conversation

carolinan
Copy link
Contributor

In Twenty Twenty-Five:

  • Remove the unnecessary context from some text strings where the translatable text was the same but the context was different. This reduces the number of strings a translator needs to work with.
  • Use straight double quotes and straight apostrophes, to follow the documentation standards.
  • Update the name of headers, to make it easier for translators to understand that they are site headers not headings.
  • Update the name of templates to make the naming more consistent. Example:
    Title: Text-only blog, home is now Title: Text blog home to match Title: News blog home etc.

Trac ticket: https://core.trac.wordpress.org/ticket/62482


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props poena.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@@ -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 esc_html_e( 'Learn More', 'twentytwentyfive' ); ?></a>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'Learn More' in the banner-intro-image and hero-full-width-image patterns would make them consistent with each other, but the existing string in cta-centered-heading has a lowercase m:

<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php esc_html_e( 'Learn more', 'twentytwentyfive' ); ?></a></div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let's use sentence case here :)

Copy link
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments :)
The idea is to avoid escaped characters as much as possible, to simplify polyglot's work.

@@ -23,7 +23,7 @@
<!-- /wp:heading -->

<!-- wp:paragraph {"fontSize":"medium"} -->
<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. 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.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></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\'s evocative imagery, Strand\'s groundbreaking modernist approach, and Kōno\'s 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.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use a curly one? I mean:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guidelines says that it should be straight:
https://make.wordpress.org/docs/style-guide/punctuation/apostrophes/

I don't feel strongly for or against, I believe it was Peter W that pointed out that it was not following the guidelines. I would have to look through Slack to find the exact comment.

I looked at the translation tool used in the project, as well as an old version of Poedit, and the escaping is not even visible in the strings. What is the problem translators are experiencing? Where is this practice documented?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to revisit this discussion in the future, but I would prefer not to edit the apostrophes in these strings when they have already been translated.

Yes, Peter pointed to the documentation style guide in a Slack thread, but that does not exactly fit text strings. Core often uses the HTML entities &#8217;, &#8220;, and &#8221; for single-quote apostrophes and curly quotes (probably "for better typography," and "Translators can use actual characters instead of entities").

In themes:

  • Twenty Twenty and TT1 have the &#8220;, and &#8221; entities in starter content block patterns.
  • In addition to TT5, both Twenty Sixteen and TT4 have “ ” curly quote characters in their patterns.

Side note: The straight quotes on the documentation handbook pages run through a content filter that replaces them with curly quote entities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then lets close this PR, because it would take longer to go through this PR again than to start over and just not include the changes in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't do it today :) Because, I need to have a weekend 😄

@@ -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 esc_html_e( 'Learn More', 'twentytwentyfive' ); ?></a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let's use sentence case here :)

@@ -25,7 +25,7 @@
<?php
echo wp_kses_post(
/* translators: This string contains the word "Stories" in four different languages with the first item in the locale's language. */
_x( 'Stories, <span lang="es">historias</span>, <span lang="uk">iсторії</span>, <span lang="el">iστορίες</span>', 'Placeholder heading in four languages.', 'twentytwentyfive' )
_x( '"Stories, <span lang="es">historias</span>, <span lang="uk">iсторії</span>, <span lang="el">iστορίες</span>"', 'Placeholder heading in four languages.', 'twentytwentyfive' )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use a curly one?

@@ -48,7 +48,7 @@
<!-- wp:column {"verticalAlignment":"bottom","width":"80%"} -->
<div class="wp-block-column is-vertically-aligned-bottom" style="flex-basis:80%">
<!-- 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"><?php esc_html_e( 'Lets hear them.', 'twentytwentyfive' ); ?></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\'s hear them.', 'twentytwentyfive' ); ?></h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use the curly one?

@@ -86,7 +86,7 @@
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group">
<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading"><a href="#"><?php esc_html_e( 'Things you didnt know about the deep ocean', 'twentytwentyfive' ); ?></a></h4>
<h4 class="wp-block-heading"><a href="#"><?php esc_html_e( 'Things you didn\'t know about the deep ocean', 'twentytwentyfive' ); ?></a></h4>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use the curly one?

@@ -28,7 +28,7 @@
<h2 class="wp-block-heading has-text-align-left" style="font-size:22rem;font-style:normal;font-weight:300;letter-spacing:-0.03em;line-height:1.4"><?php echo esc_html_x( 'Hey,', 'Example heading in pattern.', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className":"is-style-text-subtitle"} -->
<p class="is-style-text-subtitle"><?php echo esc_html_x( 'My name is Nora Winslow Keene, and Im a committed public interest attorney. Living in Denver, Colorado, Ive spent years championing the rights of underrepresented workers. A graduate of Stanford University, I played a key role in securing critical protections for agricultural laborers, ensuring better wages and access to healthcare. My work has focused on advocating for environmental justice and improving the quality of life for rural communities. Every case I take on is driven by the belief that everyone deserves dignity and fair treatment in the workplace.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
<p class="is-style-text-subtitle"><?php echo esc_html_x( 'My name is Nora Winslow Keene, and I\'m a committed public interest attorney. Living in Denver, Colorado, I\'ve spent years championing the rights of underrepresented workers. A graduate of Stanford University, I played a key role in securing critical protections for agricultural laborers, ensuring better wages and access to healthcare. My work has focused on advocating for environmental justice and improving the quality of life for rural communities. Every case I take on is driven by the belief that everyone deserves dignity and fair treatment in the workplace.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use the curly one?

@@ -35,7 +35,7 @@
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><?php echo esc_html_x( 'Im Nora, a dedicated public interest attorney based in Denver. Im a graduate of Stanford University.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
<p><?php echo esc_html_x( 'I\'m Nora, a dedicated public interest attorney based in Denver. I\'m a graduate of Stanford University.', 'Pattern placeholder text.', 'twentytwentyfive' ); ?></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use the curly one?

@@ -39,7 +39,7 @@
<!-- wp:group {"style":{"dimensions":{"minHeight":"100%"}},"layout":{"type":"flex","orientation":"vertical","verticalAlignment":"space-between","flexWrap":"nowrap","justifyContent":"stretch"}} -->
<div class="wp-block-group" style="min-height:100%">
<!-- wp:paragraph {"align":"left","style":{"typography":{"lineHeight":"1.2"}},"fontSize":"x-large"} -->
<p class="has-text-align-left has-x-large-font-size" style="line-height:1.2"><?php esc_html_e( 'Im Asahachi Kōno, a Japanese photographer, a member of Los Angeless Japanese Camera Pictorialists of California. Before returning to Japan, I worked as a photo retoucher.', 'twentytwentyfive' ); ?></p>
<p class="has-text-align-left has-x-large-font-size" style="line-height:1.2"><?php esc_html_e( 'I\'m Asahachi Kōno, a Japanese photographer, a member of Los Angeles\'s Japanese Camera Pictorialists of California. Before returning to Japan, I worked as a photo retoucher.', 'twentytwentyfive' ); ?></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of escaping a straight apostrophe, could we use the curly one?

@carolinan carolinan closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants