Opened 6 weeks ago
Closed 3 days ago
#64984 closed defect (bug) (fixed)
reply needs gettext
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | I18N | Keywords: | fixed-major dev-reviewed i18n-change |
| Focuses: | Cc: |
Description
reply is used as a noun and verb (button)
Change History (15)
#1
@
6 weeks ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 7.0
This ticket was mentioned in PR #11406 on WordPress/wordpress-develop by @sanket.parmar.
6 weeks ago
#3
- Keywords has-patch added; needs-patch removed
## Summary
Fixes the ambiguous translation of the string 'Reply' used as a button/link label in comments UI. In some languages (e.g., German), "Reply" as a noun and as an imperative verb translate differently. Without a translator context, GlotPress cannot distinguish between uses, leading to mistranslations.
Replaces all __( 'Reply' ) occurrences with _x( 'Reply', 'verb' ) and adds /* translators: */ docblock comments, consistent with the existing pattern used for _x( 'Spam', 'verb' ) in the same codebase.
## Changes
src/wp-admin/includes/dashboard.php— Use_x()for Reply button in dashboard comment actions.src/wp-admin/includes/class-wp-comments-list-table.php— Use_x()for Reply button in comments list table row actions.src/wp-includes/comment-template.php— Use_x()for defaultreply_textinget_comment_reply_link().src/js/_enqueues/admin/edit-comments.js— Exposewp.i18n._xalongsidewp.i18n.__, and use_x()for both Reply button text assignments.
## Testing
- Verify the comments admin screens (
/wp-admin/edit-comments.php) still show "Reply" buttons correctly. - Verify the comment reply link renders correctly on the front end.
- Verify the dashboard Recent Comments widget still shows a "Reply" action link.
- Optionally: confirm the new
verbcontext appears in GlotPress under thewp/devproject strings for'Reply'.
---
Trac ticket: https://core.trac.wordpress.org/ticket/64984
---
## Use of AI Tools
AI assistance: Yes
Tool(s): GitHub Copilot
Model(s): Claude Sonnet 4.6
Used for: Identifying all affected locations, implementing the _x() replacements, and drafting this PR description; changes were reviewed before submission.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
6 weeks ago
#5
@
6 weeks ago
- Keywords commit added
- Owner set to audrasjb
- Status changed from new to accepted
LGTM.
#6
@
6 weeks ago
- Keywords changes-requested added; good-first-bug commit removed
Removing commit.
This needs to be also fixed on Gutenberg's side, too.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
12 days ago
#8
@
12 days ago
- Keywords commit added; changes-requested removed
As per today's bug scrub: This needs to be fixed on Gutenberg side too, but we can always commit this patch in Core, and open a GB PR in parallel.
Re-adding commit keyword.
#12
@
4 days ago
- Keywords dev-feedback fixed-major added; has-patch commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport consideration.
To be clear, what is needed here is a context for translators, using the
_x()function.See https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context