Skip to content

I18N: Add translator context to all 'Preview' strings.#11787

Open
itzmekhokan wants to merge 1 commit intoWordPress:trunkfrom
itzmekhokan:fix/trac-64986-preview-gettext
Open

I18N: Add translator context to all 'Preview' strings.#11787
itzmekhokan wants to merge 1 commit intoWordPress:trunkfrom
itzmekhokan:fix/trac-64986-preview-gettext

Conversation

@itzmekhokan
Copy link
Copy Markdown

@itzmekhokan itzmekhokan commented May 10, 2026

https://core.trac.wordpress.org/ticket/64986
Adds translator context to all in-tree occurrences of the 'Preview' string using a simplified _x( 'Preview', 'noun' ) or _x( 'Preview', 'verb' ), so translators can correctly disambiguate it across languages (e.g. German) where the noun and verb forms differ.

  • Buttons and action links use 'verb'.
  • Preview pane labels, table row headers, and the iframe title use 'noun'.

Adds translator context to all in-tree occurrences of the 'Preview' string
using a simplified `_x( 'Preview', 'noun' )` or `_x( 'Preview', 'verb' )`,
so translators can correctly disambiguate it across languages
(e.g. German) where the noun and verb forms differ.

* Buttons and action links use `'verb'`.
* Preview pane labels, table row headers, and the iframe title use `'noun'`.

Affected files:
* src/wp-admin/customize.php
* src/wp-admin/includes/class-custom-background.php
* src/wp-admin/includes/class-custom-image-header.php
* src/wp-admin/includes/class-wp-posts-list-table.php
* src/wp-admin/includes/class-wp-theme-install-list-table.php
* src/wp-admin/includes/meta-boxes.php
* src/wp-admin/includes/post.php
* src/wp-admin/theme-install.php
* src/wp-includes/class-wp-customize-manager.php
* src/wp-includes/class-wp-editor.php

Props motylanogha, wildworks, jorbin, sergeybiryukov, audrasjb,
anupkankale, mohamedahamed, rafaeldella, t-hamano.

See #64986.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 khokansardar.

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

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

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