Skip to content

Plugins: Add 'hello-dolly' text domain to Hello Dolly string - #14238

Open
wprashed wants to merge 1 commit into
WordPress:trunkfrom
wprashed:fix/65676-hello-dolly-textdomain
Open

wprashed wants to merge 1 commit into
WordPress:trunkfrom
wprashed:fix/65676-hello-dolly-textdomain

Conversation

@wprashed

Copy link
Copy Markdown

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

Description

In src/wp-content/plugins/hello.php, the quote attribution string inside hello_dolly():

__( 'Quote from Hello Dolly song, by Jerry Herman:' )

was missing the second argument specifying the 'hello-dolly' text domain (declared in the plugin header Text Domain: hello-dolly). As a result, the string fell back to the default WordPress core domain, preventing translations provided by the Hello Dolly localization project on translate.wordpress.org from loading.

Solution

  • Added the 'hello-dolly' text domain to __( 'Quote from Hello Dolly song, by Jerry Herman:', 'hello-dolly' ) in hello_dolly().
  • Added a PHPUnit test in tests/phpunit/tests/plugins/helloDolly.php asserting that the 'hello-dolly' text domain is used when translating the quote attribution string.

Props: fahimmurshed, wprashed.

The quote attribution string in `hello_dolly()` was missing the 'hello-dolly' text domain argument, causing it to fall back to the default core text domain and preventing plugin translations from being loaded.

Props fahimmurshed, wprashed.
Fixes #65676.
@github-actions

github-actions Bot commented Oct 13, 2026 •

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 wprashed, ravipatel.

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.

@rvpatel

rvpatel commented Oct 13, 2026

Copy link
Copy Markdown

A test report: I have tested it.
It fails without the fix and passes with it, plus your environment. This helps a committer most.

Optional suggestions for the author:
Add the "Use of AI Tools" section from the PR template.
Use get_echo( 'hello_dolly' ) instead of ob_start() / ob_end_clean().

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.

2 participants