Skip to content

Twenty Twenty-Three: Extract pagination into pattern#6403

Closed
d-claassen wants to merge 1 commit into
WordPress:trunkfrom
d-claassen:60298-translate-2023-pagination-string
Closed

Twenty Twenty-Three: Extract pagination into pattern#6403
d-claassen wants to merge 1 commit into
WordPress:trunkfrom
d-claassen:60298-translate-2023-pagination-string

Conversation

@d-claassen

Copy link
Copy Markdown

This extracts the pagination into a pattern, which adds translation support to the pagination-previous and pagination-next labels.

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

Testing Instructions

On your WordPress installation, make sure that you have enough posts to enable pagination on archives.

Download and install Twenty Twenty-Three.

Note

At the time of writing, this only seems to work with the current Gutenberg plugin active.

Note

The labels currently aren't translated in the twentytwentythree domain. I removed the domain in the esc_html_e calls in the pagination pattern to utilize the translations from the root domain that have been translated for the link_template.php file.

View the front of the site, confirm that the pagination blocks are visible on your homepage, an archive page, and the search page. Navigate to the next page. Verify you're on the right url. Verify the labels are showing correct and the previous and next navigation points again to the right pages.

Go to settings > general and change your site language.

Once more, view the front of the site and confirm that the pagination blocks are visible on your homepage, an archive page, and the search page. The labels should be translated. Navigate to the next page. Verify you're on the right url. Verify the labels are showing correct and are translated, and the previous and next navigation points again to the right pages.


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.

This adds translation support to the pagination-previous and pagination-next labels.
@github-actions

Copy link
Copy Markdown

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 dennisatyoast.

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

@github-actions

Copy link
Copy Markdown

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.

@d-claassen

Copy link
Copy Markdown
Author

Following some thorough feedback by @carolinan, it makes most sense to close this PR. This change would be a BC break (only functioning from WordPress 6.6) and by closing this, anyone can start fresh on a backwards compatible change.

@d-claassen d-claassen closed this Apr 24, 2024
@d-claassen d-claassen deleted the 60298-translate-2023-pagination-string branch April 24, 2024 12:31
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.

1 participant