Repository navigation
Bundled Themes: Place translator comments directly before their strings - #16071
mukeshpanchal27 wants to merge 3 commits into
Conversation
Some translator comments shared a line with a second translatable string, so string extraction attached them to both strings: - In Twenty Ten, Twenty Eleven, Twenty Twelve, Twenty Thirteen and Twenty Fourteen, the "%s: Date." comment for the monthly and yearly archive titles was also attached to the date format strings. - In Twenty Fourteen, the comment for the Featured Content help text was also attached to the "featured" tag slug. - In Twenty Seventeen, the "Hidden accessibility text." comment for "Previous Post" and "Next Post" was also attached to the visible "Previous" and "Next" labels. This moves each comment directly before the gettext call it describes. No string changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
There was a problem hiding this comment.
🟡 Changes recommended
The shared translator comments still describe “Previous” and “Next” as hidden accessibility text despite their visible use, and should be clarified without changing translation keys.
1 open issue
What changed in this PR
Moves translator comments directly before their intended gettext calls across six bundled themes, following the core change in #16069. Translatable strings and rendered output remain unchanged.
Changes:
- Separate archive-title translations from date-format translations.
- Reposition the Twenty Fourteen Featured Content help comment.
- Separate Twenty Seventeen’s hidden navigation labels from visible labels.
| File | Description |
|---|---|
src/wp-content/themes/twentytwelve/archive.php |
Repositions monthly and yearly archive-title comments. |
src/wp-content/themes/twentythirteen/archive.php |
Repositions monthly and yearly archive-title comments. |
src/wp-content/themes/twentyten/archive.php |
Repositions monthly and yearly archive-title comments. |
src/wp-content/themes/twentyseventeen/single.php |
Places accessibility comments directly before hidden-label translations. |
src/wp-content/themes/twentyfourteen/inc/customizer.php |
Separates the help-text comment from the featured-tag translation. |
src/wp-content/themes/twentyfourteen/archive.php |
Repositions monthly and yearly archive-title comments. |
src/wp-content/themes/twentyeleven/archive.php |
Repositions monthly and yearly archive-title comments. |
Review effort: Balanced
…nslators. "Previous" and "Next" are hidden labels in `comments.php` and visible labels in `single.php`. Both uses share one translation entry, so translators only saw the "Hidden accessibility text." comment. This adds a comment for the visible use, so the entry describes both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This is the bundled themes counterpart of #16069, which fixes the same problem in core.
Some translator comments share a line with a second translatable string. String extraction then attaches the comment to both strings, so translators see a wrong comment on the second one:
archive.php)%s: Date.on the monthly and yearly archive titlesF YandYdate format stringsinc/customizer.php)featuredtag slugThis PR moves each comment directly before the gettext call it describes, and moves the second string to a later line. No strings change, so translations are not affected.
Twenty Seventeen has a related problem. In
single.php, "Previous" and "Next" are visible labels, but they share a translation entry with the hidden labels incomments.php. Translators only saw "Hidden accessibility text." for them. This PR moves thesingle.phpcomments directly before "Previous Post" and "Next Post", and adds a comment for the visible use. The shared entry now describes both uses:How I verified it
I ran
wp i18n make-poton all six themes, before and after the change, and compared the output without the file references.featuredslug carry wrong comments.php -land PHPCS pass on all changed files.Side note, not changed here: the Twenty Fourteen help text comment lists four placeholders, but the string has three, and
%2$sis the Customizer URL, not a post editor URL. That could be fixed separately, because it changes the comment text.Trac ticket: Needs a ticket. Follow-up to the core change in #16069.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the affected strings, making the change, and checking the POT output before and after. I reviewed the final change.
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.
🤖 Generated with Claude Code